<!-- Source: https://useworkloom.com/dev/webhook-endpoints/ · Workloom API v1 -->

# Webhook endpoints

Everything Settings › API and webhooks › Webhooks does, over the API with the `webhooks:manage` scope. A key acting for one person also needs that person’s permission to manage webhooks.

Scopes: `webhooks:manage`.

## The webhook endpoint object

- `id` (string, required): The endpoint’s id.
- `name` (string, required): Its name.
- `url` (string, required): Where deliveries go. HTTPS, on the public internet.
- `events` (array of string, required): The events it gets, or `["*"]` for every event except the Activity log.
- `status` (string, required): Disabled endpoints get nothing. Workloom disables one after 20 failed attempts in a row.
- `disabled_reason` (string, nullable, required): Why it was turned off.
- `consecutive_failures` (integer, nullable, required): Failed attempts since the last success.
- `last_success_at` (timestamp, nullable, required): The last delivery your server accepted.
- `last_failure_at` (timestamp, nullable, required): The last failed attempt.
- `secret` (string, nullable, required): The signing secret. Only on create, rotate and `GET …/secret`; null everywhere else.
- `workloom_version` (string, required): The dated version its deliveries are shaped in, set when it was added. Change it with `PATCH` to move it to a later one.
- `created_at` (timestamp, required): When it was added.

```json
{
  "id": "66ff91a7e4b0a1b2c3d4ee01",
  "name": "Revenue alerts",
  "url": "https://example.com/hooks/workloom",
  "events": [
    "deal.won",
    "deal.lost"
  ],
  "status": "active",
  "disabled_reason": null,
  "consecutive_failures": 0,
  "last_success_at": "2026-10-07T09:12:44.000Z",
  "last_failure_at": null,
  "secret": null,
  "workloom_version": "2026-10-07",
  "created_at": "2026-10-01T09:00:00.000Z"
}
```

## The delivery object

- `id` (string, required): The delivery id, as sent in `X-Workloom-Delivery`. Every attempt at one delivery shares it.
- `event_type` (string, required): The event.
- `event_id` (string, nullable, required): The event, when it can be sent again.
- `attempt` (integer, nullable, required): Which attempt this was, from 1.
- `ok` (boolean, required): Whether your server answered with a 2xx.
- `status_code` (integer, nullable, required): What your server answered. Null when it did not answer.
- `error` (string, nullable, required): What went wrong, when something did.
- `duration_ms` (integer, nullable, required): How long it took.
- `created_at` (timestamp, required): When the attempt was made.

```json
{
  "id": "whd_3f1c0d9a2b7e44c1a8d6b5f0",
  "event_type": "deal.won",
  "event_id": "evt_66ff5d63e4b0a1b2c3d4aa01",
  "attempt": 1,
  "ok": true,
  "status_code": 200,
  "error": null,
  "duration_ms": 142,
  "created_at": "2026-10-07T09:12:44.000Z"
}
```

## Endpoints

### Make an event happen (sandbox only)

`POST /sandbox/events`

In a developer sandbox (sandbox-api.useworkloom.com, a `wl_sbx_` key) only: records an event nobody can cause through the API (a reply, an open, a click, a bounce, a meeting, a booking, a form, a call, a Tell, an unsubscribe) about one of your sandbox contacts, and every endpoint subscribed to it gets the delivery, signed and retried as always. The live API answers `sandbox_only`.

Scope: `webhooks:manage`

**Body parameters**

- `type` (string, required): Which event. The ones the API can cause itself (contact.created, deal.won…) are made the real way.
- `contact_id` (string, required): The contact it is about.
- `category` (string, nullable): reply.received: what kind of reply (interested, meeting, not_interested…). Default interested.
- `url` (string, nullable): email.clicked, booking.made, form.submitted: the page.
- `answers` (object): form.submitted: what they entered, by field name.
- `outcome` (string, nullable): call.logged: the outcome. Default connected.
- `title` (string, nullable): meeting.*: the meeting’s title; tell.fired: what happened.
- `start_at` (timestamp): meeting.*: when it starts. Default two days from now.

**Request**

```bash
curl -X POST "https://api.useworkloom.com/api/public/v1/sandbox/events" \
  -H "Authorization: Bearer $WORKLOOM_KEY"
```

