PUT
/
webhooks
/
subscribe
curl --request PUT \
  --url https://notificationservice.withbenji.com/webhooks/subscribe \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "endpoint": "<string>",
  "event_name": "<string>",
  "entity_type": 123
}'
{
    "code": "ok",
    "data": {
        "subscribed": true
    }
}
The Bearer token to be used on this API is your partner access token
endpoint
string
required

Your endpoint URL that will receive the event webhooks

event_name
string

The event you are subscribing to. Note that if an event is not specified, all events for the entity type specified will be subscribed to.

entity_type
integer

Integer representing an enum of one of the following entity type values to subscribe to :

To delete an endpoint subscription , just use this API with an empty endpoint parameter

Return values

subscribed
boolean
required

A true or false value indicating whether the subscription was succesfull.

{
    "code": "ok",
    "data": {
        "subscribed": true
    }
}