Log Conversation
Copy page
Logs a new conversation or updates an existing one with new messages. Always include all messages.
API Key Types: WEB
, API
Authorization
Authorization
RequiredBearer <token>The API key for a Web integration. For more details, see authentication documentation
In: header
Authorization
RequiredBearer <token>The API key for an API integration. For more details, see authentication documentation
In: header
Request Body
application/json
RequiredNote: The maximum size of the request body is 2 MB.
body
RequiredCreateConversationResponse Body
Conversation upserted successfully
TypeScript Definitions
Use the response body type in TypeScript.
response
RequiredConversationSelectBad Request
TypeScript Definitions
Use the response body type in TypeScript.
title
RequiredstringA short, human-readable summary of the problem type.
status
RequirednumberThe HTTP status code.
400
detail
RequiredstringA detailed explanation specific to this occurrence of the problem, providing context and specifics about what went wrong.
instance
stringA URI reference that identifies the specific occurrence of the problem.
requestId
stringA unique identifier for the request, useful for troubleshooting.
code
RequiredstringA short code indicating the error code returned.
"bad_request"
error
RequiredobjectLegacy error format for backward compatibility.
Unauthorized
TypeScript Definitions
Use the response body type in TypeScript.
title
RequiredstringA short, human-readable summary of the problem type.
status
RequirednumberThe HTTP status code.
401
detail
RequiredstringA detailed explanation specific to this occurrence of the problem, providing context and specifics about what went wrong.
instance
stringA URI reference that identifies the specific occurrence of the problem.
requestId
stringA unique identifier for the request, useful for troubleshooting.
code
RequiredstringA short code indicating the error code returned.
"unauthorized"
error
RequiredobjectLegacy error format for backward compatibility.
Forbidden
TypeScript Definitions
Use the response body type in TypeScript.
title
RequiredstringA short, human-readable summary of the problem type.
status
RequirednumberThe HTTP status code.
403
detail
RequiredstringA detailed explanation specific to this occurrence of the problem, providing context and specifics about what went wrong.
instance
stringA URI reference that identifies the specific occurrence of the problem.
requestId
stringA unique identifier for the request, useful for troubleshooting.
code
RequiredstringA short code indicating the error code returned.
"forbidden"
error
RequiredobjectLegacy error format for backward compatibility.
Unprocessable Entity
TypeScript Definitions
Use the response body type in TypeScript.
title
RequiredstringA short, human-readable summary of the problem type.
status
RequirednumberThe HTTP status code.
422
detail
RequiredstringA detailed explanation specific to this occurrence of the problem, providing context and specifics about what went wrong.
instance
stringA URI reference that identifies the specific occurrence of the problem.
requestId
stringA unique identifier for the request, useful for troubleshooting.
code
RequiredstringA short code indicating the error code returned.
"unprocessable_entity"
error
RequiredobjectLegacy error format for backward compatibility.
Internal Server Error
TypeScript Definitions
Use the response body type in TypeScript.
title
RequiredstringA short, human-readable summary of the problem type.
status
RequirednumberThe HTTP status code.
500
detail
RequiredstringA detailed explanation specific to this occurrence of the problem, providing context and specifics about what went wrong.
instance
stringA URI reference that identifies the specific occurrence of the problem.
requestId
stringA unique identifier for the request, useful for troubleshooting.
code
RequiredstringA short code indicating the error code returned.
"internal_server_error"
error
RequiredobjectLegacy error format for backward compatibility.
curl -X POST "https://api.analytics.inkeep.com/conversations" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"id": "string",
"externalId": "string",
"externalUrl": "string",
"type": "openai",
"supportTicketConversationId": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"projectId": "string",
"integrationId": "string",
"properties": {},
"userProperties": {
"id": "string",
"identificationType": "COOKIED",
"userId": "string",
"supportAgentName": "string",
"userType": "string"
},
"tags": [
"string"
],
"visibility": "private",
"messages": [
{
"id": "string",
"type": "openai",
"externalId": "string",
"externalUrl": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"role": "system",
"content": "string",
"name": "string",
"links": [
{
"label": "string",
"url": "string",
"title": "string",
"description": "string",
"type": "documentation",
"breadcrumbs": [
"string"
]
}
],
"properties": {},
"userProperties": {
"id": "string",
"identificationType": "COOKIED",
"userId": "string",
"supportAgentName": "string",
"userType": "string"
},
"tool_calls": [
{
"id": "string",
"type": "function",
"function": {
"name": "string",
"arguments": "string"
}
}
]
}
]
}'
const body = JSON.stringify({
"id": "string",
"externalId": "string",
"externalUrl": "string",
"type": "openai",
"supportTicketConversationId": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"projectId": "string",
"integrationId": "string",
"properties": {},
"userProperties": {
"id": "string",
"identificationType": "COOKIED",
"userId": "string",
"supportAgentName": "string",
"userType": "string"
},
"tags": [
"string"
],
"visibility": "private",
"messages": [
{
"id": "string",
"type": "openai",
"externalId": "string",
"externalUrl": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"role": "system",
"content": "string",
"name": "string",
"links": [
{
"label": "string",
"url": "string",
"title": "string",
"description": "string",
"type": "documentation",
"breadcrumbs": [
"string"
]
}
],
"properties": {},
"userProperties": {
"id": "string",
"identificationType": "COOKIED",
"userId": "string",
"supportAgentName": "string",
"userType": "string"
},
"tool_calls": [
{
"id": "string",
"type": "function",
"function": {
"name": "string",
"arguments": "string"
}
}
]
}
]
})
fetch("https://api.analytics.inkeep.com/conversations", {
headers: {
"Authorization": "Bearer <token>"
},
body
})
package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://api.analytics.inkeep.com/conversations"
body := strings.NewReader(`{
"id": "string",
"externalId": "string",
"externalUrl": "string",
"type": "openai",
"supportTicketConversationId": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"projectId": "string",
"integrationId": "string",
"properties": {},
"userProperties": {
"id": "string",
"identificationType": "COOKIED",
"userId": "string",
"supportAgentName": "string",
"userType": "string"
},
"tags": [
"string"
],
"visibility": "private",
"messages": [
{
"id": "string",
"type": "openai",
"externalId": "string",
"externalUrl": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"role": "system",
"content": "string",
"name": "string",
"links": [
{
"label": "string",
"url": "string",
"title": "string",
"description": "string",
"type": "documentation",
"breadcrumbs": [
"string"
]
}
],
"properties": {},
"userProperties": {
"id": "string",
"identificationType": "COOKIED",
"userId": "string",
"supportAgentName": "string",
"userType": "string"
},
"tool_calls": [
{
"id": "string",
"type": "function",
"function": {
"name": "string",
"arguments": "string"
}
}
]
}
]
}`)
req, _ := http.NewRequest("POST", url, body)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
import requests
url = "https://api.analytics.inkeep.com/conversations"
body = {
"id": "string",
"externalId": "string",
"externalUrl": "string",
"type": "openai",
"supportTicketConversationId": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"projectId": "string",
"integrationId": "string",
"properties": {},
"userProperties": {
"id": "string",
"identificationType": "COOKIED",
"userId": "string",
"supportAgentName": "string",
"userType": "string"
},
"tags": [
"string"
],
"visibility": "private",
"messages": [
{
"id": "string",
"type": "openai",
"externalId": "string",
"externalUrl": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"role": "system",
"content": "string",
"name": "string",
"links": [
{
"label": "string",
"url": "string",
"title": "string",
"description": "string",
"type": "documentation",
"breadcrumbs": [
"string"
]
}
],
"properties": {},
"userProperties": {
"id": "string",
"identificationType": "COOKIED",
"userId": "string",
"supportAgentName": "string",
"userType": "string"
},
"tool_calls": [
{
"id": "string",
"type": "function",
"function": {
"name": "string",
"arguments": "string"
}
}
]
}
]
}
response = requests.request("POST", url, json = body, headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
})
print(response.text)
{
"id": "string",
"externalId": "string",
"externalUrl": "string",
"type": "openai",
"supportTicketConversationId": "string",
"createdAt": "string",
"updatedAt": "string",
"projectId": "string",
"integrationId": "string",
"properties": {},
"userProperties": {
"id": "string",
"identificationType": "COOKIED",
"userId": "string",
"supportAgentName": "string",
"userType": "string"
},
"tags": [
"string"
],
"visibility": "private",
"messages": [
{
"id": "string",
"type": "openai",
"externalId": "string",
"externalUrl": "string",
"conversationId": "string",
"createdAt": "string",
"updatedAt": "string",
"role": "system",
"content": "string",
"name": "string",
"links": [
{
"label": "string",
"url": "string",
"title": "string",
"description": "string",
"type": "documentation",
"breadcrumbs": [
"string"
]
}
],
"properties": {},
"userProperties": {
"id": "string",
"identificationType": "COOKIED",
"userId": "string",
"supportAgentName": "string",
"userType": "string"
},
"tool_calls": [
{
"id": "string",
"type": "function",
"function": {
"name": "string",
"arguments": "string"
}
}
]
}
],
"messagesOpenAIFormat": [
{
"role": "system",
"name": "string",
"content": "string",
"tool_calls": [
{
"id": "string",
"type": "function",
"function": {
"name": "string",
"arguments": "string"
}
}
]
}
]
}
{
"title": "Bad Request",
"status": 400,
"detail": "Bad Request",
"instance": "/conversations/123",
"requestId": "req_1234567890",
"code": "bad_request",
"error": {
"code": "bad_request",
"message": "Bad Request"
}
}
{
"title": "Unauthorized",
"status": 401,
"detail": "Unauthorized",
"instance": "/conversations/123",
"requestId": "req_1234567890",
"code": "unauthorized",
"error": {
"code": "unauthorized",
"message": "Unauthorized"
}
}
{
"title": "Forbidden",
"status": 403,
"detail": "Forbidden",
"instance": "/conversations/123",
"requestId": "req_1234567890",
"code": "forbidden",
"error": {
"code": "forbidden",
"message": "Forbidden"
}
}
{
"title": "Unprocessable Entity",
"status": 422,
"detail": "Unprocessable Entity",
"instance": "/conversations/123",
"requestId": "req_1234567890",
"code": "unprocessable_entity",
"error": {
"code": "unprocessable_entity",
"message": "Unprocessable Entity"
}
}
{
"title": "Internal Server Error",
"status": 500,
"detail": "Internal Server Error",
"instance": "/conversations/123",
"requestId": "req_1234567890",
"code": "internal_server_error",
"error": {
"code": "internal_server_error",
"message": "Internal Server Error"
}
}