> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/stackai-api/rest-api-v2/runs/post-v2-runs-run_id-resume.md).

# POST /v2/runs/{run\_id}/resume

## Resume Run

> 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.\
> \
> \`\`\`json\
> {\
> &#x20; "resume\_token": "TOKEN\_FROM\_PENDING\_INPUT",\
> &#x20; "response": "THE\_HUMAN\_ANSWER",\
> &#x20; "response\_type": "text"\
> }\
> \`\`\`

````json
{"openapi":"3.1.0","info":{"title":"StackAI API","version":"0.1.0"},"tags":[{"name":"endpoint-resumeRunV2"}],"servers":[{"url":"https://api.stack-ai.com","description":"Hosted API. Use your deployment-specific origin for private installations."}],"security":[{"HTTPBearer":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer","description":"Personal API key (sk_...) or supported user access JWT. See Authentication and authorization for endpoint restrictions and scopes. Use exactly one Authorization header."}},"schemas":{"RunResumeRequestV2":{"properties":{"resume_token":{"type":"string","title":"Resume Token","description":"Token issued for the paused ask-human step."},"response":{"type":"string","title":"Response","description":"Human response to the paused step."},"response_type":{"anyOf":[{"$ref":"#/components/schemas/RunResumeResponseTypeV2"},{"type":"null"}],"description":"How to interpret the response; defaults to text when omitted."}},"additionalProperties":false,"type":"object","required":["resume_token","response"],"title":"RunResumeRequest","description":"Body for resuming an ask-human pause."},"RunResumeResponseTypeV2":{"type":"string","enum":["text","approval","choice"],"title":"RunResumeResponseTypeV2","description":"Kind of answer sent to a paused ask-human step."},"StackAIAPIResponse":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}}},"type":"object","title":"StackAIAPIResponse","description":"Base response model for StackAI API endpoints.\n\nProvides Pydantic validation and serialization with a helper method\nto convert to FastAPI's JSONResponse when needed.\n\nSerialization contract: `status_code` never reaches the body (it only feeds\n`to_json_response`), and `response_code`/`meta` are omitted when unset so\nsuccess bodies carry no filler. Error handlers that set them keep them."},"StackAIAPIErrorResponse":{"properties":{"response_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Code","description":"Machine-readable response code, when provided."},"meta":{"additionalProperties":true,"type":"object","title":"Meta","description":"Additional metadata","default":{}},"errors":{"items":{"$ref":"#/components/schemas/StackAIAPIError"},"type":"array","title":"Errors","description":"List of errors"},"detail":{"items":{"type":"string"},"type":"array","title":"Detail","description":"Human-readable error messages. Use the HTTP status and error metadata to decide how to handle the failure.","readOnly":true}},"type":"object","required":["detail"],"title":"StackAIAPIErrorResponse","description":"Error response model with status code and error list."},"StackAIAPIError":{"properties":{"message":{"type":"string","title":"Message","description":"Message describing the error"}},"type":"object","required":["message"],"title":"StackAIAPIError","description":"Error detail model."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v2/runs/{run_id}/resume":{"post":{"tags":["endpoint-resumeRunV2"],"summary":"Resume Run","description":"Accept an asynchronous response to a paused ask-human step.\n\n**How to use**\n\nGET 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.\n\n**Authentication and permissions**\n\nRequired permissions: `projects.run`. Resource and owner access checks also apply.\n\n**Prepare request.json**\n\nSave 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.\n\n```json\n{\n  \"resume_token\": \"TOKEN_FROM_PENDING_INPUT\",\n  \"response\": \"THE_HUMAN_ANSWER\",\n  \"response_type\": \"text\"\n}\n```","operationId":"resumeRunV2","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunResumeRequestV2"}}}},"responses":{"202":{"description":"Resume accepted. Poll the Location URL for the current run state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackAIAPIResponse"}}}},"400":{"description":"Invalid or expired resume token, run ID or request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackAIAPIErrorResponse"}}}},"401":{"description":"Authentication required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackAIAPIErrorResponse"}}}},"402":{"description":"Organization usage limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackAIAPIErrorResponse"}}}},"403":{"description":"Project run permission or credential scope required, or run logging disabled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackAIAPIErrorResponse"}}}},"404":{"description":"Run not found or inaccessible.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackAIAPIErrorResponse"}}}},"409":{"description":"Run is not resumable or requires an unsupported pause or backend.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackAIAPIErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"500":{"description":"Resume failed; usage may already have been charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackAIAPIErrorResponse"}}}}}}}}}
````


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/stackai-api/rest-api-v2/runs/post-v2-runs-run_id-resume.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
