API Reference

Create webhook subscription

Requires subscriptions:manage. Registers the authenticated principal's public HTTPS callback after URL safety validation, encrypts the shared secret without returning it, and responds with the new subscription.

POST/v1/subscriptions

Requires subscriptions:manage. Registers the authenticated principal's public HTTPS callback after URL safety validation, encrypts the shared secret without returning it, and responds with the new subscription.

Authorization

bearerAuth
AuthorizationBearer <token>

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

curl -X POST "https://example.com/v1/subscriptions" \  -H "Content-Type: application/json" \  -d '{    "active": true,    "events": [      "CertificateIssued.v2",      "CertificateFailed.v1"    ],    "secret": "replace-with-a-strong-shared-secret",    "url": "https://consumer.example.com/webhooks/alfred"  }'
{  "subscription": {    "active": true,    "createdAt": "string",    "events": [      "string"    ],    "health": "string",    "id": "string",    "kmsKeyId": "string",    "ownerPrincipalId": "string",    "url": "string"  }}