# Send test event

`opensend webhooks test`

Posts one signed sample event to an endpoint and answers with what the endpoint said.

Needs the scope: `webhooks:write`

## Flags

- `<id>` (string, required): The id of the item. Up to 64 characters.

## Returns

The command prints the answer: as JSON when its output goes to a file or another program, and as a table or a list of fields in a terminal. When the API refuses, the error goes to the error stream and the command ends with a code that names the failure. [Output and scripts](https://opensend.sh/docs/scripting) lists the codes.

- `object` ("webhook_delivery"): Always `webhook_delivery`.
- `id` (string): The id of the delivery.
- `webhookId` (string): The id of the webhook it was for.
- `type` (string): The event that was posted. One of: `email.sent`, `email.delivered`, `email.delayed`, `email.bounced`, `email.opened`, `email.clicked`, `email.complained`, `email.failed`, `email.received`, `email.scheduled`, `email.canceled`, `automation.entered`, `automation.finished`, `automation.step`.
- `state` (string): `pending` while it is still being tried, `delivered` once your address answered 2xx, `failed` after the last try. One of: `pending`, `delivered`, `failed`.
- `status` (integer): The HTTP status of the last answer, or 0 when there was none.
- `attempts` (integer): How many times it has been tried.
- `error` (string): What went wrong on the last try. Empty when nothing did.
- `nextAttemptAt` (string | null): When it is tried again, or `null`.
- `createdAt` (string): When the event happened.

## Example

CLI:

```bash
opensend webhooks test wh_01
```

Answer:

```json
{
  "object": "webhook_delivery",
  "id": "evt_04:wh_01",
  "webhookId": "wh_01",
  "type": "email.sent",
  "state": "delivered",
  "status": 200,
  "attempts": 1,
  "error": "",
  "nextAttemptAt": null,
  "createdAt": "2026-11-27T09:30:00.000Z"
}
```
