Create a webhook subscription

​

Creates a webhook subscription owned by the caller and returns the signing secret once

Body

required
application/json
  • Event types the subscription is interested in

  • HTTPS endpoint deliveries are POSTed to

Responses

  • application/json
Request Example for post/webhooks/v1/subscriptions
curl https://api.specs.wseng.ai/webhooks/v1/subscriptions \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "url": "https://example.com/webhooks/spec-viewer",
  "eventTypes": [
    "specification.updated",
    "comment.created"
  ]
}'
{
  "subscriptionId": "sub_01HQXYZ",
  "url": "https://example.com/webhooks/spec-viewer",
  "eventTypes": [
    "specification.updated",
    "comment.created"
  ],
  "status": "active",
  "createdAt": "2024-06-15T10:30:00.000Z",
  "signingSecret": "whsec_01HQXYZabcdef"
}