Create a webhook endpoint
Auth: Bearer key with no domain scope.
An endpoint belongs to a key: only a send made with that key produces events for it.
bearerAuthorizationBearer <token>An API key in the Authorization header.
application/json- body
key_id*stringKey whose sends produce this endpoint's events.
1 <= lengthurl*stringhttps URL Pouch posts to. A private or unroutable address is refused.
1 <= lengthevents*array<>Events to receive: email.delivered, email.bounced, email.complained, email.unsubscribed, list.subscribed, address.received, domain.reputation_changed, organization.reputation_changed.
1 <= itemsdescription?stringNote for whoever reads the endpoint list later.
length <= 200The created endpoint, with its signing secret.
application/json- response
id?stringOpaque id, prefixed whk_.
key_id?stringThe key whose sends produce this endpoint's events.
url?stringWhere Pouch posts.
events?array<string>Events this endpoint receives.
description?|The note it was created with, or null.
disabled?booleanTrue while delivery is stopped, by request or by too many exhausted deliveries.
last_success_at?|ISO 8601 timestamp of the last 2xx, or null.
last_failure_at?|ISO 8601 timestamp of the last failed attempt, or null.
created_at?stringISO 8601 timestamp.
secret?stringThe signing secret, returned by this call only. Reveal it again on the key detail screen, or rotate for a new one.
curl -X POST 'https://pouch.example.com/v1/webhook_endpoints' \ -H 'Content-Type: application/json' \ -d '{ "key_id": "string", "url": "string", "events": [ "email.delivered" ]}'{ "id": "string", "key_id": "string", "url": "string", "events": [ "string" ], "description": "string", "disabled": true, "last_success_at": "string", "last_failure_at": "string", "created_at": "string", "secret": "string"}