Integrations
Preview

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

POST
/outbound-webhooks
cookiebetter-auth.session_token<token>

Better Auth session cookie. Production uses the __Secure- prefixed name.

Idempotency-Key?string

Makes 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.

Match^[A-Za-z0-9_.:-]+$
Length1 <= length <= 255
application/json
  1. body
name*string
Length1 <= length <= 100
url*string

An https address. Credentials in the address and fragments are refused.

Lengthlength <= 2048
events*array<string>
Items1 <= items <= 4

Response Body

The endpoint and its signing secret.

application/json
  1. response
endpoint*
secret*string

The signing secret, whsec_ and 64 hex characters. It is shown here once and cannot be read again.

Example Request
curl -X POST 'https://wardn.example.com/api/v1/outbound-webhooks' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "url": "string",  "events": [    "string"  ]}'
Example Response
{  "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"}