Skip to content
Navigation

Post a message to a work session

Writes your message onto the timeline and starts one turn per agent you mention.

mentions takes agent handles or ids. A handle that resolves to no published agent is returned in unresolvedMentions and starts nothing — it is never an error; an agent whose turn the platform could not start is returned in failedMentions, so you can retry that one. startedTurnIds names the turns this message began; a mention of an agent that is already working steers its live turn instead and is not listed. Files in fileIds join the session's working set for good.

Turns start before the message is written, so a turn_started entry holds a lower seq than the message that caused it; the message names the turns it started.

Learn more: Work sessions

POST
https://api.cloudraker.com/v1/work-sessions/{id}/entries
Try it
Path parameters
Request body
Live API request

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

Authorization

  • bearerAuth
    HTTP
    required

Path parameters

  • id
    string
    required
    maxLength: 128 · minLength: 1

Request body JSON required

  • text
    string
    required
    maxLength: 4000 · minLength: 1
  • mentions
    optional
    array of
    string
    maxLength: 64 · minLength: 1 · default: []
  • fileIds
    optional
    array of
    string
    maxLength: 128 · minLength: 1 · default: []

Returns

201

The appended entry and the turns it started.

JSON
  • data
    object
    required
    • entry
      object
      required
      • seq
        integer
        required
        maximum: 9007199254740991 · minimum: -9007199254740991
      • id
        string
        required
      • kind
        comment
        or
        system
        or
        turn_started
        or
        turn_finished
        or
        turn_message
        or
        approval
        +6 more
        required
      • at
        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))$
      • role
        user
        or
        assistant
        or
        system
        required
      • author
        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
      • threadId
        string | null
        required
      • turnId
        string | null
        required
      • parts
        array of
        map<unknown>
        required
      • startedTurnIds
        array of
        string
        required
      • updatedSeq
        required

        Any of the following:

        • integer
        • null
    • startedTurnIds
      array of
      string
      required
    • unresolvedMentions
      array of
      string
      required
    • failedMentions
      array of
      string
      required

400

Validation Error
JSON
  • success
    false
    required
  • error
    array of
    unknown
    required
  • data
    unknown
    required

401

Missing or invalid credential.

403

The credential may not use the /v1 API.

404

Unknown session id, or an attached file you may not read.

409

session_has_no_space — the session has no space to run a turn in.

429

Rate limited. The /v1 API allows at least 67 requests per minute per organization (about 1,000 requests per 15 minutes) — a guaranteed floor, enforced per edge location, so a geographically spread caller may get more. Wait for the Retry-After interval and retry — the error is retryable.
JSON
  • code
    rate_limited
    required
  • message
    string
    required
  • retryable
    true
    required
  • requestId
    string
    required
  • docUrl
    optional
    string

503

turn_start_failed — no mentioned agent could be started. Retry.

Type to search…

↑↓ navigate↵ selectEsc close