```javascript
const res = await fetch("https://api.useworkloom.com/api/public/v1/sandbox/events", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.WORKLOOM_KEY}`
  }
});
const data = await res.json();
```

```python
import os, requests

res = requests.post(
    "https://api.useworkloom.com/api/public/v1/sandbox/events",
    headers={"Authorization": f"Bearer {os.environ['WORKLOOM_KEY']}"},
)
data = res.json()
```

**Response (sample, 201)**

```json
{}
```

**Errors**

- 400: `invalid_request`, `unknown_fields`, `reason_required` or `unsupported_version`.
- 401: `authentication_required` or `invalid_key`.
- 403: `missing_scope`, `forbidden`, `seat_inactive` or `organisation_inactive`.
- 409: `duplicate`, `conflict` or `idempotency_key_in_use`.
- 429: `rate_limited`. Wait `Retry-After` seconds.
- 500: `internal_error`.

### List webhook endpoints

`GET /webhooks`

Scope: `webhooks:manage`

**Request**

```bash
curl "https://api.useworkloom.com/api/public/v1/webhooks" \
  -H "Authorization: Bearer $WORKLOOM_KEY"
```

```javascript
const res = await fetch("https://api.useworkloom.com/api/public/v1/webhooks", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.WORKLOOM_KEY}`
  }
});
const data = await res.json();
```

```python
import os, requests

res = requests.get(
    "https://api.useworkloom.com/api/public/v1/webhooks",
    headers={"Authorization": f"Bearer {os.environ['WORKLOOM_KEY']}"},
)
data = res.json()
```

**Response (sample, 200)**

```json
{
  "data": [
    {
      "id": "66ff91a7e4b0a1b2c3d4ee01",
      "name": "Revenue alerts",
      "url": "https://example.com/hooks/workloom",
      "events": [
        "deal.won",
        "deal.lost"
      ],
      "status": "active",
      "disabled_reason": null,
      "consecutive_failures": 0,
      "last_success_at": "2026-10-07T09:12:44.000Z",
      "last_failure_at": null,
      "secret": null,
      "workloom_version": "2026-10-07",
      "created_at": "2026-10-01T09:00:00.000Z"
    }
  ]
}
```

**Errors**

- 400: `invalid_request`, `unknown_fields`, `reason_required` or `unsupported_version`.
- 401: `authentication_required` or `invalid_key`.
- 403: `missing_scope`, `forbidden`, `seat_inactive` or `organisation_inactive`.
- 429: `rate_limited`. Wait `Retry-After` seconds.
- 500: `internal_error`.

### Add a webhook endpoint

`POST /webhooks`

Adds an endpoint. The answer carries its signing `secret`, the only time it is sent unasked. The address must be HTTPS on the public internet.

Scope: `webhooks:manage`

**Header parameters**

- `Idempotency-Key` (string): Any unique string, up to 255 characters. Send the same key when you retry and the request runs once; the first answer comes back with `Idempotent-Replayed: true`. Kept 24 hours.

**Body parameters**

- `name` (string, required): A name you will recognise.
- `url` (string, required): An HTTPS address on the public internet that accepts POST.
- `events` (array of string): Event types from `GET /events`, or `["*"]` for every event except the Activity log. Defaults to `["*"]`.
- `workloom_version` (string): The dated version to shape its deliveries in. Defaults to the latest.

**Request**

```bash
curl -X POST "https://api.useworkloom.com/api/public/v1/webhooks" \
  -H "Authorization: Bearer $WORKLOOM_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "name": "Revenue alerts",
  "url": "https://example.com/hooks/workloom",
  "events": [
    "deal.won",
    "deal.lost"
  ]
}'
```

```javascript
const res = await fetch("https://api.useworkloom.com/api/public/v1/webhooks", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.WORKLOOM_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID()
  },
  body: JSON.stringify({
    "name": "Revenue alerts",
    "url": "https://example.com/hooks/workloom",
    "events": [
      "deal.won",
      "deal.lost"
    ]
  })
});
const data = await res.json();
```

