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 version 2. If you want to use version 1 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

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;status&quot;:&quot;\u003cnumber\u003e&quot;,&quot;success&quot;:&quot;\u003cboolean\u003e&quot;,&quot;data&quot;:{&quot;id&quot;:&quot;\u003cnumber\u003e&quot;,&quot;name&quot;:&quot;\u003cstring\u003e&quot;,&quot;event&quot;:&quot;\u003cstring\u003e&quot;,&quot;url&quot;:&quot;\u003cstring\u003e&quot;,&quot;version&quot;:2,&quot;rule&quot;:&quot;\u003cstring\u003e&quot;,&quot;headers&quot;:{&quot;Authorization&quot;:&quot;\u003cstring\u003e&quot;,&quot;Accept-Language&quot;:&quot;\u003cstring\u003e&quot;}}}