Add an outbound webhook endpoint
Adds an address and the events it takes, and makes the secret every post to it is signed with. The secret is returned once, in `secret`, and cannot be read again; rotate it to get a new one. The address must be `https` and must not resolve to loopback, link-local or cloud metadata addresses (nor pri
better-auth.session_token<token>Better Auth session cookie. Production uses the __Secure- prefixed name.
Idempotency-Key?stringMakes retries safe. A repeated key with the same request returns the first result and sets
Idempotent-Replayed: true. The same key with a different request answers 409
idempotency.key_reused, and while the first request is still running 409
idempotency.in_progress. Results are kept for 24 hours. Server errors and refusals for lack
of sign-in or permission are not kept, so a retry runs again.
^[A-Za-z0-9_.:-]+$1 <= length <= 255application/json- body
name*string1 <= length <= 100url*stringAn https address. Credentials in the address and fragments are refused.
length <= 2048events*array<string>1 <= items <= 4The endpoint and its signing secret.
application/json- response
endpoint*secret*stringThe signing secret, whsec_ and 64 hex characters. It is shown here once and cannot be read again.
curl -X POST 'https://wardn.example.com/api/v1/outbound-webhooks' \ -H 'Content-Type: application/json' \ -d '{ "name": "string", "url": "string", "events": [ "string" ]}'{ "endpoint": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "deploy-events", "url": "https://hooks.example.com/wardn/deploys", "events": [ "string" ], "paused": true, "maskedSecret": "whsec_••••a91f", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "lastDelivery": { "status": "pending", "at": "2019-08-24T14:15:22Z", "code": 0 } }, "secret": "string"}List outbound webhook endpoints GET
The addresses Wardn posts its events to, each with the events it takes and how its newest finished delivery went, and the catalogue of events an endpoint can take. An endpoint's signing secret is never listed; `maskedSecret` shows only its last four characters. Needs `integration:manage`.
Get an outbound webhook endpoint GET
One endpoint with its events and how its newest finished delivery went. Needs `integration:manage`.