Skip to content
Navigation

Complete a human step

Marks one of the run's executor: "human" steps done, which releases everything waiting on it.

{ "note": "Client signed; scan attached.", "files": ["file_01JQ8ZKMRT4V6WXYZ0ABCDEF"] }

Both fields are optional. files are ids you registered or that the run already holds; they are attached to the step and show up in the run's output.files.

Only human steps are completable — an agent's own step answers 422. A step whose dependencies are unfinished answers 409, and so does one that is already done. The response carries the step plus run.status; ?wait= holds the request while the run picks the work back up.

Note: An API key has no person behind it, so the run records your organization's key as the actor rather than a named individual.

Learn more: Agents guide

POST
https://api.cloudraker.com/v1/agent-runs/{id}/tasks/{taskId}/complete
Try it
Path parameters
Query parameters
Header 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
    minLength: 1
  • taskId
    string
    required
    minLength: 1

Query parameters

  • wait
    optional
    integer

    How many seconds to hold the request open. Releases early the moment the run finishes or blocks on a person. Maximum 120; 0 returns immediately.

    maximum: 120 · minimum: 0 · default: 60

Header parameters

  • idempotency-key
    optional
    string

    Retries with the same key replay the first applied mutation.

    maxLength: 255 · minLength: 1

Request body JSON required

  • note
    optional
    string

    What you did, recorded on the step and visible on the run.

    maxLength: 2000
  • files
    optional
    array of
    string

    Files produced while doing the step, by file id.

    maxLength: 128 · minLength: 1

Returns

200

The completed step, and where the run stands after it.

JSON
  • object
    string
    required
  • id
    string
    required
  • title
    string
    required
  • executor
    agent
    or
    human
    required

    Who performs the step: agent runs by itself, human waits for a person to complete it.

  • status
    pending
    or
    ready
    or
    in_progress
    or
    completed
    or
    skipped
    required
  • summary
    string | null
    required
  • completedAt
    string | null
    required
  • run
    object
    required
    • id
      string
      required
    • status
      queued
      or
      processing
      or
      waiting
      or
      paused
      or
      completed
      or
      failed
      +2 more
      required

      Where the agent run is in its life.

      Status Meaning
      queued Accepted; its files are still being prepared
      processing The agent is working
      waiting Blocked on a person — see waiting, approvals and tasks[]
      paused Stopped short of finishing and resumable; not a failure
      completed Finished; result and output are populated
      failed Finished without producing a result
      cancelled Stopped on request
      expired Reached its expiresAt without finishing

      completed, failed, cancelled and expired are terminal. A completed run that still had outstanding work also carries incomplete: true.

    • statusUrl
      string
      required
  • note
    optional
    string

400

Invalid request (invalid_request).

401

Missing or invalid credentials.
JSON
  • code
    string
    required
  • message
    string
    required
  • retryable
    boolean
    required
  • requestId
    string
    required
  • docUrl
    optional
    string

403

The credential is valid but cannot administer this organization.
JSON
  • code
    string
    required
  • message
    string
    required
  • retryable
    boolean
    required
  • requestId
    string
    required
  • docUrl
    optional
    string

404

Unknown run id (not_found), unknown step (task_not_found), or a file id that is not yours (not_found).

409

Dependencies unfinished (task_blocked), already done (task_resolved), taken by someone else (task_claimed), or the run has not started yet (run_not_started).

422

Not a human step (task_not_completable).

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

Type to search…

↑↓ navigate↵ selectEsc close