Webhooks

GET /webhooks

List the organization's webhook endpoints, newest first by default.

Requires the webhooks:read permission.

Query parameters

limitnumber

The number of records to return.

cursorstring

A pagination cursor. Fetch the next page by passing the nextCursor value from the previous response.

sorturl | -url | createdAt | -createdAt

The sort order. Prefix a field with - to sort descending. Defaults to -createdAt.

filterstring

A JSON-encoded filter document, for example {"createdAt":{"$gte":"2025-01-01T00:00:00Z"}}. Filterable fields: id, url, isActive, createdAt. See Filtering for the syntax.

Request
curl \
  "https://your-store.meisei.app/api/webhooks" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY"
Response
{
  "data": [
    {
      "id": "A4Ws1igz",
      "url": "https://example.com",
      "isActive": true,
      "events": ["..."],
      "hasHmacSecret": true,
      "createdAt": "2025-01-15T09:30:00Z",
      "updatedAt": "2025-01-15T09:30:00Z"
    }
  ],
  "nextCursor": "string"
}

POST /webhooks

Register a webhook endpoint. It starts receiving deliveries for the events you subscribe to as soon as it is active. Triggers the webhook.created webhook.

Requires the webhooks:write permission.

Body parameters

urlstring (uri)required

The URL deliveries should be POSTed to. It has to be a public https address: private networks, IP addresses and redirects are not supported.

eventscustomer.created | customer.updated | customer.deleted | order.created | order.updated | order.deleted | product.created | product.updated | product.deleted | productVariant.updated | review.created | review.updated | review.deleted | review.published | reviewQuestion.created | reviewQuestion.updated | reviewQuestion.deleted | site.created | site.updated | site.deleted | emailTemplate.created | emailTemplate.updated | emailTemplate.deleted | survey.deleted | reviewRequest.eligible | reviewRequest.canceled | loyaltyProgram.created | loyaltyProgram.updated | loyaltyProgram.deleted | loyaltyRule.created | loyaltyRule.updated | loyaltyRule.deleted | loyaltyTier.created | loyaltyTier.updated | loyaltyTier.deleted | loyaltyMembership.created | loyaltyMembership.updated | loyaltyMembership.deleted | loyaltyMembership.tierChanged | loyaltyMembership.pointsEarned | loyaltyTransaction.created | loyaltyReward.issued | loyaltyReward.claimed | loyaltyReward.redeemed | loyaltyReward.revoked | loyaltyReward.expired | loyaltyReward.expiringSoon | loyaltyPoints.expiringSoon | wishlist.created | wishlist.updated | wishlist.deleted | webhook.created | webhook.updated | webhook.deleted | metadataDefinition.created | metadataDefinition.updated | metadataDefinition.deleted | schedule.hourly | schedule.daily[]required

The events to subscribe to. Call GET /webhook-events for the full list of names. There are no wishlist item events: item additions, removals, and edits fire wishlist.updated for the affected list.

isActiveboolean

Whether the webhook is live. Defaults to true.

hmacSecretstring | null

A shared secret used to sign deliveries so you can verify they came from Meisei. Never returned once set.

Request
curl \
  -X POST \
  "https://your-store.meisei.app/api/webhooks" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://example.com",
  "events": [
    "customer.created"
  ],
  "isActive": true,
  "hmacSecret": "string"
}'
Response
{
  "id": "A4Ws1igz",
  "url": "https://example.com",
  "isActive": true,
  "events": ["customer.created"],
  "hasHmacSecret": true,
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T09:30:00Z"
}

GET /webhooks/{id}

Get a single webhook by ID.

Requires the webhooks:read permission.

Path parameters

idstringrequired

The ID of the webhook.

Request
curl \
  "https://your-store.meisei.app/api/webhooks/A4Ws1igz" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY"
Response
{
  "id": "A4Ws1igz",
  "url": "https://example.com",
  "isActive": true,
  "events": ["customer.created"],
  "hasHmacSecret": true,
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T09:30:00Z"
}

PUT /webhooks/{id}

Update a webhook's URL, subscriptions, signing secret or active flag. Triggers the webhook.updated webhook.

Requires the webhooks:write permission.

Path parameters

idstringrequired

The ID of the webhook to update.

Body parameters

urlstring (uri)

The URL deliveries should be POSTed to. It has to be a public https address: private networks, IP addresses and redirects are not supported.

