Create a webhook
Endpoint for creating webhooks. Webhook will be invoked as POST http request on provided targetUrl whenever specific event occurs. Specific events and their payloads are described in WEBHOOKS section.
POST
/advertising/v1.0/webhooks/
curl \
--request POST 'http://apis.reas.cz/advertising/v1.0/webhooks/' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"event":"inquiry_created","configuration":{"targetUrl":"https://example.com/hooks","headers":{"Authorization":"Token 95abe511ff"}}}'
Request examples
{
"event": "inquiry_created",
"configuration": {
"targetUrl": "https://example.com/hooks",
"headers": {
"Authorization": "Token 95abe511ff"
}
}
}
Response examples (200)
{
"success": true,
"data": {
"id": "string",
"event": "inquiry_created",
"configuration": {
"targetUrl": "https://example.com/hooks",
"headers": {
"Authorization": "Token 95abe511ff"
}
}
}
}