Quick Start
Learn how to integrate with our Chat API using your preferred programming language. Below are examples showing how to make requests with the required API key authentication and message format.
All requests require an 'x-api-key' header for authentication. This key must be associated with an enterprise plan or have API integration enabled.
Chat API Integration
curl -X POST 'https://dacosoft.pro/api/chat-call' \
-H 'Content-Type: application/json' \
-H 'x-api-key: your-api-key' \
-d '{
"assistant_id": "your-assistant-id",
"messages": [],
"lang": "en"
}'
Request Headers
Header | Required | Description |
---|---|---|
x-api-key | Yes | Your API key for authentication |
Content-Type | Yes | Must be 'application/json' |
Request Body Parameters
Parameter | Type | Required | Description |
---|---|---|---|
assistant_id | string | Yes | ID of the assistant to use |
messages | array | Yes | Array of messages for the conversation |
lang | string | Yes | Language code for the response |
uuid | string | No | Unique User ID for dashboard analytics |
Response Format
{
"status": 200,
"data": {
// Response data
}
}
Error Response
{
"status": 500,
"message": "Internal Server Error"
}
Your account must have either an enterprise plan with API integration enabled to use the API.