---
search:
  tags:
    - Executions
    - POST
seo:
  description: >-
    Reference for the POST /v1/sandboxes/{id}/executions endpoint in the Carton
    API reference.
sidebar:
  label: POST /v1/sandboxes/{id}/executions
  badge: POST
title: POST /v1/sandboxes/{id}/executions
type: openapi-operation
---
`POST /v1/sandboxes/{id}/executions`

**Request body** (`application/json`, required)

- `argv` (string[], required)
- `capture_limit_bytes` (Positive)
- `cwd` (AbsolutePath)
- `env` (object)
- `exec_timeout_ms` (Positive)
- `pty` (boolean)
- `size` (PtySize)

Request body example:

```json
{
  "argv": [
    "string"
  ],
  "capture_limit_bytes": 1,
  "cwd": "string",
  "env": {
    "property1": "string",
    "property2": "string"
  },
  "exec_timeout_ms": 1,
  "pty": true,
  "size": {
    "cols": 1,
    "rows": 1
  }
}
```

**Responses**

- `200` — Execution SSE; JSON data payloads follow ExecutionEvent, ID equals seq. No replay.
- `201` — Success
- `400` — Typed error; Retry-After is present when retryable
- `401` — Typed error; Retry-After is present when retryable
- `403` — Typed error; Retry-After is present when retryable
- `404` — Unknown resource
- `409` — Idempotency request in progress, expired response, or conflicting state
- `410` — Sandbox existed and is gone; details contains its reason
- `413` — Request exceeds policy body limit
- `415` — Expected application/json
- `422` — Typed error; Retry-After is present when retryable
- `429` — Typed error; Retry-After is present when retryable
- `500` — Typed error; Retry-After is present when retryable
- `503` — Typed error; Retry-After is present when retryable
