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.
A client’s developer reading their brand’s portal uses the separate Client portal API with a client key instead.
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.
Documents of every kind have their own routes, with the same access your account has in MX:
GET /v1/documents/{id}reads any document by id: notes, campaigns, flow emails, briefs, task notes, flow criteria and Agent SOP files. The body comes back as Markdown, with the record it belongs to (owner) and the fields you can set (editableFields).GET /v1/brands/{id}/documentslists a brand’s notes, campaigns and flow emails, newest first. Passkindfor one kind andcursorfor the next page.POST /v1/brands/{id}/documentscreates a note, or another note kind such asvoice_profile.PUT /v1/documents/{id}/contentreplaces the body with Markdown, andPATCH /v1/documents/{id}sets the title and email fields. History keeps the earlier version.DELETE /v1/documents/{id}moves a note or campaign to Trash. A brief, flow email or flow criteria goes with the campaign, node or flow it belongs to.
Task notes and Agent SOP files are read-only on the API. Change them in MX.
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.