API reference
Webhooks
Get orders, refunds, returns, and site changes pushed to your server as they happen, instead of polling.
List webhook endpoints
/api/v1/webhooks
Your shop’s webhook endpoints, newest first, each with the result of its latest delivery.
- Scope
- MCP tool
- webhooks_list
- Changes data
- No
Parameters
No parameters.
Request
curl "https://3commerce.com/api/v1/webhooks" \
-H "Authorization: Bearer 3c_live_…"Response
{
"data": [
{
"id": "5a9c1e2f-7b3d-4f60-9e1a-2c4b6d8f0a13",
"url": "https://example.com/hooks/3commerce",
"events": [
"order.created",
"order.fulfilled"
],
"created_at": "2026-11-27T09:00:00.000Z",
"last_delivery": {
"event": "order.created",
"status": "delivered",
"response_status": 200,
"at": "2026-11-27T10:12:44.000Z"
}
}
]
}Add a webhook endpoint
/api/v1/webhooks
Sends the events you pick to an https URL as signed JSON POSTs. The response carries the signing `secret` this once: store it to verify the `3Commerce-Signature` header. Up to 10 endpoints per shop.
- Scope
- MCP tool
- webhooks_create
- Changes data
- Yes
- Idempotency-Key
- Accepted
Parameters
| Name | Type | Description |
|---|---|---|
urlbody · required | string (uri) | Your receiver, on https |
eventsbody · required | array of enum | What to send: `order.created`, `order.fulfilled`, `order.refunded`, `return.requested`, `return.updated`, `product.pulled`, `gift_card.issued`, `discount.redeemed`, `site.published`, `domain.verified`, `commission.earned` |
Request
curl -X POST "https://3commerce.com/api/v1/webhooks" \
-H "Authorization: Bearer 3c_live_…" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/photo.jpg",
"events": [
"order.created"
]
}'Response
{
"id": "5a9c1e2f-7b3d-4f60-9e1a-2c4b6d8f0a13",
"url": "https://example.com/hooks/3commerce",
"events": [
"order.created",
"order.fulfilled"
],
"created_at": "2026-11-27T09:00:00.000Z",
"secret": "whsec_Jx8…"
}Send a test event
/api/v1/webhooks/{id}/test
Sends a signed `ping` event to the endpoint now and reports how it answered. A test is never retried.
- Scope
- MCP tool
- webhooks_test
- Changes data
- Yes
Parameters
| Name | Type | Description |
|---|---|---|
idpath · required | string (uuid) | The resource id |
Request
curl -X POST "https://3commerce.com/api/v1/webhooks/6f1c2a4e-8b3d-4c5e-9a7f-1d2e3f4a5b6c/test" \
-H "Authorization: Bearer 3c_live_…" \
-H "Content-Type: application/json" \
-d '{}'Response
{
"status": "delivered",
"response_status": 200,
"error": null
}Delete a webhook endpoint
/api/v1/webhooks/{id}
Stops sending to the endpoint, including any retries still waiting.
- Scope
- MCP tool
- webhooks_delete
- Changes data
- Yes
Parameters
| Name | Type | Description |
|---|---|---|
idpath · required | string (uuid) | The resource id |
Request
curl -X DELETE "https://3commerce.com/api/v1/webhooks/6f1c2a4e-8b3d-4c5e-9a7f-1d2e3f4a5b6c" \
-H "Authorization: Bearer 3c_live_…"Response
{
"ok": true
}