A programmable Call Flow puts your server in control of an inbound phone call. Whippy handles
the telephony: it answers the call, plays audio, collects keypad input, dials people, and records
voicemail. Your server decides what happens next.
The two sides talk in a loop:
- Something happens on the call. Whippy sends your webhook URL an event (an HTTP
POST). - Your server replies with a command that says what Whippy should do next.
- Whippy runs the command. When it finishes or the caller does something, Whippy sends the next event.
Every event Whippy sends is described here, along with every command you can reply with. Each command
section says what it does, what Whippy sends next, and which replies you can return.
What you need
- An HTTPS endpoint that accepts
POSTrequests with a JSON body. - A Call Flow whose
webhook_config.urlpoints at that endpoint. See
Create programmable call flow. - Optional: an API key that signs each request. Set it as
webhook_config.signing_api_key_id.
Without one, requests are not signed. If you set a key that is inactive or no longer exists,
Whippy does not send the request. The caller hears the spoken error message and the call ends.
A Call Flow is either programmable or static, never both. A static Call Flow keeps its menus and
actions in Whippy (ivr_flow_config). A programmable one has only webhook_config, and your server
decides every step.
The basics
What every request from Whippy looks like
Every request is a POST with a JSON body and these headers.
| Header | Value |
|---|---|
Content-Type | application/json |
X-Whippy-Event | The event name. The same as event in the body. |
X-Whippy-Delivery-Id | The delivery id. The same as request_id in the body. It stays the same if Whippy retries. |
X-Whippy-Signature | Only when you set a signing key. See Verify signatures. |
Every event uses the same body shape. The values change from one event to the next, and
data.input and data.forward are set only on the events that carry them.
{
"api_version": "v1",
"event": "call_flow.run.started",
"request_id": "f1eebc99-9c0b-4ef8-bb6d-6bb9bd380a01",
"created_at": "2026-07-01T12:00:00.100000Z",
"data": {
"call": {
"id": "a1eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"direction": "inbound",
"from": "+15551234567",
"to": "+15559876543",
"delivery_status": "call_in_progress",
"call_flow_run_id": "b1eebc99-9c0b-4ef8-bb6d-6bb9bd380a22"
},
"contact": { "id": "c1eebc99-9c0b-4ef8-bb6d-6bb9bd380a33", "name": "Prakash" },
"channel": { "id": "d1eebc99-9c0b-4ef8-bb6d-6bb9bd380a44", "name": "Support Line" },
"input": null,
"forward": null,
"customer_state": null
}
}| Field | Description |
|---|---|
api_version | Always "v1". |
event | The event name. Branch on this. |
request_id | A unique id for this delivery. Use it to spot a repeat. |
created_at | When Whippy created the event, in UTC, with microseconds. |
data.call.id | The id of the call. |
data.call.direction | "inbound". Call Flows handle inbound calls. |
data.call.from | The caller's number, in E.164 format. |
data.call.to | The number that was called, in E.164 format. |
data.call.delivery_status | The call's current status in Whippy. call_in_progress while the caller is on the line. call_completed and similar once the call is over. |
data.call.call_flow_run_id | The id of this run of the Call Flow. It is the same in every event of one call. |
data.contact | The caller's contact (id and name). null when Whippy has no contact for the caller. |
data.channel | The channel that took the call (id and name). |
data.input | The caller's keypad input. Set only for call_flow.input.received. Otherwise null. |
data.forward | The result of a dial. Set only for call_flow.forward.* events. Otherwise null. |
data.customer_state | The customer_state you sent in an earlier reply, returned unchanged. null until you send one. |
What every reply from you looks like
Reply to every request with an HTTP 2xx status and a JSON body that holds one command and, optionally,
your own state.
{
"action": {
"command": "menu",
"arg": {
"prompt": { "content_type": "text", "content": "Press 1 for sales, 2 for support." },
"timeout_secs": 10,
"reference_key": "main_menu"
}
},
"customer_state": { "step": "awaiting_menu" }
}| Field | Required | Description |
|---|---|---|
action | Yes | One object with a command and an arg. Whippy runs it. |
action.command | Yes | What to do. One of the eight commands. |
action.arg | Yes | The settings for the command, as a JSON object. Only end_call accepts null. |
customer_state | No | Your own data, as a JSON object. Whippy stores it and returns it as data.customer_state in later requests for this call. Leave it out to keep the stored value. Send {} to clear it. |
Rules for every reply:
- Send exactly one
action. Anactionsarray is rejected. - Put the settings in
argas an object. A string such as"arg": "main_menu"is rejected. - The only top-level keys are
actionandcustomer_state. Any other key is rejected. - Keep the body under 64 KB.
- Write phone numbers in E.164 format, for example
+14155552671.
If a reply breaks a rule, Whippy cannot tell what you meant. The caller hears a short spoken error
message and the call ends. Common mistakes lists the cases.
customer_state: remembering things between requests
customer_state: remembering things between requestscustomer_state lets you keep your own data for the length of the call without a database. Send
it in any reply. Whippy stores it and returns it in data.customer_state on every later request
for the same call. Whippy does not read it, so the contents are up to you. Every reply still needs
an action, so send customer_state next to it:
{
"action": {
"command": "menu",
"arg": {
"prompt": { "content_type": "text", "content": "Press 1 for sales, 2 for support." },
"timeout_secs": 10,
"reference_key": "main_menu"
}
},
"customer_state": { "step": "awaiting_menu", "crm_ticket_id": "12345" }
}Your endpoint has to be fast
The caller is on the line while Whippy waits for you.
- Whippy waits 1 second to connect and 5 seconds for your reply.
- On a timeout or a
5xxstatus, Whippy tries once more, with the same body and the same
X-Whippy-Delivery-Id. A4xxstatus is not retried. - Your endpoint can receive the same event twice. Use
X-Whippy-Delivery-Idto recognize a retry.
Do not repeat its side effects, such as a CRM write. Return the command you saved for that
delivery, so the caller gets the same step. - If Whippy gets no valid reply (a timeout, an error status, or an invalid body, including after the
retry), the caller hears a short spoken error message and the call ends.
Step 1: The call starts (call_flow.run.started)
call_flow.run.started)When a caller dials a channel that has a programmable Call Flow, Whippy sends
call_flow.run.started to your webhook URL. This is always the first request. It is sent once per
call.
What Whippy sends
{
"api_version": "v1",
"event": "call_flow.run.started",
"request_id": "f1eebc99-9c0b-4ef8-bb6d-6bb9bd380a01",
"created_at": "2026-07-01T12:00:00.100000Z",
"data": {
"call": {
"id": "a1eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"direction": "inbound",
"from": "+15551234567",
"to": "+15559876543",
"delivery_status": "call_in_progress",
"call_flow_run_id": "b1eebc99-9c0b-4ef8-bb6d-6bb9bd380a22"
},
"contact": { "id": "c1eebc99-9c0b-4ef8-bb6d-6bb9bd380a33", "name": "Prakash" },
"channel": { "id": "d1eebc99-9c0b-4ef8-bb6d-6bb9bd380a44", "name": "Support Line" },
"input": null,
"forward": null,
"customer_state": null
}
}input and forward are null, and customer_state is null because you have not stored
anything yet. Use data.call.from and data.contact to look the caller up in your own systems.
What you can reply with
Your reply is the first step on the call. You can reply with any of the eight commands.
| Command | Use it to |
|---|---|
menu | Play a prompt and collect keypad input. |
forward_to_phone_number | Connect the caller to a phone number. |
forward_to_user | Connect the caller to a Whippy user. |
forward_to_agent | Hand the caller to an AI agent. |
forward_to_team | Ring several people at once. |
ring_channel_user | Ring the users subscribed to the channel. |
voicemail | Let the caller leave a message. |
end_call | Say goodbye and hang up. |
The commands
| Command | What the caller experiences | What Whippy sends next |
|---|---|---|
menu | Hears a prompt, then presses keys. | call_flow.input.received after the caller presses keys. call_flow.status.updated if the timeout runs out. |
forward_to_phone_number | Hears ringing, then talks to a phone number. | call_flow.forward.* when the dial ends. |
forward_to_user | Hears ringing, then talks to a Whippy user. | call_flow.forward.* when the dial ends. |
forward_to_agent | Is connected to an AI agent. | call_flow.forward.* when the transfer ends. |
forward_to_team | Hears ringing while several people are called. | call_flow.forward.* when the dial ends. |
ring_channel_user | Hears ringing while the channel's users are called. | call_flow.forward.* when the dial ends. |
voicemail | Hears a prompt, then leaves a message. | call_flow.status.updated after the call ends. |
end_call | Optionally hears a prompt, then the call ends. | call_flow.status.updated after the call ends. |
voicemail and end_call are final. Whippy never asks you for another step after them. The other
six commands come back to your webhook.
Prompts
Several commands take a prompt.
| Field | Required | Description |
|---|---|---|
content_type | Yes | "text" or "recording_url". |
content | Yes | For "text", the words to speak. For "recording_url", a public URL of an audio file. |
Whippy speaks text with the voice_type and voice_language set on your Call Flow.
{ "content_type": "text", "content": "Thanks for calling Whippy." }{ "content_type": "recording_url", "content": "https://cdn.example.com/prompts/greeting.mp3" }menu
menuWhat it does. Plays a prompt to the caller and waits for them to press keys on their phone. The
caller can press a key while the prompt is still playing. Menus take keypad input only. They do not
take speech.
When to use it. Use it to let the caller choose ("Press 1 for sales"), or to collect digits
such as an extension or an account number.
Your reply
| Field | Required | Description |
|---|---|---|
prompt | Yes | A prompt. |
timeout_secs | Yes | How long Whippy waits for a key, as a whole number from 1 to 60. |
reference_key | Yes | A label of your choice. Whippy returns it in data.input.reference_key, so you can tell your menus apart. |
{
"action": {
"command": "menu",
"arg": {
"prompt": { "content_type": "text", "content": "Thanks for calling Whippy. Press 1 for sales, 2 for support." },
"timeout_secs": 10,
"reference_key": "main_menu"
}
},
"customer_state": { "step": "awaiting_menu" }
}How the waiting works:
- After the caller presses a key, Whippy waits
timeout_secsfor another key before it sends the
event. The caller can press#to send right away. The#is not included indigits. - The caller can press more than one key, so
digitscan be"1","12", or"4521".
What Whippy sends next
If the caller pressed keys, Whippy sends call_flow.input.received. data.input holds the
keys, and reference_key is the label you set on the menu.
{
"api_version": "v1",
"event": "call_flow.input.received",
"request_id": "f1eebc99-9c0b-4ef8-bb6d-6bb9bd380a02",
"created_at": "2026-07-01T12:00:08.350000Z",
"data": {
"call": {
"id": "a1eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"direction": "inbound",
"from": "+15551234567",
"to": "+15559876543",
"delivery_status": "call_in_progress",
"call_flow_run_id": "b1eebc99-9c0b-4ef8-bb6d-6bb9bd380a22"
},
"contact": { "id": "c1eebc99-9c0b-4ef8-bb6d-6bb9bd380a33", "name": "Prakash" },
"channel": { "id": "d1eebc99-9c0b-4ef8-bb6d-6bb9bd380a44", "name": "Support Line" },
"input": { "digits": "1", "speech_result": null, "reference_key": "main_menu" },
"forward": null,
"customer_state": { "step": "awaiting_menu" }
}
}| Field | Description |
|---|---|
data.input.digits | The keys the caller pressed, without the #. |
data.input.speech_result | Always null. Menus take keypad input only. |
data.input.reference_key | The reference_key from the menu you sent. |
If the caller pressed nothing before timeout_secs ran out, Whippy sends
call_flow.status.updated while the call is still live. data.call.delivery_status is
call_in_progress, and there is no data.input. Your reply is run, so the caller is waiting for
you.
{
"api_version": "v1",
"event": "call_flow.status.updated",
"request_id": "f1eebc99-9c0b-4ef8-bb6d-6bb9bd380a05",
"created_at": "2026-07-01T12:00:20.500000Z",
"data": {
"call": {
"id": "a1eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"direction": "inbound",
"from": "+15551234567",
"to": "+15559876543",
"delivery_status": "call_in_progress",
"call_flow_run_id": "b1eebc99-9c0b-4ef8-bb6d-6bb9bd380a22"
},
"contact": { "id": "c1eebc99-9c0b-4ef8-bb6d-6bb9bd380a33", "name": "Prakash" },
"channel": { "id": "d1eebc99-9c0b-4ef8-bb6d-6bb9bd380a44", "name": "Support Line" },
"input": null,
"forward": null,
"customer_state": { "step": "awaiting_menu" }
}
}To tell this event apart from the final one, read data.call.delivery_status. If it is
call_in_progress, the caller is still on the line and Whippy runs your reply. If it is a final
status such as call_completed, the call is over. See
The call ends.
What you can reply to these events
| The caller | Event | Reply with |
|---|---|---|
Pressed a key you offered, for example 1 | call_flow.input.received | The command for that choice. For 1 (sales), forward_to_user to Marcos Paulo. |
Pressed a key you did not offer, for example 9 | call_flow.input.received | menu again, with the options repeated. |
| Pressed nothing | call_flow.status.updated with call_in_progress | menu again, or voicemail, or a forward_* command. |
Example reply to 1. Whippy rings Marcos Paulo (user 42):
{
"action": {
"command": "forward_to_user",
"arg": { "user_id": "42" }
},
"customer_state": { "step": "dialing_sales", "attempt": 1 }
}Example reply to a key you did not offer. Whippy plays the menu again:
{
"action": {
"command": "menu",
"arg": {
"prompt": { "content_type": "text", "content": "Sorry, that is not an option. Press 1 for sales, 2 for support." },
"timeout_secs": 10,
"reference_key": "main_menu"
}
}
}forward_to_phone_number
forward_to_phone_numberWhat it does. Dials a phone number. The caller hears ringing. If the person answers, the caller
and the person talk. When the dial ends for any reason, Whippy sends you the result.
When to use it. Use it to send the caller to an external number, such as a mobile phone or an
answering service.
Your reply
| Field | Required | Description |
|---|---|---|
phone_number | Yes | The number to dial, in E.164 format. |
caller_id | No | The number the person sees. "channel" shows your Whippy channel number. "caller" shows the original caller's number. Default: "channel". |
{
"action": {
"command": "forward_to_phone_number",
"arg": { "phone_number": "+14155552671", "caller_id": "channel" }
},
"customer_state": { "step": "dialing_mobile" }
}What Whippy sends next
When the dial ends, Whippy sends a call_flow.forward.* event. The event name is the result.
This example is a busy line:
{
"api_version": "v1",
"event": "call_flow.forward.call_busy",
"request_id": "f1eebc99-9c0b-4ef8-bb6d-6bb9bd380a06",
"created_at": "2026-07-01T12:00:14.800000Z",
"data": {
"call": {
"id": "a1eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"direction": "inbound",
"from": "+15551234567",
"to": "+15559876543",
"delivery_status": "call_in_progress",
"call_flow_run_id": "b1eebc99-9c0b-4ef8-bb6d-6bb9bd380a22"
},
"contact": { "id": "c1eebc99-9c0b-4ef8-bb6d-6bb9bd380a33", "name": "Prakash" },
"channel": { "id": "d1eebc99-9c0b-4ef8-bb6d-6bb9bd380a44", "name": "Support Line" },
"input": null,
"forward": {
"status": "call_busy",
"to": "+14155552671",
"from": "+15551234567",
"dial_call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"parent_call_sid": "CAbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
},
"customer_state": { "step": "dialing_mobile" }
}
}All the possible results are listed in Forward results.
What you can reply
| Result | Reply with |
|---|---|
call_flow.forward.call_no_answer or call_flow.forward.call_busy | Another forward_to_phone_number to a different number, or voicemail. |
call_flow.forward.call_failed | Another forward_to_phone_number, or voicemail, or end_call. |
call_flow.forward.call_completed | end_call. |
Example reply to a busy line. Whippy tries a second number:
{
"action": {
"command": "forward_to_phone_number",
"arg": { "phone_number": "+14155552672", "caller_id": "channel" }
},
"customer_state": { "step": "dialing_backup_mobile" }
}forward_to_user
forward_to_userWhat it does. Rings one Whippy user. Whippy rings the user in the Whippy app, and on any desk
phone linked to the user. If the user answers, the caller and the user talk.
When to use it. Use it to route the caller to a named person, such as the sales rep for a
caller who pressed 1.
Your reply
| Field | Required | Description |
|---|---|---|
user_id | Yes | The user's id, as a string, for example "42". The user must belong to the Call Flow's organization. |
{
"action": {
"command": "forward_to_user",
"arg": { "user_id": "42" }
},
"customer_state": { "step": "dialing_sales", "attempt": 1 }
}Whippy only dials the user if the user is set up to receive incoming call alerts for the channel
(and is not paused or in Do Not Disturb). A user who is already on a call is rung on their desk
phones only. If the user has no desk phone, Whippy cannot dial them.
When Whippy cannot dial the user, the caller hears the spoken error message and the call ends. You
do not get a call_flow.forward.* event in that case.
What Whippy sends next
When the dial ends, Whippy sends a call_flow.forward.* event. This example is a user who did not
answer:
{
"api_version": "v1",
"event": "call_flow.forward.call_no_answer",
"request_id": "f1eebc99-9c0b-4ef8-bb6d-6bb9bd380a03",
"created_at": "2026-07-01T12:00:38.900000Z",
"data": {
"call": {
"id": "a1eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"direction": "inbound",
"from": "+15551234567",
"to": "+15559876543",
"delivery_status": "call_in_progress",
"call_flow_run_id": "b1eebc99-9c0b-4ef8-bb6d-6bb9bd380a22"
},
"contact": { "id": "c1eebc99-9c0b-4ef8-bb6d-6bb9bd380a33", "name": "Prakash" },
"channel": { "id": "d1eebc99-9c0b-4ef8-bb6d-6bb9bd380a44", "name": "Support Line" },
"input": null,
"forward": {
"status": "call_no_answer",
"to": "client:user_42",
"from": "+15551234567",
"dial_call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"parent_call_sid": "CAbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
},
"customer_state": { "step": "dialing_sales", "attempt": 1 }
}
}data.forward.to shows client:user_42 for a Whippy user. All the possible results are listed in
Forward results.
What you can reply
| Result | Reply with |
|---|---|
call_flow.forward.call_no_answer or call_flow.forward.call_busy | voicemail, or forward_to_user for a different user, or forward_to_team. |
call_flow.forward.call_failed | voicemail, or another forward, or end_call. |
call_flow.forward.call_completed | end_call. |
Example reply to a no-answer. The caller leaves a message:
{
"action": {
"command": "voicemail",
"arg": {
"prompt": { "content_type": "text", "content": "Sorry we missed you. Please leave a message after the beep." },
"notification_emails": ["[email protected]"]
}
},
"customer_state": { "step": "voicemail", "attempt": 1 }
}forward_to_agent
forward_to_agentWhat it does. Transfers the caller to an AI agent. The agent talks with the caller. When the
transfer ends, Whippy sends you the result.
When to use it. Use it to hand the call to an AI agent instead of a person, for example for
after-hours calls or for simple questions.
Your reply
| Field | Required | Description |
|---|---|---|
agent_id | Yes | The agent's id, as a string. The agent must belong to your organization. |
{
"action": {
"command": "forward_to_agent",
"arg": { "agent_id": "9079b695-8421-44ee-bad4-386f5c8b04cf" }
},
"customer_state": { "step": "with_agent" }
}What Whippy sends next
When the transfer ends, Whippy sends a call_flow.forward.* event. This example is an agent who did
not answer. The example leaves out to. Do not rely on to for an agent transfer. For all the
events, see Forward results.
{
"api_version": "v1",
"event": "call_flow.forward.call_no_answer",
"request_id": "f1eebc99-9c0b-4ef8-bb6d-6bb9bd380a05",
"created_at": "2026-07-01T12:02:10.400000Z",
"data": {
"call": {
"id": "a1eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"direction": "inbound",
"from": "+15551234567",
"to": "+15559876543",
"delivery_status": "call_in_progress",
"call_flow_run_id": "b1eebc99-9c0b-4ef8-bb6d-6bb9bd380a22"
},
"contact": { "id": "c1eebc99-9c0b-4ef8-bb6d-6bb9bd380a33", "name": "Prakash" },
"channel": { "id": "d1eebc99-9c0b-4ef8-bb6d-6bb9bd380a44", "name": "Support Line" },
"input": null,
"forward": {
"status": "call_no_answer",
"from": "+15551234567",
"dial_call_sid": "CAcccccccccccccccccccccccccccccccc",
"parent_call_sid": "CAbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
},
"customer_state": { "step": "with_agent" }
}
}What you can reply
| Result | Reply with |
|---|---|
call_flow.forward.call_completed | end_call. |
call_flow.forward.call_no_answer, call_flow.forward.call_busy, or call_flow.forward.call_failed | voicemail, or a forward_to_user or forward_to_team to reach a person, or end_call. |
forward_to_team
forward_to_teamWhat it does. Rings a list of people at the same time. The first person to answer gets the call.
The list can mix Whippy users, phone numbers, AI agents, and whole channels.
When to use it. Use it to ring a group, such as everyone on the sales team, instead of one
person.
Your reply
| Field | Required | Description |
|---|---|---|
members | Yes | A list with at least one member. Each member is { "type": "...", "value": "..." }. |
Member type | value |
|---|---|
user_id | A Whippy user id, as a string. |
number | A phone number in E.164 format. |
agent | An AI agent id. |
channel_id | A channel id. Whippy replaces it with the users subscribed to that channel. |
In this example, user 42 is Marcos Paulo and user 7 is Mauricio Holanda.
{
"action": {
"command": "forward_to_team",
"arg": {
"members": [
{ "type": "user_id", "value": "42" },
{ "type": "user_id", "value": "7" },
{ "type": "number", "value": "+15550001111" }
]
}
},
"customer_state": { "step": "dialing_team", "attempt": 1 }
}How the dial works:
- Whippy rings at most 10 members at once. Members past the tenth are not called.
- Whippy skips users who are not set up for incoming call alerts. It also skips users who are
already on a call and have no desk phone. - Each reply is a fresh list. Whippy does not remember who it already rang, so sending the same
list again rings the same people again. ring_orderis not allowed here. Sendmembersonly.- If nobody on the list can be called, the caller hears the spoken error message and the call ends.
You do not get acall_flow.forward.*event in that case.
What Whippy sends next
When the dial ends, Whippy sends a call_flow.forward.* event. A team dial can add two fields to
data.forward that tell you who was and was not called:
attempted_memberslists the members Whippy rang.remaining_memberslists the members Whippy did not ring, in three groups.
Both are left out when everyone on your list was called. This example is a team dial where nobody
answered, and some members were not called:
{
"api_version": "v1",
"event": "call_flow.forward.call_no_answer",
"request_id": "f1eebc99-9c0b-4ef8-bb6d-6bb9bd380a07",
"created_at": "2026-07-01T12:00:40.100000Z",
"data": {
"call": {
"id": "a1eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"direction": "inbound",
"from": "+15551234567",
"to": "+15559876543",
"delivery_status": "call_in_progress",
"call_flow_run_id": "b1eebc99-9c0b-4ef8-bb6d-6bb9bd380a22"
},
"contact": { "id": "c1eebc99-9c0b-4ef8-bb6d-6bb9bd380a33", "name": "Prakash" },
"channel": { "id": "d1eebc99-9c0b-4ef8-bb6d-6bb9bd380a44", "name": "Support Line" },
"input": null,
"forward": {
"status": "call_no_answer",
"to": "client:user_42",
"from": "+15551234567",
"dial_call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"parent_call_sid": "CAbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
"attempted_members": [
{ "type": "user_id", "value": "42" },
{ "type": "user_id", "value": "7" }
],
"remaining_members": {
"overflow": [{ "type": "user_id", "value": "11" }],
"alert_filtered": [{ "type": "user_id", "value": "99" }],
"on_call_filtered": []
}
},
"customer_state": { "step": "dialing_team", "attempt": 1 }
}
}| Field | Meaning |
|---|---|
attempted_members | Members Whippy rang in this attempt. |
remaining_members.overflow | Members past the limit of 10 at once. They were not called. |
remaining_members.alert_filtered | Users who do not receive incoming call alerts. They were not called. |
remaining_members.on_call_filtered | Users already on another call who have no desk phone to ring. They were not called. |
Each member has a type (user_id, number, or agent) and a value. If you sent a channel_id,
Whippy replaces it with the users on that channel, so you never see channel_id here. Whippy never
calls the remaining members for you. Your reply decides what happens next.
What you can reply
| Result | Reply with |
|---|---|
call_flow.forward.call_no_answer with people in remaining_members.overflow | A new forward_to_team that lists the overflow members. |
call_flow.forward.call_no_answer with nobody left to call | voicemail, or forward_to_phone_number to a fallback number, or end_call. |
call_flow.forward.call_busy or call_flow.forward.call_failed | voicemail, or another forward, or end_call. |
call_flow.forward.call_completed | end_call. |
Example reply that calls the overflow members from the event above:
{
"action": {
"command": "forward_to_team",
"arg": {
"members": [
{ "type": "user_id", "value": "11" }
]
}
},
"customer_state": { "step": "dialing_team", "attempt": 2 }
}ring_channel_user
ring_channel_userWhat it does. Rings the users who are subscribed to the channel that took the call. The caller
hears ringing. ring_order decides the order Whippy rings them in.
When to use it. Use it to ring whoever is assigned to the channel in Whippy, without listing
people yourself.
Your reply
| Field | Required | Description |
|---|---|---|
ring_order | Yes | "sequential", "batch", or "random". Sets how Whippy orders the channel's users. |
{
"action": {
"command": "ring_channel_user",
"arg": { "ring_order": "batch" }
},
"customer_state": { "step": "ringing_channel" }
}Whippy keeps track of which users it has already rung. Sending the same command again after a
no-answer continues with the next user or batch.
When there is nobody left to ring, Whippy cannot dial. The caller hears the spoken error message
and the call ends. You do not get a call_flow.forward.* event in that case.
What Whippy sends next
When the dial ends, Whippy sends a call_flow.forward.* event. This example is a user who did not
answer. Resend ring_channel_user to ring the next user or batch. For all the events, see
Forward results.
{
"api_version": "v1",
"event": "call_flow.forward.call_no_answer",
"request_id": "f1eebc99-9c0b-4ef8-bb6d-6bb9bd380a06",
"created_at": "2026-07-01T12:03:45.100000Z",
"data": {
"call": {
"id": "a1eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"direction": "inbound",
"from": "+15551234567",
"to": "+15559876543",
"delivery_status": "call_in_progress",
"call_flow_run_id": "b1eebc99-9c0b-4ef8-bb6d-6bb9bd380a22"
},
"contact": { "id": "c1eebc99-9c0b-4ef8-bb6d-6bb9bd380a33", "name": "Prakash" },
"channel": { "id": "d1eebc99-9c0b-4ef8-bb6d-6bb9bd380a44", "name": "Support Line" },
"input": null,
"forward": {
"status": "call_no_answer",
"to": "client:user_42",
"from": "+15551234567",
"dial_call_sid": "CAdddddddddddddddddddddddddddddddd",
"parent_call_sid": "CAbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
},
"customer_state": { "step": "ringing_channel" }
}
}What you can reply
| Result | Reply with |
|---|---|
call_flow.forward.call_no_answer | ring_channel_user again to ring the next user or batch, or voicemail. |
call_flow.forward.call_busy or call_flow.forward.call_failed | ring_channel_user again, or voicemail, or end_call. |
call_flow.forward.call_completed | end_call. |
Forward results (call_flow.forward.*)
call_flow.forward.*)Whippy sends one of these events when a dial ends. This applies to forward_to_phone_number,
forward_to_user, forward_to_agent, forward_to_team, and ring_channel_user. The event name
tells you what happened. The details are in data.forward.
| Event | What happened |
|---|---|
call_flow.forward.call_completed | Someone answered, and the forwarded call then ended. |
call_flow.forward.call_no_answer | The phone rang and nobody answered. |
call_flow.forward.call_busy | The line was busy. |
call_flow.forward.call_failed | The call could not be connected. |
call_flow.forward.call_cancelled | The call was cancelled before anyone answered. |
call_flow.forward.completed | The phone provider reported a status Whippy does not recognise. Treat this as the catch-all. |
data.forward has these fields:
| Field | Description |
|---|---|
status | The result. The same as the end of the event name, for example call_no_answer. For call_flow.forward.completed, it is the raw status string from the phone provider. |
to | Who was dialled, for example client:user_42 for a Whippy user, or a phone number. |
from | The caller's number, as the phone provider reported it on the dial. |
dial_call_sid | The id of the forwarded call leg. |
parent_call_sid | The id of the original inbound call leg. |
attempted_members | Only after forward_to_team. See forward_to_team. |
remaining_members | Only after forward_to_team. See forward_to_team. |
Whippy runs your reply on the caller's call, so the caller is still on the line when you reply. If
the caller hangs up while the dial is ringing, you still get the event, but your reply has no
effect.
voicemail
voicemailWhat it does. Plays your prompt, then records a message from the caller. The caller speaks, and
then hangs up. Whippy keeps the recording.
When to use it. Use it when nobody can take the call, for example after a no-answer or outside
business hours.
Your reply
| Field | Required | Description |
|---|---|---|
prompt | Yes | A prompt, played before the recording starts. |
notification_emails | No | Up to 10 email addresses to notify about the new voicemail. |
{
"action": {
"command": "voicemail",
"arg": {
"prompt": { "content_type": "text", "content": "Please leave a message after the beep." },
"notification_emails": ["[email protected]"]
}
},
"customer_state": { "step": "voicemail" }
}What Whippy sends next
Whippy does not send an event for the recording itself. When the caller hangs up, Whippy sends
call_flow.status.updated with a final status. See
The call ends.
What you can reply
Nothing runs. voicemail is final, and Whippy does not ask you for another step.
end_call
end_callWhat it does. Ends the call. The caller can hear a closing message first.
When to use it. Use it when the conversation is finished, or as the last step after a forwarded
call completes.
Your reply
arg can be null or an object.
arg | What happens |
|---|---|
null | Whippy plays the Call Flow's closing greeting if it has one, then ends the call. |
{ "prompt": ... } | Whippy plays your prompt, then ends the call. |
{
"action": {
"command": "end_call",
"arg": { "prompt": { "content_type": "text", "content": "Thanks for calling Whippy. Goodbye." } }
},
"customer_state": { "step": "done" }
}{
"action": { "command": "end_call", "arg": null }
}What Whippy sends next
When the call has ended, Whippy sends call_flow.status.updated with a final status. See
The call ends.
What you can reply
Nothing runs. end_call is final.
The call ends (call_flow.status.updated)
call_flow.status.updated)When the call reaches a final status, Whippy sends call_flow.status.updated. The final statuses
are completed, busy, no answer, failed, and cancelled. Whippy does not send updates for ringing or
in-progress while the call is live, with one exception: when a menu times out with no key
pressed, Whippy sends call_flow.status.updated while the call is still live. Check
data.call.delivery_status before you treat this event as the end of the call. call_in_progress
means the caller is still waiting for your reply.
This event comes after every call, whichever way it ended: the caller hung up, you sent end_call,
the caller finished a voicemail, or a forwarded call ended and the caller hung up.
What Whippy sends
data.call.delivery_status holds the final status. input and forward are null.
{
"api_version": "v1",
"event": "call_flow.status.updated",
"request_id": "f1eebc99-9c0b-4ef8-bb6d-6bb9bd380a04",
"created_at": "2026-07-01T12:01:21.400000Z",
"data": {
"call": {
"id": "a1eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"direction": "inbound",
"from": "+15551234567",
"to": "+15559876543",
"delivery_status": "call_completed",
"call_flow_run_id": "b1eebc99-9c0b-4ef8-bb6d-6bb9bd380a22"
},
"contact": { "id": "c1eebc99-9c0b-4ef8-bb6d-6bb9bd380a33", "name": "Prakash" },
"channel": { "id": "d1eebc99-9c0b-4ef8-bb6d-6bb9bd380a44", "name": "Support Line" },
"input": null,
"forward": null,
"customer_state": { "step": "voicemail" }
}
}What you can reply
The call is over, so Whippy does not run your reply. Use this event to update your own records, for
example to close a ticket. Reply 200 with any valid command, for example:
{
"action": { "command": "end_call", "arg": null }
}The final event can arrive more than once for the same call. Whippy also sends this event while the
call is live, when a menu times out, and that live event has the same
data.call.call_flow_run_id and event as the final one. Check data.call.delivery_status first
and handle live (call_in_progress) and final statuses separately. Then treat a second final event
as a repeat, and spot it with data.call.call_flow_run_id, event, and the final
data.call.delivery_status. Do not drop a final event because a live one with the same
call_flow_run_id and event arrived earlier.
A complete call, start to finish
This walks through one call from start to finish: each request Whippy sends and the reply your
server returns. The customer_state in each request is the one you returned in the previous
reply.
The scenario. Prakash (+15551234567) calls the Support Line (+15559876543) to test the
flow. Prakash presses 1 for sales. Whippy rings Marcos Paulo (user 42), who does not answer.
Prakash leaves a voicemail and hangs up.
| Phase | Step | Event | Whippy runs your reply? |
|---|---|---|---|
| Call starts | 1 | call_flow.run.started | Yes |
| During the call | 2 | call_flow.input.received | Yes |
| During the call | 3 | call_flow.forward.call_no_answer | Yes |
| Call ends | 4 | call_flow.status.updated | No |
Step 1. Prakash's call reaches your Call Flow
Whippy sends call_flow.run.started.
{
"api_version": "v1",
"event": "call_flow.run.started",
"request_id": "f1eebc99-9c0b-4ef8-bb6d-6bb9bd380a01",
"created_at": "2026-07-01T12:00:00.100000Z",
"data": {
"call": {
"id": "a1eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"direction": "inbound",
"from": "+15551234567",
"to": "+15559876543",
"delivery_status": "call_in_progress",
"call_flow_run_id": "b1eebc99-9c0b-4ef8-bb6d-6bb9bd380a22"
},
"contact": { "id": "c1eebc99-9c0b-4ef8-bb6d-6bb9bd380a33", "name": "Prakash" },
"channel": { "id": "d1eebc99-9c0b-4ef8-bb6d-6bb9bd380a44", "name": "Support Line" },
"input": null,
"forward": null,
"customer_state": null
}
}You reply with a menu. Prakash hears the prompt, and Whippy waits up to 10 seconds for a key.
{
"action": {
"command": "menu",
"arg": {
"prompt": { "content_type": "text", "content": "Thanks for calling Whippy. Press 1 for sales, 2 for support." },
"timeout_secs": 10,
"reference_key": "main_menu"
}
},
"customer_state": { "step": "awaiting_menu" }
}Step 2. Prakash presses 1
Whippy sends call_flow.input.received.
{
"api_version": "v1",
"event": "call_flow.input.received",
"request_id": "f1eebc99-9c0b-4ef8-bb6d-6bb9bd380a02",
"created_at": "2026-07-01T12:00:08.350000Z",
"data": {
"call": {
"id": "a1eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"direction": "inbound",
"from": "+15551234567",
"to": "+15559876543",
"delivery_status": "call_in_progress",
"call_flow_run_id": "b1eebc99-9c0b-4ef8-bb6d-6bb9bd380a22"
},
"contact": { "id": "c1eebc99-9c0b-4ef8-bb6d-6bb9bd380a33", "name": "Prakash" },
"channel": { "id": "d1eebc99-9c0b-4ef8-bb6d-6bb9bd380a44", "name": "Support Line" },
"input": { "digits": "1", "speech_result": null, "reference_key": "main_menu" },
"forward": null,
"customer_state": { "step": "awaiting_menu" }
}
}You reply by forwarding the call to Marcos Paulo (user 42). Prakash hears ringing.
{
"action": {
"command": "forward_to_user",
"arg": { "user_id": "42" }
},
"customer_state": { "step": "dialing_sales", "attempt": 1 }
}Step 3. Marcos Paulo does not answer
The dial rings out. Whippy sends call_flow.forward.call_no_answer. Prakash is still on the line.
{
"api_version": "v1",
"event": "call_flow.forward.call_no_answer",
"request_id": "f1eebc99-9c0b-4ef8-bb6d-6bb9bd380a03",
"created_at": "2026-07-01T12:00:38.900000Z",
"data": {
"call": {
"id": "a1eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"direction": "inbound",
"from": "+15551234567",
"to": "+15559876543",
"delivery_status": "call_in_progress",
"call_flow_run_id": "b1eebc99-9c0b-4ef8-bb6d-6bb9bd380a22"
},
"contact": { "id": "c1eebc99-9c0b-4ef8-bb6d-6bb9bd380a33", "name": "Prakash" },
"channel": { "id": "d1eebc99-9c0b-4ef8-bb6d-6bb9bd380a44", "name": "Support Line" },
"input": null,
"forward": {
"status": "call_no_answer",
"to": "client:user_42",
"from": "+15551234567",
"dial_call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"parent_call_sid": "CAbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
},
"customer_state": { "step": "dialing_sales", "attempt": 1 }
}
}You reply with a voicemail. voicemail is final, so Whippy will not ask you for another step.
{
"action": {
"command": "voicemail",
"arg": {
"prompt": { "content_type": "text", "content": "Sorry we missed you. Please leave a message after the beep." },
"notification_emails": ["[email protected]"]
}
},
"customer_state": { "step": "voicemail", "attempt": 1 }
}Step 4. Prakash leaves a message and hangs up
Whippy sends call_flow.status.updated with a final status.
{
"api_version": "v1",
"event": "call_flow.status.updated",
"request_id": "f1eebc99-9c0b-4ef8-bb6d-6bb9bd380a04",
"created_at": "2026-07-01T12:01:21.400000Z",
"data": {
"call": {
"id": "a1eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"direction": "inbound",
"from": "+15551234567",
"to": "+15559876543",
"delivery_status": "call_completed",
"call_flow_run_id": "b1eebc99-9c0b-4ef8-bb6d-6bb9bd380a22"
},
"contact": { "id": "c1eebc99-9c0b-4ef8-bb6d-6bb9bd380a33", "name": "Prakash" },
"channel": { "id": "d1eebc99-9c0b-4ef8-bb6d-6bb9bd380a44", "name": "Support Line" },
"input": null,
"forward": null,
"customer_state": { "step": "voicemail", "attempt": 1 }
}
}You reply with anything valid. Nothing plays because the call is over.
{
"action": { "command": "end_call", "arg": null }
}Other paths through the same call
| What happens | Event Whippy sends | A sensible reply |
|---|---|---|
| Prakash presses nothing on the menu | call_flow.status.updated with delivery_status call_in_progress | Send the menu again, or voicemail. |
| Prakash presses a key you did not offer | call_flow.input.received with that digits value | Send a menu that repeats the options. |
| Marcos Paulo answers, they talk, and the forwarded call ends | call_flow.forward.call_completed | end_call. |
| The line is busy | call_flow.forward.call_busy | Try another number, or voicemail. |
| The forwarded call fails or is cancelled | call_flow.forward.call_failed or call_flow.forward.call_cancelled | Try another number, or voicemail. |
| Marcos Paulo cannot be dialled (alerts off, or busy with no desk phone) | None. The caller hears the error message and the call ends. | Not applicable. Check the user's alert settings. |
| Prakash hangs up at any point | call_flow.status.updated with a final status | Any valid reply. It is not run. |
| Your server is slow or returns an error | None. Whippy retries once for a timeout or a 5xx status, and does not retry a 4xx status. If it gets no valid reply, including after the retry, it plays the error message and ends the call. If the retry succeeds, the call continues. | Fix the endpoint. |
Reference
Verify signatures
Use this section only if you set a signing key. If you did not, skip it.
When a signing key is set, each request includes this header:
X-Whippy-Signature: t=1751371200,v1=<signature>
tis the Unix time in seconds when Whippy signed the request.v1is the signature. It is an HMAC-SHA256 oft, a dot, and the raw request body, using the API
key secret as the key. The result is encoded as standard Base64 with no=padding.
To verify a request:
- Read the raw request body exactly as received. Do not parse and re-serialise the JSON, because
the bytes must match. - Split the header on
,and readtandv1. - Compute
HMAC-SHA256(apiKeySecret, t + "." + rawBody)and encode it as standard Base64 with no
padding. - Compare it with
v1using a constant-time comparison. - Recommended: reject requests where
tis more than 5 minutes from your clock, to block replays.
Node.js example:
import crypto from "node:crypto";
export function verifyWhippySignature(rawBody, signatureHeader, apiKeySecret) {
const fields = {};
for (const part of signatureHeader.split(",")) {
const i = part.indexOf("=");
fields[part.slice(0, i)] = part.slice(i + 1);
}
const { t, v1 } = fields;
if (!t || !v1) return false;
const expected = crypto
.createHmac("sha256", apiKeySecret)
.update(`${t}.${rawBody}`)
.digest("base64")
.replace(/=+$/, "");
const a = Buffer.from(expected);
const b = Buffer.from(v1);
return a.length === b.length && crypto.timingSafeEqual(a, b);
}Many web frameworks parse JSON before your handler runs. Capture the raw body first.
Common mistakes
Each of these ends the call with the spoken error message, except on a final
call_flow.status.updated.
| Mistake | Example | Fix |
|---|---|---|
| Not JSON, or a body over 64 KB | OK | Return a JSON object under 64 KB. |
No action | { "customer_state": {} } | Always include action. |
An actions array | { "actions": [ ... ] } | Send one action. |
arg as a string | "arg": "main_menu" | Send the settings inline, as an object. |
Unknown command | "command": "transfer" | Use one of the eight commands. |
| Extra top-level key | { "action": {}, "note": "x" } | Send only action and customer_state. |
customer_state is not an object | "customer_state": "step1" | Use an object, or leave it out. |
| Phone number not in E.164 | "phone_number": "415-555-2671" | Use +14155552671. |
timeout_secs out of range | "timeout_secs": 120 | Use a whole number from 1 to 60. |
ring_order on forward_to_team | "arg": { "members": [], "ring_order": "batch" } | Remove it. Send members only. |
Empty members list | "members": [] | Include at least one member. |
| Slow or failing endpoint | No reply in 5 seconds, or a 4xx or 5xx | See Your endpoint has to be fast. |
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
