Register Webhook
POST https://api.salla.dev/admin/v2/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)
✅ Added URL must allow POST requests
✅ By default, all new registered webhooks will be set as version2
. If you want to use version1
of the webhook, pass that in your request parameter.
Read more on Webhooks here.
Request Body
{"event"=>"<string>", "url"=>"<string>", "name"=>"<string>", "version"=>1, "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":1,"rule":"\u003cstring\u003e","headers":{"Authorization":"\u003cstring\u003e","Accept-Language":"\u003cstring\u003e"}}}