> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nivara.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Reset Conversation History

> Resets the conversation history for a given user type.

# Reset Conversation History

Resets the conversation history for a given user type.

## Query Parameters

| Parameter  | Type   | Required | Description                               |
| ---------- | ------ | -------- | ----------------------------------------- |
| user\_type | string | Yes      | The type of user (Patient, Doctor, Coach) |
| model\_id  | string | Yes      | The model ID (openai, gemini)             |
| user\_id   | string | Yes      | The user identifier (User1-User20)        |

## Headers

| Parameter     | Type   | Required | Description             |
| ------------- | ------ | -------- | ----------------------- |
| authorization | string | Yes      | API authorization token |

## Responses

| Status | Description      | Content Type     |
| ------ | ---------------- | ---------------- |
| 200    | Success message  | application/json |
| 401    | Unauthorized     | application/json |
| 422    | Validation Error | application/json |

## Sample Request

```bash theme={null}
curl -X GET "https://covita.nivara.io/v1/reset_conversation_history?user_type=Patient&model_id=openai&user_id=User1" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
```

## Sample Response

```json theme={null}
{
  "status": "success",
  "message": "Conversation history has been reset",
  "user_type": "Patient",
  "model_id": "openai",
  "user_id": "User1",
  "timestamp": "2023-08-15T15:45:30.123Z"
}
```

## Notes

<Callout type="warning">
  This operation permanently deletes all conversation history for the specified user type, model, and user ID. This action cannot be undone.
</Callout>

<Callout type="info">
  Resetting conversation history can be useful when starting a new session or when you want the AI to forget previous context.
</Callout>


## OpenAPI

````yaml GET /v1/reset_conversation_history
openapi: 3.1.0
info:
  title: Chatbot Backend
  description: A FastAPI backend for the Covita chatbot application
  version: 1.0.0
servers: []
security: []
paths:
  /v1/reset_conversation_history:
    get:
      tags:
        - chatbot
      summary: Reset Conversation History
      description: Resets the conversation history for a given user type.
      operationId: reset_conversation_history_v1_reset_conversation_history_get
      parameters:
        - name: user_type
          in: query
          required: true
          schema:
            type: string
            title: User Type
        - name: model_id
          in: query
          required: true
          schema:
            type: string
            title: Model Id
        - name: authorization
          in: header
          required: true
          schema:
            type: string
            title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````