Skip to content
Navigation

Open a work session

Opens a work session (ws_) with a description, the agents to invite, the spaces it is linked to and its working set of files. Authorization: any authenticated member. With no spaceIds the session lands on the caller’s own private desk, created on demand — a desk session is private BY IDENTITY and can never be shared, so name a real space (here, or later with PATCH) for anything a colleague must see. Every named space must EXIST and is re-checked for space:contribute as the caller — either denial is 404, so a space’s existence is never leaked; an explicit me:* id is 400 cannot_target_desk (a desk is never a named target). An entry in spaceIds is a bare id or { spaceId, access }, where access is read or commit (default). Every id in fileIds is resolved the same way — it must exist and the caller must hold space:read on the space it lives in, otherwise 404. EVERY turn is scoped to this working set, so an id that cannot be read would refuse every later turn. The set is repairable: PATCH { fileIds } replaces it. Each agent must be published and not archived — a session pins its publishedVersionId — otherwise 422 agent_not_published. On success the caller is granted the work-session-owner role on the new work_session FGA resource.

POST
https://api.cloudraker.com/workspace/sessions
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

  • description
    string
    required
    maxLength: 8000 · minLength: 1
  • title
    optional
    string
    maxLength: 200
  • agentIds
    optional
    array of
    string
    maxLength: 128 · minLength: 1 · default: []
  • spaceIds
    optional
    array of
    WorkspaceSpaceLink
    default: []

    Any of the following:

    • string
    • object
      • spaceId
        string
        required
        maxLength: 128 · minLength: 1
      • access
        optional
        read
        or
        commit
        default: "commit"
  • fileIds
    optional
    array of
    string

    The session’s working set. EVERY turn the session runs is scoped to these files, plus whatever the comment that woke it attaches — a caller never has to re-send them.

    maxLength: 128 · minLength: 1 · default: []

Returns

201

The opened work session.

JSON
  • data
    object
    required
    • id
      string
      required
      maxLength: 128 · minLength: 1
    • title
      string
      required
      maxLength: 200
    • description
      string
      required
      maxLength: 8000
    • status
      open
      or
      working
      or
      waiting
      or
      done
      or
      archived
      required
    • workStatus
      active
      or
      ready_for_review
      or
      done
      required

      Whether the WORK is done, which only people decide. status stays the derived state of the turns.

    • openedBy
      object
      required
      • kind
        user
        or
        agent
        or
        api_key
        or
        trigger
        or
        external
        required
      • id
        string
        required
        maxLength: 128 · minLength: 1
      • name
        string
        required
        maxLength: 120 · minLength: 1
      • avatarUrl
        optional
        string
        maxLength: 2048
      • source
        optional
        web
        or
        desktop
        or
        api
        or
        email
        or
        webhook
        or
        schedule
        +4 more
    • openedVia
      web
      or
      desktop
      or
      api
      or
      email
      or
      webhook
      or
      schedule
      +2 more
      required
    • participants
      object
      required
      • humans
        array of
        string
        required
      • agents
        array of
        object
        required
        • agentId
          string
          required
        • versionId
          string
          required
        • handle
          string
          required
        • name
          string
          required
        • role
          string
          required
        • joinedAt
          string
          required
          format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
    • spaces
      array of
      object
      required
      • spaceId
        string
        required
      • access
        read
        or
        commit
        required
    • files
      array of
      object
      required
      • fileId
        string
        required
      • role
        input
        or
        artifact
        required
    • triggerId
      string | null
      required
    • parentSessionId
      string | null
      required
    • counts
      object
      required
      • turns
        number
        required
      • approvalsPending
        number
        required
      • tasksPending
        number
        required
      • unread
        number
        required
    • lastActivityAt
      string
      required
      format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
    • createdAt
      string
      required
      format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
    • closedAt
      string | null
      required

400

cannot_target_desk — a me:* id was named explicitly.

404

A named space the caller cannot contribute to, or a file that does not exist or the caller cannot read.

422

agent_not_published — an agent is unpublished or archived.

Type to search…

↑↓ navigate↵ selectEsc close