---
title: "Chat With Agents"
method: POST
path: "/v1/orchestrate/{agent_id}/chat/completions"
tags: ["Orchestrate Agent"]
---

# Chat With Agents

`POST /v1/orchestrate/{agent_id}/chat/completions`

## Path parameters

- `agent_id` string, required

## Headers

- `X-IBM-THREAD-ID` string, nullable — Optional header to specify the thread ID

## Request body

- ChatCompletion
  - `messages` CreateMessageV2[], required
    - `role` string, required
    - `content` union, required
      - AssistantContent[]
        - `response_type` 'conversational_search' | 'text' | 'image' | 'option' | 'pause' | 'iframe' | 'connect_to_agent' | 'suggestion' | 'channel_transfer' | 'search' | 'user_defined' | 'video' | 'audio' | 'date' | 'inline_error' | 'chat_with_docs_upload' | 'disconnected_apps' | 'forms' | 'form_operation' | 'document_processing_response', required
        - `json_schema` object, nullable
        - `ui_schema` object, nullable
        - `form_data` object, nullable
        - `id` string, nullable
        - `form_operation` string, nullable
        - `sub_type` string, nullable
        - `event_type` string, nullable
        - `dps_payload_id` string, nullable
      - string
  - `additional_parameters` object, nullable
  - `context` object, nullable — Optional context dictionary
  - `stream` boolean

## Response `200`

Successful Response

- ChatCompletionResponse
  - `id` string, uuid, required
  - `object` string, required
  - `created` integer, required
  - `model` string, required
  - `choices` object[], required
  - `thread_id` string, uuid, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/ibm/apis/wxo-server-api.md) · [All operations](https://skmtc.net/ibm/apis/wxo-server-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ibm/wxo-server-api/revisions/82c114c37196/schema)
