Webhooks
Create a webhook endpoint
Creates a webhook endpoint that receives project event deliveries.
AuthorizationBearer <token>
JWT issued by Better Auth. Verified via JWKS.
In: header
Path Parameters
project_id*string
Unique project identifier (prefixed, e.g. prj_xxx).
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Mutable fields of a webhook endpoint (used for create and update).
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/projects/string/webhooks" \ -H "Content-Type: application/json" \ -d '{ "url": "https://example.com/hooks/pgbeam" }'{ "id": "whk_01h455vb4pex5vsknk084sn02q", "project_id": "string", "url": "https://example.com/hooks/pgbeam", "format": "json", "event_types": [ "string" ], "enabled": true, "description": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}{ "error": { "code": "string", "message": "string" }}{ "error": { "code": "string", "message": "string" }}{ "error": { "code": "string", "message": "string" }}{ "error": { "code": "string", "message": "string" }}{ "error": { "code": "string", "message": "string" }}