---
title: "Create a session thread"
method: POST
path: "/api/projects/{projectId}/sessions/{sessionId}/threads"
tags: ["Threads"]
---

# Create a session thread

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

Create 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

## Request body

- CreateThreadRequest — create Thread Request payload accepted by the API.
  - `id` string, required — Stable identifier for the object.
  - `name` string — Human-readable name.
  - `phase` string — Session lifecycle phase; "review" when ready for review.

## Response `200`

Thread

- Thread — Conversation thread metadata and current execution state.
  - `id` string, required — Stable identifier for the object.
  - `name` string, required — Human-readable name.
  - `lastMessage` string — last Message value for the thread object.
  - `errorMessage` string — Detailed error message, when present.
  - `model` string — model value for the thread object.
  - `reasoning` string — reasoning value for the thread object.
  - `serviceTier` string — service Tier value for the thread object.
  - `phase` string — Session lifecycle phase; "review" when ready for review.
  - `state` string — OAuth state correlation value.
  - `pendingQuestion` boolean — pending Question value for the thread object.
  - `activeCommand` string — active Command value for the thread object.
  - `pending` boolean — pending value for the thread object.
  - `promptQueue` QueuedPrompt[] — Collection of prompt queue values.
    - `id` string, required — Stable identifier for the object.
    - `createdAt` string, date-time — Time when the object was created.
    - `runAfter` string, date-time — run After value for the queued Prompt object.
    - `prompt` string, required — prompt value for the queued Prompt object.
  - `activityStatus` ThreadActivity — thread Activity API object.
    - `status` string, required — Current status value.
    - `reason` string — reason value for the thread Activity object.
    - `completionId` string, nullable — completion Id value for the thread Activity object.
    - `queueCount` integer — queue Count value for the thread Activity object.
    - `nextRunAfter` string, date-time, nullable — next Run After value for the thread Activity object.
    - `message` string — Human-readable status or error message.
  - `metadata` unknown

---

[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)
