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.
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/api/v1/sandbox/simulate" \ -H "Content-Type: application/json" \ -d '{ "account_id": "lg_3f9c2a7b1d4e5f60", "kind": "message_received", "text": "Thanks for reaching out, happy to chat." }'{ "object": "SandboxSimulation", "kind": "message_received", "account_id": "lg_3f9c2a7b1d4e5f60", "provider_id": "ACoAAB1a2b3c4d5e6f", "chat_id": "lgc_8XyZ12ab34", "message_id": "lgm_4k2Lp9"}Email: play an event on a sandbox mailbox POST
With a `gw_test_` key, on a sandbox mailbox: a mail arrives (`mail_received`), the last sent one bounces, is complained about, opened, clicked or fails, or the mailbox changes `status` (`state`: connected, authenticationError, connectError, disconnected). The events reach your sandbox webhook. 403 for a live mailbox.
Simulate WhatsApp on a sandbox number POST
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. | `kind` | What happens | |---|---| | `message_received` (default) | `from` writes to the number. | | `message_reaction` | `from` reacts (`reaction`, an emoji) to the number's message (`message_id`, else its newest to them). | | `message_read` | `from` reads the number's message (told once per message). | | `message_edited` | `from` edits their message (`message_id`, else their newest) to `text`. | | `message_deleted` | `from` 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.