Pular para o conteúdo

POST /v1/flows

POST
/v1/flows
curl --request POST \
--url https://seu-endereco-da-api/v1/flows \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "triggerType": "nova_conversa", "folderId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'

Permissão que a Chave de acesso precisa: Gerenciar fluxos (flows:manage).

Media typeapplication/json
object
name
required
string
>= 1 characters
triggerType
required
string
Allowed values: nova_conversa mensagem_recebida palavra_chave comentario story_reply carrinho pedido_entregue deal_stage_change deal_stale conversa_encerrada tarefa_concluida tarefa_vencida webhook cron campo_de_data campo_alterado campo_vencido formulario_recebido agendamento_proximo agendamento_faltou agendamento_vaga cobranca_criada cobranca_paga cobranca_vencida cobranca_cancelada cobranca_estornada cobranca_expirada passo_sequencia negocio_ganho contato_criado
folderId
string format: uuid
Media typeapplication/json
object
id
required
string
name
required
string
status
required
string
folderId
required
string
nullable
triggerType
required
string
triggerKeyword
required
string
nullable
triggerChannel
required
string
triggerAccounts
required

Ids dos canais do gatilho; vazio atende todos os canais

Array<string>
version
required
number
origin
required
string
companionAgentId
required

Agente de IA que criou o fluxo junto com ele, quando veio de uma IA pronta

string
nullable
publishedAt
required
string format: date-time
nullable
ownerUserId
required

Who receives the notice when the flow holds or fails messages

string
nullable
ownerName
required
string
nullable
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
nodeCount
number
warnings
Array<object>
object
graph
required
object
hasWebhookToken
required
boolean
aiAction

Present on the detail: what the AI did to create this flow, if it did.

object

Example generated

{
"id": "example",
"name": "example",
"status": "example",
"folderId": "example",
"triggerType": "example",
"triggerKeyword": "example",
"triggerChannel": "example",
"triggerAccounts": [
"example"
],
"version": 1,
"origin": "example",
"companionAgentId": "example",
"publishedAt": "2026-04-15T12:00:00Z",
"ownerUserId": "example",
"ownerName": "example",
"createdAt": "2026-04-15T12:00:00Z",
"updatedAt": "2026-04-15T12:00:00Z",
"nodeCount": 1,
"warnings": [
{}
],
"graph": {},
"hasWebhookToken": true,
"aiAction": {}
}