Skip to main content

REST API

The EChat platform provides a REST API for managing your knowledge base programmatically. You can use it to create, read, update, and delete documents and categories without relying on the Magento sync mechanism.

This is useful when you want to:

  • Push content from external sources (help desk, blog, custom CMS) into the chatbot's knowledge base.
  • Automate knowledge base management via CI/CD pipelines or scripts.
  • Build custom integrations with third-party systems.

Base URL

All API endpoints are relative to your EChat instance URL:

https://echat.mirasvit.dev/api

Authentication

All Knowledge Base endpoints require Bearer token authentication. Include the Authorization header with every request:

Authorization: Bearer <secret_key>

The secret_key is provided when you register your instance. You can also use the instance_id as the token.

Response format

All endpoints return a consistent JSON response:

{
"success": true, // whether the request was processed successfully
"message": "", // error description (empty on success)
"data": { ... } // response payload (varies by endpoint)
}

Endpoints

  • Documents — CRUD operations for knowledge base documents
  • Categories — CRUD operations for knowledge base categories