Open API
What it is
Section titled “What it is”The Open API gives your services access to your company’s chats in JECRM. You can read chats and messages, search by text, send replies to customers (including files) and receive events through webhooks.
Every endpoint, field and example is in the interactive documentation (Swagger): open.jecrm.org/docs.
There is a separate MCP server for AI assistants (Claude, Cursor and others). See MCP server.
Where to get the API key
Section titled “Where to get the API key”- Open Settings → CompanySettings in the left menu.
- On the General tab, find the API key field.
- Click the key field. The key is copied to the clipboard. On screen it is hidden behind asterisks.
There is one key per company. The API only sees that company’s chats.
If the key has leaked, click the refresh button (↻) next to the field and confirm. A new key is generated and the old one stops working immediately. Remember to replace it in your integrations.
How to use it
Section titled “How to use it”1. Try it in Swagger
Section titled “1. Try it in Swagger”- Open open.jecrm.org/docs.
- Click Authorize and paste your key.
- Pick a request, click Try it out, then Execute.
This lets you test a request and see a real response before you write any code.
2. Make requests from your service
Section titled “2. Make requests from your service”- Base URL:
https://open.jecrm.org/v1 - Send the key with every request in the
x-api-key: <key>header (orAuthorization: Bearer <key>).
curl "https://open.jecrm.org/v1/chats?limit=10" \ -H "x-api-key: YOUR_API_KEY"Only make requests from your server. Do not put the key in website or mobile app code, where others can see it.
3. Receive events through webhooks
Section titled “3. Receive events through webhooks”Instead of polling for new messages, subscribe to a webhook. JECRM will then send events to your URL: a new chat, a new message from a customer and so on. The URL must be public and use https. See Swagger for how to subscribe.
Response format
Section titled “Response format”Successful responses share the same wrapper:
{ "status": true, "status_code": 200, "path": "/v1/chats?limit=10", "data": { "items": [], "total": 0, "size": 10, "page": 1 }, "errors": []}- The result is in
data. - Lists are paginated:
pagestarts at 1,limitcan be 1 to 100. - Errors come in a different format (RFC 9457,
application/problem+json). Handle them by thecodefield. All codes and examples: Errors.
Limits
Section titled “Limits”- At most 200 requests per second per company. Above that, the API returns
429with aRetry-Afterheader. Wait that many seconds and retry. - Files: up to 25 MB.
- Hidden chats are not available through the API.
If it doesn’t work
Section titled “If it doesn’t work”API_KEY_NOT_FOUND: the request has no key. Check thex-api-keyheader.API_KEY_INVALID: the key is wrong. It may have been regenerated. Copy the current key from Settings → CompanySettings.RATE_LIMIT_EXCEEDED: too many requests. Send requests less often.
All error codes and what to do about them: Errors.
See also: Errors, MCP server, Channels.