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

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.

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

curl -X POST "https://example.com/email/api/v1/sandbox/simulate" \  -H "Content-Type: application/json" \  -d '{    "account_id": "em_gX2kP9qL4mT7vB1nR8sW3yZ",    "event": "mail_received",    "from": "lead@example.com",    "subject": "Re: Quick question",    "text": "Sounds good, call me tomorrow."  }'
{  "object": "SimulationDone",  "event": "string",  "event_id": "string"}

Withdraw an invitation DELETE

A write (`withdraw`). 404 when it is no longer pending.

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.