Skip to content

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.

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.

The full, machine-readable spec is served as OpenAPI 3.1 at:

GET /v1/_meta/openapi.json

Point 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.

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 apply per token. When you exceed the limit, the API responds with 429. Back off and retry.