For the complete documentation index, see llms.txt. This page is also available as Markdown.

POST /v2/runs/{run_id}/resume

Resume Run

post

Accept an asynchronous response to a paused ask-human step.

How to use

GET the paused run first, handle the human response, and send the issued resume token. Poll after 202. A 409 means state or pause/backend support is incompatible. On 500, usage may already have been charged; read current state before retrying.

Authentication and permissions

Required permissions: projects.run. Resource and owner access checks also apply.

Prepare request.json

Save the example body below as request.json for the curl sample. Replace example IDs, node keys, and dynamic configuration with values for your organization; these are illustrative, not pre-existing resources.

{
  "resume_token": "TOKEN_FROM_PENDING_INPUT",
  "response": "THE_HUMAN_ANSWER",
  "response_type": "text"
}
Authorizations
AuthorizationstringRequired

Personal API key (sk_...) or supported user access JWT. See Authentication and authorization for endpoint restrictions and scopes. Use exactly one Authorization header.

Path parameters
run_idstring · uuidRequired
Body

Body for resuming an ask-human pause.

resume_tokenstringRequired

Token issued for the paused ask-human step.

responsestringRequired

Human response to the paused step.

response_typestring · enum · nullableOptional

How to interpret the response; defaults to text when omitted.

Possible values:
Responses
202

Resume accepted. Poll the Location URL for the current run state.

application/json

Base response model for StackAI API endpoints.

Provides Pydantic validation and serialization with a helper method to convert to FastAPI's JSONResponse when needed.

Serialization contract: status_code never reaches the body (it only feeds to_json_response), and response_code/meta are omitted when unset so success bodies carry no filler. Error handlers that set them keep them.

response_codestring · nullableOptional

Machine-readable response code, when provided.

post/v2/runs/{run_id}/resume
curl
curl --fail-with-body -sS \
  "$STACKAI_BASE_URL/v2/runs/${RUN_ID}/resume" \
  -H "Authorization: Bearer $STACKAI_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-binary @request.json
{
  "response_code": "text",
  "meta": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  }
}

Last updated

Was this helpful?