Webhook endpoints
Besday webhook endpoints API: register, list, test and delete the https URLs that receive signed order events.
Updated · API version 2026-12-03
Webhook endpoints receive signed events when your orders change.
The webhook endpoint object#
A URL on your server that Besday POSTs signed events to when your orders change.
| Field | Description |
|---|---|
objectstring | Always webhook_endpoint.webhook_endpoint |
idstring | Unique id. |
urlstring | https URL that receives events. |
descriptionstring · nullable | Your label. |
eventsstring[] | Event types sent there, or ["*"] for all. |
secretstring | Create only: the whsec_… signing secret. Shown once. |
created_atstring | ISO 8601 timestamp (UTC) |
{
"object": "webhook_endpoint",
"id": "we_3f9d0c8e",
"url": "https://yourapp.com/webhooks/besday",
"description": "Production",
"events": [
"order.delivered",
"order.completed",
"order.cancelled"
],
"created_at": "2026-12-03T17:20:00.000Z"
}Create a webhook endpoint#
POST/api/v1/webhook_endpointsscope: read_writeIdempotency-Key
Registers an https URL for order events. The answer includes the signing secret, once.
Body parameters (JSON)
| Parameter | Description |
|---|---|
urlstring · required | https URL on port 443 that resolves to public addresses. |
eventsstring[] | Event types to send, or ["*"] (default) for all: order.paid, order.awaiting_acceptance, order.awaiting_product, order.in_production, order.delivered, order.revision_requested, order.disputed, order.completed, order.cancelled. |
descriptionstring | Your label, up to 200 characters. |
Request
curl -X POST "https://besday.com/api/v1/webhook_endpoints" \
-H "Authorization: Bearer $BESDAY_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"url": "https://yourapp.com/webhooks/besday",
"events": [
"order.delivered",
"order.completed",
"order.cancelled"
],
"description": "Production"
}'const res = await fetch("https://besday.com/api/v1/webhook_endpoints", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.BESDAY_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"url": "https://yourapp.com/webhooks/besday",
"events": [
"order.delivered",
"order.completed",
"order.cancelled"
],
"description": "Production"
}),
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message}`);import os, uuid, requests
res = requests.post(
"https://besday.com/api/v1/webhook_endpoints",
headers={
"Authorization": f"Bearer {os.environ['BESDAY_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"url": "https://yourapp.com/webhooks/besday",
"events": [
"order.delivered",
"order.completed",
"order.cancelled"
],
"description": "Production"
},
timeout=30,
)
res.raise_for_status()
print(res.json())Response 201
{
"object": "webhook_endpoint",
"id": "we_3f9d0c8e",
"url": "https://yourapp.com/webhooks/besday",
"description": "Production",
"events": [
"order.delivered",
"order.completed",
"order.cancelled"
],
"created_at": "2026-12-03T17:20:00.000Z",
"secret": "whsec_Wq3m…(shown once)"
}Errors
422 parameter_invalid: A parameter is missing or invalid;paramnames it.422 url_not_allowed: A webhook URL must be https on port 443 and resolve only to public internet addresses.409 limit_reached: The brand already has the most objects of this kind allowed (for example 5 webhook endpoints).
List webhook endpoints#
GET/api/v1/webhook_endpointsscope: read
Your brand’s webhook endpoints (secrets are never shown again).
Request
curl "https://besday.com/api/v1/webhook_endpoints" \
-H "Authorization: Bearer $BESDAY_API_KEY"const res = await fetch("https://besday.com/api/v1/webhook_endpoints", {
headers: {
Authorization: `Bearer ${process.env.BESDAY_API_KEY}`,
},
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message}`);import os, uuid, requests
res = requests.get(
"https://besday.com/api/v1/webhook_endpoints",
headers={
"Authorization": f"Bearer {os.environ['BESDAY_API_KEY']}",
},
timeout=30,
)
res.raise_for_status()
print(res.json())Response 200
{
"object": "list",
"data": [
{
"object": "webhook_endpoint",
"id": "we_3f9d0c8e",
"url": "https://yourapp.com/webhooks/besday",
"description": "Production",
"events": [
"order.delivered",
"order.completed",
"order.cancelled"
],
"created_at": "2026-12-03T17:20:00.000Z"
}
],
"has_more": false,
"next_cursor": null
}Delete a webhook endpoint#
DELETE/api/v1/webhook_endpoints/{id}scope: read_write
Stops sending events to the endpoint. Pending deliveries to it are dropped.
Path parameters
| Parameter | Description |
|---|---|
idstring · required | The endpoint id. |
Request
curl -X DELETE "https://besday.com/api/v1/webhook_endpoints/we_3f9d0c8e" \
-H "Authorization: Bearer $BESDAY_API_KEY"const res = await fetch("https://besday.com/api/v1/webhook_endpoints/we_3f9d0c8e", {
method: "DELETE",
headers: {
Authorization: `Bearer ${process.env.BESDAY_API_KEY}`,
},
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message}`);import os, uuid, requests
res = requests.delete(
"https://besday.com/api/v1/webhook_endpoints/we_3f9d0c8e",
headers={
"Authorization": f"Bearer {os.environ['BESDAY_API_KEY']}",
},
timeout=30,
)
res.raise_for_status()
print(res.json())Response 200
{
"object": "webhook_endpoint",
"id": "we_3f9d0c8e",
"deleted": true
}Errors
404 not_found: No such object for your brand.
Send a test event#
POST/api/v1/webhook_endpoints/{id}/testscope: read_write
Sends a signed ping event now and reports what your endpoint answered.
Path parameters
| Parameter | Description |
|---|---|
idstring · required | The endpoint id. |
Request
curl -X POST "https://besday.com/api/v1/webhook_endpoints/we_3f9d0c8e/test" \
-H "Authorization: Bearer $BESDAY_API_KEY"const res = await fetch("https://besday.com/api/v1/webhook_endpoints/we_3f9d0c8e/test", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.BESDAY_API_KEY}`,
},
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message}`);import os, uuid, requests
res = requests.post(
"https://besday.com/api/v1/webhook_endpoints/we_3f9d0c8e/test",
headers={
"Authorization": f"Bearer {os.environ['BESDAY_API_KEY']}",
},
timeout=30,
)
res.raise_for_status()
print(res.json())Response 200
{
"object": "webhook_test",
"endpoint_id": "we_3f9d0c8e",
"event_id": "evt_77aa01",
"delivered": true,
"status_code": 200,
"error": null
}Errors
404 not_found: No such object for your brand.