---
title: "Start chat for a session thread"
method: POST
path: "/api/projects/{projectId}/sessions/{sessionId}/threads/{threadId}/chat"
tags: ["Chat"]
---

# Start chat for a session thread

`POST /api/projects/{projectId}/sessions/{sessionId}/threads/{threadId}/chat`

Start chat for a session thread. Accepts a JSON request body when defined and returns the resulting resource or action status.

## Path parameters

- `projectId` string, required
- `sessionId` string, required
- `threadId` string, required

## Request body

- ChatRequest — Request to submit or queue chat messages for a session thread.
  - `messages` Message[] — Discobot UIMessage values accepted by the sandbox agent API.
    - `id` string, required
    - `role` 'system' | 'user' | 'assistant' | 'tool', required
    - `parts` MessagePart[], required
      - union — Discriminated UIMessage part. Authoritative variants live in agent-go/message.
        - object — Text UIMessage part.
          - `type` 'text', required
          - `text` string, required
          - `state` string
          - `providerMetadata` object
        - object — Reasoning UIMessage part.
          - `type` 'reasoning', required
          - `text` string, required
          - `state` string
          - `providerMetadata` object
        - object — File UIMessage part.
          - `type` 'file', required
          - `url` string, required
          - `mediaType` string, required
          - `filename` string
          - `providerMetadata` object
        - object — URL source UIMessage part.
          - `type` 'source-url', required
          - `sourceId` string, required
          - `url` string, required
          - `title` string
          - `providerMetadata` object
        - object — Document source UIMessage part.
          - `type` 'source-document', required
          - `sourceId` string, required
          - `mediaType` string, required
          - `title` string, required
          - `filename` string
          - `providerMetadata` object
        - object — Step boundary UIMessage part.
          - `type` 'step-start', required
        - object — Dynamic tool UIMessage part.
          - `type` 'dynamic-tool', required
          - `toolName` string, required
          - `toolCallId` string, required
          - `state` string, required
          - `title` string
          - `providerExecuted` boolean
          - `input` unknown
          - `output` unknown
          - `errorText` string
          - `approval` ToolApproval — Tool approval request/response metadata.
            - `id` string, required
            - `approved` boolean
            - `reason` string
          - `preliminary` boolean
          - `callProviderMetadata` object
        - object — Custom data UIMessage part with type data-*.
          - `type` string, required
          - `id` string
          - `data` unknown
    - `metadata` object
    - `replacesMessageId` string — ID of the prior message this message replaces.
    - `replacedByMessageId` string — ID of the replacement message that supersedes this message.
    - `synthetic` boolean — Whether this message was generated internally rather than directly by the user or assistant.
  - `trigger` string — trigger value for the chat Request object.
  - `workspaceId` string — Workspace identifier associated with this object.
  - `providerId` string — Sandbox provider identifier.
  - `model` string — model value for the chat Request object.
  - `reasoning` string — reasoning value for the chat Request object.
  - `serviceTier` string — service Tier value for the chat Request object.
  - `runAfter` string — run After value for the chat Request object.

## Response `200`

Chat response

- ChatResponse — Identifiers and status returned after a chat submission is accepted.
  - `workspaceId` string, required — Workspace identifier associated with this object.
  - `sessionId` string, required — Session identifier associated with this object.
  - `threadId` string, required — Thread identifier associated with this object.
  - `submissionId` string — submission Id value for the chat Response object.
  - `messageId` string — message Id value for the chat Response object.
  - `completionId` string — completion Id value for the chat Response object.
  - `status` string — Current status value.
  - `queuedPromptId` string — queued Prompt Id value for the chat Response object.

## Changes

> 11 revisions in range; 1 could not be searched.

- **2026-06-05** `92f0e282c6a5` — 1 info
  - added the new optional request property `messages/items/synthetic`
- **2026-06-01** `de7d5036a104` — 2 info
  - added the new optional request property `messages/items/replacedByMessageId`
  - added the new optional request property `messages/items/replacesMessageId`
- **2026-06-01** `90fa68eb439c` — 4 breaking, 1 info
  - added the new required request property `messages/items/id`
  - added the new required request property `messages/items/parts`
  - added the new required request property `messages/items/role`
  - the `messages/items/` request property type/format changed from ``/`` to `object`/``
  - …1 more
- **2026-05-29** `2d34481e85d7` — 1 breaking, 7 warning
  - the `messages/items/` request property type/format changed from `object`/`` to ``/``
  - removed the request property `messages/items/id`
  - removed the request property `messages/items/metadata`
  - removed the request property `messages/items/parts`
  - …4 more

[Change history](https://skmtc.dev/ibuildthecloud/apis/discobot-server-api/changes/api/projects/:projectId/sessions/:sessionId/threads/:threadId/chat/post.md)

---

[API](https://skmtc.dev/ibuildthecloud/apis/discobot-server-api.md) · [All operations](https://skmtc.dev/ibuildthecloud/apis/discobot-server-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ibuildthecloud/discobot-server-api/revisions/4de3fcd6be56/schema)
