Skip to content
Navigation

Start a thread with the default agent

Starts a new conversation thread: resolves the container, mints a threadId, and creates the thread’s first agent run there from the founding prompt (1–4000 chars) and optional fileIds (1–200). Omit spaceId for the caller’s private desk (the default); pass a spaceId to start the thread in a space, where every holder of space:contribute can read and continue it. Authorization: any real organization member (embed tokens and API keys have no desk → 404); a named space requires space:contribute (404 otherwise) and may never be a desk id (400 cannot_target_desk). Gated by AGENTS_ENABLED; disabled → 404. Returns 201 { threadId, runId, steered: false, status, spaceId }.

POST
https://api.cloudraker.com/me/threads
Try it
Request body
Live API request

This request can change data or incur charges for the selected organization.

Authorization

  • bearerAuth
    HTTP
    required

Request body JSON required

  • prompt
    string
    required

    The request that founds the thread (frozen into the first run’s snapshot).

    maxLength: 4000 · minLength: 1
  • playbookId
    optional
    string

    The agent the thread talks to. Omit for the default agent. Every run in the thread (including rollover successors) executes this agent.

    maxLength: 128 · minLength: 1
  • fileIds
    optional
    array of
    string

    Files to attach to the first run. Omit for a prompt-only start.

    minLength: 1
  • spaceId
    optional
    string

    Start the thread in this space instead of the caller’s private desk — everyone who holds space:contribute on it can then read and continue the thread. Requires space:contribute (404 otherwise). A desk id (me:…) is never a valid target (400 cannot_target_desk).

    minLength: 1

Returns

201

The thread’s first run.

JSON
  • threadId
    string
    required
  • runId
    string
    required
  • steered
    boolean
    required
  • status
    string
    required
  • spaceId
    string
    required

400

cannot_target_desk — a desk is never a named target.

404

Agents disabled, no desk, or the space is not contributable.

Type to search…

↑↓ navigate↵ selectEsc close