Set the time a running sandbox has left

Sets `time_limit_at` to now plus `time_limit_s`.

POST/v1/sandboxes/{sandbox_id}/extend

Sets time_limit_at to now plus time_limit_s. When the time limit passes the sandbox stops, keeps its disk, and shows reason: time_limit.

A key with the sandboxes:write scope.

Request

curl -X POST "https://api.pod.mapier.ai/v1/sandboxes/sbx_3ahrz6dmv29gqy5ckt18fpx4b/extend" \
  -H "Authorization: Bearer $POD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"time_limit_s":1}'

Parameters

NameInTypeRequiredWhat it is
sandbox_idpathstringYes
Pod-End-UserheaderstringNoNarrows a project key to one of its end users: the call sees only that end user's sandboxes and usage, any other answering not_found, and a create is labelled with it. An end user of another project, or one that is not there, is not_found; a suspended one refuses creates and wakes (account_restricted).
Idempotency-KeyheaderstringNoMakes a repeat of this call safe for 24 hours.

Body

FieldTypeRequiredWhat it is
time_limit_sintegerYesThe time left, counted from now. At least 1.

Answer

200. The sandbox with its new time_limit_at.

200
{
  "id": "sbx_3ahrz6dmv29gqy5ckt18fpx4b",
  "project": "prj_3ahrz6dmv29gqy5ckt18fp",
  "state": "running",
  "tier": null,
  "operation": null,
  "reason": null,
  "restarted": false,
  "system": "linux",
  "size": "small",
  "class": "shared",
  "disk": "persistent",
  "template": null,
  "parent": null,
  "created_at": "2026-11-23T12:00:00.000Z",
  "state_at": "2026-11-23T12:00:00.000Z",
  "time_limit_at": null,
  "idle_s": 900,
  "flags": {
    "no_save": false,
    "billing_mark": null
  },
  "labels": {
    "app": "quickstart"
  },
  "queue_position": null,
  "end_user": null,
  "group": null
}
FieldTypeAlwaysWhat it is
idstringYes
projectstringYes
state"creating" | "running" | "stopping" | "sleeping" | "waking" | "stopped" | "deleting" | "deleted" | "error"Yesrunning means restored and reset: a sandbox made or woken from a copy (a template, a snapshot or a fork) shows running only once Pod's agent inside it has reset the copy (random numbers, clock and identity), so nothing that runs in it shares them with another copy. Secrets and the machine profile load after the reset.
tier"memory" | "disk" | "none" | nullYesSet only while sleeping.
operation"snapshotting" | "forking" | "moving" | nullYes
reason"create_failed" | "boot_failed" | "server_lost" | "resize_failed" | "vm_crashed" | "time_limit" | "no_capacity" | "idle" | "stopped" | nullYes
restartedbooleanYesTrue when the last wake booted, so programs started again.
system"linux"Yes
size"small" | "medium" | "large" | "xlarge" | "ci-2" | "ci-4" | "ci-8" | "ci-16"Yes
class"shared" | "ci" | "nested"Yes
disk"persistent" | "throwaway"Yesthrowaway keeps writes on the server and never sends them to object storage; the sandbox cannot sleep to disk on another server and is lost with its server. The key that created it may still snapshot it, with its memory, and restore the snapshot at the same size; with no_save, every other key is refused.
templatestring | nullYes
parentstring | nullYesThe sandbox this one was forked from.
created_atstringYesRFC 3339 in UTC with milliseconds, for example 2026-11-23T17:04:05.123Z.
state_atstringYesRFC 3339 in UTC with milliseconds, for example 2026-11-23T17:04:05.123Z.
time_limit_atstring | nullYes
idle_sinteger | nullYesSeconds with no activity before it sleeps; null when it never sleeps for want of activity. At least 60.
flagsSandboxFlagsYes
labelsLabelsYesUp to 32 labels. Keys are lowercase, 1 to 63 characters; values up to 256.
queue_positioninteger | nullYesWhile waking and waiting for room. At least 1.
end_userstring | nullYesThe end user the sandbox was made for, if any.
groupstring | nullYesThe sandbox's group: its swarm, or its group of one, whose id is the sandbox's with grp_ for sbx_. Null only from a cell that predates groups.

Errors

The refusals this call is known for: invalid, conflict, not_found, in_other_cell. Any call can also answer unauthorized, rate_limited, unavailable or internal; the error list says what each means and when to send the call again.

In the SDKs

ClientCall
TypeScriptsandbox.extend(timeLimitS)
Pythonsandbox.extend(time_limit_s)
mpodmpod sandboxes extend <sandbox> <time_limit_s>