Call it
curl https://api.peume.com/v1/call/whatsapp-send-flow-message \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"accountId": "your accountId",
"to": "your to",
"flow_id": "your flow id",
"flow_cta": "your flow cta",
"flow_action": "navigate",
"body": "your body"
}
}'const res = await fetch("https://api.peume.com/v1/call/whatsapp-send-flow-message", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"accountId": "your accountId",
"to": "your to",
"flow_id": "your flow id",
"flow_cta": "your flow cta",
"flow_action": "navigate",
"body": "your body"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/whatsapp-send-flow-message",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"accountId": "your accountId",
"to": "your to",
"flow_id": "your flow id",
"flow_cta": "your flow cta",
"flow_action": "navigate",
"body": "your body"
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: whatsapp-send-flow-message.
Parameters
accountIdRequiredstringWhatsApp account ID
toRequiredstringRecipient phone number (E.164 format, e.g. +1234567890)
flow_idRequiredstringPublished flow ID
flow_ctaRequiredstringCTA button text (e.g. 'Book Now', 'Sign Up')
flow_actionstringAction type: navigate opens a screen directly, data_exchange hits your endpoint first
navigate · data_exchange
Example: navigate
flow_tokenstringUnique token to correlate responses. If omitted, auto-generated as '<flowId>:<uuid>' so the response can be attributed to this flow in the Flow Responses view.
flow_action_payloadobjectbodyRequiredstringMessage body text
headerobjectfooterstringOptional footer text
draftbooleanSet true to test an unpublished (DRAFT) flow
