Ir al contenido

Actualizar un flujo conversacional

PUT
/flows/{id}
curl --request PUT \
--url https://api.matiasimpulso.com/flows/1 \
--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": {} }'

Reemplaza o actualiza la estructura de nodos, disparadores y metadatos de un flujo existente.

id
required
number

ID del flujo

Media type application/json
object
name
string
description
string
nullable
active
boolean
triggerConfig
object
steps
Array<object>
object
id
required
string
type
required
string
Allowed values: delay handoff_human send_text send_media add_tag move_funnel webhook_call condition
label
string
position
object
x
required
number
y
required
number
nextStepId
string
nullable
text
string
mediaUrl
string
mediaName
string
mediaMimeType
string
mediaType
string
Allowed values: document audio image video
caption
string
delaySeconds
number
>= 1 <= 10
tagId
number
nullable
webhookUrl
string
webhookMethod
string
Allowed values: GET POST
sendReplyFromWebhook
boolean
conditionField
string
Allowed values: message_text has_email has_tag
conditionOperator
string
Allowed values: exists contains exact starts_with
conditionValue
string
conditionTagId
number
nullable
trueStepId
string
nullable
falseStepId
string
nullable
handoffMessage
string
handoffSummary
string
postFlowAction
object

Flujo actualizado correctamente

Definición de flujo inválida

Acceso restringido a administradores

Flujo no encontrado