Skip to main content

GraphQL API

Scripts and CRM syncs read your workspace through a GraphQL endpoint. Send requests to https://echat.mirasvit.com/api/v1/graphql with the access key from Settings -> API & MCP:

curl -X POST https://echat.mirasvit.com/api/v1/graphql \
-H "Authorization: Bearer <access key>" \
-H "Content-Type: application/json" \
-d '{"query": "{ conversations(perPage: 50, filters: {updatedAtFrom: \"2026-10-01T00:00:00Z\"}, sorting: {field: UPDATED_AT, direction: ASC}) { totalCount edges { node { id createdAt updatedAt visitor { name email phone } } } } }"}'

This returns the conversations that changed since a moment - a new message, or the conversation closing - with the visitor's contact details. To read one transcript:

curl -X POST https://echat.mirasvit.com/api/v1/graphql \
-H "Authorization: Bearer <access key>" \
-H "Content-Type: application/json" \
-d '{"query": "{ conversationMessages(conversationId: \"<conversation id>\") { body senderType senderName createdAt } }"}'

For a nightly sync, remember when the last run started and pass it as updatedAtFrom next time.

The endpoint is for servers and scripts: requests made from a web page in a browser are refused. The permissions and limits are the same as for an AI assistant - see API & AI agents.

Every query and mutation, with its arguments and return types, is listed in the GraphQL API reference.