#Events
GET /events
List the organization's events from the last 30 days, newest first by default. Every event is recorded here whether or not a webhook subscribes to it, so you can poll instead of receiving pushes, or catch up on deliveries your endpoint missed. Pass after to read forward from the last event you handled.
Requires the webhooks:read permission.
Query parameters
limitnumberThe number of records to return.
cursorstringA pagination cursor. Fetch the next page by passing the nextCursor value from the previous response.
sortcreatedAt | -createdAtThe sort order. Prefix a field with - to sort descending. Defaults to -createdAt.
filterstringA JSON-encoded filter document, for example {"createdAt":{"$gte":"2025-01-01T00:00:00Z"}}. Filterable fields: id, name, createdAt. See Filtering for the syntax.
afterstringOnly events that happened after this one, oldest first. Store the id of the last event you processed and pass it here to pick up where you left off, or to replay everything since.
curl \
"https://your-store.meisei.app/api/events" \
-H "Authorization: Bearer sk_YOUR_SECRET_KEY"import { client } from "@meisei/api/admin/client"
import { getEvents } from "@meisei/api/admin"
client.setConfig({
baseUrl: "https://your-store.meisei.app/api",
headers: { Authorization: "Bearer sk_YOUR_SECRET_KEY" },
})
const { data, error } = await getEvents()require "meisei"
meisei = Meisei::Client.new(
secret_key: "sk_YOUR_SECRET_KEY",
base_url: "https://your-store.meisei.app/api",
)
page = meisei.events.listfrom meisei import Client
meisei = Client(
secret_key="sk_YOUR_SECRET_KEY",
base_url="https://your-store.meisei.app/api",
)
page = meisei.events.list(){
"data": [
{
"id": "A4Ws1igz",
"name": "customer.created",
"idempotencyKey": "string",
"data": "...",
"previousAttributes": "...",
"createdAt": "2025-01-15T09:30:00Z"
}
],
"nextCursor": "string"
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the event. A webhook delivery of the event carries the same `id`.",
"idCodec": "sqid"
},
"name": {
"type": "string",
"enum": [
"customer.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"
],
"description": "A webhook event name, in `resource.action` form."
},
"idempotencyKey": {
"type": "string",
"description": "The key a webhook delivery of this event carried as its `idempotencyKey`."
},
"data": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {},
"description": "The record the event is about, in the same shape the API returns it, as it was when the event happened. A customer, order or product also carries `tags`, its tag names in alphabetical order."
},
"previousAttributes": {
"anyOf": [
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
{
"type": "null"
}
],
"description": "On an update event, the fields of `data` that changed since the last event about the same record, each at the value that event carried. Fields that did not change are left out, so an update that changed nothing visible carries an empty object. Null on every other event, and on the first update event about a record with no earlier event."
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
"description": "When the event happened."
}
},
"required": ["id", "name", "idempotencyKey", "data", "previousAttributes", "createdAt"],
"additionalProperties": false
},
"description": "The page of records, in the requested sort order."
},
"nextCursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Pass this back as `cursor` to fetch the next page. Null once the last page has been returned."
}
},
"required": ["data", "nextCursor"],
"additionalProperties": false
}GET /events/{id}
Get a single event by ID.
Requires the webhooks:read permission.
Path parameters
idstringrequiredThe ID of the event.
curl \
"https://your-store.meisei.app/api/events/A4Ws1igz" \
-H "Authorization: Bearer sk_YOUR_SECRET_KEY"import { client } from "@meisei/api/admin/client"
import { getEventsById } from "@meisei/api/admin"
client.setConfig({
baseUrl: "https://your-store.meisei.app/api",
headers: { Authorization: "Bearer sk_YOUR_SECRET_KEY" },
})
const { data, error } = await getEventsById({
path: { id: "A4Ws1igz" },
})require "meisei"
meisei = Meisei::Client.new(
secret_key: "sk_YOUR_SECRET_KEY",
base_url: "https://your-store.meisei.app/api",
)
result = meisei.events.retrieve("A4Ws1igz")from meisei import Client
meisei = Client(
secret_key="sk_YOUR_SECRET_KEY",
base_url="https://your-store.meisei.app/api",
)
result = meisei.events.retrieve("A4Ws1igz"){
"id": "A4Ws1igz",
"name": "customer.created",
"idempotencyKey": "string",
"data": "...",
"previousAttributes": "...",
"createdAt": "2025-01-15T09:30:00Z"
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the event. A webhook delivery of the event carries the same `id`.",
"idCodec": "sqid"
},
"name": {
"type": "string",
"enum": [
"customer.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"
],
"description": "A webhook event name, in `resource.action` form."
},
"idempotencyKey": {
"type": "string",
"description": "The key a webhook delivery of this event carried as its `idempotencyKey`."
},
"data": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {},
"description": "The record the event is about, in the same shape the API returns it, as it was when the event happened. A customer, order or product also carries `tags`, its tag names in alphabetical order."
},
"previousAttributes": {
"anyOf": [
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
{
"type": "null"
}
],
"description": "On an update event, the fields of `data` that changed since the last event about the same record, each at the value that event carried. Fields that did not change are left out, so an update that changed nothing visible carries an empty object. Null on every other event, and on the first update event about a record with no earlier event."
},
"createdAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
"description": "When the event happened."
}
},
"required": ["id", "name", "idempotencyKey", "data", "previousAttributes", "createdAt"],
"additionalProperties": false,
"description": "The requested event."
}