API referenceSandbox
POST
/whatsapp/api/v1/sandbox/simulate

Sandbox only (a gw_test_ key, a sandbox number): what a person does to the number, arriving as WhatsApp's own would, so your sandbox webhook gets the same event as live. A live number answers 403.

kindWhat happens
message_received (default)from writes to the number.
message_reactionfrom reacts (reaction, an emoji) to the number's message (message_id, else its newest to them).
message_readfrom reads the number's message (told once per message).
message_editedfrom edits their message (message_id, else their newest) to text.
message_deletedfrom deletes their message for everyone.

message_delivered follows each message the number sends by itself, a moment later. Reads follow too: GET /messages shows the reaction, the read, the edit or the deletion.

Authorization

X-API-KEY<token>

Your API key from the console (gw_live_…).

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/whatsapp/api/v1/sandbox/simulate" \  -H "Content-Type: application/json" \  -d '{    "account_id": "wa_3f9c2a7b1d4e5f60",    "from": "33612345678",    "text": "Sure, let us talk tomorrow."  }'
{  "object": "SandboxSimulated",  "account_id": "wa_3f9c2a7b1d4e5f60",  "kind": "message_received",  "message_id": "SBXLQ3K2A1",  "from": "33612345678"}

Simulate LinkedIn on a sandbox account POST

Sandbox only (a `gw_test_` key, a sandbox account): what LinkedIn would do on its own, so your sandbox webhook receives the same event, in the same shape, as on a live account. A live account answers 403. Every field but `account_id` and `kind` is optional: a sandbox person, chat, message or post is picked when it is left out. | `kind` | What happens | Fields it reads | |---|---|---| | `message_received` | A person writes: in `chat_id`, else to the account in their conversation (`provider_id`) or a new one. | `chat_id`, `provider_id`, `text` | | `message_edited` | The other person edits their message (`message_id`, else their newest). | `message_id`, `chat_id`, `provider_id`, `text` | | `message_deleted` | The other person deletes their message. | `message_id`, `chat_id`, `provider_id` | | `message_reaction` | The other person reacts to the account's message (its newest, by default). | `message_id`, `chat_id`, `provider_id`, `reaction` (an emoji) | | `message_read` | The other person reads the account's message (told once per message). | `message_id`, `chat_id`, `provider_id` | | `new_relation` | A pending invitation the account sent (`provider_id`, else the oldest) is accepted. `invitation_accepted` is the same. | `provider_id` | | `invitation_received` | Someone invites the account; it shows in `GET /users/invite/received`. | `provider_id`, `text` | | `post_comment` | Someone comments on one of the account's three newest posts. | `post_id`, `provider_id`, `text` | | `post_reaction` | Someone who has not yet reacts to one of those posts. | `post_id`, `provider_id`, `reaction` (`like`, `celebrate`, `support`, `love`, `insightful`, `funny`) | | `profile_view` | Someone views the account's profile (one view per person a day). | `provider_id` | The change shows when read back: a message in its chat, an edit or a deletion in it, a comment or a reaction on the post. `message_edited`, `message_deleted`, `message_reaction`, `message_read`, `post_comment`, `post_reaction` and `profile_view` reach your webhook only when your company receives live events, as on a live account.

Delete a WhatsApp number DELETE

Unlinks the device on the phone (unless `provider_session_revoke=false`; a number not connected right now is not unlinked there, WhatsApp drops an idle linked device after 30 days), erases its login and its stored chats, messages and contacts, and sends `AccountStatus` `DELETED`. 503 `whatsapp-connecting` for a moment during an update of Swarmhit: retry.