Webhooks

Create a webhook endpoint

Adds an endpoint that receives the event types it subscribes to. The URL must be HTTPS on port 443 to a public host.

Authorization

bearer webhooks:write
AuthorizationBearer <token>

A v1 API key; the scope named is the one the route needs.

In: header

Scope: webhooks:write

Header Parameters

Idempotency-Key*string

Names the act so a retry under it lands on the stored answer (idempotency-key).

Length1 <= length <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

POST
/v1/webhook-endpoints
curl -X POST "https://example.com/v1/webhook-endpoints" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "url": "http://example.com",    "subscribedTypes": [      "order.paid"    ]  }'
{  "endpoint": {    "id": "string",    "liveMode": true,    "url": "http://example.com",    "apiVersion": "string",    "status": "active",    "subscribedTypes": [      "order.paid"    ],    "description": "string",    "consecutiveFailures": 0,    "lastSuccessAt": "2019-08-24T14:15:22Z",    "lastFailureAt": "2019-08-24T14:15:22Z",    "disabledReason": "string",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  },  "secret": "stringstringstringstringstringst"}