# Send a test event

> Send one signed sample event now and see what your receiver answered.

Canonical: <https://www.tryadeli.com/docs/api/webhooks/test-webhook>

`POST https://app.tryadeli.com/api/v1/webhooks/{webhookId}/test`

Authorization: `Bearer <API key>` — see [Authentication](https://www.tryadeli.com/docs/authentication)

Send one signed sample event to a webhook now, and get back what your receiver
answered. Use it to check a receiver before any real comment arrives: the event
has exactly the envelope and headers of a real one, with ids prefixed `test_`
and `"test": true` at the top level.

There is one attempt, with the same 10-second timeout as a real delivery and no
redirects, and no retries. Test events are not queued, and a failing answer
(even `410`) never disables the webhook. Each webhook accepts one test event
every few seconds.

**Body**

| Name       | Type     | Required | Description                                                              |
| ---------- | -------- | -------- | ------------------------------------------------------------------------ |
| `type`     | `string` |          | `comment.created` (default) or `message.postback`.                       |
| `platform` | `string` |          | `tiktok` (default) or `instagram`. `message.postback` is Instagram-only. |

The body is optional. Returns `200` with `{ eventId, delivered, statusCode, error }`:
`delivered` is true for any `2xx`, `statusCode` is null when the request never got
an answer, and `error` says why (`timed out`, `request failed`, or `HTTP <status>`).

**Errors** — `401 unauthorized`, `400 invalid_request`, `404 webhook_not_found`,
`422 unsupported_for_platform`, `429 rate_limited` (with `Retry-After`).

The event your receiver gets:

```json
{
  "id": "evt_test_5f0c2a9e7b1d4c3a2f1e0d9c",
  "type": "comment.created",
  "createdAt": "2026-11-02T17:00:00.000Z",
  "profileId": "00000000-0000-4000-8000-000000000001",
  "platform": "tiktok",
  "accountId": "00000000-0000-0000-0000-000000000000",
  "test": true,
  "data": {
    "commentId": "test_7400000000000000001",
    "mediaId": "test_7400000000000000000",
    "parentId": null,
    "text": "Test comment from Adeli",
    "from": { "id": "test_user", "username": "adeli.test", "displayName": "Adeli Test" },
    "isSelf": false
  }
}
```

## Request examples

**cURL**

```bash
curl -X POST "https://app.tryadeli.com/api/v1/webhooks/00000000-0000-4000-8000-000000000009/test" \
  -H "Authorization: Bearer $ADELI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "comment.created",
  "platform": "tiktok"
}'
```

**JavaScript**

```javascript
const response = await fetch("https://app.tryadeli.com/api/v1/webhooks/00000000-0000-4000-8000-000000000009/test", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.ADELI_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    type: "comment.created",
    platform: "tiktok",
  }),
});
console.log(await response.json());
```

**Python**

```python
import os

import requests

response = requests.post(
    "https://app.tryadeli.com/api/v1/webhooks/00000000-0000-4000-8000-000000000009/test",
    headers={"Authorization": f"Bearer {os.environ['ADELI_API_KEY']}"},
    json={
        "type": "comment.created",
        "platform": "tiktok",
    },
)
print(response.json())
```

## Responses

### 200

```json
{
  "eventId": "evt_test_5f0c2a9e7b1d4c3a2f1e0d9c",
  "delivered": true,
  "statusCode": 204,
  "error": null
}
```

### 200 Receiver rejected it

```json
{
  "eventId": "evt_test_5f0c2a9e7b1d4c3a2f1e0d9c",
  "delivered": false,
  "statusCode": 401,
  "error": "HTTP 401"
}
```

### 429

```json
{
  "error": {
    "code": "rate_limited",
    "message": "One test event per webhook every few seconds; retry shortly",
    "details": { "retryAfterSeconds": 3 }
  }
}
```
