Skip to content
中文

Retrieve a human task

Read one human task - title, Markdown body, context, actions, form, assignees, mode, due time, responses and outcome - so an assignee can choose an action and fill the form. Read-only; the Console approval page /automation/tasks/{id} reads the same resource.

GET /automation/v1/human-tasks/{task_id}

Authentication

Authorization: Bearer $PRAXIS_API_KEY

Request fields

Parameter Type Description
path: task_id string required; Human task ID (htask_), from the list or the run's waits.

Examples

Set these environment variables to your own resources:

: "${RUN_ID:?Set RUN_ID}"
curl --fail-with-body -X GET "https://api.deepraxis.com/automation/v1/human-tasks/{task_id}" \
  -H "Authorization: Bearer $PRAXIS_API_KEY"
import { createAutomationClient } from '@deepraxis/sdk/automation';

function env(name: string): string {
  const value = process.env[name];
  if (!value) throw new Error(`Set ${name}`);
  return value;
}
const automation = createAutomationClient({
  apiKey: env('PRAXIS_API_KEY'),
  baseUrl: 'https://api.deepraxis.com',
  maxRetries: 0,
  timeoutMs: 90_000,
});
const result = await automation.humanTasks.retrieve({
  "path": {
    "id": env("RUN_ID")
  }
});
console.log(result);

Response

HTTP 200

Success

application/json

Field Type Description
id string required; Human task ID (htask_), derived deterministically from the run and step; use it with retrieve, respond, cancel and delegate. The Console page is /automation/tasks/{id}.
owner string required; ID of the organization that owns the task.
run_id string required; ID of the workflow run (run_) that opened the task; the run continues once the task closes.
workflow object / null required; The published workflow of the run; null for an ad hoc run.
workflow (variant 1).namespace string required; Workflow namespace.
workflow (variant 1).name string required; Workflow name.
task_reference string required; JSON Pointer of the approval step in the workflow source, for example /do/1/approveRefund.
wait_id string required; ID of the run's wait (wait_htask_); it closes only through respond, never through the run wait completion endpoint.
kind "approval" required; Task kind; currently only approval.
title string required; Approval title, at most 200 characters.
body string required; Markdown details for the assignees, up to 16 KiB; empty string when not given.
context null / string / number / boolean / object / JSON[] required; JSON context the workflow attached (for example the order), up to 32 KiB; null when not given.
context (variant 5).* null / string / number / boolean / object / JSON[] Recursive JSON value.
context (variant 6)[] null / string / number / boolean / object / JSON[] Recursive JSON value.
actions object[] required; The 1–6 buttons an assignee chooses from; defaults to approve and reject.
actions[].id string required; Action ID to pass as action_id to respond; starts with a lowercase letter, at most 32 characters.
actions[].label string required; Button label.
actions[].style "primary" / "danger" / "default" required; primary: the main button. danger: a destructive button, which is the rejection in all, quorum and sequential modes. default: a plain button.
actions[].require_comment boolean required; When true, choosing this action requires a comment.
form_schema object / null required; The form an assignee fills in (a JSON Schema subset - an object with at most 30 string, number, integer, boolean or enum fields); null when there is no form.
form_schema (variant 1).* (variant 5) object Recursive JSON value.
form_schema (variant 1).* (variant 6)[] null / string / number / boolean / object / JSON[] Recursive JSON value.
assignees object required; The assignees. no additional fields.
assignees.users string[] required; Assignee user IDs, 1–20; sequential mode follows this order. Delegation replaces an entry in place.
assignees.groups string[] required; Group assignment; not supported yet, always an empty array.
mode "any" / "all" / "quorum" / "sequential" required; Decision rule. any: the first response decides. all: everyone must respond and any rejection rejects at once. quorum: quorum approvals approve, and it rejects once that many approvals are no longer possible. sequential: assignees respond in users order; any rejection rejects at once and the last approval approves.
quorum integer / null required; Number of approvals required in quorum mode; null in other modes.
allow_self_approval boolean required; When true, the person who started the run may respond to their own request; false by default.
allow_agent_decision boolean required; When true, an agent (agent session or run token) may respond; false by default.
initiator object required; The subject that started the run. no additional fields.
initiator.type "user" / "api_key" / "agent" / "run" / "trigger" required; Initiator type: user, api_key, agent, run (a parent run), trigger or application.
initiator.id string required; Initiator ID.
initiator.user_id string / null required; The user behind the initiator (the owner of an API key or trigger), null when unknown; the self-approval rule uses it.
due_at string required; Due time (RFC 3339); defaults to 3 days after creation, at most 30 days and never later than the run's deadline. on_timeout applies when it passes. format: "date-time"
on_timeout object required; What happens at due_at. no additional fields.
on_timeout.action "reject" / "approve" / "fault" required; reject: the workflow receives decision timeout:reject. approve: it receives timeout:approve. fault (default): the step raises a timeout error that try/catch can catch.
remind string[] required; Reminder intervals (ISO 8601 durations, up to 3); stored, not yet sent in this version.
channels "console" / "email"[] required; Notification channels: console or email; stored, delivery is not wired yet.
proposal null / string / number / boolean / object / JSON[] required; An agent's proposal (any JSON up to 32 KiB) for the assignees to consider; null when not given.
proposal (variant 5).* null / string / number / boolean / object / JSON[] Recursive JSON value.
proposal (variant 6)[] null / string / number / boolean / object / JSON[] Recursive JSON value.
status "open" / "completed" / "expired" / "cancelled" required; open: awaiting responses. completed: decided. expired: due_at passed. cancelled: withdrawn, including automatically when the run ended.
responses object[] required; Responses submitted so far, in order.
responses[].actor object required; Who responded. no additional fields.
responses[].actor.id string required; The responder's user ID (for an agent, the user it acts for).
responses[].actor.kind "human" / "agent" required; human: the person responded. agent: an agent responded on their behalf.
responses[].actor.display_name string / null required; Display name; this service does not resolve names, so it is null and the Console resolves it from the user ID.
responses[].action_id string required; The chosen action ID.
responses[].values object required; Submitted form values; an empty object when there is no form.
responses[].values.* (variant 5) object Recursive JSON value.
responses[].values.* (variant 6)[] null / string / number / boolean / object / JSON[] Recursive JSON value.
responses[].comment string / null required; Comment; null when none.
responses[].via "console" / "api" / "agent" required; Where it came from: console, api (the public API) or agent.
responses[].at string required; Submission time (RFC 3339). format: "date-time"
outcome object / null required; The decision, which is also the workflow step's output; null while open, and after a fault timeout or cancellation.
outcome (variant 1).decision string required; The deciding action ID, or timeout:reject / timeout:approve when on_timeout decided.
outcome (variant 1).values object required; Form values of the deciding response; an empty object on timeout.
outcome (variant 1).values.* (variant 5) object Recursive JSON value.
outcome (variant 1).values.* (variant 6)[] null / string / number / boolean / object / JSON[] Recursive JSON value.
outcome (variant 1).comment string / null required; Comment of the deciding response; null on timeout.
outcome (variant 1).decided_by object / null required; Who decided; null on timeout.
outcome (variant 1).decided_by (variant 1).id string required; The responder's user ID (for an agent, the user it acts for).
outcome (variant 1).decided_by (variant 1).kind "human" / "agent" required; human: the person responded. agent: an agent responded on their behalf.
outcome (variant 1).decided_by (variant 1).display_name string / null required; Display name; this service does not resolve names, so it is null and the Console resolves it from the user ID.
outcome (variant 1).responses object[] required; All responses at the time the task closed.
outcome (variant 1).responses[].actor object required; Who responded. no additional fields.
outcome (variant 1).responses[].actor.id string required; The responder's user ID (for an agent, the user it acts for).
outcome (variant 1).responses[].actor.kind "human" / "agent" required; human: the person responded. agent: an agent responded on their behalf.
outcome (variant 1).responses[].actor.display_name string / null required; Display name; this service does not resolve names, so it is null and the Console resolves it from the user ID.
outcome (variant 1).responses[].action_id string required; The chosen action ID.
outcome (variant 1).responses[].values object required; Submitted form values; an empty object when there is no form.
outcome (variant 1).responses[].values.* (variant 5) object Recursive JSON value.
outcome (variant 1).responses[].values.* (variant 6)[] null / string / number / boolean / object / JSON[] Recursive JSON value.
outcome (variant 1).responses[].comment string / null required; Comment; null when none.
outcome (variant 1).responses[].via "console" / "api" / "agent" required; Where it came from: console, api (the public API) or agent.
outcome (variant 1).responses[].at string required; Submission time (RFC 3339). format: "date-time"
created_at string required; Creation time (RFC 3339). format: "date-time"
updated_at string required; Last change time (RFC 3339). format: "date-time"

