Webhooks
Create and manage webhooks, list deliveries and replay them.
See Webhooks for events, payloads and signature verification.
The webhook object
{
"object": "webhook",
"id": "4dd369bc-aa82-4ff3-97de-514ae3000ee0",
"endpoint": "https://acme.com/webhooks/usend",
"events": ["email.delivered", "email.bounced"],
"enabled": true,
"signing_secret": "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw",
"created_at": "2026-10-11T08:00:00.000Z"
}Create a webhook
POST /webhooks
| Name | Type | Required | Description |
|---|---|---|---|
endpoint | string | Yes | An absolute http:// or https:// URL. |
events | string[] | Yes | At least one event type: email.queued, email.scheduled, email.sent, email.delivered, email.delivery_delayed, email.bounced, email.complained, email.opened, email.clicked, email.failed, email.canceled, email.received, contact.unsubscribed. |
curl -X POST https://api.usend.et/webhooks \
-H "Authorization: Bearer us_123456789" \
-H "Content-Type: application/json" \
-d '{
"endpoint": "https://acme.com/webhooks/usend",
"events": ["email.delivered", "email.bounced"]
}'Returns the webhook object, including signing_secret.
Retrieve a webhook
GET /webhooks/{id}
curl https://api.usend.et/webhooks/4dd369bc-aa82-4ff3-97de-514ae3000ee0 \
-H "Authorization: Bearer us_123456789"Returns the webhook object.
List webhooks
GET /webhooks
curl https://api.usend.et/webhooks \
-H "Authorization: Bearer us_123456789"{
"object": "list",
"data": [
{
"object": "webhook",
"id": "4dd369bc-aa82-4ff3-97de-514ae3000ee0",
"endpoint": "https://acme.com/webhooks/usend",
"events": ["email.delivered", "email.bounced"],
"enabled": true,
"signing_secret": "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw",
"created_at": "2026-10-11T08:00:00.000Z"
}
]
}Update a webhook
PATCH /webhooks/{id}
| Name | Type | Required | Description |
|---|---|---|---|
endpoint | string | No | A new URL. |
events | string[] | No | Replaces the subscribed events. |
enabled | boolean | No | false pauses the webhook. |
curl -X PATCH https://api.usend.et/webhooks/4dd369bc-aa82-4ff3-97de-514ae3000ee0 \
-H "Authorization: Bearer us_123456789" \
-H "Content-Type: application/json" \
-d '{ "enabled": false }'Returns the updated webhook object.
Delete a webhook
DELETE /webhooks/{id}
curl -X DELETE https://api.usend.et/webhooks/4dd369bc-aa82-4ff3-97de-514ae3000ee0 \
-H "Authorization: Bearer us_123456789"{ "object": "webhook", "id": "4dd369bc-aa82-4ff3-97de-514ae3000ee0", "deleted": true }List deliveries
GET /webhooks/{id}/deliveries
Lists the events sent to a webhook, newest first. Paginated. Deliveries are kept for 30 days.
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The webhook ID (path). |
limit | integer | No | 1 to 100. Default 50. |
after | string | No | Return deliveries older than this delivery ID. |
before | string | No | Return deliveries newer than this delivery ID. |
curl "https://api.usend.et/webhooks/4dd369bc-aa82-4ff3-97de-514ae3000ee0/deliveries?limit=20" \
-H "Authorization: Bearer us_123456789"{
"object": "list",
"data": [
{
"id": "2b7c4a51-1f0e-4f6e-9c8a-7d2f3e9a6b10",
"event_type": "email.delivered",
"status": "succeeded",
"attempts": 1,
"response_status": 200,
"last_error": null,
"created_at": "2026-10-11T09:12:47.118Z",
"delivered_at": "2026-10-11T09:12:47.402Z"
}
],
"has_more": false
}status is pending, succeeded or failed. See Retries and replay.
Replay a delivery
POST /webhooks/{id}/deliveries/{delivery_id}/replay
Sends a delivery again with its original payload.
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The webhook ID (path). |
delivery_id | string | Yes | The delivery ID (path). |
curl -X POST https://api.usend.et/webhooks/4dd369bc-aa82-4ff3-97de-514ae3000ee0/deliveries/2b7c4a51-1f0e-4f6e-9c8a-7d2f3e9a6b10/replay \
-H "Authorization: Bearer us_123456789"{}Rotate the signing secret
POST /webhooks/{id}/rotate-secret
Issues a new signing secret. The old secret stops signing immediately, so update your endpoint right away. The new secret is returned here and on GET /webhooks/{id}.
curl -X POST https://api.usend.et/webhooks/4f8a1d52-2f4b-4d8e-8a7e-6f1f6b0f9b21/rotate-secret \
-H "Authorization: Bearer us_123456789"{ "object": "webhook", "id": "4f8a1d52-2f4b-4d8e-8a7e-6f1f6b0f9b21", "signing_secret": "whsec_..." }List webhook events
GET /webhooks/events
Every event sent to any of your endpoints, newest first. Paginated.
| Name | Type | Required | Description |
|---|---|---|---|
webhook_id | string | No | Only events sent to this endpoint. |
type | string | No | Only this event type, such as email.bounced. |
status | string | No | pending, succeeded or failed. |
{
"object": "list",
"data": [
{
"object": "webhook_event",
"id": "9a1c0f2e-7d1f-4e2a-9b5c-3f8d2e1a6c74",
"type": "email.delivered",
"webhook_id": "4f8a1d52-2f4b-4d8e-8a7e-6f1f6b0f9b21",
"endpoint": "https://example.com/hooks",
"status": "succeeded",
"attempts": 1,
"response_status": 200,
"last_error": null,
"created_at": "2026-10-11T09:12:47.118Z",
"delivered_at": "2026-10-11T09:12:47.402Z"
}
],
"has_more": false
}Retrieve a webhook event
GET /webhooks/events/{id}
Returns the event with its payload, the JSON body sent to your endpoint.
List delivery attempts
GET /webhooks/events/{id}/attempts
{
"object": "list",
"data": [
{ "object": "webhook_attempt", "id": "...", "attempt": 1, "status": "failed", "response_status": 500, "error": "endpoint returned HTTP 500", "created_at": "2026-10-11T09:12:47.402Z" }
]
}Replay a webhook event
POST /webhooks/events/{id}/replay
Sends the event to its endpoint again.
{ "object": "webhook_event", "id": "9a1c0f2e-7d1f-4e2a-9b5c-3f8d2e1a6c74" }