---
updatedAt: 2026-10-25T15:46:36.000Z
agentTools:
  projectIndex: https://docs.superwise.ai/llms.txt
---

# Log Conversation

Logs a conversation for the agent named in the `x-agent-id` header.

## When to use it

Use it to record an agent conversation in SUPERWISE.

## Required parameters

* `x-agent-id` (header): the ID of the agent.

## Response

A successful call returns `202 Accepted`. The response body is not documented.

**Related:** [Log a record to a dataset](https://docs.superwise.ai/reference/log_v1_datasets__dataset_id__log_post), [Get an agent](https://docs.superwise.ai/reference/get_agent_by_id), [Send feedback on an agent answer](https://docs.superwise.ai/reference/feedback_feedback_post)

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "paths": {
    "/v1/datasets/log-conversation": {
      "post": {
        "tags": [
          "Dataset"
        ],
        "summary": "Log Conversation",
        "operationId": "log_conversation_v1_datasets_log_conversation_post",
        "parameters": [
          {
            "name": "content-type",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "default": "",
              "title": "Content-Type"
            }
          },
          {
            "name": "x-agent-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Agent ID",
              "title": "X-Agent-Id"
            },
            "description": "Agent ID"
          }
        ],
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "info": {
    "title": "Superwise Main Entities",
    "description": "API reference",
    "version": "0.1.0"
  },
  "components": {
    "schemas": {
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    },
    "securitySchemes": {
      "implicit": {
        "type": "oauth2",
        "flows": {
          "implicit": {
            "authorizationUrl": "https://authentication.superwise.ai/identity/resources/auth/v1/api-token",
            "scopes": {}
          }
        }
      }
    }
  },
  "security": [
    {
      "implicit": []
    }
  ],
  "servers": [
    {
      "url": "api.superwise.ai",
      "description": "Superwise Api Gateway"
    }
  ]
}
```