Skip to content

Open API

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.

  1. Open Settings → CompanySettings in the left menu.
  2. On the General tab, find the API key field.
  3. 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.

  1. Open open.jecrm.org/docs.
  2. Click Authorize and paste your key.
  3. 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.

  • Base URL: https://open.jecrm.org/v1
  • Send the key with every request in the x-api-key: <key> header (or Authorization: Bearer <key>).
Terminal window
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.

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.

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: page starts at 1, limit can be 1 to 100.
  • Errors come in a different format (RFC 9457, application/problem+json). Handle them by the code field. All codes and examples: Errors.
  • At most 200 requests per second per company. Above that, the API returns 429 with a Retry-After header. Wait that many seconds and retry.
  • Files: up to 25 MB.
  • Hidden chats are not available through the API.
  • API_KEY_NOT_FOUND: the request has no key. Check the x-api-key header.
  • 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.