# Send a test webhook

```http
POST https://trydimmi.com/api/v1/webhook-endpoints/{endpoint}/tests
```

## Authorization

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

## Path parameters

- `endpoint` (string, required): Id of the webhook endpoint, starting with whk_, such as whk_01jx2m8k4t. Find it with GET /webhook-endpoints.

## Body

- `type` (string): Event type to send a sample of, from GET /webhook-event-types; webhook.test when left out.

## Response 201 (Created)

- `data` (object, required)
  - `attempt` (object, required)
    - `duration_ms` (integer | null, required): How long the request took, in milliseconds. Null when not measured.
    - `error_code` (string | null, required): Why the attempt failed, such as http_error, redirect_not_followed or a network failure class. Null when it succeeded.
    - `error_message` (string | null, required): Details of the failure in words, up to 500 characters. Null when there are none.
    - `hint` (string): Advice for fixing the endpoint, given only when it answered 401 or 403 (check the signature against the raw body). Left out otherwise.
    - `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.
    - `number` (integer, required): Which try of the delivery this was, counting from 1.
    - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
    - `request_headers` (any, required): The HTTP headers dimmi sent with the request, as an object of name to value.
    - `requested_at` (string, required): When the request was sent.
    - `response_body` (string | null, required): The body the endpoint answered with, as text. Null when it gave none or never answered.
    - `response_headers` (any, required): The HTTP headers the endpoint answered with, as an object. Null when it never answered.
    - `response_status` (integer | null, required): HTTP status the endpoint answered with, such as 200 or 500. Null when it never answered.
    - `trigger` (string, required): What caused the attempt: auto (dimmi's own send or retry), manual (someone asked to resend) or test (a test send).
  - `delivery` (object, required)
    - `attempt_count` (integer, required): How many times dimmi has tried to send this delivery.
    - `created_at` (string, required): When it was created, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
    - `endpoint_id` (string, required): Id of the webhook endpoint the event is sent to, such as whk_.... Send it wherever a webhook endpoint is asked for.
    - `event_id` (string, required): Id of the event being delivered, such as evt_.... The same event sent to several endpoints shares it.
    - `event_type` (string, required): Dotted name of the event delivered, such as conversation.created or contact.updated; webhook.test for a plain test send.
    - `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.
    - `last_attempt_at` (string | null, required): When the newest attempt was made. Null before the first attempt.
    - `last_error_code` (string | null, required): Error code of the newest failed attempt, such as http_error or redirect_not_followed, or a network failure class. Null when it did not fail.
    - `last_response_status` (integer | null, required): HTTP status the endpoint answered the newest attempt with, such as 200 or 500. Null when it never answered.
    - `next_attempt_at` (string | null, required): When the next attempt is due. Null when none is planned.
    - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
    - `payload_bytes` (integer, required): Size of the payload sent, in bytes.
    - `sequence` (integer, required): A number that only goes up across events; of two deliveries about the same object, the higher one carries the newer copy.
    - `status` (string, required): Where the delivery stands: pending, retrying, succeeded, failed or canceled.
    - `succeeded_at` (string | null, required): When the endpoint accepted the delivery. Null until it does.
    - `test` (boolean, required): True when this is a test send rather than a real event.
    - `thin` (boolean, required): True when the full object was too large to send, so the payload carries only a reference to it and must be fetched.
  - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.

## 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/{endpoint}/tests' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "type": "<string>"
}'
```

## Example response

```json
{
  "data": {
    "attempt": {
      "duration_ms": 123,
      "error_code": "<string>",
      "error_message": "<string>",
      "hint": "<string>",
      "id": "<string>",
      "number": 123,
      "object": "<string>",
      "request_headers": null,
      "requested_at": "2026-11-01T09:30:00Z",
      "response_body": "<string>",
      "response_headers": null,
      "response_status": 123,
      "trigger": "<string>"
    },
    "delivery": {
      "attempt_count": 123,
      "created_at": "2026-11-01T09:30:00Z",
      "endpoint_id": "<string>",
      "event_id": "<string>",
      "event_type": "<string>",
      "id": "<string>",
      "last_attempt_at": "2026-11-01T09:30:00Z",
      "last_error_code": "<string>",
      "last_response_status": 123,
      "next_attempt_at": "2026-11-01T09:30:00Z",
      "object": "<string>",
      "payload_bytes": 123,
      "sequence": 123,
      "status": "<string>",
      "succeeded_at": "2026-11-01T09:30:00Z",
      "test": true,
      "thin": true
    },
    "object": "<string>"
  }
}
```

---

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