---
title: "POST /api/v1/workflow/waitForStateCompletion"
method: POST
path: "/api/v1/workflow/waitForStateCompletion"
---

# POST /api/v1/workflow/waitForStateCompletion

`POST /api/v1/workflow/waitForStateCompletion`

## Request body

- WorkflowWaitForStateCompletionRequest
  - `workflowId` string, required
  - `stateExecutionId` string
  - `stateId` string
  - `waitForKey` string
  - `waitTimeSeconds` integer

## Response `200`

successful operation

- WorkflowWaitForStateCompletionResponse
  - `stateCompletionOutput` StateCompletionOutput
    - `completedStateId` string, required
    - `completedStateExecutionId` string, required
    - `completedStateOutput` EncodedObject
      - `extStoreId` string
      - `extPath` string
      - `encoding` string
      - `data` string

## Other responses

- `400` — Invalid input
- `420` — wait has exceeded timeout

---

[API](https://skmtc.net/indeedeng/apis/workflow-apis.md) · [All operations](https://skmtc.net/indeedeng/apis/workflow-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/indeedeng/workflow-apis/versions/fe9c7606824c/schema)
