API & AI agents
Your eChat workspace can be reached from outside the eChat backend:
- An AI assistant - Claude, ChatGPT, or another assistant that supports MCP - connects to your workspace and answers questions like "show me yesterday's chats where someone left an email address", or curates your FAQ. See Connect an AI assistant.
- A script or a CRM reads conversations through a GraphQL endpoint, for example to sync new leads every night. See GraphQL API.
- The knowledge base can be filled from outside Magento through a REST API. See Knowledge base REST API.
- Your store's own JavaScript controls the chat widget on your store pages: opens it, opens Leave a message, and reacts when a message arrives. See JavaScript API.
The connection details for an AI assistant and for scripts are in the eChat backend under Settings -> API & MCP.
Credentials
| Credential | Used by | Where to find it |
|---|---|---|
| Signing in with OAuth | AI assistants that connect by signing in, such as Claude and ChatGPT | Nothing to copy: the assistant asks an admin of your store to approve the connection |
| Access key | Scripts using the GraphQL API, and AI assistants configured with a header | Settings -> API & MCP |
| Secret Key | The knowledge base REST API, and the Magento extension itself | Magento admin, the Account panel of the eChat settings. It changes when you rotate it |
The access key and the secret key are separate. Changing one does not affect the other.
What an assistant or a script can do
A connected assistant or script can read your conversations, knowledge base, FAQ, guidance and settings. Changing your knowledge base, FAQ, guidance and settings depends on how it connects:
- An assistant that signs in can change them only if Allow changes was ticked when it was approved. Otherwise it is given only the tools that read.
- An assistant that uses the access key can only read.
- A script that uses the access key with the GraphQL API can only read. To change data, connect an AI assistant and tick Allow changes.
It cannot:
- change billing - apply or cancel a coupon, extend a trial
- read or change your AI provider keys
- rename, remove or merge workspaces
- read or change the access key, or disconnect other assistants
- delete conversations or visitor data, or change how long conversations are kept
- block or unblock a visitor's IP address
Limits
- Up to 60 requests a minute per workspace, counted together for AI assistants and the GraphQL API. Past that, a request is answered
429with aRetry-Afterheader telling you how many seconds to wait. - Up to 100 items per page (
perPage). - A request with a missing or wrong credential is answered with
401.
Manage access
In Settings -> API & MCP:
- Connected assistants lists every assistant you approved, with what it may do and when it was last used. Disconnect stops it at once. A connection that is not used for 30 days ends, and every connection ends after 90 days.
- Regenerate key replaces the access key. Every script and assistant using the old key stops working immediately; update them with the new key. Assistants connected by signing in stay connected.
📄️ Connect an AI assistant
An AI assistant connects to your workspace over MCP and works with your conversations, knowledge base, FAQ and guidance. What it may and may not do is listed in API & AI agents.
📄️ GraphQL API
Scripts and CRM syncs read your workspace through a GraphQL endpoint. Send requests to https
📄️ GraphQL API reference
This section describes every query and mutation available through the GraphQL API and to a connected AI assistant, with their arguments and the data they return.
📄️ JavaScript API
Your store's own JavaScript can control the chat widget through window.$echat: open and close it, tell it who the visitor is, start a conversation, open the Leave a message form, and react when a message arrives or a person from your team joins.
🗃️ Knowledge base REST API
2 items