Create a webhook endpoint
Registers an HTTPS endpoint for the listed event types and returns its signing secret once. Store the secret now: reads never return it.
A COMPANY key, or a PLATFORM key with the Account-Holder header,
creates an endpoint owned by that account holder. It receives only that
account holder’s events.
The URL must use https on port 443 without a user name, password or
fragment, and its host must resolve only to public internet addresses.
Every event type must be one this API publishes, and the API key must
hold the read permission of each event’s object, for example
cards:read for card events. At most 16 endpoints can exist at once for
an account holder or a platform.
Authentication
Access token from POST /access-token. Valid for at most 30 minutes.
Headers
The account holder a platform API key acts on. Platform keys must send it on account holder operations. A company API key acts on its own account holder; it may omit the header or send its own account holder ID.
Your unique key for this operation: 1 to 255 visible ASCII characters, ideally a new UUID v4 for each operation. A value in double quotes is accepted and the quotes are removed. Retrying with the same key and the same request returns the first response with Idempotent-Replayed: true; the same key with a different request is refused with IDEMPOTENCY_KEY_REUSED. A key can be used again 30 days after its operation completes.
Your own correlation ID for this request. It is recorded with the request. The X-Request-Id response header is always generated by the server.
Request
An https URL on port 443 with no user name, password or fragment. Its host must resolve only to public internet addresses; private, loopback, link-local and cloud metadata addresses are refused.
PAUSED creates the endpoint without delivering to it yet.
Response headers
Remaining budget for each rate limit policy, for example "burst"; r=57; t=6 (requests remaining and seconds until the window resets).
The rate limit policies applied to this request, for example "burst"; q=60; w=10 (requests allowed per window of seconds).
Path of the resource, relative to the API host, for example /api/v2/embeddedSessions/0b6f3c1e-5d2a-4c8e-9a71-3f4d2e1b6c90.
Sent as true when this response repeats the first response to the same Idempotency-Key. A replay keeps the first response’s status and body, including the requestId of a problem; X-Request-Id is new.
Response
Always webhookEndpoint.
true on a live platform in production, false on a Sandbox platform and outside production.
PAUSED endpoints receive nothing; DELETED endpoints are final.
The signing secret: whsec_ followed by the base64 of 32 random bytes, whose decoded bytes are the HMAC-SHA256 key. It is returned only by this response. A retry with the same Idempotency-Key within 24 hours returns it again; after that the replay leaves it out, so rotate the secret if it was lost.