---
title: "Send a message to a debug chat session"
method: POST
path: "/v1/agents/{agentId}/debug-chat/{conversationId}"
tags: ["Debug Chat"]
---

# Send a message to a debug chat session

`POST /v1/agents/{agentId}/debug-chat/{conversationId}`

## Request body

- RespondDebugChatBody — A user turn sent into an existing debug chat session, with the runtime overrides that apply to this message.
  - `clientEnv` string, required — Client environment (sandbox, pre-release, live)
  - `asrLangCode` string — ASR language code (e.g. en-US). Defaults to server config.
  - `ttsLangCode` string — TTS language code (e.g. en-US). Defaults to server config.
  - `message` string — User input message
  - `metadata` object — User input metadata

## Response `200`

Successful response

- DebugChatResponse — A chat turn's result: the agent's reply text, the conversation's updated state, and whether the conversation has ended.
  - `conversationId` string, required
  - `userInput` string, required
  - `response` string, required
  - `metadata` ChatMetadataResponse, required — Metadata returned with each chat response.
    - `state` object, required
    - `currentNode` string, required
    - `nodeTrace` string[], required
    - `metrics` object, required
    - `functionEvents` unknown[], required
      - unknown
    - `handoffDestination` string
    - `retrievedTopics` string[]
    - `retrievedSources` string[]
    - `citedTopic` string
    - `inFlow` string
    - `inStep` string
    - `llmRequests` object[]
    - `asrLangCode` string
    - `ttsLangCode` string
  - `conversationEnded` boolean, required
  - `delayedResponse` boolean, required

## Other responses

- `400` — Validation error
- `401` — Unauthorized – missing or invalid API key
- `403` — Forbidden – insufficient permissions
- `404` — Resource not found

---

[API](https://skmtc.net/poly/apis/polyai-agents-api.md) · [All operations](https://skmtc.net/poly/apis/polyai-agents-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/poly/polyai-agents-api/revisions/76f3c606e395/schema)
