Create Subscription

View as Markdown
This endpoint creates a new webhook subscription.

Authentication

AuthorizationBearer

Authentication using Personal Access Token (PAT) token or OAuth2

Request

This endpoint expects an object.
topicslist of enumsRequired
The event types for which webhook callbacks will be received.
urlstringRequiredformat: "uri"

The URL that will be called when an event matching the subscription topic occurs. The URL must use HTTPS, accept POST requests, and handle content of type application/json.

descriptionstring or nullOptional
Description of the webhook subscription.
secretstring or nullOptionalformat: "^whsec_[a-zA-Z0-9+/]{32}$"
A secret key used to sign the webhook payload for verifying its authenticity on the receiver's end.

Response

Success
created_atdatetime
TimeStamp the webhook subscription was created
descriptionstring or null
Description of the webhook subscription
idstring
ID of the webhook subscription
secretstringformat: "^whsec_[a-zA-Z0-9+/]{32}$"
A secret key used to sign the webhook payload for verifying its authenticity on the receiver's end.
topicslist of enums
List of event types the webhook will receive notifications for
urlstring
URL subscription events will be posted to

Errors

401
Unauthorized Error
403
Forbidden Error
422
Unprocessable Entity Error