Integrations

GET /integrations

List the organization's connected storefront integrations, newest first. Access tokens are never returned.

Requires the settings: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.

sortcreatedAt | -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, type, createdAt. See Filtering for the syntax.

Request
curl \
  "https://your-store.meisei.app/api/integrations" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY"
Response
{
  "data": [
    {
      "id": "A4Ws1igz",
      "type": "shopify",
      "publicData": "...",
      "createdAt": "2025-01-15T09:30:00Z",
      "updatedAt": "2025-01-15T09:30:00Z"
    }
  ],
  "nextCursor": "string"
}

GET /integrations/{id}

Get a single integration by ID.

Requires the settings:read permission.

Path parameters

idstringrequired

The ID of the integration.

Request
curl \
  "https://your-store.meisei.app/api/integrations/A4Ws1igz" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY"
Response
{
  "id": "A4Ws1igz",
  "type": "shopify",
  "publicData": "...",
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T09:30:00Z"
}

PATCH /integrations/{id}

Update how a connected integration behaves in Meisei. Only the settings you send are changed, and the rest are left alone. These are Meisei's own settings, not the store's.

Requires the settings:write permission.

Path parameters

idstringrequired

The ID of the integration.

Body parameters

settingsobject | object | object

The settings to change, in the shape the integration's type takes. Anything you leave out keeps its current value.

channelstring | null

Slack only. The channel this connection posts to, as a label to show in Meisei.

webhookUrlstring

Slack only. A replacement incoming webhook URL, for pointing an existing connection at a different channel.

apiKeystring

Klaviyo only. A replacement private API key, for rotating the one this connection holds.

Request
curl \
  -X PATCH \
  "https://your-store.meisei.app/api/integrations/A4Ws1igz" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "settings": {
    "onProductDelete": "delete",
    "onCustomerDelete": "delete",
    "onOrderDelete": "delete",
    "earnOn": "orderCreated",
    "earnOnBackfill": true,
    "followHandleRenames": true,
    "metafieldMappings": [
      {
        "resource": "...",
        "namespace": "...",
        "key": "...",
        "metadataKey": "..."
      }
    ]
  },
  "channel": "string",
  "webhookUrl": "string",
  "apiKey": "string"
}'
Response
{
  "id": "A4Ws1igz",
  "type": "shopify",
  "publicData": "...",
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T09:30:00Z"
}

DELETE /integrations/{id}

Disconnect an integration. Syncing stops and the stored access token is discarded. Records already synced into Meisei are kept.

Requires the settings:write permission.

Path parameters

idstringrequired

The ID of the integration to disconnect.

Request
curl \
  -X DELETE \
  "https://your-store.meisei.app/api/integrations/A4Ws1igz" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY"
Response
{
  "id": "A4Ws1igz",
  "type": "shopify",
  "publicData": "...",
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T09:30:00Z"
}

POST /integrations/slack

Connect Slack by storing an incoming webhook URL. Meisei posts the message types you switch on, plus an optional daily or weekly summary, to the channel that webhook belongs to. One Slack connection per organization.

Requires the settings:write permission.

Body parameters

webhookUrlstringrequired

The Slack incoming webhook URL to post to. Create one in Slack under your app's Incoming Webhooks, picking the channel it posts to. It is a credential, so Meisei never shows it again once saved.

channelstring | null

The channel the webhook posts to, such as #reviews. Slack does not report this back, so it is a label for your own reference.

Request
curl \
  -X POST \
  "https://your-store.meisei.app/api/integrations/slack" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "webhookUrl": "string",
  "channel": "string"
}'
Response
{
  "id": "A4Ws1igz",
  "type": "shopify",
  "publicData": "...",
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T09:30:00Z"
}

POST /integrations/klaviyo

Connect Klaviyo with a private API key. Meisei sends the events you switch on as Klaviyo metrics, keeps each customer's Meisei properties up to date on their profile, and imports current state for the customers it already knows about. One Klaviyo connection per organization.

Requires the settings:write permission.

Body parameters

apiKeystringrequired

The Klaviyo private API key to send events and profile updates with. Create one in Klaviyo under Settings, API keys, with write access to profiles, events and lists. It is a credential, so Meisei never shows it again once saved.

Request
curl \
  -X POST \
  "https://your-store.meisei.app/api/integrations/klaviyo" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "apiKey": "string"
}'
Response
{
  "id": "A4Ws1igz",
  "type": "shopify",
  "publicData": "...",
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T09:30:00Z"
}

GET /integrations/{id}/klaviyo-lists

List the Klaviyo audiences this connection can add customers to. Meisei calls Klaviyo live, so a list created a moment ago is here.

Requires the settings:read permission.

Path parameters

idstringrequired

The ID of the Klaviyo integration.

Request
curl \
  "https://your-store.meisei.app/api/integrations/A4Ws1igz/klaviyo-lists" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY"
Response
{
  "data": [
    {
      "id": "string",
      "name": "string"
    }
  ]
}

POST /integrations/{id}/test

Check that a connection still works. For Slack this posts a test message to the channel; for Klaviyo it asks Klaviyo who the credentials belong to. Unlike a real notification, this reports the failure rather than swallowing it, so a credential that has been revoked shows up here rather than as silence.

Requires the settings:write permission.

Path parameters

idstringrequired

The ID of the integration to test.

Request
curl \
  -X POST \
  "https://your-store.meisei.app/api/integrations/A4Ws1igz/test" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY"
Response
{
  "ok": true,
  "error": "string"
}

GET /integrations/shopify/connect-context

Check whether a Shopify store can be connected to this organization, and say why not if it cannot. The connect screen calls this so it never offers a button that would fail once the merchant is back in Shopify.

Requires the settings:read permission.

Query parameters

shopstringrequired

The myshopify.com domain of the store being connected

Request
curl \
  "https://your-store.meisei.app/api/integrations/shopify/connect-context" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY"
Response
{
  "shop": "string",
  "organization": {
    "id": "string",
    "name": "string"
  },
  "siteCount": 0,
  "siteLimit": 0,
  "blockedReason": "string"
}

POST /integrations/shopify/grant

Authorize the Shopify connector to connect a store to the signed-in user's organization

Requires the settings:write permission.

Body parameters

shopstringrequired

The myshopify.com domain of the store being connected

statestringrequired

The ticket the Shopify app issued when the merchant started connecting, naming the store and the staff member.

Request
curl \
  -X POST \
  "https://your-store.meisei.app/api/integrations/shopify/grant" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "shop": "string",
  "state": "string"
}'
Response
{
  "grant": "string",
  "returnUrl": "string"
}