Skip to content
Navigation

Put one paperwork agent to work

Opens a work session with one agent and hands it the job in a single call: the session is opened, the agent is mentioned, and its turn starts before the response returns.

{handle} is the agent's handle (mike) or its agt_ id. An unknown or unpublished agent answers 404.

startedTurnIds names the turn that began. Watch it at streamUrl, or set webhookUrl and receive the same events on your endpoint.

Learn more: Paperwork agents

POST
https://api.cloudraker.com/v1/paperwork-agents/{handle}/sessions
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

  • handle
    string
    required
    maxLength: 128 · minLength: 1

Request body JSON required

  • description
    string
    required
    maxLength: 8000 · minLength: 1
  • title
    optional
    string
    maxLength: 200
  • fileIds
    optional
    array of
    string
    maxLength: 128 · minLength: 1 · default: []
  • spaceIds
    optional
    array of
    string
    maxLength: 128 · minLength: 1 · default: []
  • webhookUrl
    optional
    string
    format: uri · maxLength: 2048
  • apiVisible
    optional
    boolean
    default: false

Returns

201

The opened session and the turn it started.

JSON
  • data
    object
    required
    • object
      string
      required
    • id
      string
      required
    • status
      open
      or
      working
      or
      waiting
      or
      done
      or
      archived
      required
    • title
      string
      required
    • description
      string
      required
    • agents
      array of
      object
      required
      • id
        string
        required
      • handle
        string
        required
      • name
        string
        required
      • role
        string
        required
    • spaceIds
      array of
      string
      required
    • fileIds
      array of
      string
      required
    • counts
      object
      required
      • turns
        integer
        required
        maximum: 9007199254740991 · minimum: -9007199254740991
      • approvalsPending
        integer
        required
        maximum: 9007199254740991 · minimum: -9007199254740991
      • tasksPending
        integer
        required
        maximum: 9007199254740991 · minimum: -9007199254740991
    • apiVisible
      boolean
      required
    • createdAt
      string
      required
    • lastActivityAt
      string
      required
    • closedAt
      string | null
      required
    • entriesUrl
      string
      required
    • streamUrl
      string
      required
    • artifactsUrl
      string
      required
    • startedTurnIds
      array of
      string
      required
    • failedMentions
      array of
      string
      required
    • webhookUrl
      optional
      string

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

No such published agent, or a space or file you may not use.

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 — the agent could not be started. Retry.

Type to search…

↑↓ navigate↵ selectEsc close