eventscustomer.created | customer.updated | customer.deleted | order.created | order.updated | order.deleted | product.created | product.updated | product.deleted | productVariant.updated | review.created | review.updated | review.deleted | review.published | reviewQuestion.created | reviewQuestion.updated | reviewQuestion.deleted | site.created | site.updated | site.deleted | emailTemplate.created | emailTemplate.updated | emailTemplate.deleted | survey.deleted | reviewRequest.eligible | reviewRequest.canceled | loyaltyProgram.created | loyaltyProgram.updated | loyaltyProgram.deleted | loyaltyRule.created | loyaltyRule.updated | loyaltyRule.deleted | loyaltyTier.created | loyaltyTier.updated | loyaltyTier.deleted | loyaltyMembership.created | loyaltyMembership.updated | loyaltyMembership.deleted | loyaltyMembership.tierChanged | loyaltyMembership.pointsEarned | loyaltyTransaction.created | loyaltyReward.issued | loyaltyReward.claimed | loyaltyReward.redeemed | loyaltyReward.revoked | loyaltyReward.expired | loyaltyReward.expiringSoon | loyaltyPoints.expiringSoon | wishlist.created | wishlist.updated | wishlist.deleted | webhook.created | webhook.updated | webhook.deleted | metadataDefinition.created | metadataDefinition.updated | metadataDefinition.deleted | schedule.hourly | schedule.daily[]

Replaces the subscription list wholesale. Omit to leave it alone.

isActiveboolean

Whether the webhook is live.

hmacSecretstring | null

A new signing secret, or null to stop signing deliveries.

Request
curl \
  -X PUT \
  "https://your-store.meisei.app/api/webhooks/A4Ws1igz" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://example.com",
  "events": [
    "customer.created"
  ],
  "isActive": true,
  "hmacSecret": "string"
}'
Response
{
  "id": "A4Ws1igz",
  "url": "https://example.com",
  "isActive": true,
  "events": ["customer.created"],
  "hasHmacSecret": true,
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T09:30:00Z"
}

DELETE /webhooks/{id}

Delete a webhook endpoint, stopping all deliveries to it. To pause it instead, set isActive to false. Triggers the webhook.deleted webhook.

Requires the webhooks:write permission.

Path parameters

idstringrequired

The ID of the webhook to delete.

Request
curl \
  -X DELETE \
  "https://your-store.meisei.app/api/webhooks/A4Ws1igz" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY"
Response
{
  "id": "A4Ws1igz",
  "url": "https://example.com",
  "isActive": true,
  "events": ["customer.created"],
  "hasHmacSecret": true,
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T09:30:00Z"
}

GET /webhooks/{id}/events

List a webhook's recent deliveries, newest first, with their payloads, attempts and any errors. Use this to debug an endpoint that is not receiving what you expect, or pass status=failed to find the deliveries that ran out of retries.

Requires the webhooks:read permission.

Path parameters

idstringrequired

The ID of the webhook.

Query parameters

limitnumber

The number of deliveries to return.

statuspending | retrying | succeeded | failed

Only return deliveries in this state.

Request
curl \
  "https://your-store.meisei.app/api/webhooks/A4Ws1igz/events" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY"
Response
{
  "data": [
    {
      "id": "A4Ws1igz",
      "webhookId": "A4Ws1igz",
      "eventId": "A4Ws1igz",
      "eventName": "customer.created",
      "idempotencyKey": "string",
      "url": "https://example.com",
      "payload": "...",
      "status": "pending",
      "error": "string",
      "attempts": 0,
      "nextAttemptAt": "2025-01-15T09:30:00Z",
      "responseStatus": 0,
      "durationMs": 0,
      "createdAt": "2025-01-15T09:30:00Z",
      "updatedAt": "2025-01-15T09:30:00Z"
    }
  ],
  "nextCursor": "string"
}

POST /webhooks/{id}/events/{eventId}/redeliver

Send a delivery again, now. It is one attempt with the original payload, sent to the webhook's current URL, and it is not retried on its own if it fails. Use it after fixing an endpoint that missed deliveries.

Requires the webhooks:write permission.

Path parameters

idstringrequired

The ID of the webhook.

eventIdstringrequired

The ID of the delivery to send again.

Request
curl \
  -X POST \
  "https://your-store.meisei.app/api/webhooks/A4Ws1igz/events/A4Ws1igz/redeliver" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY"
Response
{
  "id": "A4Ws1igz",
  "webhookId": "A4Ws1igz",
  "eventId": "A4Ws1igz",
  "eventName": "customer.created",
  "idempotencyKey": "string",
  "url": "https://example.com",
  "payload": "...",
  "status": "pending",
  "error": "string",
  "attempts": 0,
  "nextAttemptAt": "2025-01-15T09:30:00Z",
  "responseStatus": 0,
  "durationMs": 0,
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T09:30:00Z"
}