Skip to content

API reference

Webhooks

Get orders, refunds, returns, and site changes pushed to your server as they happen, instead of polling.

List webhook endpoints

GET/api/v1/webhooks

Your shop’s webhook endpoints, newest first, each with the result of its latest delivery.

Scope
webhooks:read
MCP tool
webhooks_list
Changes data
No

Parameters

No parameters.

Request

curl "https://3commerce.com/api/v1/webhooks" \
  -H "Authorization: Bearer 3c_live_…"

Response

200 OK
{
  "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

POST/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
webhooks:write
MCP tool
webhooks_create
Changes data
Yes
Idempotency-Key
Accepted

Parameters

NameTypeDescription
urlbody · requiredstring (uri)Your receiver, on httpsmax 500 chars
eventsbody · requiredarray of enumWhat 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`min 1 itemsone of 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

201 Created
{
  "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

POST/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
webhooks:write
MCP tool
webhooks_test
Changes data
Yes

Parameters

NameTypeDescription
idpath · requiredstring (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

201 Created
{
  "status": "delivered",
  "response_status": 200,
  "error": null
}

Delete a webhook endpoint

DELETE/api/v1/webhooks/{id}

Stops sending to the endpoint, including any retries still waiting.

Scope
webhooks:write
MCP tool
webhooks_delete
Changes data
Yes

Parameters

NameTypeDescription
idpath · requiredstring (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

200 OK
{
  "ok": true
}