Chatbots (flows)
Read, create, update and activate chatbot flows for WhatsApp, Instagram and website chat. A flow is a graph of nodes (message, question with options, condition, business hours, action, delay, end…). Reading requires `chatbots:read`; writing requires `chatbots:write`.
https://app.syncro.chat/api/v1AuthX-API-Key: crm_SUA_CHAVE_AQUIKey concepts
- Versioned envelope. The flow travels inside a single
envelopeobject —{ syncro_chatbot_flow, schema_version, channel, flow, graph }— the same oneGETreturns andPOST/PUTaccepts back. - Created inactive. Flows created through the API start disabled. Activating one (
PATCH /chatbots/{id}/toggle) makes the bot start replying to real conversations — confirm with the user first. - Immutable channel. Once created, the flow's channel cannot change. A
PUTwith a different channel returnschannel_mismatch. PUTreplaces the whole graph. Do aGETfirst and send the complete envelope.validate_only: trueperforms a dry-run (always200, witherrors/warnings, without saving).- Plan features. Requires the
chatbotfeature enabled; thewebsitechannel also requireswebsite_chat.
List flows
/chatbotschatbots:readPaginated. Accepts filters by channel, status and name search.
Query parameters
channelstringoptionalwhatsapp, instagram or websiteis_activebooleanoptionalsearchstringoptionalpageintegeroptionalper_pageintegeroptionalcurl "https://app.syncro.chat/api/v1/chatbots?channel=whatsapp&is_active=true" \ -H "X-API-Key: crm_SUA_CHAVE_AQUI"
{
"success": true,
"data": [
{
"id": 12,
"name": "Boas-vindas",
"channel": "whatsapp",
"is_active": true,
"is_catch_all": false,
"trigger_type": "keyword",
"trigger_keywords": [
"oi",
"menu"
],
"whatsapp_instance_id": null,
"completions_count": 340,
"updated_at": "2026-07-19T18:00:00-03:00"
}
],
"meta": {
"total": 1,
"per_page": 30,
"current_page": 1,
"last_page": 1,
"has_more": false
}
}Fetch a flow
/chatbots/12chatbots:readReturns the flow status plus the re-importable envelope.
curl "https://app.syncro.chat/api/v1/chatbots/12" \ -H "X-API-Key: crm_SUA_CHAVE_AQUI"
{
"success": true,
"data": {
"id": 12,
"is_active": true,
"is_catch_all": false,
"whatsapp_instance_id": null,
"completions_count": 340,
"updated_at": "2026-07-19T18:00:00-03:00",
"envelope": {
"syncro_chatbot_flow": true,
"schema_version": 1,
"channel": "whatsapp",
"flow": {
"name": "Boas-vindas",
"channel": "whatsapp",
"trigger_type": "keyword",
"trigger_keywords": [
"oi",
"menu"
]
},
"graph": {
"nodes": [],
"edges": []
}
}
}
}Create a flow
/chatbotschatbots:writeThe flow is created inactive. Use PATCH /chatbots/{id}/toggle to activate it afterwards.
Body parameters
envelopeobjectrequired{ syncro_chatbot_flow, schema_version, channel, flow, graph }whatsapp_instance_idintegeroptionalis_catch_allbooleanoptionalvalidate_onlybooleanoptionalerrors/warnings without savingcurl -X POST "https://app.syncro.chat/api/v1/chatbots" \
-H "X-API-Key: crm_SUA_CHAVE_AQUI" \
-H "Content-Type: application/json" \
-d '{
"envelope": {
"syncro_chatbot_flow": true,
"schema_version": 1,
"channel": "whatsapp",
"flow": {
"name": "Boas-vindas",
"channel": "whatsapp",
"trigger_type": "keyword",
"trigger_keywords": [
"oi",
"menu"
]
},
"graph": {
"nodes": [
{
"id": "n1",
"type": "message",
"position": {
"x": 300,
"y": 200
},
"data": {
"text": "Olá! Como posso ajudar?"
}
},
{
"id": "n2",
"type": "end",
"position": {
"x": 600,
"y": 200
},
"data": {}
}
],
"edges": [
{
"id": "e1",
"source": "n1",
"sourceHandle": "default",
"target": "n2"
}
]
}
}
}'Graph rules
- A single start node — exactly one node with no incoming edge (it is the beginning of the flow).
- Branches (options) use
branch-Nhandles (hyphenated:branch-0,branch-1…), unique per node, and every branch edge needs a matchingsourceHandle. - Runtime limits: delay from 1 to 30s; native buttons ≤ 3 (label ≤ 20 characters); lists ≤ 10 items (label ≤ 24, description ≤ 72); at most 200 nodes / 400 edges; payload ≤ 2 MB.
Update a flow
/chatbots/12chatbots:writeReplaces the whole graph. Do a GET first and send the complete envelope.
Body parameters
envelopeobjectrequiredvalidate_onlybooleanoptionalerrors/warnings without savingThe channel is immutable: a PUT with a channel different from the original returns channel_mismatch.
curl -X PUT "https://app.syncro.chat/api/v1/chatbots/12" \
-H "X-API-Key: crm_SUA_CHAVE_AQUI" \
-H "Content-Type: application/json" \
-d '{
"envelope": {
"syncro_chatbot_flow": true,
"schema_version": 1,
"channel": "whatsapp",
"flow": {
"name": "Boas-vindas",
"channel": "whatsapp",
"trigger_type": "keyword",
"trigger_keywords": [
"oi",
"menu"
]
},
"graph": {
"nodes": [
{
"id": "n1",
"type": "message",
"position": {
"x": 300,
"y": 200
},
"data": {
"text": "Olá! Como posso ajudar?"
}
},
{
"id": "n2",
"type": "end",
"position": {
"x": 600,
"y": 200
},
"data": {}
}
],
"edges": [
{
"id": "e1",
"source": "n1",
"sourceHandle": "default",
"target": "n2"
}
]
}
}
}'Activate / deactivate flow
/chatbots/12/togglechatbots:writeSend { "is_active": true }. If is_active is omitted, the current state is toggled. Activating makes the bot start replying to real conversations.
Body parameters
is_activebooleanoptionalActivating re-checks the plan features: returns 403 if chatbot (or website_chat, on the website channel) is missing.
curl -X PATCH "https://app.syncro.chat/api/v1/chatbots/12/toggle" \
-H "X-API-Key: crm_SUA_CHAVE_AQUI" \
-H "Content-Type: application/json" \
-d '{
"is_active": true
}'Delete flow
/chatbots/12chatbots:writecurl -X DELETE "https://app.syncro.chat/api/v1/chatbots/12" \ -H "X-API-Key: crm_SUA_CHAVE_AQUI"
{
"success": true
}Discover what is valid
/chatbots/capabilitieschatbots:readReturns node types per channel, action subtypes, handle rules, limits and a sample envelope — it is the single source of truth for the validator. Check it before building a flow.
curl "https://app.syncro.chat/api/v1/chatbots/capabilities" \ -H "X-API-Key: crm_SUA_CHAVE_AQUI"
Node types and actions
Node types (9): message, input, condition, business_hours, action, delay, end, disable_chatbot, cards (website only).
Action subtypes (action node): change_stage, save_variable, close_conversation, send_whatsapp, add_tag, remove_tag, assign_human, assign_random_user, send_webhook, set_custom_field, assign_ai_agent, create_task, enroll_sequence, transfer_conversation, create_lead (website), redirect (website).
Error format
422 with errors: [{ path, code, message }]. E.g.: path: "graph.nodes[3].data.branches[1].handle", code: "invalid_handle".
Common codes: feature_missing, limit_reached, channel_mismatch, no_start_node, multiple_start_nodes, invalid_handle, duplicate_handle, cap_exceeded, fk_not_found, payload_too_large.