Create Webhook
CLI:
Authentication
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
Full list of event types this webhook should receive. Required: omitting it or sending an empty array
returns a 400, and there is no “all events” default. Send every type you want in this array (not
incremental). See Webhooks overview
for spam, blocked, and unauthenticated events and required permissions.
Custom HTTP headers to include with every delivery to this webhook. Header values are write-only: AgentMail never returns them from webhook read endpoints. The map must contain at least one entry when provided, and every name and value must be a valid HTTP header.
Inboxes for which to send events. A webhook can list at most 10 inboxes and pods combined;
more returns 403 with limit_exceeded.
Pods for which to send events. A webhook can list at most 10 pods and inboxes combined; more returns
403 with limit_exceeded. The webhook receives an event that matches any listed pod or inbox, so a
listed pod already covers every inbox in it.
Response
Whether the webhook is enabled. It becomes false when you disable it, and also when deliveries to
the URL have failed for 5 days, in which case AgentMail sends no notification. Re-enable it with
update and enabled set to true.
ID of the pod the webhook belongs to: the pod it was created in, or the pod of the inbox it
belongs to. Absent for an organization webhook and on some inbox webhooks. This is not the
list of pods it receives events for; see pod_ids.
ID of the inbox the webhook belongs to, if it was created for an inbox. This is not the list
of inboxes it receives events for; see inbox_ids.
