Skip to main content
POST
/
admin
/
webhooks
Webhook 생성
curl --request POST \
  --url https://api.headlesscommerce.io/v1/admin/webhooks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "<string>",
  "events": [
    "<string>"
  ]
}
'
{
  "id": "<string>",
  "url": "<string>",
  "events": [
    "<string>"
  ],
  "is_active": true,
  "secret": "<string>",
  "created_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

API Key. 예: sk_live_xxxxx 또는 pk_live_xxxxx

Body

application/json
url
string<uri>
required
events
string[]
required

구독할 이벤트. 예: product.created, order.confirmed, payment.completed 전체 목록: product., variant., inventory., cart., order., payment., fulfillment., refund., customer., discount.

Response

201 - application/json

Created

id
string
url
string
events
string[]
is_active
boolean
secret
string

생성 시에만 반환

created_at
string<date-time>