MAI

MAI Pixel Event Collection API

The one public, callable API MAI publishes. A single unauthenticated write-only endpoint, POST /api/collect, that ingests first-party commerce events from a merchant's storefront — product views, cart activity, search, collection views and checkout — together with UTM attribution, so MAI's autonomous advertising agents can tie ad spend to revenue. Ten events are defined. Commerce identifiers in the payload are Shopify GIDs rather than MAI identifiers. MAI publishes no OpenAPI for this endpoint; the contract is published as first-party TypeScript declarations inside the MIT-licensed @mai-co/pixel npm package, from which the JSON Schema in this repository was transcribed.

API entry from apis.yml

apis.yml Raw ↑
name: MAI Pixel Event Collection API
description: The one public, callable API MAI publishes. A single unauthenticated write-only endpoint,
  POST /api/collect, that ingests first-party commerce events from a merchant's storefront — product views,
  cart activity, search, collection views and checkout — together with UTM attribution, so MAI's autonomous
  advertising agents can tie ad spend to revenue. Ten events are defined. Commerce identifiers in the
  payload are Shopify GIDs rather than MAI identifiers. MAI publishes no OpenAPI for this endpoint; the
  contract is published as first-party TypeScript declarations inside the MIT-licensed @mai-co/pixel npm
  package, from which the JSON Schema in this repository was transcribed.
humanURL: https://www.npmjs.com/package/@mai-co/pixel
baseURL: https://pixel.mai.co
tags:
- Event Tracking
- Attribution
- Analytics
- E-Commerce
- Shopify
properties:
- type: Documentation
  name: MAI Pixel SDK integration guide
  url: https://www.npmjs.com/package/@mai-co/pixel
- type: JSONSchema
  name: MAI Pixel Event Payload schema
  url: json-schema/mai-pixel-event.schema.json
- type: SourceCode
  name: MAI on GitHub
  url: https://github.com/mai-co
x-base-url-evidence:
  source: npm @mai-co/pixel@1.0.5 dist/mai-pixel.es.js
  detail: The shipped bundle hardcodes https://pixel.mai.co as the default apiEndpoint and appends /api/collect
    in its transport module.
  probed:
    url: https://pixel.mai.co/api/collect
    method: GET
    http_status: 200
    body: '{"status":"ok","service":"pixel-api"}'
    fetched: '2026-08-12'