Crear un nuevo flujo conversacional
POST
/flows
const url = 'https://api.matiasimpulso.com/flows';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","description":"example","active":true,"triggerConfig":{},"steps":[{"id":"example","type":"delay","label":"example","position":{"x":1,"y":1},"nextStepId":"example","text":"example","mediaUrl":"example","mediaName":"example","mediaMimeType":"example","mediaType":"document","caption":"example","delaySeconds":1,"tagId":1,"webhookUrl":"example","webhookMethod":"GET","sendReplyFromWebhook":true,"conditionField":"message_text","conditionOperator":"exists","conditionValue":"example","conditionTagId":1,"trueStepId":"example","falseStepId":"example","handoffMessage":"example","handoffSummary":"example"}],"postFlowAction":{}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.matiasimpulso.com/flows \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "description": "example", "active": true, "triggerConfig": {}, "steps": [ { "id": "example", "type": "delay", "label": "example", "position": { "x": 1, "y": 1 }, "nextStepId": "example", "text": "example", "mediaUrl": "example", "mediaName": "example", "mediaMimeType": "example", "mediaType": "document", "caption": "example", "delaySeconds": 1, "tagId": 1, "webhookUrl": "example", "webhookMethod": "GET", "sendReplyFromWebhook": true, "conditionField": "message_text", "conditionOperator": "exists", "conditionValue": "example", "conditionTagId": 1, "trueStepId": "example", "falseStepId": "example", "handoffMessage": "example", "handoffSummary": "example" } ], "postFlowAction": {} }'Registra un nuevo flujo de automatización conversacional dentro de la empresa autenticada.
Authorizations
Sección titulada « Authorizations »Request Bodyrequired
Sección titulada « Request Bodyrequired » Media type application/json
object
name
string
description
string
active
boolean
triggerConfig
object
steps
Array<object>
object
id
required
string
type
required
string
label
string
position
object
x
required
number
y
required
number
nextStepId
string
text
string
mediaUrl
string
mediaName
string
mediaMimeType
string
mediaType
string
caption
string
delaySeconds
number
tagId
number
webhookUrl
string
webhookMethod
string
sendReplyFromWebhook
boolean
conditionField
string
conditionOperator
string
conditionValue
string
conditionTagId
number
trueStepId
string
falseStepId
string
handoffMessage
string
handoffSummary
string
postFlowAction
object
Responses
Sección titulada « Responses »Flujo creado correctamente
Definición de flujo inválida
Acceso restringido a administradores