---
title: "Start an exec instance"
method: POST
path: "/exec/{id}/start"
tags: ["Exec"]
---

# Start an exec instance

`POST /exec/{id}/start`

Starts a previously set up exec instance. If detach is true, this endpoint
returns immediately after starting the command. Otherwise, it sets up an
interactive session with the command.

## Path parameters

- `id` string, required

## Request body

- object
  - `Detach` boolean — Detach from the command.
  - `Tty` boolean — Allocate a pseudo-TTY.
  - `ConsoleSize` integer[], nullable — Initial console size, as an `[height, width]` array.

## Response `200`

No error

## Other responses

- `404` — No such exec instance
- `409` — Container is stopped or paused

---

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