Get Webhook
Retrieve a specific webhook by ID
Authentication
Account API Key required via Authorization: Bearer {api_key} header.
Path Parameters
idstringpathrequiredWebhook ID (prefix: wh_)
curl -X GET https://api.daimon.email/v1/webhooks/wh_xyz789 \
-H "Authorization: Bearer dm_free_7d8a9b0c1d2e3f4g5h6i7j8k9l0m1n2o"import { DaimonClient } from 'daimon-email';
const client = new DaimonClient({
apiKey: 'dm_free_7d8a9b0c1d2e3f4g5h6i7j8k9l0m1n2o'
});
const webhook = await client.webhooks.get('wh_xyz789');
console.log(`URL: ${webhook.url}`);
console.log(`Status: ${webhook.status}`);
console.log(`Failures: ${webhook.failure_count}`);from daimon_email import DaimonClient
client = DaimonClient(api_key='dm_free_7d8a9b0c1d2e3f4g5h6i7j8k9l0m1n2o')
webhook = client.webhooks.get('wh_xyz789')
print(f"URL: {webhook.url}")
print(f"Status: {webhook.status}")
print(f"Failures: {webhook.failure_count}")Response
{
"result": {
"id": "wh_xyz789",
"account_id": "acc_def456",
"inbox_id": "inb_abc123",
"url": "https://your-agent.com/webhook",
"events": ["message.received"],
"status": "active",
"last_delivered_at": "2024-03-11T15:30:00Z",
"failure_count": 0,
"created_at": "2024-03-11T14:23:45Z",
"updated_at": "2024-03-11T14:23:45Z"
},
"next_steps": [
"Check failure_count - if >0, investigate endpoint health",
"Use PATCH /v1/webhooks/{id} to update URL or events",
"Use DELETE /v1/webhooks/{id} to remove webhook"
]
}Response Fields
idstringUnique webhook identifier (prefix: wh_)
account_idstringAccount that owns this webhook
inbox_idstring | nullInbox this webhook is scoped to, or null for account-wide
urlstringHTTPS endpoint where events are delivered
eventsarrayEvent types this webhook is subscribed to
statusstringWebhook health status:
active- Delivering events successfullyunhealthy- Multiple consecutive delivery failuresdisabled- Manually disabled
last_delivered_atstring | nullISO 8601 timestamp of last successful delivery
failure_countnumberConsecutive delivery failures. Webhook goes unhealthy after 5 failures.
created_atstringISO 8601 timestamp of webhook creation
updated_atstringISO 8601 timestamp of last update
Error Responses
401errorInvalid or missing API key
404errorWebhook not found or does not belong to this account
Info
Monitoring webhook health: Check failure_count and status regularly. If a webhook is unhealthy, verify your endpoint is returning HTTP 200 within 5 seconds and accepting POST requests with valid HTTPS.