Pular para o conteúdo principal
POST
/
v1
/
bots
/
{botId}
/
users
/
{userId}
/
flow_message
curl --request POST \
  --url https://api.jelou.ai/v1/bots/BOT_ID/users/593987654321/flow_message \
  --header 'Authorization: Basic <Base64Encoded clientId:clientSecret>' \
  --header 'Content-Type: application/json' \
  --data '{
    "title": "Olá",
    "text": "Complete este fluxo para começar",
    "caption": "Jelou",
    "parameters": {
      "flow_name": "fluxo_de_boas_vindas",
      "flow_cta": "Iniciar Fluxo",
      "flow_action_payload": {
        "screen": "RECOMMEND"
      }
    }
  }'
{}
O WhatsApp Flow deve existir previamente no Jelou para o bot indicado. É referenciado pelo seu slug em parameters.flow_name. O botId e o número do destinatário (userId, sem o sinal +) vão ambos na rota. Disponível apenas para bots com provedor WhatsApp Cloud API, Gupshup CAPI ou Aldeamo.
curl --request POST \
  --url https://api.jelou.ai/v1/bots/BOT_ID/users/593987654321/flow_message \
  --header 'Authorization: Basic <Base64Encoded clientId:clientSecret>' \
  --header 'Content-Type: application/json' \
  --data '{
    "title": "Olá",
    "text": "Complete este fluxo para começar",
    "caption": "Jelou",
    "parameters": {
      "flow_name": "fluxo_de_boas_vindas",
      "flow_cta": "Iniciar Fluxo",
      "flow_action_payload": {
        "screen": "RECOMMEND"
      }
    }
  }'

Boas Práticas

Fluxos Complexos: Use botões de fluxo para interações complexas de várias etapas que exigem entradas de formulário, seleções ou experiências guiadas. Os fluxos proporcionam uma experiência nativa do WhatsApp sem sair do chat.

Casos de Uso

  • Formulários de cadastro ou pesquisas
  • Processos de compra em várias etapas
  • Configurações guiadas
  • Experiências interativas complexas

Autorizações

Authorization
string
header
obrigatório

Basic authentication using Base64 encoded clientId:clientSecret

Parâmetros de caminho

botId
string
obrigatório

Identifier of the bot whose WhatsApp channel sends the message.

userId
string
obrigatório

Recipient's phone number, without the + sign.

Parâmetros de consulta

type
string

Type of WhatsApp Flow to send. Defaults to the standard flow type.

Corpo

application/json
title
string
obrigatório

Header shown above the Flow button.

Exemplo:

"Hello"

text
string
obrigatório

Body text shown above the Flow button.

Exemplo:

"Complete this flow to get started"

caption
string
obrigatório

Footer text shown below the Flow button.

Exemplo:

"Jelou"

parameters
object
obrigatório
payload
object

Optional extra context cached and returned with the Flow reply.

Resposta

Flow message sent

The response is of type object.