Add a webhook
Post /settings/webhooks
Parameters:
Name | Description | Type | Mandatory |
---|---|---|---|
url | Url used to call as event will occur | String | Yes |
description | Webhook description | String | Yes |
events |
Lists of events
Event available:
| Array | Yes |
Response:
Before adding the webhook, we test if the url is good and return a 200 http code. Else we don't save the webhook and return an error code.
Name | Description | Type |
---|---|---|
id | Id of the webhook | String |
url | Webhook url | String |
description | Webhook description | String |
events | Events used for the Webhook | Array of String |
success | Number of call in success | Int |
errors | Number of call in error | Int |
createdAt | Creation date | String |
updatedAt | Update date | String |
Programming language:
Request exemple:
1 2 3 4 5 6 | { "description" : "my first webhook" , "events" : [ "delivered" , "opened" , "clicked" ] } |
Response exemple:
1 2 3 4 5 6 7 8 9 10 11 12 | { "id" : "5654654v6re54v654654648c" , "description" : "Webhook description" , "createdAt" : 1452177334, "updatedAt" : 1452177334, "success" : 0, "errors" : 0, "events" : [ "delivered" , "opened" , "clicked" ], "status" : "success" } |