Reset Conversation History
curl --request GET \
--url https://api.example.com/v1/reset_conversation_history \
--header 'authorization: <authorization>'import requests
url = "https://api.example.com/v1/reset_conversation_history"
headers = {"authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {authorization: '<authorization>'}};
fetch('https://api.example.com/v1/reset_conversation_history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/reset_conversation_history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/reset_conversation_history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/reset_conversation_history")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/reset_conversation_history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}API Reference
Reset Conversation History
Resets the conversation history for a given user type.
GET
/
v1
/
reset_conversation_history
Reset Conversation History
curl --request GET \
--url https://api.example.com/v1/reset_conversation_history \
--header 'authorization: <authorization>'import requests
url = "https://api.example.com/v1/reset_conversation_history"
headers = {"authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {authorization: '<authorization>'}};
fetch('https://api.example.com/v1/reset_conversation_history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/reset_conversation_history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/reset_conversation_history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/reset_conversation_history")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/reset_conversation_history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}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
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
{
"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
This operation permanently deletes all conversation history for the specified user type, model, and user ID. This action cannot be undone.
Resetting conversation history can be useful when starting a new session or when you want the AI to forget previous context.
⌘I