email

Register webhook

Register a webhook URL to receive real-time email.received events. AgentLair will POST a JSON payload to your URL within seconds of inbound delivery.

If secret is provided, requests include X-AgentLair-Signature: sha256=<hmac-sha256-hex-of-json-body>.

post/v1/email/webhooks

Request

  • Base URL: https://agentlair.dev
  • URL: https://agentlair.dev/v1/email/webhooks
  • Auth: HTTP bearer

Request body

addressstring required
urlstring uri required
secretstring

Optional HMAC secret for signature verification

Example request

{
  "address": "myagent@agentlair.dev",
  "url": "https://myserver.com/webhook"
}

Response

Webhook registered

idstring
addressstring
urlstring uri
has_secretboolean
eventsstring[]
created_atstring date-time

Example response

{
  "id": "wh_abc123def456ghi7",
  "address": "myagent@agentlair.dev",
  "events": [
    "email.received"
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.