Create flow
Create a new flow for an agent.
Authorization
AuthorizationheaderrequiredBearer YOUR_API_KEY. Create a key in the dashboard.
Path parameters
senderIdstringrequired
Body
application/json
namestringrequiredLimitsmax length 100descriptionstringtriggerobjectrequired3 properties
typestringrequiredWhat starts a flow.
keyword: the message contains one of the words listed inkeywords. Plain substring matching, so a word inside another word still counts.intent: the message MEANS whatintentdescribes, whatever words it uses.always: any message starts it.manual: reserved. Nothing starts amanualflow today — it is accepted and stored, and no message or endpoint runs it.
One ofkeywordintentalwaysmanualkeywordsstring[]Words that start the flow, for
keywordtriggers. Matched as substrings, case-insensitively, against the whole message: a flow oninfoalso starts on "no quiero info". Useintentwhen that matters.intentstringOne plain sentence describing what the contact wants, for
intenttriggers. Any language.The message is judged for meaning, not for words, so "kiero saber el presio" starts a flow whose intent is "quiere saber precios o cotizar", and "no quiero info de precios" starts nothing.
A
keywordoralwaysflow with a higherpriorityis matched first and wins. At most 12 intent flows are considered per message, highest priority first. When the classification is unavailable or uncertain, the message is handled as if no intent matched, so a flow never starts on a guess.
stepsobject[]requiredThe first step runs on the message that started the flow. It cannot be a
conditionwithout adefaultGoto: nothing has been collected yet, so its conditions evaluate the same way on every message, and the request is refused with400 invalid_request.A flow that ends on that first message without replying hands the message to the agent, which answers it. A
transferstep stays silent.Limitsmin items 14 properties
idstringrequiredUnique step identifier.
typestringrequiredType of flow step.
One ofmessagecollectconditiontoolllmtransferconfigobjectrequiredStep configuration (varies by type).
nextStepIdstringID of the next step to execute.
enabledbooleanDefaultfalsepriorityintegerDefault0
Responses
201Flow created.
flowobjectrequired10 properties
idstringrequiredagentIdstringrequirednamestringrequireddescriptionstringtriggerobjectrequired3 properties
typestringrequiredWhat starts a flow.
keyword: the message contains one of the words listed inkeywords. Plain substring matching, so a word inside another word still counts.intent: the message MEANS whatintentdescribes, whatever words it uses.always: any message starts it.manual: reserved. Nothing starts amanualflow today — it is accepted and stored, and no message or endpoint runs it.
One ofkeywordintentalwaysmanualkeywordsstring[]Words that start the flow, for
keywordtriggers. Matched as substrings, case-insensitively, against the whole message: a flow oninfoalso starts on "no quiero info". Useintentwhen that matters.intentstringOne plain sentence describing what the contact wants, for
intenttriggers. Any language.The message is judged for meaning, not for words, so "kiero saber el presio" starts a flow whose intent is "quiere saber precios o cotizar", and "no quiero info de precios" starts nothing.
A
keywordoralwaysflow with a higherpriorityis matched first and wins. At most 12 intent flows are considered per message, highest priority first. When the classification is unavailable or uncertain, the message is handled as if no intent matched, so a flow never starts on a guess.
stepsobject[]required4 properties
idstringrequiredUnique step identifier.
typestringrequiredType of flow step.
One ofmessagecollectconditiontoolllmtransferconfigobjectrequiredStep configuration (varies by type).
nextStepIdstringID of the next step to execute.
enabledbooleanrequiredpriorityintegerrequiredPriority when multiple flows match (higher = more priority).
createdAtstring<date-time>requiredupdatedAtstring<date-time>required
400Invalid request.
codestringrequiredmessagestringrequireddetailsobject
401Unauthorized.
codestringrequiredmessagestringrequireddetailsobject
404Agent not found.
codestringrequiredmessagestringrequireddetailsobject