Chat History API
All the relevant APIs needed to interact with Chat History of a session or character.
This API is available only on the Scale Plan and above.
List Sessions for a Character
POST https://api.convai.com/character/chatHistory/list
List all the sessions for the Character. The API accepts a limit parameter which can be used to limit the number of sessions to fetch. If the value is set to "-1", then all sessions are returned.
Headers
CONVAI-API-KEY*
String
The unique api-key provided for every user. Found under the Key icon when logged into your Convai account.
Request Body
charID
String
Id of your character.
limit
String
Number of sessions to return
[
{
"sessionID": "c1234567890aba1111222233334447862",
"date": "25-09-2024",
"time": "20:52:57",
"is_added_to_memory": false
},
{
"sessionID": "8c123456789011111222223333344455",
"date": "25-09-2024",
"time": "19:54:56",
"is_added_to_memory": false
}
]
{
"ERROR": "Invalid API key provided."
}Here are some sample codes to demonstrate the request format for the endpoint -->
ChatHistory for a Session
POST https://api.convai.com/character/chatHistory/details
List all interactions for a given session-id. The output also contain a bool parameter which tell if the user input is a trigger or not. This will be set to true, if you have ever send a trigger while interacting with your character.
Headers
CONVAI-API-KEY*
String
The unique api-key provided for every user. Found under the Key icon when logged into your Convai account.
Request Body
charID
String
Id of your character.
sessionID
String
SessionId of the character for which you want to fetch the interactions.
Here are some sample codes to demonstrate the request format for the endpoint -->
Last updated
Was this helpful?