Create and manage webhook endpoints to receive event notifications
Manage webhook endpoints that receive event notifications from all do.dev services.
/v1/webhooksCreate a new webhook endpoint
urlstringrequiredenabled_eventsstring[]requireddescriptionstringcurl -X POST https://api.do.dev/v1/webhooks \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/webhooks/dodev",
"enabled_events": ["send.email.*", "telco.lookup.completed"],
"description": "Production webhook handler"
}'{
"id": "whep_abc123",
"url": "https://example.com/webhooks/dodev",
"enabled_events": ["send.email.*", "telco.lookup.completed"],
"description": "Production webhook handler",
"signing_secret": "whsec_EXAMPLE_SECRET_DO_NOT_USE",
"is_active": true,
"message": "Webhook endpoint created. Save the signing_secret - it will not be shown again."
}The signing_secret is only returned at creation time. Store it securely — you'll need it to verify webhook signatures.
The enabled_events field supports wildcard patterns:
| Pattern | Matches |
|---|---|
* | All events from all services |
send.* | All send events (send.email.sent, send.email.delivered, etc.) |
send.email.* | All send email events |
telco.lookup.completed | Only this specific event type |
You can combine multiple patterns:
{
"enabled_events": [
"send.email.bounced",
"send.email.complained",
"telco.*"
]
}/v1/webhooksList all webhook endpoints for your organization
curl https://api.do.dev/v1/webhooks \
-H "Authorization: Bearer YOUR_API_KEY"{
"endpoints": [
{
"id": "whep_abc123",
"url": "https://example.com/webhooks/dodev",
"description": "Production webhook handler",
"enabled_events": ["send.email.*", "telco.lookup.completed"],
"is_active": true,
"is_paused": false,
"consecutive_failures": 0,
"last_delivery_at": 1700000000000,
"last_delivery_status": 200,
"created_at": 1699900000000
}
]
}/v1/webhooks/{id}Get a single webhook endpoint
idstringrequired/v1/webhooks/{id}/testSend a test event to a webhook endpoint
Sends a synthetic platform.test event to the specified endpoint. Use this to verify your webhook handler is working correctly.
curl -X POST https://api.do.dev/v1/webhooks/whep_abc123/test \
-H "Authorization: Bearer YOUR_API_KEY"{
"success": true,
"eventId": "evt_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "Test event published. The webhook will be delivered shortly."
}The test event payload looks like:
{
"eventId": "evt_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"type": "platform.test",
"service": "platform",
"data": {
"message": "This is a test webhook event from do.dev",
"endpoint_id": "whep_abc123"
},
"livemode": false,
"createdAt": 1700000000000
}| State | Description |
|---|---|
| Active | Endpoint is receiving events normally |
| Disabled | Manually disabled — no events delivered |
| Paused | Auto-paused after 10 consecutive delivery failures. Must be manually unpaused from the dashboard |
{
"error": "url is required"
}{
"error": "Webhook URL must use HTTPS"
}{
"error": "unauthorized",
"message": "Invalid or missing API key"
}{
"error": "forbidden",
"message": "Insufficient scope. Required: platform:webhooks:manage"
}