```python
import os, uuid, requests

res = requests.post(
    "https://api.useworkloom.com/api/public/v1/webhooks",
    headers={"Authorization": f"Bearer {os.environ['WORKLOOM_KEY']}", "Idempotency-Key": str(uuid.uuid4())},
    json={
      "name": "Revenue alerts",
      "url": "https://example.com/hooks/workloom",
      "events": [
        "deal.won",
        "deal.lost"
      ]
    },
)
data = res.json()
```

**Response (sample, 201)**

```json
{
  "data": {
    "id": "66ff91a7e4b0a1b2c3d4ee01",
    "name": "Revenue alerts",
    "url": "https://example.com/hooks/workloom",
    "events": [
      "deal.won",
      "deal.lost"
    ],
    "status": "active",
    "disabled_reason": null,
    "consecutive_failures": 0,
    "last_success_at": "2026-10-07T09:12:44.000Z",
    "last_failure_at": null,
    "secret": null,
    "workloom_version": "2026-10-07",
    "created_at": "2026-10-01T09:00:00.000Z"
  },
  "livemode": true
}
```

**Errors**

- 400: `invalid_request`, `unknown_fields`, `reason_required` or `unsupported_version`.
- 401: `authentication_required` or `invalid_key`.
- 403: `missing_scope`, `forbidden`, `seat_inactive` or `organisation_inactive`.
- 409: `duplicate`, `conflict` or `idempotency_key_in_use`.
- 422: `idempotency_key_reused`.
- 429: `rate_limited`. Wait `Retry-After` seconds.
- 500: `internal_error`.

### Get a webhook endpoint

`GET /webhooks/{id}`

Scope: `webhooks:manage`

**Path parameters**

- `id` (string, required): The endpoint’s id.

**Request**

```bash
curl "https://api.useworkloom.com/api/public/v1/webhooks/66ff91a7e4b0a1b2c3d4ee01" \
  -H "Authorization: Bearer $WORKLOOM_KEY"
```

```javascript
const res = await fetch("https://api.useworkloom.com/api/public/v1/webhooks/66ff91a7e4b0a1b2c3d4ee01", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.WORKLOOM_KEY}`
  }
});
const data = await res.json();
```

```python
import os, requests

res = requests.get(
    "https://api.useworkloom.com/api/public/v1/webhooks/66ff91a7e4b0a1b2c3d4ee01",
    headers={"Authorization": f"Bearer {os.environ['WORKLOOM_KEY']}"},
)
data = res.json()
```

**Response (sample, 200)**

```json
{
  "data": {
    "id": "66ff91a7e4b0a1b2c3d4ee01",
    "name": "Revenue alerts",
    "url": "https://example.com/hooks/workloom",
    "events": [
      "deal.won",
      "deal.lost"
    ],
    "status": "active",
    "disabled_reason": null,
    "consecutive_failures": 0,
    "last_success_at": "2026-10-07T09:12:44.000Z",
    "last_failure_at": null,
    "secret": null,
    "workloom_version": "2026-10-07",
    "created_at": "2026-10-01T09:00:00.000Z"
  }
}
```

**Errors**

- 400: `invalid_request`, `unknown_fields`, `reason_required` or `unsupported_version`.
- 401: `authentication_required` or `invalid_key`.
- 403: `missing_scope`, `forbidden`, `seat_inactive` or `organisation_inactive`.
- 404: `not_found`.
- 429: `rate_limited`. Wait `Retry-After` seconds.
- 500: `internal_error`.

### Change a webhook endpoint

`PATCH /webhooks/{id}`

Scope: `webhooks:manage`

**Path parameters**

- `id` (string, required): The endpoint’s id.

**Body parameters**

- `name` (string): A new name.
- `url` (string): A new address.
- `events` (array of string): Replaces the events.
- `status` (string): Turn it off, or back on. Turning it on clears the failure count.
- `workloom_version` (string): Move its deliveries to another dated version.

**Request**

```bash
curl -X PATCH "https://api.useworkloom.com/api/public/v1/webhooks/66ff91a7e4b0a1b2c3d4ee01" \
  -H "Authorization: Bearer $WORKLOOM_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "events": [
    "deal.won",
    "deal.lost",
    "contact.deleted"
  ]
}'
```

```javascript
const res = await fetch("https://api.useworkloom.com/api/public/v1/webhooks/66ff91a7e4b0a1b2c3d4ee01", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.WORKLOOM_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "events": [
      "deal.won",
      "deal.lost",
      "contact.deleted"
    ]
  })
});
const data = await res.json();
```

```python
import os, requests

