API referenceWebhooks

Create a webhook

POST/webhooks

The whsec_ signing secret is returned once, in this response.

Authorization

apiKey
AuthorizationBearer <token>

A project API key: Authorization: Bearer s0_…

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/webhooks" \  -H "Content-Type: application/json" \  -d '{    "endpoint": "http://example.com",    "events": [      "email.sent"    ]  }'
{  "object": "webhook",  "id": "string",  "endpoint": "string",  "events": [    "email.sent"  ],  "status": "enabled",  "created_at": "2019-08-24T14:15:22Z",  "signing_secret": "string"}