Measured response

HTTP 200

{
  "id": "htask_c85611f5546106a9e140fae63de3be0b0bbe2feeb9f003ec8fd1db1b6da5b900",
  "owner": "org_prxp50ywsssv6s86nhcn8yytb",
  "run_id": "run_00mvoxnjik9a1389c530fcdf94b41977428e7f06a62a11a82ca4e851ffa9db5daa2cb7901c",
  "workflow": null,
  "task_reference": "/do/0/approve",
  "wait_id": "wait_htask_c85611f5546106a9e140fae63de3be0b0bbe2feeb9f003ec8fd1db1b6da5b900",
  "kind": "approval",
  "title": "报销 120 元",
  "body": "差旅报销,附发票。",
  "context": null,
  "actions": [
    {
      "id": "approve",
      "label": "同意",
      "style": "primary",
      "require_comment": false
    },
    {
      "id": "reject",
      "label": "驳回",
      "style": "danger",
      "require_comment": false
    }
  ],
  "form_schema": null,
  "assignees": {
    "users": [
      "usr_rxp50ywsssv6s86nhcn8yytb"
    ],
    "groups": []
  },
  "mode": "any",
  "quorum": null,
  "allow_self_approval": true,
  "allow_agent_decision": false,
  "initiator": {
    "type": "api_key",
    "id": "key_rbq66f5v9vxqbk6cd702x5er",
    "user_id": "usr_rxp50ywsssv6s86nhcn8yytb"
  },
  "due_at": "2026-10-26T08:26:19.537Z",
  "on_timeout": {
    "action": "fault"
  },
  "remind": [],
  "channels": [
    "console"
  ],
  "proposal": null,
  "status": "open",
  "responses": [],
  "outcome": null,
  "created_at": "2026-10-26T07:26:19.537Z",
  "updated_at": "2026-10-26T07:26:19.537Z"
}

Errors

HTTP Codes and description
400 INVALID_PARAMS: Invalid request parameters, path, cursor, or body format.
404 HUMAN_TASK_NOT_FOUND: The human task does not exist or belongs to another organization; take the htask_ ID from the human-tasks list or the run's waits.
default RFC 9457 automation problem. 429 includes Retry-After.

Authentication and common errors · Retain the X-Request-Id response header for troubleshooting.