Skip to content

Create a new subscription

Request

Creates a new subscription to webhook events

Security
ApiKeyAuth
Bodyapplication/jsonrequired
callbackUrlstring, [ 0 .. 255 ] charactersrequired
secretstring, [ 0 .. 255 ] charactersrequired
eventsArray of stringsrequired
POST
/subscription
curl -i -X POST \
  https://developers.prana.software/webhooks/openwebhooks/subscription \
  -H 'Content-Type: application/json' \
  -H 'X-API-KEY: YOUR_API_KEY_HERE' \
  -d '{
    "callbackUrl": "string",
    "secret": "string",
    "events": [
      "string"
    ]
  }'

Responses

Subscription created successfully

Bodyapplication/json
subscriptionIdstring
responseStatestring
Enum:"SUCCESS""FAILED""LOCKED"
errorsArray of strings
Response
{ "subscriptionId": "string", "responseState": "SUCCESS", "errors": [ "string" ] }