Conversations API methods for interacting with conversations and the associated analytics
List Conversations
All conversations
GET
https://api.context.ai/api/v1/conversations
Fetches a list of all transcripts. If tenant_id
is provided, fetches the conversations for the given tenant, otherwise fetches the conversations for the top level Context.ai account.
Query Parameters
200: OK Indicates a successful response
Copy {
"count" : 1 ,
"conversations" : [
{
"metadata" : {
"id" : "pzbGrCEWgKi99HHnwWxUi" ,
"metadata" : {
"model" : "gpt-3.5-turbo" ,
"user_id" : 3242
} ,
"sentiment_trend" : "up|flat|down" ,
"topics" : [
{
"id" : "w4AnzB9iENa1_AVfWI3sr" ,
"name" : "football shoes" ,
}
] ,
"suggested_topics" : [
{
"id" : "QOAwUCRhhlpmDCH534lBu" ,
"name" : "opening hours" ,
}
] ,
"messages" : [
{
"type" : "message" ,
"event_timestamp" : "2022-09-27 18:00:00.000" ,
"role" : "system|assistant|user" ,
"message" : "hola mundo!" ,
"rating" : -1 ,
"language" : "es" ,
"translation" : "hello world!" ,
"sentiment" : 0.2 ,
"topics" : {
"name" : "football shoes" ,
"id" : "w4AnzB9iENa1_AVfWI3sr" ,
} ,
"suggested_topics" : {
"id" : "QOAwUCRhhlpmDCH534lBu" ,
"name" : "opening hours" ,
}
}
}
]
}
]
}
Get Conversation
Get a conversation
GET
https://api.context.ai/api/v1/conversations/:id
Fetches a single transcript by its ID. If tenant_id
is provided, uses the permissions of the provided tenant, otherwise fetches the conversations for the top level Context.ai account.
Path Parameters
Query Parameters
200: OK Indicates a successful response 404: Not Found id provided could not be found
Copy {
"conversation" : {
"metadata" : {
"id" : "pzbGrCEWgKi99HHnwWxUi" ,
"metadata" : {
"model" : "gpt-3.5-turbo" ,
"user_id" : 3242
} ,
"sentiment_trend" : "up|flat|down" ,
"topics" : [
{
"id" : "w4AnzB9iENa1_AVfWI3sr" ,
"name" : "football shoes" ,
}
] ,
"suggested_topics" : [
{
"id" : "QOAwUCRhhlpmDCH534lBu" ,
"name" : "opening hours" ,
}
] ,
"messages" : [
{
"type" : "message" ,
"event_timestamp" : "2022-09-27 18:00:00.000" ,
"role" : "system|assistant|user" ,
"message" : "hola mundo!" ,
"rating" : -1 ,
"language" : "es" ,
"translation" : "hello world!" ,
"sentiment" : 0.2 ,
"topics" : {
"name" : "football shoes" ,
"id" : "w4AnzB9iENa1_AVfWI3sr" ,
} ,
"suggested_topics" : {
"id" : "QOAwUCRhhlpmDCH534lBu" ,
"name" : "opening hours" ,
}
}
]
}
}
Last updated 5 months ago