res = requests.patch(
    "https://api.useworkloom.com/api/public/v1/webhooks/66ff91a7e4b0a1b2c3d4ee01",
    headers={"Authorization": f"Bearer {os.environ['WORKLOOM_KEY']}"},
    json={
      "events": [
        "deal.won",
        "deal.lost",
        "contact.deleted"
      ]
    },
)
data = res.json()
```

**Response (sample, 200)**

```json
{
  "data": {
    "id": "66ff91a7e4b0a1b2c3d4ee01",
    "name": "Revenue alerts",
    "url": "https://example.com/hooks/workloom",
    "events": [
      "deal.won",
      "deal.lost"
    ],
    "status": "active",
    "disabled_reason": null,
    "consecutive_failures": 0,
    "last_success_at": "2026-10-07T09:12:44.000Z",
    "last_failure_at": null,
    "secret": null,
    "workloom_version": "2026-10-07",
    "created_at": "2026-10-01T09:00:00.000Z"
  },
  "livemode": true
}
```

**Errors**

- 400: `invalid_request`, `unknown_fields`, `reason_required` or `unsupported_version`.
- 401: `authentication_required` or `invalid_key`.
- 403: `missing_scope`, `forbidden`, `seat_inactive` or `organisation_inactive`.
- 404: `not_found`.
- 409: `duplicate`, `conflict` or `idempotency_key_in_use`.
- 429: `rate_limited`. Wait `Retry-After` seconds.
- 500: `internal_error`.

### Delete a webhook endpoint

`DELETE /webhooks/{id}`

Scope: `webhooks:manage`

**Path parameters**

- `id` (string, required): The endpoint’s id.

**Request**

```bash
curl -X DELETE "https://api.useworkloom.com/api/public/v1/webhooks/66ff91a7e4b0a1b2c3d4ee01" \
  -H "Authorization: Bearer $WORKLOOM_KEY"
```

```javascript
const res = await fetch("https://api.useworkloom.com/api/public/v1/webhooks/66ff91a7e4b0a1b2c3d4ee01", {
  method: "DELETE",
  headers: {
    Authorization: `Bearer ${process.env.WORKLOOM_KEY}`
  }
});
const data = await res.json();
```

```python
import os, requests

res = requests.delete(
    "https://api.useworkloom.com/api/public/v1/webhooks/66ff91a7e4b0a1b2c3d4ee01",
    headers={"Authorization": f"Bearer {os.environ['WORKLOOM_KEY']}"},
)
data = res.json()
```

**Response (sample, 200)**

```json
{}
```

**Errors**

- 400: `invalid_request`, `unknown_fields`, `reason_required` or `unsupported_version`.
- 401: `authentication_required` or `invalid_key`.
- 403: `missing_scope`, `forbidden`, `seat_inactive` or `organisation_inactive`.
- 404: `not_found`.
- 409: `duplicate`, `conflict` or `idempotency_key_in_use`.
- 429: `rate_limited`. Wait `Retry-After` seconds.
- 500: `internal_error`.

### Rotate an endpoint’s secret

`POST /webhooks/{id}/rotate-secret`

Makes a new signing secret and returns it. The old one stops at once, so update your server first or accept both for a moment.

Scope: `webhooks:manage`

**Path parameters**

- `id` (string, required): The endpoint’s id.

**Request**

```bash
curl -X POST "https://api.useworkloom.com/api/public/v1/webhooks/66ff91a7e4b0a1b2c3d4ee01/rotate-secret" \
  -H "Authorization: Bearer $WORKLOOM_KEY"
```

```javascript
const res = await fetch("https://api.useworkloom.com/api/public/v1/webhooks/66ff91a7e4b0a1b2c3d4ee01/rotate-secret", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.WORKLOOM_KEY}`
  }
});
const data = await res.json();
```

```python
import os, requests

res = requests.post(
    "https://api.useworkloom.com/api/public/v1/webhooks/66ff91a7e4b0a1b2c3d4ee01/rotate-secret",
    headers={"Authorization": f"Bearer {os.environ['WORKLOOM_KEY']}"},
)
data = res.json()
```

