API reference
MX has an org-scoped REST API for reading brands, knowledge, and content and for creating and editing campaigns and flows. This page is for developers integrating with MX.
Base URL and auth
Section titled “Base URL and auth”All REST endpoints live at https://app.mxbrandcopy.com/v1. Authenticate with a Bearer token in the Authorization header:
Authorization: Bearer mx_<your-token>Tokens are minted on the Integrations page; see API tokens. Each token carries read and/or write scopes and is scoped to your organization. A read call with a write-only token (or the reverse) returns 403; a resource your organization cannot access returns 404.
An org admin must have the API integration enabled for tokens to authenticate.
Explore the API
Section titled “Explore the API”The full, machine-readable spec is served as OpenAPI 3.1 at:
GET /v1/_meta/openapi.jsonPoint any OpenAPI tool at it to see every endpoint, parameter, and response schema. Enumerated values and stable error codes are also listed at GET /v1/_meta/capabilities.
Endpoints cover brands (/v1/brands, brand context, per-brand campaigns/flows/knowledge search), organization knowledge search, campaigns and flows (list, read, create, delete), campaign and flow-node briefs and content, and document versions.
Responses and errors
Section titled “Responses and errors”Every response uses a consistent envelope.
- Success:
{ "data": ..., "meta": { "version", "requestId" } } - Error:
{ "error": { "code", "message" } }
Every response carries X-Request-Id (a per-request id, also in meta.requestId) and X-API-Version (always 1 on /v1/*). Write requests accept an optional Idempotency-Key header so a retry does not repeat the change.
Rate limits
Section titled “Rate limits”Rate limits apply per token. When you exceed the limit, the API responds with 429. Back off and retry.