send0
API Reference

Webhooks

Configure webhook endpoints to receive event notifications.

Register a webhook endpoint

POST /v1/webhooks

Creates a new webhook endpoint to receive event notifications.

Body parameters

ParameterTypeRequiredDescription
urlstringYesThe URL to receive webhook events
eventsstring[]NoEvent types to subscribe to (default: all)
activebooleanNoWhether the endpoint is active (default: true)

Note: Webhook endpoint management is available via the REST API. Use Send0.webhooks.verify() for payload verification.

TypeScript SDK

// Webhook endpoint management is done via the REST API.
// The SDK provides webhook payload verification:
const event = Send0.webhooks.verify(body, headers, secret);

Python SDK

from send0 import Webhooks
event = Webhooks.verify(body, headers, secret)

Go SDK

event, err := send0.VerifyWebhook(body, headers, secret)

curl

curl -X POST https://api.send0.dev/v1/webhooks \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://yourapp.com/webhooks/send0",
    "events": ["email.delivered", "email.bounced", "email.complained"]
  }'

Response (201)

{
  "id": "wh_3mKpLvRw9nQx",
  "object": "webhook_endpoint",
  "url": "https://yourapp.com/webhooks/send0",
  "events": ["email.delivered", "email.bounced", "email.complained"],
  "secret": "whsec_abc123...",
  "active": true,
  "created_at": "2026-04-12T10:30:00Z"
}

Important: Save the secret from the response — it's only shown once. Use it to verify webhook signatures.


Get a webhook endpoint

GET /v1/webhooks/:id

Retrieves the details of an existing webhook endpoint.

curl

curl https://api.send0.dev/v1/webhooks/wh_3mKpLvRw9nQx \
  -H "Authorization: Bearer sk_live_..."

Response (200)

{
  "id": "wh_3mKpLvRw9nQx",
  "object": "webhook_endpoint",
  "url": "https://yourapp.com/webhooks/send0",
  "events": ["email.delivered", "email.bounced", "email.complained"],
  "active": true,
  "created_at": "2026-04-12T10:30:00Z"
}

List webhook endpoints

GET /v1/webhooks

Returns a list of all webhook endpoints for your workspace.

curl

curl https://api.send0.dev/v1/webhooks \
  -H "Authorization: Bearer sk_live_..."

Response (200)

{
  "data": [
    {
      "id": "wh_3mKpLvRw9nQx",
      "object": "webhook_endpoint",
      "url": "https://yourapp.com/webhooks/send0",
      "events": ["email.delivered", "email.bounced", "email.complained"],
      "active": true,
      "created_at": "2026-04-12T10:30:00Z"
    }
  ],
  "has_more": false,
  "cursor": null
}

Update a webhook endpoint

PATCH /v1/webhooks/:id

Updates an existing webhook endpoint. Only the provided fields are updated.

Body parameters

ParameterTypeRequiredDescription
urlstringNoNew URL for the endpoint
eventsstring[]NoUpdated event types
activebooleanNoEnable or disable the endpoint

curl

curl -X PATCH https://api.send0.dev/v1/webhooks/wh_3mKpLvRw9nQx \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "events": ["email.delivered", "email.bounced", "email.complained", "email.opened"],
    "active": true
  }'

Response (200)

{
  "id": "wh_3mKpLvRw9nQx",
  "object": "webhook_endpoint",
  "url": "https://yourapp.com/webhooks/send0",
  "events": ["email.delivered", "email.bounced", "email.complained", "email.opened"],
  "active": true,
  "created_at": "2026-04-12T10:30:00Z"
}

Delete a webhook endpoint

DELETE /v1/webhooks/:id

Permanently deletes a webhook endpoint. Events will no longer be sent to this URL.

curl

curl -X DELETE https://api.send0.dev/v1/webhooks/wh_3mKpLvRw9nQx \
  -H "Authorization: Bearer sk_live_..."

Response (200)

{
  "id": "wh_3mKpLvRw9nQx",
  "object": "webhook_endpoint",
  "deleted": true
}

Send a test event

POST /v1/webhooks/:id/test

Sends a test webhook event to your endpoint for verification. Useful for confirming your endpoint is reachable and correctly processing payloads.

curl

curl -X POST https://api.send0.dev/v1/webhooks/wh_3mKpLvRw9nQx/test \
  -H "Authorization: Bearer sk_live_..."

Response (200)

{
  "success": true,
  "status_code": 200,
  "response_time_ms": 145
}

Available event types

EventDescription
email.queuedEmail accepted and queued for sending
email.deliveredEmail delivered to recipient
email.openedRecipient opened the email
email.clickedRecipient clicked a link
email.bouncedEmail bounced (includes bounce_type: hard or soft)
email.complainedRecipient marked as spam
email.failedEmail delivery failed
domain.health.degradedDomain DNS health check regression detected