Create Subscription

This endpoint is used to create a new subscription under the given webhook.

post
https://api.claimsmanagertest.crawco.co.uk/webhooks/{webhookId}/subscriptions

Path parameters

Parameters marked are required.
Parameter Name Description Type Example Data
webhookId The unique id of the webhook that you want to create the subscription under. numeric 1

Request body parameters

Parameters marked are required.
Parameter Name Description Type Example Data
name A unique name given to the subscription. This optional field is for your personal use in identifying the subscription while interacting with the API. It is not used by Claims Manager. string Test Subscription
webhookEvent The name of the webhook event that this subscription is subscribing to. string New Event
isActive When set to false, this subscription is created in a disabled state. Defaults to true when not provided. string true
filters Object containing any filters defined for this subscription. object See Filters

Example request

curl --location --request POST 'https://api.claimsmanagertest.crawco.co.uk/webhooks/1/subscriptions' \
--header 'Authorization: Bearer {access token} \
--header 'Content-Type: application/json' \
--data-raw '{
  "name": "Test Subscription",
  "webhookEvent": "New Event",
  "isActive": true,
  "filters": {
    "fields": [
      {
        "name": "eventType",
        "operator": "equals",
        "value": "Event Log Entry"
      },
      {
        "name": "category",
        "operator": "equals",
        "value": "Report: Final"
      }
    ]
  }
}'

Response body parameters

Parameter Name Description Type Example Data
subscriptionId The unique id of the created subscription. numeric 1

Example response

{
    "subscriptionId": 1
}