# Add a webhook endpoint

```http
POST https://trydimmi.com/api/v1/webhook-endpoints
```

## Authorization

Send an API token as `Authorization: Bearer <token>`.
The token needs: `webhooks:write`.

## Body

- `api_version` (string): Payload version; only the current one is accepted.
- `description` (string): A note for the team, up to 255 characters.
- `enabled` (boolean): false stops sending and cancels what is waiting; true starts again.
- `event_types` (string[]): Event types from GET /webhook-event-types, an area such as conversation.*, or * for every event.
- `inbox_ids` (string[]): Only conversations of these inboxes (inbox_...); an empty list means every inbox.
- `include_notes` (boolean): Also send events about internal notes.
- `metadata` (object): Up to 20 short labels for the developer's own use.
- `url` (string): The https URL to post to.

## Response 201 (Created)

- `data` (object, required)
  - `api_version` (string, required): The API version the endpoint's payloads are shaped for, as a date such as 2026-11-01.
  - `created_at` (string, required): When it was created, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
  - `description` (string, required): A note saying what the endpoint is for, up to 255 characters. Empty when none is set.
  - `disabled_at` (string | null, required): When the endpoint was turned off. Null while it is on.
  - `disabled_reason` (string | null, required): Why the endpoint is off: manual (someone turned it off), auto_failure (it kept failing) or gone (it answered 410). Null while it is on.
  - `enabled` (boolean, required): True when dimmi sends events to the endpoint; false when it is turned off and nothing is sent.
  - `event_types` (string[] | null, required): The events the endpoint subscribes to: exact names such as conversation.created, an area wildcard, or * for every event.
  - `failing_since` (string | null, required): Since when the endpoint has answered nothing but failures. Null while it is healthy.
  - `health` (string, required): Whether deliveries are getting through: healthy or failing.
  - `id` (string, required): The id of this record. Send it wherever an endpoint asks for this record; never use its name or title in its place.
  - `inbox_ids` (string[] | null, required): Ids of the inboxes whose events the endpoint receives, such as inbox_.... Null means every inbox.
  - `include_notes` (boolean, required): True when the endpoint also receives events about internal notes.
  - `last_failure_at` (string | null, required): When a delivery to the endpoint last failed. Null when none has.
  - `last_success_at` (string | null, required): When a delivery to the endpoint last succeeded. Null when none has.
  - `metadata` (object, required): The caller's own labels kept on the endpoint, as an object of text keys and text values. Empty when none are set.
  - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
  - `previous_secret_expires_at` (string | null, required): During a secret rotation, when the old signing secret stops being used. Null when no rotation is under way.
  - `updated_at` (string, required): When it last changed, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
  - `url` (string, required): The web address dimmi sends events to.
- `meta` (object, required)
  - `secret` (string, required): The new webhook endpoint's signing secret. Shown only this once, in the answer that created the endpoint, so store it now.

## Response default (Error)

- `code` (string, required): Stable code for programs to tell errors apart, such as validation_failed or internal_error.
- `errors` (object): Each rejected field mapped to its messages. Only present when the input was invalid.
- `message` (string, required): What went wrong, in words safe to show a person.

## Example request

```bash
curl --request POST \
  --url 'https://trydimmi.com/api/v1/webhook-endpoints' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "api_version": "<string>",
  "description": "<string>",
  "enabled": true,
  "event_types": [
    "<string>"
  ],
  "inbox_ids": [
    "<string>"
  ],
  "include_notes": true,
  "metadata": {
    "<key>": "<string>"
  },
  "url": "<string>"
}'
```

## Example response

```json
{
  "data": {
    "api_version": "<string>",
    "created_at": "2026-11-01T09:30:00Z",
    "description": "<string>",
    "disabled_at": "2026-11-01T09:30:00Z",
    "disabled_reason": "<string>",
    "enabled": true,
    "event_types": [
      "<string>"
    ],
    "failing_since": "2026-11-01T09:30:00Z",
    "health": "<string>",
    "id": "<string>",
    "inbox_ids": [
      "<string>"
    ],
    "include_notes": true,
    "last_failure_at": "2026-11-01T09:30:00Z",
    "last_success_at": "2026-11-01T09:30:00Z",
    "metadata": {
      "<key>": "<string>"
    },
    "object": "<string>",
    "previous_secret_expires_at": "2026-11-01T09:30:00Z",
    "updated_at": "2026-11-01T09:30:00Z",
    "url": "<string>"
  },
  "meta": {
    "secret": "<string>"
  }
}
```

---

Index of all dimmi docs: https://trydimmi.com/llms.txt (full text: https://trydimmi.com/llms-full.txt)
