Create Session
Creates a new chat session. A session represents a single conversation thread and maintains the history (context) of interactions. Recommended before sending messages so you control the conversation_id up front.
If you send chat with an invalid or deleted conversation_id, Send Message will auto-create a new session and return isfresh: true.
HTTP Request
POST
/api/sessionRequest Example
curl -X POST https://api.aksita.ai/api/session \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_API_KEY"
Success Response
200 OK
{
"status": true,
"data": {
"conversation_id": "123e4567-e89b-..."
},
"detail": "Session created successfully"
}Error Responses
Invalid or missing API Key
401 Unauthorized
{
"status": false,
"reason": "Invalid API Key"
}Server failed to create session
500 Internal Server Error
{
"status": false,
"reason": "failed to create session"
}