daimon.email
Api referenceWebhooks

Get Webhook

Retrieve a specific webhook by ID

Authentication

Account API Key required via Authorization: Bearer {api_key} header.

Path Parameters

idstringpathrequired

Webhook 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

idstring

Unique webhook identifier (prefix: wh_)

account_idstring

Account that owns this webhook

inbox_idstring | null

Inbox this webhook is scoped to, or null for account-wide

urlstring

HTTPS endpoint where events are delivered

eventsarray

Event types this webhook is subscribed to

statusstring

Webhook health status:

  • active - Delivering events successfully
  • unhealthy - Multiple consecutive delivery failures
  • disabled - Manually disabled
last_delivered_atstring | null

ISO 8601 timestamp of last successful delivery

failure_countnumber

Consecutive delivery failures. Webhook goes unhealthy after 5 failures.

created_atstring

ISO 8601 timestamp of webhook creation

updated_atstring

ISO 8601 timestamp of last update

Error Responses

401error

Invalid or missing API key

404error

Webhook 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.