---
title: "POST /containers/{id}/wait"
method: POST
path: "/containers/{id}/wait"
---

# POST /containers/{id}/wait

`POST /containers/{id}/wait`

Wait for a container

## Path parameters

- `id` string, required

## Query parameters

- `condition` 'not-running' | 'next-exit' | 'removed'

## Response `200`

The request has succeeded.

- ContainerWaitResponse — OK response to ContainerWait operation
  - `StatusCode` integer, required — Exit code of the container
  - `Error` ContainerWaitExitError — container waiting error, if any
    - `Message` string — Details of an error

## Changes

- **2026-02-14** `31f80d10d31a` — 1 breaking, 4 info
  - for the `query` request parameter `condition`, default value `not-running` was removed
  - api tag `Container` removed
  - removed the non-success response with the status `400`
  - removed the non-success response with the status `404`
  - …1 more

[Change history](https://skmtc.dev/hexlet/apis/docker-engine-api/changes/containers/:id/wait/post.md)

---

[API](https://skmtc.dev/hexlet/apis/docker-engine-api.md) · [All operations](https://skmtc.dev/hexlet/apis/docker-engine-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hexlet/docker-engine-api/revisions/7dbd508c79cf/schema)
