Register Webhook
POST {{baseUrl}}/webhooks/subscribe
This endpoint allows you to register a new webhook. The webhook used is to notify/update/delete an external service when an event has occurred.
To trigger your webhook to send data, You can choose one event from the list of events which You can get from the List Events Endpoint.
:::note
• New subscriptions with the same URL will update events / restore old webhooks (if they exist).
• The added URL must accept POST
requests.
• By default, all new webhooks are registered as version 2
. To use version 1
, specify it in your request parameters.
:::
webhooks.read_write
- Webhooks Read & Write
Request Body
{"event"=>"<string>", "url"=>"<string>", "name"=>"<string>", "version"=>2, "rule"=>"<string>", "headers"=>[{"key"=>"<string>", "value"=>"<string>"}, {"key"=>"<string>", "value"=>"<string>"}]}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"status":"\u003cnumber\u003e","success":"\u003cboolean\u003e","data":{"id":"\u003cnumber\u003e","name":"\u003cstring\u003e","event":"\u003cstring\u003e","url":"\u003cstring\u003e","version":2,"rule":"\u003cstring\u003e","headers":{"Authorization":"\u003cstring\u003e","Accept-Language":"\u003cstring\u003e"}}}