- Welcome 👋
- Get Started
- Create Your First App
- Authorization
- Webhooks
- Conditional Webhooks
- Security Considerations
- Multi-Language Support
- Responses
- Pagination
- Rate Limiting
- Versioning
- Change Log
- Support
- APIs
- Orders
- Order Status
- Order Histories
- Order Tags
- Order Invoice
- Order Reservations
- Order Items
- Products
- Product Options
- Product Quantity
- Product Variants
- Product Tags
- Product Images
- Product Option Values
- Abandoned Carts
- Customer Groups
- Customers
- Digitals Product
- Categories
- Exports
- Shipments
- Shipping Companies
- Shipping Zones
- Shipping Rules
- Countries
- Product Option Templates
- Taxes
- Coupons
- Affiliates
- Order Assignment
- Special Offers
- Transactions
- Payments
- Settlements
- Settings
- Merchant
- Brands
- Reviews
- Branches
- Currencies
- SEO
- Cities
- DNS Records
- Languages
- Employees
- Advertisements
- Webhooks
- Custom URLs
- Loyalty Points
- Webhooks - Store Events
Register Webhook
Production
Production
POST
https://api.salla.dev/admin/v2/webhooks/subscribe
Webhooks
Last modified:2025-04-16 14:05:44
Note
Information
Alert
• 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.Scopes
webhooks.read_write
- Webhooks Read & WriteRequest
Authorization
Add the parameter
Authorization
to Headers,whose value is to concatenate the Token after the Bearer.Example:
Authorization: Bearer ********************
Body Params application/json
name
string
optional
Example:
Salla Update Customer Event
event
string
required
Example:
customer.updated
url
string
required
Example:
https://webhook.site/07254470-c763-4ee3-bef1-ab2480262814
version
enum<integer>
optional
1
or 2
.Allowed values:
12
Example:
2
rule
string
optional
=
,!=
,AND
,OR
etc in such a menner: payment_method = YOUR_PAYMENT_METHOD
or in combination company_id = 871291 OR price < 50
. That adds more capbility to filter the response based on conditionsExample:
payment_method = mada OR price < 50
headers
array [object {2}]
optional
key
string
optional
Example:
Your Secret token key name
value
string
optional
cf-ray: 669af54ecf55dfcb-FRA
Example:
Your Secret token value
Example
{
"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"
}
]
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.salla.dev/admin/v2/webhooks/subscribe' \
--header 'Content-Type: application/json' \
--data-raw '{
"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"
}
]
}'
Responses
🟢200New webhook has been registered successfully
application/json
Body
status
number
optional
success
boolean
optional
data
object (Webhook)
optional
id
number
required
Example:
60587520
name
string
required
Example:
Salla Update Customer Event
event
string
required
Example:
customer.updated
type
string
required
url
string
required
Example:
https://webhook.site/07254470-c763-4ee3-bef1-ab2480262814
version
enum<number>
required
1
or 2
, reflecting changes or updates to its functionality or structure.Allowed values:
12
Example:
2
rule
string
required
This enables precise response filtering based on your criteria.
Example:
payment_method = mada
headers
object
required
headers.key
and headers.value
.Examples
{
"status": 200,
"success": true,
"data": {
"id": 60587520,
"name": "Salla Update Customer Event",
"event": "customer.updated",
"type": "manual",
"url": "https://webhook.site/07254470-c763-4ee3-bef1-ab2480262814",
"version": 2,
"rule": "payment_method = mada OR price < 50",
"headers": {
"Authorization": "abcd1234",
"Accept-Language": "AR"
}
}
}
🟠422Error Validation
🟠401Unauthorized
Modified at 2025-04-16 14:05:44