---
title: "POST /v1/sandboxes/{id}/extend-timeout"
method: POST
path: "/v1/sandboxes/{id}/extend-timeout"
tags: ["Sandboxes"]
---

# POST /v1/sandboxes/{id}/extend-timeout

`POST /v1/sandboxes/{id}/extend-timeout`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/v1/sandboxes/{id}/extend-timeout`
- Auth: HTTP bearer

## Path parameters

- `id` string, required

## Request body

- ExtendTimeoutBody
  - `duration` integer, nullable: `@vercel/sandbox`-compatible alternative — duration in milliseconds. Used when `extra_secs` is absent.
  - `extra_secs` integer, nullable: Extra seconds to add to the existing `expires_at` (temps-native).

## Response `200`

Timeout extended

- SandboxResponse: `@vercel/sandbox` wraps every single-sandbox response as `{ sandbox: {...}, routes: [...] }`. The SDK reads both.
  - `routes` SandboxRoute[], required
    - `port` integer, required
    - `subdomain` string, required
    - `url` string, required
  - `sandbox` SandboxInner, required: Inner `sandbox` object in `@vercel/sandbox` responses. Strict shape — the SDK's zod validator rejects missing required fields.
    - `agent_run_id` integer, nullable: Agent run this sandbox executes (autofixer / workflow agent). `None` for sandboxes created via this API.
    - `allow_docker` boolean, required: Normal guest-root semantics enabled for Docker (microsandbox only).
    - `backend` string, nullable: Isolation backend: "docker" | "firecracker" | "microsandbox". `None` on legacy rows created before the backend was recorded.
    - `createdAt` integer, required
    - `cwd` string, required
    - `disk_size_mb` integer, nullable: Configured root disk size in MB (Firecracker). `None` when unknown or the default.
    - `egress_policy` SandboxEgressPolicy, required: Which outside destinations the sandbox may reach (temps-native).
      - `mode` 'internet' | 'restricted': How a sandbox may reach the outside world.
      - `rules` EgressRule[]: Allowed destinations, in `restricted` mode. At most 100.
        - `cidr` string, nullable: An IPv4 or IPv6 address or CIDR block (`198.51.100.7`, `2606:4700::/32`), matched against a literal IP the sandbox asked for or the address a hostname resolved to.
        - `host` string, nullable: A hostname, matched case-insensitively against the name the sandbox asked for (`api.example.com`). A leading `*.` matches subdomains only: `*.example.com` matches `a.example.com` and `a.b.example.com`, never `example.com` itself.
        - `ports` integer[]: Destination ports this rule permits, 1-65535. Empty means 80 and 443.
    - `id` string, required
    - `image` string, nullable
    - `lifecycle` string, required: Lifecycle class (ADR-036): `"ephemeral"` or `"workspace"`. Always present — a client that doesn't know about workspaces sees `"ephemeral"` and behaves exactly as before.
    - `memory` integer, required
    - `name` string, required
    - `node_id` integer, nullable: Worker node hosting the sandbox (ADR-048). `null` = the control plane.
    - `node_name` string, required: Name of the hosting node; `"control-plane"` for control-plane sandboxes.
    - `preview_access` 'temps_login' | 'password' | 'public', required: Who may open the preview URLs: `temps_login` (a signed-in Temps user who may read this sandbox; the default), `password` (whoever knows the preview password) or `public` (anyone).
    - `preview_allowed_cidrs` string[], required: Client networks allowed to open the preview URLs, as normalised CIDRs. Checked before `preview_access`; empty = any address.
    - `preview_password_hint` string, nullable
    - `preview_url_template` string, required
    - `project_id` integer, nullable: Project this sandbox was created from, when created from one.
    - `region` string, required
    - `requestedAt` integer, required: Creation time as Unix epoch milliseconds.
    - `runtime` string, required
    - `source_repo_url` string, nullable: Repo the work dir was seeded from. Never carries credentials.
    - `status` string, required
    - `timeout` integer, required: Idle timeout in milliseconds (SDK convention).
    - `updatedAt` integer, required
    - `vcpus` number, double, required

## Other responses

- `400`: Validation error
- `404`: Not found

## Changes

- **2026-10-28** `b8d51a990805`: 3 info
  - added the required property `sandbox/egress_policy` to the response with the `200` status
  - added the required property `sandbox/preview_access` to the response with the `200` status
  - added the required property `sandbox/preview_allowed_cidrs` to the response with the `200` status
- **2026-10-14** `4ddae13b7241`: 1 info
  - added the required property `sandbox/allow_docker` to the response with the `200` status
- **2026-10-05** `4b228ebed583`: 2 info
  - added the optional property `sandbox/node_id` to the response with the `200` status
  - added the required property `sandbox/node_name` to the response with the `200` status
- **2026-10-05** `63a80791dc58`: 1 breaking, 1 warning
  - removed the required property `sandbox/node_name` from the response with the `200` status
  - removed the optional property `sandbox/node_id` from the response with the `200` status
- **2026-10-02** `185fa8a10fca`: 2 info
  - added the optional property `sandbox/node_id` to the response with the `200` status
  - added the required property `sandbox/node_name` to the response with the `200` status

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/v1/sandboxes/:id/extend-timeout/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
