Create a webhook subscription
Creates a webhook subscription owned by the caller and returns the signing secret once
OAuth scopes
- openid
Body
required
application/json
- Type: array string[] 1…event
Types min length:1requiredEvent types the subscription is interested in
- Type: stringurlmax length:2048Format: urirequired
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"
}