Skip to main content
GET
/
api
/
v1
/
conversation_history
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Get Conversation History

Retrieves the conversation history for a given user type.

Headers

ParameterTypeRequiredDescription
authorizationstringYesAPI authorization token (Bearer token)

Query Parameters

ParameterTypeRequiredDescription
user_typestringYesThe type of user (Patient, Doctor, Coach, Researcher)
model_idstringYesThe AI model identifier (openai, gemini)
user_idstringYesThe user identifier

Responses

StatusDescriptionContent Type
200Successful Responseapplication/json
422Validation Errorapplication/json

Sample Request

curl -X GET "https://api.covita.com/api/v1/conversation_history?user_type=Patient&model_id=openai&user_id=User1" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Sample Response

{
  "conversation_history": [
    {
      "timestamp": "2023-08-15T14:30:00.000Z",
      "message": "What is my average heart rate?",
      "response": "Based on your recent health data, your average heart rate is 72 beats per minute.",
      "user_type": "Patient"
    }
  ],
  "total_messages": 1
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

user_type
string
required
model_id
string
required
user_id
string
required

Response

Successful Response