Analytics apiConversation

Log Conversation

Logs a new conversation or updates an existing one with new messages. Always include all messages.

API Key Types: WEB, API

POST
/conversations
/conversations

The Authorization access token

Authorization

Authorization
Required
Bearer <token>

The API key for a Web integration

In: header

Authorization
Required
Bearer <token>

The API key for an API integration

In: header

Request Body

application/jsonOptional

bodyobject & object | object & object

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",
    "createdAt": "string",
    "updatedAt": "string",
    "projectId": "string",
    "integrationId": "string",
    "properties": {},
    "userProperties": {},
    "tags": [
      "string"
    ],
    "messages": [
      {
        "id": "string",
        "type": "openai",
        "externalId": "string",
        "externalUrl": "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": {},
        "tool_calls": [
          {
            "id": "string",
            "type": "function",
            "function": {
              "name": "string",
              "arguments": "string"
            }
          }
        ]
      }
    ]
  }'

Conversation upserted successfully

{
  "id": "string",
  "externalId": "string",
  "externalUrl": "string",
  "type": "openai",
  "createdAt": "string",
  "updatedAt": "string",
  "projectId": "string",
  "integrationId": "string",
  "properties": {},
  "userProperties": {},
  "tags": [
    "string"
  ],
  "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": {},
      "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"
          }
        }
      ]
    }
  ]
}