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.