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

# POST /containers/{id}/exec

`POST /containers/{id}/exec`

Create an exec instance

## Path parameters

- `id` string, required

## Request body

- object
  - `AttachStdin` boolean
  - `AttachStdout` boolean
  - `AttachStderr` boolean
  - `ConsoleSize` integer[], nullable
  - `DetachKeys` string
  - `Tty` boolean
  - `Env` string[]
  - `Cmd` string[]
  - `Privileged` boolean
  - `User` string
  - `WorkingDir` string

## Response `200`

The request has succeeded.

- IDResponse — Response to an API call that returns just an Id
  - `Id` string, required — The id of the newly created object.

---

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