**Response (sample, 200)**

```json
{
  "data": {
    "id": "66ff91a7e4b0a1b2c3d4ee01",
    "name": "Revenue alerts",
    "url": "https://example.com/hooks/workloom",
    "events": [
      "deal.won",
      "deal.lost"
    ],
    "status": "active",
    "disabled_reason": null,
    "consecutive_failures": 0,
    "last_success_at": "2026-10-07T09:12:44.000Z",
    "last_failure_at": null,
    "secret": null,
    "workloom_version": "2026-10-07",
    "created_at": "2026-10-01T09:00:00.000Z"
  },
  "livemode": true
}
```

**Errors**

- 400: `invalid_request`, `unknown_fields`, `reason_required` or `unsupported_version`.
- 401: `authentication_required` or `invalid_key`.
- 403: `missing_scope`, `forbidden`, `seat_inactive` or `organisation_inactive`.
- 404: `not_found`.
- 409: `duplicate`, `conflict` or `idempotency_key_in_use`.
- 429: `rate_limited`. Wait `Retry-After` seconds.
- 500: `internal_error`.

### Show an endpoint’s secret

`GET /webhooks/{id}/secret`

Scope: `webhooks:manage`

**Path parameters**

- `id` (string, required): The endpoint’s id.

**Request**

```bash
curl "https://api.useworkloom.com/api/public/v1/webhooks/66ff91a7e4b0a1b2c3d4ee01/secret" \
  -H "Authorization: Bearer $WORKLOOM_KEY"
```

```javascript
const res = await fetch("https://api.useworkloom.com/api/public/v1/webhooks/66ff91a7e4b0a1b2c3d4ee01/secret", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.WORKLOOM_KEY}`
  }
});
const data = await res.json();
```

```python
import os, requests

res = requests.get(
    "https://api.useworkloom.com/api/public/v1/webhooks/66ff91a7e4b0a1b2c3d4ee01/secret",
    headers={"Authorization": f"Bearer {os.environ['WORKLOOM_KEY']}"},
)
data = res.json()
```

**Response (sample, 200)**

```json
{
  "data": {
    "secret": "whsec_Lr8Tg2Vb6Nq4Kk9Wd1Zp7a3c"
  }
}
```

**Errors**

- 400: `invalid_request`, `unknown_fields`, `reason_required` or `unsupported_version`.
- 401: `authentication_required` or `invalid_key`.
- 403: `missing_scope`, `forbidden`, `seat_inactive` or `organisation_inactive`.
- 404: `not_found`.
- 429: `rate_limited`. Wait `Retry-After` seconds.
- 500: `internal_error`.

### Send a test event

`POST /webhooks/{id}/test`

Sends `webhook.test` now, signed like any event, and answers with what your server answered.

Scope: `webhooks:manage`

**Path parameters**

- `id` (string, required): The endpoint’s id.

**Request**

```bash
curl -X POST "https://api.useworkloom.com/api/public/v1/webhooks/66ff91a7e4b0a1b2c3d4ee01/test" \
  -H "Authorization: Bearer $WORKLOOM_KEY"
```

```javascript
const res = await fetch("https://api.useworkloom.com/api/public/v1/webhooks/66ff91a7e4b0a1b2c3d4ee01/test", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.WORKLOOM_KEY}`
  }
});
const data = await res.json();
```

```python
import os, requests

res = requests.post(
    "https://api.useworkloom.com/api/public/v1/webhooks/66ff91a7e4b0a1b2c3d4ee01/test",
    headers={"Authorization": f"Bearer {os.environ['WORKLOOM_KEY']}"},
)
data = res.json()
```

**Response (sample, 200)**

```json
{
  "data": {
    "sent": true,
    "ok": true,
    "status_code": 200,
    "error": null
  },
  "livemode": true
}
```

**Errors**

- 400: `invalid_request`, `unknown_fields`, `reason_required` or `unsupported_version`.
- 401: `authentication_required` or `invalid_key`.
- 403: `missing_scope`, `forbidden`, `seat_inactive` or `organisation_inactive`.
- 404: `not_found`.
- 409: `duplicate`, `conflict` or `idempotency_key_in_use`.
- 429: `rate_limited`. Wait `Retry-After` seconds.
- 500: `internal_error`.

