Skip to main content
POST
/
partner
/
webhooks
Register a webhook endpoint
curl --request POST \
  --url https://api.example.com/api/v1/partner/webhooks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "https://example.com/webhooks/exchange",
  "events": [
    "order.created",
    "order.status_changed"
  ]
}
'
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "url": "https://example.com/webhooks/exchange",
  "events": [
    "order.created",
    "order.status_changed"
  ],
  "isActive": true,
  "failCount": 0,
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "secretKey": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2",
  "note": "Store this secret key securely — it will not be shown again. Use it to verify HMAC-SHA256 signatures."
}

Authorizations

Authorization
string
header
required

Partner API key. Format: sk_branch_<32chars>, sk_personal_<32chars>, or pk_<32chars> (public, read-only)

Body

application/json
url
string<uri>
required
Example:

"https://example.com/webhooks/exchange"

events
enum<string>[]
required
Minimum array length: 1
Available options:
order.created,
order.status_changed,
order.cancelled,
offer.updated
Example:
["order.created", "order.status_changed"]

Response

Webhook registered. The secretKey field is shown only in this response.

id
string<uuid>
Example:

"550e8400-e29b-41d4-a716-446655440000"

url
string<uri>
Example:

"https://example.com/webhooks/exchange"

events
enum<string>[]
Available options:
order.created,
order.status_changed,
order.cancelled,
offer.updated
Example:
["order.created", "order.status_changed"]
isActive
boolean
Example:

true

failCount
integer
Example:

0

createdAt
string<date-time>
updatedAt
string<date-time>
secretKey
string

HMAC-SHA256 signing secret. Shown only once — store securely.

Example:

"a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2"

note
string
Example:

"Store this secret key securely — it will not be shown again. Use it to verify HMAC-SHA256 signatures."