Developer

Webhook General

When configuring your webhook you have two choices of format. JSON or x-www-form-urlencoded.

The consuming API has 15 seconds to accept the event. If a succes http status code has not been returned with these 15 seconds, the event will be discarded and the engine will proceed to the next one.

Only one event is dispatched at a time, and in sequence. There is no parallel dispatch against a single customer end point, and the engine will not try to resend a failed request.

If a consuming API consistently fails over a period of time, the engine will suspend delivery until the customer manually re-enables distribution of events.

JSON Encoded Events

This is an example of a call created event being posted as JSON. This example assumes that the hook has been configured to be http://www.example.com/webhook

POST /webhook
Host: www.example.com
X-Telzio-Event-Type: call_created
Content-Type: application/json; charset=utf-8

{
   "EventType":"call_created",
   "call_id":"9309b4a2-d59f-4dbe-8370-7f3d2e44ab68",
   "direction":"outbound",
   "from":"jonas1",
   "from_cnam":"Jonas 1",
   "to":"78791245",
   "rate":0.0,
   "date":"2016-03-01T08:31:55.0000000"
}

Form-Urlencoded Events

Here is an example of the same event, but posted as x-www-form-urlencoded

POST /webhook
Host: www.example.com
X-Telzio-Event-Type: call_created
Content-Type: application/x-www-form-urlencoded

EventType=call_created&call_id=5909179e-e6c2-4a92-a566-fc8021790446&direction=outbound&from=jonas1&from_cnam=Jonas1&to=78791245&rate=0.0&date=2016-03-01T09%3A41%3A12.0000000