Register Webhook

POST {{baseUrl}}/webhooks/subscribe

Registering a new webhook 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 and event updates/restore old webhooks (if exist)

Note: Added URL must allow POST requests

NOTE: By default, all new registered webhooks will be set as version 2. If you want to use version 1 of the webhook, pass that in your request parameter.

Read more on webhooks here.

OAuth Scopes


webhooks.read_write

Request Body

{"name"=>"Salla Update Customer Event", "event"=>"customer.updated", "url"=>"https://webhook.site/07254470-c763-4ee3-bef1-ab2480262814", "version"=>2, "rule"=>"payment_method = mada OR price < 50", "headers"=>[{"key"=>"Your Secret token key name", "value"=>"Your Secret token value"}]}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;status&quot;:200,&quot;success&quot;:true,&quot;data&quot;:{&quot;id&quot;:60587520,&quot;name&quot;:&quot;Salla Update Customer Event&quot;,&quot;event&quot;:&quot;customer.updated&quot;,&quot;url&quot;:&quot;https://webhook.site/07254470-c763-4ee3-bef1-ab2480262814&quot;,&quot;version&quot;:2,&quot;rule&quot;:&quot;payment_method = mada OR price \u003c 50&quot;,&quot;headers&quot;:{&quot;Authorization&quot;:&quot;abcd1234&quot;,&quot;Accept-Language&quot;:&quot;AR&quot;}}}