메인 콘텐츠로 건너뛰기
POST
/
admin
/
webhooks
웹훅 생성
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"
}

인증

Authorization
string
header
필수

API Key. Example: sk_live_xxxxx or pk_live_xxxxx

본문

application/json
url
string<uri>
필수
events
string[]
필수

Events to subscribe. Example: product.created, order.confirmed, payment.completed Full list: product., variant., inventory., cart., order., payment., fulfillment., refund., customer., discount.

응답

201 - application/json

생성됨

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

Only returned on creation

created_at
string<date-time>