Analytics apiConversation

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

POST
/conversations
AuthorizationBearer <token>

The API key for a Web integration. For more details, see authentication documentation

In: header

Note: The maximum size of the request body is 2 MB.

id?string
externalId?string | null
externalUrl?string | null
typestring
Value in"openai"
supportTicketConversationId?string | null
createdAt?string | null

A timestamp in ISO 8601 format with timezone information. If not provided, the current time will be used.

Formatdate-time
updatedAt?string | null

A timestamp in ISO 8601 format with timezone information. If not provided, the current time will be used.

Formatdate-time
projectId?string | null
integrationId?string | null
properties?object | null

A customizable collection of custom properties or attributes.

Empty Object

userProperties?object | null

A customizable collection of custom properties or attributes. Some properties have first class support for the Inkeep Portal or Widget and are noted in the description.

tags?array<string> | null
visibility?string | null
Value in"private" | "public"
messagesarray<object>

The messages in the conversation. Must be at least one message.

id?string
externalId?string | null
externalUrl?string | null
typestring
Value in"support_ticket"
supportTicketConversationId?string | null
createdAt?string | null

A timestamp in ISO 8601 format with timezone information. If not provided, the current time will be used.

Formatdate-time
updatedAt?string | null

A timestamp in ISO 8601 format with timezone information. If not provided, the current time will be used.

Formatdate-time
projectId?string | null
integrationId?string | null
properties?object | null

A customizable collection of custom properties or attributes.

Empty Object

userProperties?object | null

A customizable collection of custom properties or attributes. Some properties have first class support for the Inkeep Portal or Widget and are noted in the description.

tags?array<string> | null
visibility?string | null
Value in"private" | "public"
messagesarray<object>
id?string
externalId?string | null
externalUrl?string | null
typestring
Value in"support_copilot"
supportTicketConversationId?string | null
createdAt?string | null

A timestamp in ISO 8601 format with timezone information. If not provided, the current time will be used.

Formatdate-time
updatedAt?string | null

A timestamp in ISO 8601 format with timezone information. If not provided, the current time will be used.

Formatdate-time
projectId?string | null
integrationId?string | null
properties?object | null

A customizable collection of custom properties or attributes.

Empty Object

userProperties?object | null

A customizable collection of custom properties or attributes. Some properties have first class support for the Inkeep Portal or Widget and are noted in the description.

tags?array<string> | null
visibility?string | null
Value in"private" | "public"
messagesarray<object>

Response Body

curl -X POST "https://api.analytics.inkeep.com/conversations" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "openai",
    "messages": [
      {
        "type": "openai",
        "role": "string",
        "content": "string"
      }
    ]
  }'
{
  "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"
  }
}