### List recent deliveries

`GET /webhooks/{id}/deliveries`

The latest attempts to this endpoint, newest first, from the last 30 days.

Scope: `webhooks:manage`

**Path parameters**

- `id` (string, required): The endpoint’s id.

**Query parameters**

- `limit` (integer): How many, 1 to 200. Default 50.

**Request**

```bash
curl "https://api.useworkloom.com/api/public/v1/webhooks/66ff91a7e4b0a1b2c3d4ee01/deliveries?limit=50" \
  -H "Authorization: Bearer $WORKLOOM_KEY"
```

```javascript
const res = await fetch("https://api.useworkloom.com/api/public/v1/webhooks/66ff91a7e4b0a1b2c3d4ee01/deliveries?limit=50", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.WORKLOOM_KEY}`
  }
});
const data = await res.json();
```

```python
import os, requests

res = requests.get(
    "https://api.useworkloom.com/api/public/v1/webhooks/66ff91a7e4b0a1b2c3d4ee01/deliveries?limit=50",
    headers={"Authorization": f"Bearer {os.environ['WORKLOOM_KEY']}"},
)
data = res.json()
```

**Response (sample, 200)**

```json
{
  "data": [
    {
      "id": "whd_3f1c0d9a2b7e44c1a8d6b5f0",
      "event_type": "deal.won",
      "event_id": "evt_66ff5d63e4b0a1b2c3d4aa01",
      "attempt": 1,
      "ok": true,
      "status_code": 200,
      "error": null,
      "duration_ms": 142,
      "created_at": "2026-10-07T09:12:44.000Z"
    }
  ]
}
```

**Errors**

- 400: `invalid_request`, `unknown_fields`, `reason_required` or `unsupported_version`.
- 401: `authentication_required` or `invalid_key`.
- 403: `missing_scope`, `forbidden`, `seat_inactive` or `organisation_inactive`.
- 404: `not_found`.
- 429: `rate_limited`. Wait `Retry-After` seconds.
- 500: `internal_error`.

### Send a delivery again

`POST /webhooks/{id}/deliveries/{delivery_id}/resend`

Sends one delivery again now, with the same `id`, reading the event as it is now. A test or an Activity log entry is sent once and cannot be resent.

Scope: `webhooks:manage`

**Path parameters**

- `id` (string, required): The endpoint’s id.
- `delivery_id` (string, required): The delivery’s id (whd_…).

**Request**

```bash
curl -X POST "https://api.useworkloom.com/api/public/v1/webhooks/66ff91a7e4b0a1b2c3d4ee01/deliveries/whd_3f1c0d9a2b7e44c1a8d6b5f0/resend" \
  -H "Authorization: Bearer $WORKLOOM_KEY"
```

```javascript
const res = await fetch("https://api.useworkloom.com/api/public/v1/webhooks/66ff91a7e4b0a1b2c3d4ee01/deliveries/whd_3f1c0d9a2b7e44c1a8d6b5f0/resend", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.WORKLOOM_KEY}`
  }
});
const data = await res.json();
```

```python
import os, requests

res = requests.post(
    "https://api.useworkloom.com/api/public/v1/webhooks/66ff91a7e4b0a1b2c3d4ee01/deliveries/whd_3f1c0d9a2b7e44c1a8d6b5f0/resend",
    headers={"Authorization": f"Bearer {os.environ['WORKLOOM_KEY']}"},
)
data = res.json()
```

**Response (sample, 200)**

```json
{
  "data": {
    "sent": true,
    "ok": true,
    "status_code": 200,
    "error": null
  },
  "livemode": true
}
```

**Errors**

- 400: `invalid_request`, `unknown_fields`, `reason_required` or `unsupported_version`.
- 401: `authentication_required` or `invalid_key`.
- 403: `missing_scope`, `forbidden`, `seat_inactive` or `organisation_inactive`.
- 404: `not_found`.
- 409: `duplicate`, `conflict` or `idempotency_key_in_use`.
- 429: `rate_limited`. Wait `Retry-After` seconds.
- 500: `internal_error`.
