Documentation

Create a webhook by external application or framework

POST hook/subscribe/{event}

Used for

Create a webhook. Typical usage for this API is the setup of an external subscription.
The external application can register a webhook in a dynamic way.
This function is overlapping with the basic function POST.

Authentication

Authentication required

Parameters

Parameter Omschrijving Verplicht Locatie Voorbeeld
target_url The url to post to Yes Body https://hooks.zapier.com/hooks/standard/2925541/4be1a53be005409fae79c272360cf7ae/
event A combination of context and event Yes Url booking_created

Example

Registrer a webhook.

POST api/rest/hook/subscribe/booking_updated 
Request
{
  "target_url": "https://hooks.zapier.com/hooks/standard/2925541/4be1a53be005409fae79c272360cf7ae/"
}
Response: 
{
    "id": "2",
    "Location": "http://localhost/trunk/src/api/rest/hook/3"
}

The following right may be necessary in order to use this functionality.