Create Session

Creates a new chat session. A session represents a single conversation thread and maintains the history (context) of interactions. This step is required before sending messages.

HTTP Request
POST /api/session

Request 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"
}