PathshalaDocs

MJX CRM API rate limits, errors and CORS

The response envelope, every HTTP status the MJX CRM API returns, the 120-a-minute key limit, size limits, CORS rules and how to retry safely.

Developer4 min read · Updated 2026-10-28 View as Markdown

Every MJX CRM API answer uses one JSON envelope, and every error carries a plain sentence you can show or log. This page lists the statuses, the limits and the CORS rules.

#The envelope

{ "success": true,  "data": { … } }
{ "success": false, "error": { "message": "That API key is not valid, or it was revoked." } }

Some site-wide errors (such as the general rate limit) add a code, for example "code": "RATE_LIMITED". Do not rely on the exact wording of messages — use the HTTP status in code, and show the message to people.

The MCP server uses JSON-RPC 2.0 errors instead; see MCP server.

#HTTP statuses

StatusMeaningWhat to do
200OK (also: a lead that already existed, with "duplicate": true)—
201A lead or note was created—
400Something in your request is wrong — a bad status, a bad date, no phone or email, no noteFix the request; the message says what
401No key, or the key is wrong or revokedCheck the header; make a new key if it was revoked
402Lead sources only: this kind of source needs MJX CRM ProMove to Pro, or use a website source
403CRM not on, not on Pro, read-only key used to write, or (Google Ads) a wrong keyRead the message
404No such lead, endpoint or lead sourceCheck the id or address
410Lead sources only: the source is switched offSwitch it on in Integrations
422Lead sources only: the lead could not be madeRead the message; it is also shown as "Last problem" on the source
429Too many requestsWait and retry with back-off
500"Something went wrong on our side. Try again."Retry later; contact support if it continues
503"Could not check that key just now. Try again."Retry after a few seconds

#Rate limits

LimitValueApplies to
Per API key120 requests a minute/api/v1/crm/* and /mcp together
Per internet addressA general site-wide limit (by default 100 requests a minute)Every request to the site

The per-key limit counts by key, not by address, so several servers sharing one key share one budget. Answers carry the standard RateLimit-* headers so you can see how much is left. When you go over:

{ "success": false, "error": { "message": "Too many requests for this key — at most 120 a minute. Slow down and try again." } }

#Other limits

ItemLimit
limit on GET /leads1–100 (default 50)
limit on MCP search_leads1–50 (default 20)
q search text80 characters
message on a lead5,000 characters
Extra details kept per lead30 fields, 500 characters each
Note2,000 characters including the key's name (MCP: 1,900 for the note)
Tags per lead (MCP)10
API keys per institute20 at a time
Webhooks per institute10
Lead sources per institute20
Lead source body256 KB; FormData 80 fields of 20 KB, files dropped
Webhook answer time5 seconds

#CORS

PathBrowser calls from other sites
/api/v1/crm/*Allowed from any origin, without cookies. Methods GET, POST, PATCH, OPTIONS; headers Content-Type, Authorization, X-Api-Key, Accept
/hooks/lead/*, /hooks/call/*Allowed from any origin, without cookies — this is how a website form posts straight to a lead source
/mcpMeant for servers and desktop AI clients, not browsers

#Retrying safely

  • POST /leads — safe to retry: a known phone or email returns the existing lead.
  • PATCH /leads/{id} — safe to retry: it sets values, it does not add to them.
  • POST /leads/{id}/notes — not safe to retry blindly: each call adds a note.
  • Webhooks to you — we retry once after a minute with the same X-MJX-Delivery; ignore a delivery id you have already handled.

#Versioning

The version is in the path (/api/v1/crm). New fields and endpoints can appear in v1 at any time; ignore fields you do not know. Removing or renaming a field would come with a new version path.

#Questions people ask

What is the API rate limit?

120 requests a minute per API key, shared by the REST API and the MCP server. A general limit per internet address also protects the whole site.

Can I call the API from a browser?

CORS is open for /api/v1/crm, but a key in a web page can be copied by anyone. Call the API from a server, and use a lead source address for browser forms.

Is it safe to retry a POST /leads?

Yes. A lead with the same phone (or email) is not added twice; the retry returns the existing lead with duplicate true.