Register a webhook endpoint on a principal. The secret is shown once.

post/v1/principals/{id}/endpoints

Request

  • The document declares no server URL.
  • Auth: one of:
    • HTTP bearer
    • API key in cookie __Secure-better-auth.session_token

Path parameters

idstring required

Request body

urlstring required

Must be https — anything else answers 422. Query strings, paths and fragments are legal (integrations route and authenticate with them); only the scheme is policed, because a signed delivery over cleartext would still expose the event body and the signature.

Response

The request has succeeded and a new resource has been created as a result.

idstring required
urlstring required
createdAtstring date-time required
secretstring required

The signing secret, returned once.

Changes

No recorded changes to this operation across all 1 revision of this API.