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.
Body
-
event
string Required Value is
inquiry_created
. -
configuration
object Required
POST
/advertising/v1.0/webhooks/
curl \
-X POST http://apis.public-staging.reas.cz/advertising/v1.0/webhooks/ \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"event":"inquiry_created","configuration":{"targetUrl":"https://example.com/hooks","headers":{"Authorization":"Token 95abe511ff"}}}'
Request example
{
"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"
}
}
}
}