{
  "openapi": "3.1.0",
  "info": {
    "title": "Sandbox API",
    "description": "A sandbox is an isolated microVM that runs an OCI image for untrusted or agent-generated code: create it, run commands and move files in it, pause, snapshot and fork it. The control plane (`api.telnyx.com/v2`, authenticated with your Telnyx API key) mints sandbox tokens and serves the lifecycle, snapshot and template calls, forwarding each to the sandbox's region. The data plane is each region's host (`api.<region>.sandbox.telnyxcompute.com/v2`, authenticated with a sandbox token from `POST /compute/sandbox/token`): it serves every call, the control-plane ones included, and is the only place execs, files, logs, metrics and lifecycle events are served. The region is part of the sandbox id (`sb-<region>-<uuid>`).",
    "version": "1.0",
    "contact": {},
    "x-endpoint-cost": "light",
    "x-latency-category": "responsive"
  },
  "servers": [
    {
      "url": "https://api.telnyx.com/v2",
      "description": "Control plane"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "sandboxes",
      "description": "Create, read, pause, resume, fork and terminate sandboxes."
    },
    {
      "name": "sandbox snapshots",
      "description": "Named snapshots of a running sandbox, to create new sandboxes from."
    },
    {
      "name": "sandbox templates",
      "description": "Named templates: an image built and checkpointed in its ready state."
    },
    {
      "name": "sandbox execs",
      "description": "Run commands in a sandbox and attach to them over WebSocket."
    },
    {
      "name": "sandbox files",
      "description": "Read, write, list, rename and delete paths in a sandbox."
    },
    {
      "name": "sandbox observability",
      "description": "Logs, metrics and lifecycle events."
    },
    {
      "name": "sandbox tokens",
      "description": "The sandbox token for the regions' hosts."
    }
  ],
  "paths": {
    "/compute/sandbox/openapi.json": {
      "get": {
        "operationId": "GetSandboxOpenAPI",
        "tags": ["sandboxes"],
        "summary": "Read the sandbox API contract",
        "description": "Returns the build's OpenAPI document without credentials. The bytes are constant for the build; shared caches may keep them for five minutes. Send If-None-Match with the ETag to revalidate.",
        "security": [],
        "servers": [
          {
            "url": "https://api.telnyx.com/v2",
            "description": "Control plane"
          },
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "Regional data plane",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The sandbox region."
              }
            }
          }
        ],
        "parameters": [
          {
            "name": "If-None-Match",
            "in": "header",
            "description": "An ETag from a previous response.",
            "schema": {"type": "string"}
          }
        ],
        "responses": {
          "200": {
            "description": "The OpenAPI document, byte for byte.",
            "headers": {
              "ETag": {"schema": {"type": "string"}},
              "Cache-Control": {"schema": {"type": "string"}}
            },
            "content": {
              "application/json": {
                "schema": {"type": "object", "additionalProperties": true}
              }
            }
          },
          "206": {
            "description": "The requested byte range or ranges of the document.",
            "headers": {
              "ETag": {"schema": {"type": "string"}},
              "Cache-Control": {"schema": {"type": "string"}},
              "Content-Range": {"schema": {"type": "string"}}
            }
          },
          "304": {
            "description": "The document matches If-None-Match; no body.",
            "headers": {
              "ETag": {"schema": {"type": "string"}},
              "Cache-Control": {"schema": {"type": "string"}}
            }
          },
          "412": {
            "description": "A request precondition failed."
          },
          "416": {
            "description": "The requested byte range cannot be satisfied.",
            "headers": {
              "Content-Range": {"schema": {"type": "string"}}
            }
          }
        }
      }
    },
    "/compute/sandbox": {
      "get": {
        "operationId": "ListSandboxes",
        "tags": [
          "sandboxes"
        ],
        "summary": "List sandboxes",
        "description": "Lists the organization's sandboxes, newest first. Without `state`, only sandboxes that are not terminated (paused ones included). Through the control plane the list covers every region (or the one `region` names); a region that fails is named in `unavailable_regions` and the answer is still `200`.",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": false,
            "description": "The exact name.",
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "description": "Repeatable, or comma-separated.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "starting",
                  "running",
                  "paused",
                  "terminated"
                ]
              }
            }
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "description": "`tag[<key>]=<value>`: sandboxes carrying every given tag.",
            "style": "deepObject",
            "explode": true,
            "schema": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "description": "The sandboxes of a named size, or `custom`.",
            "schema": {
              "type": "string",
              "enum": [
                "small",
                "medium",
                "large",
                "custom"
              ]
            }
          },
          {
            "name": "swarm",
            "in": "query",
            "required": false,
            "description": "A fork's swarm, `swm-<uuid>`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "region",
            "in": "query",
            "required": false,
            "description": "Control plane only: list one region instead of all.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/PageNumber"
          },
          {
            "$ref": "#/components/parameters/PageSize"
          }
        ],
        "responses": {
          "200": {
            "description": "The page of sandboxes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxList"
                }
              }
            }
          },
          "400": {
            "description": "A filter or page parameter is invalid: an unknown `state`, a `swarm` that is not `swm-<uuid>`, a `name` that is not a sandbox name, a `size` that is not `small`, `medium`, `large` or `custom`, a tag filter given twice or out of bounds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sandboxToken": []
          }
        ],
        "servers": [
          {
            "url": "https://api.telnyx.com/v2",
            "description": "Control plane, with the Telnyx API key"
          },
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane), with the sandbox token",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ]
      },
      "post": {
        "operationId": "CreateSandbox",
        "tags": [
          "sandboxes"
        ],
        "summary": "Create a sandbox",
        "description": "Creates a sandbox from an `image`, a named `template`, or a published snapshot (`from`, a clone). It answers `201` at once in `starting`; poll `GET /sandbox/{id}` until it reads `running` (`wait` answers on `paused` and `terminated` only). An organization at its quota of concurrent sandboxes is 429; paused sandboxes do not count.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SandboxCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The sandbox, `starting`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxResponse"
                }
              }
            }
          },
          "400": {
            "description": "A standard validation error (`missing_parameter`, `bad_request`, `invalid_string_length` or `invalid_type`) at `source`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the snapshot named in `from` does not exist or is not the organization's.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "409": {
            "description": "`name_conflict`, `template_not_ready`, `snapshot_not_published`, `source_terminated`, `operation_in_progress` or `request_in_progress`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "413": {
            "description": "`request_too_large` (10015): the body is larger than 1 MiB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "422": {
            "description": "A named error at `source.pointer`: `registry_not_allowed`, `invalid_env`, `invalid_workdir`, `resources_not_allowed`, `cidr_not_allowed`, `allow_out_not_allowed`, `invalid_egress_rule`, `unknown_secret`, `rules_not_allowed`, `wrong_region`, `template_field_conflict`, `unknown_template`, `unknown_size`, `size_conflict`, or `idempotency_key_reused`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "429": {
            "description": "`quota_exceeded` (90017): the organization is at its quota of concurrent sandboxes; nothing was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "502": {
            "description": "Control plane only: the region the call is forwarded to did not answer. Nothing is retried; the `Idempotency-Key` is the client's to reuse.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "503": {
            "description": "`no_capacity` (90019): no host admits a sandbox of this size now; or `secrets_unavailable` (90045): the organization's secrets could not be read. Nothing was created; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sandboxToken": []
          }
        ],
        "servers": [
          {
            "url": "https://api.telnyx.com/v2",
            "description": "Control plane, with the Telnyx API key"
          },
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane), with the sandbox token",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ]
      }
    },
    "/compute/sandbox/batch": {
      "post": {
        "operationId": "CreateSandboxBatch",
        "tags": [
          "sandboxes"
        ],
        "summary": "Create a batch of sandboxes",
        "description": "Creates `count` sandboxes from one create body, or `count` clones of one snapshot with `from`, in one call under one `Idempotency-Key`. The quota applies to the whole batch (429, nothing created); the items no host has room for are each a `no_capacity` error in the `200` answer, which is not in the data envelope. When no item is admitted at all, the answer is the create's 503.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SandboxBatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Each item's sandbox or error, in index order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResult"
                }
              }
            }
          },
          "400": {
            "description": "A standard validation error (`missing_parameter`, `bad_request`, `invalid_string_length` or `invalid_type`) at `source`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the snapshot named in `from` does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "409": {
            "description": "`name_conflict`, `template_not_ready`, `snapshot_not_published`, `source_terminated`, `operation_in_progress` or `request_in_progress`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "413": {
            "description": "`request_too_large` (10015): the body is larger than 1 MiB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "422": {
            "description": "A named error at `source.pointer`: `registry_not_allowed`, `invalid_env`, `invalid_workdir`, `resources_not_allowed`, `cidr_not_allowed`, `allow_out_not_allowed`, `invalid_egress_rule`, `unknown_secret`, `rules_not_allowed`, `wrong_region`, `template_field_conflict`, `unknown_template`, `unknown_size`, `size_conflict`, or `idempotency_key_reused`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "429": {
            "description": "`quota_exceeded` (90017): the batch would exceed the organization's quota; nothing was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "502": {
            "description": "Control plane only: the region the call is forwarded to did not answer. Nothing is retried; the `Idempotency-Key` is the client's to reuse.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "503": {
            "description": "`no_capacity` (90019): no host admits a sandbox of this size now; or `secrets_unavailable` (90045): the organization's secrets could not be read. Nothing was created; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sandboxToken": []
          }
        ],
        "servers": [
          {
            "url": "https://api.telnyx.com/v2",
            "description": "Control plane, with the Telnyx API key"
          },
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane), with the sandbox token",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ]
      }
    },
    "/compute/sandbox/{id}": {
      "get": {
        "operationId": "GetSandbox",
        "tags": [
          "sandboxes"
        ],
        "summary": "Get a sandbox",
        "description": "Reads a sandbox. A terminated sandbox stays readable.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SandboxId"
          }
        ],
        "responses": {
          "200": {
            "description": "The sandbox.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxResponse"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_string_length`: the id is not 1 to 64 characters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the sandbox does not exist or belongs to another organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "502": {
            "description": "Control plane only: the region the call is forwarded to did not answer. Nothing is retried; the `Idempotency-Key` is the client's to reuse.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sandboxToken": []
          }
        ],
        "servers": [
          {
            "url": "https://api.telnyx.com/v2",
            "description": "Control plane, with the Telnyx API key"
          },
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane), with the sandbox token",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ]
      },
      "patch": {
        "operationId": "UpdateSandbox",
        "tags": [
          "sandboxes"
        ],
        "summary": "Replace a sandbox's tags",
        "description": "Replaces the sandbox's whole tag set; `{}` clears it.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SandboxId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SandboxUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The sandbox.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxResponse"
                }
              }
            }
          },
          "400": {
            "description": "A standard validation error (`missing_parameter`, `bad_request`, `invalid_string_length` or `invalid_type`) at `source`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the sandbox does not exist or belongs to another organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "409": {
            "description": "`request_in_progress` (90011): a request with this `Idempotency-Key` is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "413": {
            "description": "`request_too_large` (10015): the body is larger than 1 MiB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "422": {
            "description": "`idempotency_key_reused` (90009): the `Idempotency-Key` was used with a different request within the last 24 hours.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "502": {
            "description": "Control plane only: the region the call is forwarded to did not answer. Nothing is retried; the `Idempotency-Key` is the client's to reuse.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sandboxToken": []
          }
        ],
        "servers": [
          {
            "url": "https://api.telnyx.com/v2",
            "description": "Control plane, with the Telnyx API key"
          },
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane), with the sandbox token",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ]
      }
    },
    "/compute/sandbox/{id}/wait": {
      "get": {
        "operationId": "WaitSandbox",
        "tags": [
          "sandboxes"
        ],
        "summary": "Wait for a sandbox to settle",
        "description": "A long poll: answers once the sandbox reads `paused` or `terminated`, or when `timeout` passes, with the sandbox as it then reads. Reaching `running` does not answer it: read `GET /sandbox/{id}` for that.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SandboxId"
          },
          {
            "name": "timeout",
            "in": "query",
            "required": false,
            "description": "Seconds to wait, at most 10 (larger values are capped); `0` answers at once.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The sandbox.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxResponse"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`: `timeout` is not a non-negative integer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the sandbox does not exist or belongs to another organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "502": {
            "description": "Control plane only: the region the call is forwarded to did not answer. Nothing is retried; the `Idempotency-Key` is the client's to reuse.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sandboxToken": []
          }
        ],
        "servers": [
          {
            "url": "https://api.telnyx.com/v2",
            "description": "Control plane, with the Telnyx API key"
          },
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane), with the sandbox token",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ]
      }
    },
    "/compute/sandbox/{id}/terminate": {
      "post": {
        "operationId": "TerminateSandbox",
        "tags": [
          "sandboxes"
        ],
        "summary": "Terminate a sandbox",
        "description": "Asks the sandbox to stop for good, with reason `terminated`; it answers `202` with the sandbox, which reads `terminated` once stopped. A paused sandbox is terminated too. A terminated sandbox is left as it is. No body.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SandboxId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "202": {
            "description": "The sandbox.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxResponse"
                }
              }
            }
          },
          "400": {
            "description": "A standard validation error (`missing_parameter`, `bad_request`, `invalid_string_length` or `invalid_type`) at `source`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the sandbox does not exist or belongs to another organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "409": {
            "description": "`request_in_progress` (90011): a request with this `Idempotency-Key` is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "422": {
            "description": "`idempotency_key_reused` (90009): the `Idempotency-Key` was used with a different request within the last 24 hours.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "502": {
            "description": "Control plane only: the region the call is forwarded to did not answer. Nothing is retried; the `Idempotency-Key` is the client's to reuse.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sandboxToken": []
          }
        ],
        "servers": [
          {
            "url": "https://api.telnyx.com/v2",
            "description": "Control plane, with the Telnyx API key"
          },
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane), with the sandbox token",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ]
      }
    },
    "/compute/sandbox/{id}/pause": {
      "post": {
        "operationId": "PauseSandbox",
        "tags": [
          "sandboxes"
        ],
        "summary": "Pause a sandbox",
        "description": "Checkpoints a `running` sandbox's memory and disk and frees its VM. The sandbox reads `running` until the checkpoint is taken, then `paused` with `paused_at` and `pause_reason` `customer`. Its timeout clock stops and it leaves the quota while paused. Running execs end `interrupted`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SandboxId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "description": "None, or `{}`; any field is 400.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The sandbox.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxResponse"
                }
              }
            }
          },
          "400": {
            "description": "A standard validation error (`missing_parameter`, `bad_request`, `invalid_string_length` or `invalid_type`) at `source`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the sandbox does not exist or belongs to another organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "409": {
            "description": "`invalid_state`: the sandbox is not `running`, or a terminate is pending; `operation_in_progress`: a checkpoint is already being taken; or `request_in_progress`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "413": {
            "description": "`request_too_large` (10015): the body is larger than 1 MiB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "422": {
            "description": "`idempotency_key_reused` (90009): the `Idempotency-Key` was used with a different request within the last 24 hours.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "502": {
            "description": "Control plane only: the region the call is forwarded to did not answer. Nothing is retried; the `Idempotency-Key` is the client's to reuse.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sandboxToken": []
          }
        ],
        "servers": [
          {
            "url": "https://api.telnyx.com/v2",
            "description": "Control plane, with the Telnyx API key"
          },
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane), with the sandbox token",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ]
      }
    },
    "/compute/sandbox/{id}/resume": {
      "post": {
        "operationId": "ResumeSandbox",
        "tags": [
          "sandboxes"
        ],
        "summary": "Resume a paused sandbox",
        "description": "Restores a `paused` sandbox from its checkpoint: it reads `starting`, then `running`. The resume takes a slot of the quota.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SandboxId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "description": "None, or `{}`; any field is 400.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The sandbox.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxResponse"
                }
              }
            }
          },
          "400": {
            "description": "A standard validation error (`missing_parameter`, `bad_request`, `invalid_string_length` or `invalid_type`) at `source`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the sandbox does not exist or belongs to another organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "409": {
            "description": "`invalid_state`: the sandbox is not `paused`, has no checkpoint, or a terminate is pending; `operation_in_progress`; or `request_in_progress`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "413": {
            "description": "`request_too_large` (10015): the body is larger than 1 MiB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "422": {
            "description": "`idempotency_key_reused` (90009): the `Idempotency-Key` was used with a different request within the last 24 hours.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "429": {
            "description": "`quota_exceeded` (90017): the sandbox stays paused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "502": {
            "description": "Control plane only: the region the call is forwarded to did not answer. Nothing is retried; the `Idempotency-Key` is the client's to reuse.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sandboxToken": []
          }
        ],
        "servers": [
          {
            "url": "https://api.telnyx.com/v2",
            "description": "Control plane, with the Telnyx API key"
          },
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane), with the sandbox token",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ]
      }
    },
    "/compute/sandbox/{id}/connect": {
      "post": {
        "operationId": "ConnectSandbox",
        "tags": [
          "sandboxes"
        ],
        "summary": "Connect to a sandbox",
        "description": "The call an agent makes per turn: resumes a paused sandbox, then moves its expiry to at least now plus `timeout` (300 s when omitted; never earlier). `200` when the sandbox is `running`, `202` while it starts (a resume among them). A connect on a running sandbox counts as activity for the idle timeout.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SandboxId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectRequest"
              }
            }
          },
          "description": "Optional: no body is the default timeout."
        },
        "responses": {
          "200": {
            "description": "The sandbox, `running`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxResponse"
                }
              }
            }
          },
          "202": {
            "description": "The sandbox, `starting`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxResponse"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`: `timeout` is below 1 or too large; or another validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the sandbox does not exist or belongs to another organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "409": {
            "description": "`invalid_state` (a terminate is pending), `sandbox_terminated`, `operation_in_progress` (a pause or checkpoint in flight), or `request_in_progress`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "413": {
            "description": "`request_too_large` (10015): the body is larger than 1 MiB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "422": {
            "description": "`idempotency_key_reused` (90009): the `Idempotency-Key` was used with a different request within the last 24 hours.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "429": {
            "description": "`quota_exceeded` (90017): resuming would exceed the quota; the sandbox stays paused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "502": {
            "description": "Control plane only: the region the call is forwarded to did not answer. Nothing is retried; the `Idempotency-Key` is the client's to reuse.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sandboxToken": []
          }
        ],
        "servers": [
          {
            "url": "https://api.telnyx.com/v2",
            "description": "Control plane, with the Telnyx API key"
          },
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane), with the sandbox token",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ]
      }
    },
    "/compute/sandbox/{id}/timeout": {
      "post": {
        "operationId": "SetSandboxTimeout",
        "tags": [
          "sandboxes"
        ],
        "summary": "Set a sandbox's timeout",
        "description": "Sets the sandbox's `timeout`: on a running sandbox the expiry becomes now plus `seconds`; on a paused one `seconds` is the lifetime left when it resumes. `null` removes the timeout. `idle_timeout` is left as it is.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SandboxId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimeoutRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The sandbox.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxResponse"
                }
              }
            }
          },
          "400": {
            "description": "`missing_parameter`: `seconds` is required; `bad_request`: it is below 1 or too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the sandbox does not exist or belongs to another organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "409": {
            "description": "`invalid_state` (a terminate is pending), `sandbox_terminated`, or `request_in_progress`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "413": {
            "description": "`request_too_large` (10015): the body is larger than 1 MiB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "422": {
            "description": "`idempotency_key_reused` (90009): the `Idempotency-Key` was used with a different request within the last 24 hours.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "502": {
            "description": "Control plane only: the region the call is forwarded to did not answer. Nothing is retried; the `Idempotency-Key` is the client's to reuse.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sandboxToken": []
          }
        ],
        "servers": [
          {
            "url": "https://api.telnyx.com/v2",
            "description": "Control plane, with the Telnyx API key"
          },
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane), with the sandbox token",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ]
      }
    },
    "/compute/sandbox/{id}/network": {
      "put": {
        "operationId": "SetSandboxNetwork",
        "tags": [
          "sandboxes"
        ],
        "summary": "Replace a sandbox's network policy",
        "description": "Replaces `egress` and `allow_out` of a `running` or `paused` sandbox, checked as on the create. On a running sandbox the call answers `202` and the object shows the new policy once applied; every open flow is then judged by it. On a paused sandbox it applies at once (`200`). `rules` cannot change.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SandboxId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NetworkRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Paused: the policy is applied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxResponse"
                }
              }
            }
          },
          "202": {
            "description": "Running: the policy is being applied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxResponse"
                }
              }
            }
          },
          "400": {
            "description": "A standard validation error (`missing_parameter`, `bad_request`, `invalid_string_length` or `invalid_type`) at `source`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the sandbox does not exist or belongs to another organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "409": {
            "description": "`invalid_state` (not running or paused, or a terminate pending), `operation_in_progress` (a checkpoint in flight), or `request_in_progress`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "413": {
            "description": "`request_too_large` (10015): the body is larger than 1 MiB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "422": {
            "description": "`cidr_not_allowed`, `allow_out_not_allowed`, `rules_immutable`, `rules_not_allowed`, or `idempotency_key_reused`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "502": {
            "description": "Control plane only: the region the call is forwarded to did not answer. Nothing is retried; the `Idempotency-Key` is the client's to reuse.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sandboxToken": []
          }
        ],
        "servers": [
          {
            "url": "https://api.telnyx.com/v2",
            "description": "Control plane, with the Telnyx API key"
          },
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane), with the sandbox token",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ]
      }
    },
    "/compute/sandbox/{id}/fork": {
      "post": {
        "operationId": "ForkSandbox",
        "tags": [
          "sandboxes"
        ],
        "summary": "Fork a running sandbox",
        "description": "Checkpoints a `running` sandbox (which runs on) and starts `count` siblings from that checkpoint, each a new sandbox with its own id, in one swarm. Answers `202` at once with every sibling `starting`. The whole fork counts against the quota (429, nothing created). A sibling no host can take ends `terminated` with `no_capacity`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SandboxId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForkRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The siblings and their swarm.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForkResult"
                }
              }
            }
          },
          "400": {
            "description": "`missing_parameter`: `count` is required; `bad_request`: it is out of range; or another validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the sandbox does not exist or belongs to another organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "409": {
            "description": "`sandbox_not_running`, `operation_in_progress`, `name_conflict`, or `request_in_progress`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "413": {
            "description": "`request_too_large` (10015): the body is larger than 1 MiB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "422": {
            "description": "`unknown_size` or `size_conflict` at `/size`: a size that names no preset, or not the source's; or `idempotency_key_reused` (90009): the `Idempotency-Key` was used with a different request within the last 24 hours.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "429": {
            "description": "`quota_exceeded` (90017): the fork would exceed the quota.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "502": {
            "description": "Control plane only: the region the call is forwarded to did not answer. Nothing is retried; the `Idempotency-Key` is the client's to reuse.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sandboxToken": []
          }
        ],
        "servers": [
          {
            "url": "https://api.telnyx.com/v2",
            "description": "Control plane, with the Telnyx API key"
          },
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane), with the sandbox token",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ]
      }
    },
    "/compute/sandbox/{id}/snapshot": {
      "post": {
        "operationId": "CreateSandboxSnapshot",
        "tags": [
          "sandbox snapshots"
        ],
        "summary": "Snapshot a running sandbox",
        "description": "Takes a named snapshot of a `running` sandbox, which runs on. Answers `202` with the snapshot; it can be used in a create's `from` once its phase is `Published`. A sandbox holds at most a few named snapshots (3 by default): one more is 409 `snapshot_quota`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SandboxId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SnapshotCreateRequest"
              }
            }
          },
          "description": "Optional: no body, or `{}`, is a snapshot without a name."
        },
        "responses": {
          "202": {
            "description": "The snapshot.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnapshotResponse"
                }
              }
            }
          },
          "400": {
            "description": "A standard validation error (`missing_parameter`, `bad_request`, `invalid_string_length` or `invalid_type`) at `source`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the sandbox does not exist or belongs to another organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "409": {
            "description": "`sandbox_not_running` (a paused sandbox included), `operation_in_progress`, `snapshot_quota`, or `request_in_progress`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "413": {
            "description": "`request_too_large` (10015): the body is larger than 1 MiB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "422": {
            "description": "`idempotency_key_reused` (90009): the `Idempotency-Key` was used with a different request within the last 24 hours.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "502": {
            "description": "Control plane only: the region the call is forwarded to did not answer. Nothing is retried; the `Idempotency-Key` is the client's to reuse.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sandboxToken": []
          }
        ],
        "servers": [
          {
            "url": "https://api.telnyx.com/v2",
            "description": "Control plane, with the Telnyx API key"
          },
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane), with the sandbox token",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ]
      },
      "get": {
        "operationId": "ListSandboxSnapshots",
        "tags": [
          "sandbox snapshots"
        ],
        "summary": "List a sandbox's snapshots",
        "description": "Lists the sandbox's named snapshots that are not deleted.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SandboxId"
          }
        ],
        "responses": {
          "200": {
            "description": "The snapshots.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnapshotList"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_string_length`: the id is not 1 to 64 characters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the sandbox does not exist or belongs to another organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "502": {
            "description": "Control plane only: the region the call is forwarded to did not answer. Nothing is retried; the `Idempotency-Key` is the client's to reuse.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sandboxToken": []
          }
        ],
        "servers": [
          {
            "url": "https://api.telnyx.com/v2",
            "description": "Control plane, with the Telnyx API key"
          },
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane), with the sandbox token",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ]
      }
    },
    "/compute/sandbox/{id}/snapshot/{sid}": {
      "get": {
        "operationId": "GetSandboxSnapshot",
        "tags": [
          "sandbox snapshots"
        ],
        "summary": "Get a snapshot",
        "description": "Reads one named snapshot.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SandboxId"
          },
          {
            "$ref": "#/components/parameters/SnapshotId"
          }
        ],
        "responses": {
          "200": {
            "description": "The snapshot.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnapshotResponse"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_string_length`: an id is not 1 to 64 characters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the sandbox or the snapshot does not exist, or belongs to another organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "502": {
            "description": "Control plane only: the region the call is forwarded to did not answer. Nothing is retried; the `Idempotency-Key` is the client's to reuse.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sandboxToken": []
          }
        ],
        "servers": [
          {
            "url": "https://api.telnyx.com/v2",
            "description": "Control plane, with the Telnyx API key"
          },
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane), with the sandbox token",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ]
      },
      "delete": {
        "operationId": "DeleteSandboxSnapshot",
        "tags": [
          "sandbox snapshots"
        ],
        "summary": "Delete a snapshot",
        "description": "Deletes a named snapshot: it leaves the API at once, and its slot frees once its checkpoint is removed. Sandboxes cloned from it keep running. No body.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SandboxId"
          },
          {
            "$ref": "#/components/parameters/SnapshotId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "description": "A standard validation error (`missing_parameter`, `bad_request`, `invalid_string_length` or `invalid_type`) at `source`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the sandbox or the snapshot does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "409": {
            "description": "`operation_in_progress`: the snapshot is being taken, or a create from it has not started yet; or `request_in_progress`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "422": {
            "description": "`idempotency_key_reused` (90009): the `Idempotency-Key` was used with a different request within the last 24 hours.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "502": {
            "description": "Control plane only: the region the call is forwarded to did not answer. Nothing is retried; the `Idempotency-Key` is the client's to reuse.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sandboxToken": []
          }
        ],
        "servers": [
          {
            "url": "https://api.telnyx.com/v2",
            "description": "Control plane, with the Telnyx API key"
          },
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane), with the sandbox token",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ]
      }
    },
    "/compute/sandbox/template": {
      "post": {
        "operationId": "CreateSandboxTemplate",
        "tags": [
          "sandbox templates"
        ],
        "summary": "Create a template",
        "description": "Creates a named template and starts its build: the image is pulled, `start_command` run, `ready_command` probed until it passes, and the ready state checkpointed. Answers `202` in `building`; a sandbox created from it (`template` on the create) resumes that checkpoint.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplateCreateRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The template, `building`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateResponse"
                }
              }
            }
          },
          "400": {
            "description": "A standard validation error (`missing_parameter`, `bad_request`, `invalid_string_length` or `invalid_type`) at `source`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "409": {
            "description": "`name_conflict`: another template of the organization holds this name; or `request_in_progress`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "413": {
            "description": "`request_too_large` (10015): the body is larger than 1 MiB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "422": {
            "description": "`wrong_region`, `registry_not_allowed`, `unknown_secret`, `invalid_env`, `template_env_secret`, `invalid_workdir`, `resources_not_allowed`, `unknown_size`, or `idempotency_key_reused`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "429": {
            "description": "`quota_exceeded` (90017): the organization is at its quota of templates.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "502": {
            "description": "Control plane only: the region the call is forwarded to did not answer. Nothing is retried; the `Idempotency-Key` is the client's to reuse.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "503": {
            "description": "`secrets_unavailable` (90045): the organization's secrets could not be read; retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sandboxToken": []
          }
        ],
        "servers": [
          {
            "url": "https://api.telnyx.com/v2",
            "description": "Control plane, with the Telnyx API key"
          },
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane), with the sandbox token",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ]
      },
      "get": {
        "operationId": "ListSandboxTemplates",
        "tags": [
          "sandbox templates"
        ],
        "summary": "List templates",
        "description": "Lists the organization's templates that are not deleted, in one page; page parameters are ignored.",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": false,
            "description": "The exact name.",
            "schema": {
              "type": "string",
              "maxLength": 64,
              "pattern": "^[A-Za-z0-9._-]+$"
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "description": "The templates of a named size, or `custom`.",
            "schema": {
              "type": "string",
              "enum": [
                "small",
                "medium",
                "large",
                "custom"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The templates.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateList"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`: the `name` filter is not a template name (1 to 64 characters of letters, digits, `.`, `_` and `-`), or the `size` filter is not `small`, `medium`, `large` or `custom`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sandboxToken": []
          }
        ],
        "servers": [
          {
            "url": "https://api.telnyx.com/v2",
            "description": "Control plane, with the Telnyx API key"
          },
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane), with the sandbox token",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ]
      }
    },
    "/compute/sandbox/template/{id}": {
      "get": {
        "operationId": "GetSandboxTemplate",
        "tags": [
          "sandbox templates"
        ],
        "summary": "Get a template",
        "description": "Reads a template.",
        "parameters": [
          {
            "$ref": "#/components/parameters/TemplateId"
          }
        ],
        "responses": {
          "200": {
            "description": "The template.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateResponse"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_string_length`: the id is not 1 to 64 characters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the template does not exist, is deleted, or belongs to another organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "502": {
            "description": "Control plane only: the region the call is forwarded to did not answer. Nothing is retried; the `Idempotency-Key` is the client's to reuse.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sandboxToken": []
          }
        ],
        "servers": [
          {
            "url": "https://api.telnyx.com/v2",
            "description": "Control plane, with the Telnyx API key"
          },
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane), with the sandbox token",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ]
      },
      "delete": {
        "operationId": "DeleteSandboxTemplate",
        "tags": [
          "sandbox templates"
        ],
        "summary": "Delete a template",
        "description": "Deletes a template: its name is free at once and no create may name it. Sandboxes created from it keep running. No body (or `{}`).",
        "parameters": [
          {
            "$ref": "#/components/parameters/TemplateId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "description": "A standard validation error (`missing_parameter`, `bad_request`, `invalid_string_length` or `invalid_type`) at `source`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the template does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "409": {
            "description": "`request_in_progress` (90011): a request with this `Idempotency-Key` is still being processed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "413": {
            "description": "`request_too_large` (10015): the body is larger than 1 MiB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "422": {
            "description": "`idempotency_key_reused` (90009): the `Idempotency-Key` was used with a different request within the last 24 hours.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "502": {
            "description": "Control plane only: the region the call is forwarded to did not answer. Nothing is retried; the `Idempotency-Key` is the client's to reuse.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sandboxToken": []
          }
        ],
        "servers": [
          {
            "url": "https://api.telnyx.com/v2",
            "description": "Control plane, with the Telnyx API key"
          },
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane), with the sandbox token",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ]
      }
    },
    "/compute/sandbox/template/{id}/rebuild": {
      "post": {
        "operationId": "RebuildSandboxTemplate",
        "tags": [
          "sandbox templates"
        ],
        "summary": "Rebuild a template",
        "description": "Builds a `ready` or `failed` template again, pulling the image again (a moved tag included) and retaking its ready state. Sandboxes already created keep running. No body (or `{}`).",
        "parameters": [
          {
            "$ref": "#/components/parameters/TemplateId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "202": {
            "description": "The template, `building`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateResponse"
                }
              }
            }
          },
          "400": {
            "description": "A standard validation error (`missing_parameter`, `bad_request`, `invalid_string_length` or `invalid_type`) at `source`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the template does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "409": {
            "description": "`operation_in_progress`: the template is building; `invalid_state`: it has been rebuilt 999 times; or `request_in_progress`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "413": {
            "description": "`request_too_large` (10015): the body is larger than 1 MiB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "422": {
            "description": "`idempotency_key_reused` (90009): the `Idempotency-Key` was used with a different request within the last 24 hours.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "502": {
            "description": "Control plane only: the region the call is forwarded to did not answer. Nothing is retried; the `Idempotency-Key` is the client's to reuse.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "sandboxToken": []
          }
        ],
        "servers": [
          {
            "url": "https://api.telnyx.com/v2",
            "description": "Control plane, with the Telnyx API key"
          },
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane), with the sandbox token",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ]
      }
    },
    "/compute/sandbox/token": {
      "post": {
        "operationId": "CreateSandboxToken",
        "tags": [
          "sandbox tokens"
        ],
        "summary": "Create a sandbox token",
        "description": "Mints a short-lived sandbox token for the caller's organization (one hour by default) and answers each region's base URL. Send the token as `Authorization: Bearer` to a region's host for every sandbox call, data plane included. Served by the control plane only; the response is not cached.",
        "responses": {
          "200": {
            "description": "The token and the regions' URLs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxToken"
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/compute/sandbox/{id}/exec": {
      "post": {
        "operationId": "StartSandboxExec",
        "tags": [
          "sandbox execs"
        ],
        "summary": "Start an exec",
        "description": "Runs a command in the sandbox and answers `201` with the exec. Read its output with the attach, or wait for it with a get and `wait`. With an `Idempotency-Key` a retry never runs the command twice.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SandboxId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExecStartRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The exec.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecResponse"
                }
              }
            }
          },
          "400": {
            "description": "A standard validation error (`missing_parameter`, `bad_request`, `invalid_string_length` or `invalid_type`) at `source`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the sandbox does not exist or belongs to another organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "409": {
            "description": "`sandbox_not_running`: no running execution, or the guest is not reachable yet; `sandbox_paused`: resume it first. Or `request_in_progress`; or `exec_limit`: the sandbox already has its cap of execs starting or running (32 by default, the host's setting), so wait for one to finish or kill one. A retry under the `Idempotency-Key` of an exec already started is answered, not refused.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "413": {
            "description": "`request_too_large` (10015): the body is larger than 1 MiB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "422": {
            "description": "`invalid_command`, `invalid_env`, `invalid_workdir`, `unknown_user`, or `idempotency_key_reused`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "503": {
            "description": "`service_unavailable` (10037): the sandbox cannot answer right now; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane)",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ],
        "security": [
          {
            "sandboxToken": []
          }
        ]
      },
      "get": {
        "operationId": "ListSandboxExecs",
        "tags": [
          "sandbox execs"
        ],
        "summary": "List execs",
        "description": "Lists the sandbox's execs, newest first.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SandboxId"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Repeatable, or comma-separated.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "starting",
                  "running",
                  "exited",
                  "failed",
                  "terminated",
                  "interrupted"
                ]
              }
            }
          },
          {
            "$ref": "#/components/parameters/PageNumber"
          },
          {
            "$ref": "#/components/parameters/PageSize"
          }
        ],
        "responses": {
          "200": {
            "description": "The page of execs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecList"
                }
              }
            }
          },
          "400": {
            "description": "A standard validation error (`missing_parameter`, `bad_request`, `invalid_string_length` or `invalid_type`) at `source`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the sandbox does not exist or belongs to another organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "409": {
            "description": "`sandbox_not_running`: no running execution, or the guest is not reachable yet; `sandbox_paused`: resume it first.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "503": {
            "description": "`service_unavailable` (10037): the sandbox cannot answer right now; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane)",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ],
        "security": [
          {
            "sandboxToken": []
          }
        ]
      }
    },
    "/compute/sandbox/{id}/exec/{exec_id}": {
      "get": {
        "operationId": "GetSandboxExec",
        "tags": [
          "sandbox execs"
        ],
        "summary": "Get an exec",
        "description": "Reads an exec; with `wait`, a long poll that answers once the exec has ended or `wait` passes.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SandboxId"
          },
          {
            "$ref": "#/components/parameters/ExecId"
          },
          {
            "name": "wait",
            "in": "query",
            "required": false,
            "description": "Seconds to wait for the exec to end, at most 10 (larger values are capped).",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The exec.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecResponse"
                }
              }
            }
          },
          "400": {
            "description": "A standard validation error (`missing_parameter`, `bad_request`, `invalid_string_length` or `invalid_type`) at `source`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the sandbox or the exec does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "409": {
            "description": "`sandbox_not_running`: no running execution, or the guest is not reachable yet; `sandbox_paused`: resume it first.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "503": {
            "description": "`service_unavailable` (10037): the sandbox cannot answer right now; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane)",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ],
        "security": [
          {
            "sandboxToken": []
          }
        ]
      }
    },
    "/compute/sandbox/{id}/exec/{exec_id}/kill": {
      "post": {
        "operationId": "KillSandboxExec",
        "tags": [
          "sandbox execs"
        ],
        "summary": "Signal an exec",
        "description": "Sends a signal to the exec's process (`SIGKILL` by default). A kill of an ended exec answers its record.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SandboxId"
          },
          {
            "$ref": "#/components/parameters/ExecId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExecKillRequest"
              }
            }
          },
          "description": "Optional: no body, or `{}`, is `SIGKILL`."
        },
        "responses": {
          "202": {
            "description": "The exec.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecResponse"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`: an unknown `signal`; or another validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the sandbox or the exec does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "409": {
            "description": "`sandbox_not_running`: no running execution, or the guest is not reachable yet; `sandbox_paused`: resume it first. Or `request_in_progress`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "413": {
            "description": "`request_too_large` (10015): the body is larger than 1 MiB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "422": {
            "description": "`idempotency_key_reused` (90009): the `Idempotency-Key` was used with a different request within the last 24 hours.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "503": {
            "description": "`service_unavailable` (10037): the sandbox cannot answer right now; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane)",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ],
        "security": [
          {
            "sandboxToken": []
          }
        ]
      }
    },
    "/compute/sandbox/{id}/exec/{exec_id}/stdin/close": {
      "post": {
        "operationId": "CloseSandboxExecStdin",
        "tags": [
          "sandbox execs"
        ],
        "summary": "Close an exec's stdin",
        "description": "Sends EOF to the exec's stdin. On an ended exec it answers the record.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SandboxId"
          },
          {
            "$ref": "#/components/parameters/ExecId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "202": {
            "description": "The exec.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecResponse"
                }
              }
            }
          },
          "400": {
            "description": "A standard validation error (`missing_parameter`, `bad_request`, `invalid_string_length` or `invalid_type`) at `source`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the sandbox or the exec does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "409": {
            "description": "`sandbox_not_running`: no running execution, or the guest is not reachable yet; `sandbox_paused`: resume it first. Or `request_in_progress`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "422": {
            "description": "`idempotency_key_reused` (90009): the `Idempotency-Key` was used with a different request within the last 24 hours.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "503": {
            "description": "`service_unavailable` (10037): the sandbox cannot answer right now; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane)",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ],
        "security": [
          {
            "sandboxToken": []
          }
        ]
      }
    },
    "/compute/sandbox/{id}/exec/{exec_id}/attach": {
      "get": {
        "operationId": "AttachSandboxExec",
        "tags": [
          "sandbox execs"
        ],
        "summary": "Attach to an exec",
        "description": "A WebSocket on the exec: its output from `offset`, then live, then its exit; stdin the other way. Server to client, beside the common messages: `output` `{stream, data, offset}` (data base64; offset the position of its first byte), `truncated` `{oldest_offset}` (the output before it is gone), `exit` `{status, exit_code, reason}`, then close 1000. Client to server, beside the common messages: `resize` `{rows, cols}` (1 to 65535 each) for an exec started with `pty`. Every message is a JSON text message with a `type`. Server to client: `heartbeat` (every 30 s); `error` `{error: {code, title, detail}}`, then the connection closes (1008 when the client caused it, 1011 otherwise). Client to server: `stdin` `{data}` (base64, at most 64 KiB decoded); `stdin_eof`. A message over 128 KiB closes the connection with 1009; an invalid or unknown message is an `error` `bad_request` and 1008. Stdin to a process that has ended or whose stdin is closed answers `stdin_closed` and the message is dropped. Disconnecting never sends EOF and never stops the process. The token is checked at the upgrade only: the stream outlives its expiry. A missing exec or a sandbox not running is answered as HTTP before the upgrade; a request that is not a WebSocket upgrade is refused before it.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SandboxId"
          },
          {
            "$ref": "#/components/parameters/ExecId"
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "The output position to replay from.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "101": {
            "description": "Switching Protocols: a WebSocket of JSON text messages, described above."
          },
          "200": {
            "description": "Not returned: a successful upgrade answers `101`. Listed because the public reference's tooling expects a 2xx on every operation, as Telnyx's other WebSocket operations do."
          },
          "400": {
            "description": "`bad_request`: `offset` is not a non-negative integer; or an id out of bounds. A handshake that names the upgrade and is malformed (the WebSocket version or key) is also `400`, as plain text, not this body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the sandbox or the exec does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "409": {
            "description": "`sandbox_not_running`: no running execution, or the guest is not reachable yet; `sandbox_paused`: resume it first.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "426": {
            "description": "The request is no WebSocket upgrade (no `Connection: Upgrade` and `Upgrade: websocket`): answered as plain text.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "503": {
            "description": "`service_unavailable` (10037): the sandbox cannot answer right now; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            }
          }
        },
        "servers": [
          {
            "url": "wss://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane, WebSocket)",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ],
        "security": [
          {
            "sandboxToken": []
          }
        ]
      }
    },
    "/compute/sandbox/{id}/attach": {
      "get": {
        "operationId": "AttachSandbox",
        "tags": [
          "sandbox execs"
        ],
        "summary": "Attach to the main process",
        "description": "A WebSocket on the sandbox's main process (the create's `command`): stdin to it, and its exit. Its output is read through the logs. Server to client, beside the common messages: `exit` `{exit_code}` once the process has exited, then close 1000; a later attach receives it again. Every message is a JSON text message with a `type`. Server to client: `heartbeat` (every 30 s); `error` `{error: {code, title, detail}}`, then the connection closes (1008 when the client caused it, 1011 otherwise). Client to server: `stdin` `{data}` (base64, at most 64 KiB decoded); `stdin_eof`. A message over 128 KiB closes the connection with 1009; an invalid or unknown message is an `error` `bad_request` and 1008. Stdin to a process that has ended or whose stdin is closed answers `stdin_closed` and the message is dropped. Disconnecting never sends EOF and never stops the process. The token is checked at the upgrade only: the stream outlives its expiry. Errors are answered as HTTP before the upgrade; a request that is not a WebSocket upgrade is refused before it.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SandboxId"
          }
        ],
        "responses": {
          "101": {
            "description": "Switching Protocols: a WebSocket of JSON text messages, described above."
          },
          "200": {
            "description": "Not returned: a successful upgrade answers `101`. Listed because the public reference's tooling expects a 2xx on every operation, as Telnyx's other WebSocket operations do."
          },
          "400": {
            "description": "`invalid_string_length`: the id is not 1 to 64 characters. A handshake that names the upgrade and is malformed (the WebSocket version or key) is also `400`, as plain text, not this body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the sandbox does not exist or belongs to another organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "409": {
            "description": "`no_command`: the sandbox was created without a command; `sandbox_not_running`: the process has not exited and the sandbox is not `running`; `sandbox_paused`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "426": {
            "description": "The request is no WebSocket upgrade (no `Connection: Upgrade` and `Upgrade: websocket`): answered as plain text.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "503": {
            "description": "`service_unavailable` (10037): the sandbox cannot answer right now; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            }
          }
        },
        "servers": [
          {
            "url": "wss://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane, WebSocket)",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ],
        "security": [
          {
            "sandboxToken": []
          }
        ]
      }
    },
    "/compute/sandbox/{id}/stdin/close": {
      "post": {
        "operationId": "CloseSandboxStdin",
        "tags": [
          "sandbox execs"
        ],
        "summary": "Close the main process's stdin",
        "description": "Sends EOF to the main process's stdin and answers the sandbox.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SandboxId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "202": {
            "description": "The sandbox.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxResponse"
                }
              }
            }
          },
          "400": {
            "description": "A standard validation error (`missing_parameter`, `bad_request`, `invalid_string_length` or `invalid_type`) at `source`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the sandbox does not exist or belongs to another organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "409": {
            "description": "`no_command`: the sandbox was created without a command; `sandbox_not_running`: no running execution, or the guest is not reachable yet; `sandbox_paused`: resume it first. Or `request_in_progress`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "422": {
            "description": "`idempotency_key_reused` (90009): the `Idempotency-Key` was used with a different request within the last 24 hours.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "503": {
            "description": "`service_unavailable` (10037): the sandbox cannot answer right now; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane)",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ],
        "security": [
          {
            "sandboxToken": []
          }
        ]
      }
    },
    "/compute/sandbox/{id}/files": {
      "get": {
        "operationId": "ReadSandboxFiles",
        "tags": [
          "sandbox files"
        ],
        "summary": "Read a file, list or stat a path",
        "description": "Without flags, the file's bytes as `application/octet-stream` with `Content-Length`, at most the region's file limit (512 MiB by default, never more). A failure after the headers aborts the response: compare the received byte count with `Content-Length` and reject a mismatch even if the HTTP library reports status 200 and a clean end of stream. Streamed transfers are limited to 4 per organization per replica and 32 total per replica, not per site; excess transfers answer 503 with `Retry-After`. Without flags files above 8 MiB use streamed transfers. `list=true` answers a directory's entries, `stat=true` the path's own entry (a symlink as one). `HEAD` answers a file's headers alone.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SandboxId"
          },
          {
            "$ref": "#/components/parameters/FilePath"
          },
          {
            "name": "list",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "stat",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "page[number]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "description": "With `list=true`."
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            },
            "description": "With `list=true`."
          }
        ],
        "responses": {
          "200": {
            "description": "The file's bytes, a directory's entries (`list=true`), or the path's entry (`stat=true`).",
            "headers": {
              "Content-Length": {
                "schema": {
                  "type": "integer"
                }
              },
              "Content-Disposition": {
                "schema": {
                  "type": "string",
                  "const": "attachment"
                }
              }
            },
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/octet-stream"
                }
              },
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/FileList"
                    },
                    {
                      "$ref": "#/components/schemas/FileEntryResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`: `list` and `stat` together; `invalid_type`: a flag that is not a boolean; or a page parameter out of range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the sandbox, or the path in it (`source.parameter` `path`), does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "409": {
            "description": "`sandbox_paused`; `sandbox_not_running`; `path_type_mismatch`: the path is not of the kind the call needs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "413": {
            "description": "`file_too_large` (90016): the file is larger than the region's file limit (512 MiB by default, never more; the error's detail says it).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "422": {
            "description": "`invalid_path` (90006).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "503": {
            "description": "`service_unavailable` (10037): the sandbox cannot answer now, or too many file transfers are in flight; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane)",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ],
        "security": [
          {
            "sandboxToken": []
          }
        ]
      },
      "put": {
        "operationId": "WriteSandboxFile",
        "tags": [
          "sandbox files"
        ],
        "summary": "Write a file or make a directory",
        "description": "Writes the raw body to `path`, whatever the `Content-Type`, making the parents: `201` for a new path, `200` for a replaced one, with the entry written. A body larger than 8 MiB is streamed and replaces the file atomically; such an upload refuses an `Idempotency-Key` (400) and is safe to repeat without one. Streamed transfers are limited to 4 per organization per replica and 32 total per replica, shared with downloads, not per site; excess transfers answer 503 with `Retry-After`. With `directory=true` it makes a directory and takes no body. The body's first byte must arrive within 60 s and each 8 MiB within 5 minutes (else 400).",
        "parameters": [
          {
            "$ref": "#/components/parameters/SandboxId"
          },
          {
            "$ref": "#/components/parameters/FilePath"
          },
          {
            "name": "directory",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "description": "The file's bytes, at most the region's file limit (512 MiB by default, never more).",
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "contentMediaType": "application/octet-stream"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Replaced: the entry written.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileEntryResponse"
                }
              }
            }
          },
          "201": {
            "description": "Created: the entry written.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileEntryResponse"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`: a body with `directory=true`, an `Idempotency-Key` on an upload above 8 MiB, or a body too slow or broken off; `invalid_type`: a flag that is not a boolean.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the sandbox does not exist or belongs to another organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "409": {
            "description": "`sandbox_paused`; `sandbox_not_running`; `path_type_mismatch`: the path is not of the kind the call needs. Or `request_in_progress`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "413": {
            "description": "`file_too_large` (90016): the body is larger than the region's file limit (512 MiB by default, never more; the error's detail says it).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "422": {
            "description": "`invalid_path` (90006), or `idempotency_key_reused`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "503": {
            "description": "`service_unavailable` (10037): the sandbox cannot answer now, too many transfers are in flight, or an upload was interrupted (send the whole file again); the detail says which. After a commit that did not answer, the write may have completed: read the file back.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane)",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ],
        "security": [
          {
            "sandboxToken": []
          }
        ]
      },
      "delete": {
        "operationId": "DeleteSandboxFile",
        "tags": [
          "sandbox files"
        ],
        "summary": "Delete a path",
        "description": "Deletes a file, or a directory (with `recursive=true` when it is not empty).",
        "parameters": [
          {
            "$ref": "#/components/parameters/SandboxId"
          },
          {
            "$ref": "#/components/parameters/FilePath"
          },
          {
            "name": "recursive",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "description": "A standard validation error (`missing_parameter`, `bad_request`, `invalid_string_length` or `invalid_type`) at `source`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the sandbox, or the path in it, does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "409": {
            "description": "`directory_not_empty`: pass `recursive=true`; `sandbox_paused`; `sandbox_not_running`; `path_type_mismatch`: the path is not of the kind the call needs. Or `request_in_progress`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "422": {
            "description": "`invalid_path` (90006), or `idempotency_key_reused`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "503": {
            "description": "`service_unavailable` (10037): the sandbox cannot answer right now; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane)",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ],
        "security": [
          {
            "sandboxToken": []
          }
        ]
      }
    },
    "/compute/sandbox/{id}/files/rename": {
      "post": {
        "operationId": "RenameSandboxFile",
        "tags": [
          "sandbox files"
        ],
        "summary": "Rename a path",
        "description": "Moves `from` to `to` inside the sandbox; both absolute.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SandboxId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FileRenameRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Renamed."
          },
          "400": {
            "description": "A standard validation error (`missing_parameter`, `bad_request`, `invalid_string_length` or `invalid_type`) at `source`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the sandbox, `from`, or the directory of `to` does not exist (the answer does not say which).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "409": {
            "description": "`cross_device`: `from` and `to` are on different filesystems (copy, then delete); `sandbox_paused`; `sandbox_not_running`; or `request_in_progress`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "413": {
            "description": "`request_too_large` (10015): the body is larger than 1 MiB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "422": {
            "description": "`invalid_path` (90006), or `idempotency_key_reused`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "503": {
            "description": "`service_unavailable` (10037): the sandbox cannot answer right now; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane)",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ],
        "security": [
          {
            "sandboxToken": []
          }
        ]
      }
    },
    "/compute/sandbox/{id}/logs": {
      "get": {
        "operationId": "GetSandboxLogs",
        "tags": [
          "sandbox observability"
        ],
        "summary": "Read the main process's output",
        "description": "Pages the main process's output by cursor, or with `follow=true` streams it as Server-Sent Events: `event: log` with the line's position as `id` and a `LogLine` as `data`, a heartbeat comment every 30 s, and `event: end` once the sandbox is terminated and its output read. A stream that ends without `end` was cut: resume it with `Last-Event-ID`. A terminated sandbox's output stays readable for a while (24 h by default), then is 410.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SandboxId"
          },
          {
            "name": "follow",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "page[after]",
            "in": "query",
            "required": false,
            "description": "The cursor: a line's `position`, or `meta.next_page_after`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/PageSize"
          },
          {
            "name": "Last-Event-ID",
            "in": "header",
            "required": false,
            "description": "The same cursor as `page[after]`, which it overrides: the SSE resume.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of lines, or with `follow=true` an event stream.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LogPage"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`: `stream` is given (the output does not tell stdout and stderr apart), or the cursor is invalid; `invalid_type`: `follow` is not a boolean.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the sandbox does not exist or belongs to another organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "410": {
            "description": "`logs_expired` (90046): the sandbox's output is no longer kept.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "503": {
            "description": "`service_unavailable` (10037): the output cannot be read now; retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane)",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ],
        "security": [
          {
            "sandboxToken": []
          }
        ]
      }
    },
    "/compute/sandbox/{id}/metrics": {
      "get": {
        "operationId": "GetSandboxMetrics",
        "tags": [
          "sandbox observability"
        ],
        "summary": "Read a sandbox's metrics",
        "description": "The sandbox's CPU, memory, network and disk usage over a window of at most 60 minutes (the default), in 60 s steps, with the latest sample. A longer window is refused with HTTP 400. The series restarts when the sandbox starts or resumes, or its host daemon restarts, and is empty while paused or terminated. Hosts retain only the last hour of samples in memory.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SandboxId"
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The metrics.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricsResponse"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_type`: `from` or `to` is not an RFC 3339 time; `bad_request`: the window is longer than 60 minutes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the sandbox does not exist or belongs to another organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "503": {
            "description": "`service_unavailable` (10037): the sandbox cannot answer right now; retry after `Retry-After` seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane)",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ],
        "security": [
          {
            "sandboxToken": []
          }
        ]
      }
    },
    "/compute/sandbox/{id}/lifecycle_event": {
      "get": {
        "operationId": "ListSandboxLifecycleEvents",
        "tags": [
          "sandbox observability"
        ],
        "summary": "List a sandbox's lifecycle events",
        "description": "The sandbox's state changes in ascending time, kept 7 days. A terminated sandbox's events are served.",
        "parameters": [
          {
            "$ref": "#/components/parameters/SandboxId"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Repeatable, at most nine.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "maxItems": 8,
              "items": {
                "type": "string",
                "enum": [
                  "created",
                  "started",
                  "paused",
                  "resumed",
                  "resume_failed",
                  "snapshotted",
                  "forked",
                  "network_updated",
                  "terminated"
                ]
              }
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            }
          },
          {
            "name": "page[after]",
            "in": "query",
            "required": false,
            "description": "The opaque cursor, `meta.next_page_after`.",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of events.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LifecycleEventPage"
                }
              }
            }
          },
          "400": {
            "description": "An unknown `type` or more than nine, a bad page size, or an invalid cursor.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "`not_found` (10005): the sandbox does not exist or belongs to another organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane)",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ],
        "security": [
          {
            "sandboxToken": []
          }
        ]
      }
    },
    "/compute/sandbox/lifecycle_event": {
      "get": {
        "operationId": "ListLifecycleEvents",
        "tags": [
          "sandbox observability"
        ],
        "summary": "List the organization's lifecycle events",
        "description": "The state changes of every sandbox of the organization in ascending time, kept 7 days. A cursor is not a commit order: a poller re-reads from a `since` a little behind its last event and drops the ids it has seen.",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "An RFC 3339 time, e.g. `2026-11-11T10:00:00Z`.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "sandbox",
            "in": "query",
            "required": false,
            "description": "One sandbox's id; another organization's answers an empty page.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Repeatable, at most nine.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "maxItems": 8,
              "items": {
                "type": "string",
                "enum": [
                  "created",
                  "started",
                  "paused",
                  "resumed",
                  "resume_failed",
                  "snapshotted",
                  "forked",
                  "network_updated",
                  "terminated"
                ]
              }
            }
          },
          {
            "name": "page[size]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            }
          },
          {
            "name": "page[after]",
            "in": "query",
            "required": false,
            "description": "The opaque cursor, `meta.next_page_after`.",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of events.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LifecycleEventPage"
                }
              }
            }
          },
          "400": {
            "description": "An unknown `type` or more than nine, a `since` that is not RFC 3339, a `sandbox` that is not an id, a bad page size, or an invalid cursor.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "`invalid_token` (90029): the request carries no valid token. Answered with `WWW-Authenticate: Bearer`, whatever is wrong with the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            }
          },
          "403": {
            "description": "`invalid_identity` (90030): the token names no organization, or an organization or user id outside 1 to 128 characters of `[A-Za-z0-9._:-]`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "`internal_error` (90020): the request failed on our side; the detail names the error's kind only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://api.{region}.sandbox.telnyxcompute.com/v2",
            "description": "The sandbox's region (data plane)",
            "variables": {
              "region": {
                "default": "us-east-1",
                "description": "The region in the sandbox id"
              }
            }
          }
        ],
        "security": [
          {
            "sandboxToken": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Your Telnyx API key, on the control plane."
      },
      "sandboxToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "The sandbox token minted by `POST /compute/sandbox/token`, sent to the region's host."
      }
    },
    "headers": {
      "RetryAfter": {
        "description": "Seconds to wait before retrying.",
        "schema": {
          "type": "integer"
        }
      },
      "WWWAuthenticate": {
        "description": "`Bearer`.",
        "schema": {
          "type": "string"
        }
      }
    },
    "parameters": {
      "SandboxId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "The sandbox's id, `sb-<region>-<uuid>`.",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 64
        },
        "example": "sb-us-east-1-0193b0a2-7c1e-7f3a-9d2b-5e8f4a6c1d20"
      },
      "TemplateId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "The template's id, `tpl-<region>-<uuid>`.",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 64
        }
      },
      "SnapshotId": {
        "name": "sid",
        "in": "path",
        "required": true,
        "description": "The snapshot's id, `snap-<uuid>`.",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 64
        }
      },
      "ExecId": {
        "name": "exec_id",
        "in": "path",
        "required": true,
        "description": "The exec's id.",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 64
        }
      },
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": false,
        "description": "Makes the call safe to repeat: a repeat with the same request within 24 hours answers the stored response; another request under the key is 422 `idempotency_key_reused`, a repeat while the first is in flight 409 `request_in_progress`.",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 255
        }
      },
      "PageNumber": {
        "name": "page[number]",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "default": 1
        }
      },
      "PageSize": {
        "name": "page[size]",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "default": 20
        }
      },
      "FilePath": {
        "name": "path",
        "in": "query",
        "required": true,
        "description": "An absolute path in the sandbox: at most 4096 bytes, no NUL, not ending in `.` or `..` (else 422 `invalid_path`). A write, a rename or a delete under `/.telnyx`, reserved for the sandbox's agent, is 422 `invalid_path` too.",
        "schema": {
          "type": "string",
          "maxLength": 4096
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "description": "One error. `title` is the error's name (a standard one such as `bad_request`, or a named one of the catalogue in `x-error-codes`); `code` is its number as a string.",
        "required": [
          "code",
          "title"
        ],
        "properties": {
          "code": {
            "type": "string",
            "description": "The error's code, e.g. `10005` or `90017`."
          },
          "title": {
            "type": "string",
            "description": "The error's name, e.g. `not_found` or `quota_exceeded`."
          },
          "detail": {
            "type": "string",
            "description": "A human-readable explanation."
          },
          "source": {
            "$ref": "#/components/schemas/ErrorSource"
          }
        },
        "additionalProperties": false
      },
      "Errors": {
        "type": "object",
        "description": "The error body of every 4xx and 5xx answer. Each error's `title` names it and `code` numbers it; the catalogue of titles and codes is the document's `x-error-codes`. A validation error carries one of the standard titles `missing_parameter` (10004), `bad_request` (10015), `invalid_string_length` (10025) or `invalid_type` (10026) with a 400; a named error (codes 90001 to 90054) carries its own title.",
        "required": [
          "errors"
        ],
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "additionalProperties": false
      },
      "PageMeta": {
        "type": "object",
        "description": "Page-number pagination.",
        "required": [
          "page_number",
          "page_size",
          "total_pages",
          "total_results"
        ],
        "properties": {
          "page_number": {
            "type": "integer"
          },
          "page_size": {
            "type": "integer"
          },
          "total_pages": {
            "type": "integer"
          },
          "total_results": {
            "type": "integer"
          }
        },
        "additionalProperties": false
      },
      "CursorMeta": {
        "type": "object",
        "description": "Cursor pagination: pass `next_page_after` as `page[after]` to read the next page.",
        "required": [
          "next_page_after",
          "page_size"
        ],
        "properties": {
          "next_page_after": {
            "type": [
              "string",
              "null"
            ],
            "description": "The cursor of the next page; `null` on the last page."
          },
          "page_size": {
            "type": "integer"
          }
        },
        "additionalProperties": false
      },
      "ImageSpec": {
        "type": "object",
        "description": "The OCI image to run.",
        "required": [
          "ref"
        ],
        "properties": {
          "ref": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024,
            "description": "The image reference, e.g. `ghcr.io/acme/app:1`. The registry must be a public DNS name (else 422 `registry_not_allowed`); no whitespace."
          },
          "registry_secret": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1,
            "maxLength": 512,
            "description": "The name of one of the organization's secrets (managed under `/v2/compute/secrets`) whose value is the registry credential, `user:token`. Not echoed on the object. An unknown name is 422 `unknown_secret`."
          }
        },
        "additionalProperties": false
      },
      "ImageView": {
        "type": "object",
        "description": "The image as given at the create.",
        "required": [
          "ref"
        ],
        "properties": {
          "ref": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "EgressRule": {
        "type": "object",
        "description": "The headers set on the sandbox's HTTPS requests to one host.",
        "properties": {
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "By header name, the value set. A value is a template that may carry `{{secrets.<name>}}` markers, resolved from the organization's secrets outside the sandbox.",
            "maxProperties": 16,
            "propertyNames": {
              "maxLength": 64
            }
          }
        },
        "additionalProperties": false
      },
      "NetworkSpec": {
        "type": "object",
        "description": "The create's network. Omitted: `public` egress, public ports.",
        "properties": {
          "egress": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "public",
              "allowlist",
              "blocked",
              null
            ],
            "description": "The outbound mode. TCP 25 is dropped under every mode.",
            "default": "public"
          },
          "allow_out": {
            "type": [
              "array",
              "null"
            ],
            "maxItems": 256,
            "items": {
              "type": "string"
            },
            "description": "Under `allowlist` only (else 422 `allow_out_not_allowed`): IPv4 CIDRs or addresses (host bits clear, not `0.0.0.0/0`; an internal range is 422 `cidr_not_allowed`) and domains (`example.com`, or `*.example.com` for any name under it), at most 256 entries together. Domains are admitted on TCP 80 and 443 by the TLS server name or the HTTP `Host`. Empty or absent under `allowlist`: only the rule hosts are reachable."
          },
          "rules": {
            "type": [
              "object",
              "null"
            ],
            "description": "By host, the rule for the sandbox's requests to it. Validated at the create against the organization's secrets (422 `invalid_egress_rule`, `unknown_secret`; `rules_not_allowed` under `blocked`).",
            "maxProperties": 32,
            "additionalProperties": {
              "$ref": "#/components/schemas/EgressRule"
            }
          },
          "public_traffic": {
            "type": [
              "boolean",
              "null"
            ],
            "default": true,
            "description": "`true` (the default): the sandbox's ports answer anyone with their URL. `false`: a request to a port must carry the sandbox's `traffic_token` in `Telnyx-Sandbox-Traffic-Token`. Fixed at the create."
          }
        },
        "additionalProperties": false
      },
      "NetworkView": {
        "type": "object",
        "description": "The network policy applied to the sandbox.",
        "required": [
          "egress",
          "allow_out",
          "public_traffic"
        ],
        "properties": {
          "egress": {
            "type": "string",
            "enum": [
              "public",
              "allowlist",
              "blocked"
            ],
            "description": "The outbound mode. TCP 25 is dropped under every mode."
          },
          "allow_out": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The applied CIDRs, then the domains; `[]` without an allowlist."
          },
          "rules": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/EgressRule"
            },
            "description": "The rules with their markers as given, never a secret value. Absent without any."
          },
          "public_traffic": {
            "type": "boolean",
            "description": "`false` when a request to the sandbox's ports must carry `traffic_token`."
          }
        },
        "additionalProperties": false
      },
      "NetworkRequest": {
        "type": "object",
        "description": "The replacement network policy.",
        "required": [
          "egress"
        ],
        "properties": {
          "egress": {
            "type": "string",
            "enum": [
              "public",
              "allowlist",
              "blocked"
            ],
            "description": "The outbound mode. TCP 25 is dropped under every mode."
          },
          "allow_out": {
            "type": [
              "array",
              "null"
            ],
            "maxItems": 256,
            "items": {
              "type": "string"
            },
            "description": "Under `allowlist` only (else 422 `allow_out_not_allowed`): IPv4 CIDRs or addresses (host bits clear, not `0.0.0.0/0`; an internal range is 422 `cidr_not_allowed`) and domains (`example.com`, or `*.example.com` for any name under it), at most 256 entries together. Domains are admitted on TCP 80 and 443 by the TLS server name or the HTTP `Host`. Empty or absent under `allowlist`: only the rule hosts are reachable."
          },
          "rules": {
            "type": [
              "object",
              "null"
            ],
            "description": "Optional. When given, must equal the sandbox's current rules (422 `rules_immutable`): rules cannot change after the create.",
            "maxProperties": 32,
            "additionalProperties": {
              "$ref": "#/components/schemas/EgressRule"
            }
          }
        },
        "additionalProperties": false
      },
      "FromSpec": {
        "type": "object",
        "description": "Makes the create a clone of a published named snapshot.",
        "required": [
          "snapshot"
        ],
        "properties": {
          "snapshot": {
            "type": "string",
            "minLength": 1,
            "description": "The snapshot's id (`snap-<uuid>`)."
          }
        },
        "additionalProperties": false
      },
      "SandboxCreateRequest": {
        "type": "object",
        "description": "A create takes exactly one of `image`, `template` or `from`. With `from` (a clone) only `name`, `tags`, `timeout`, `idle_timeout`, `region` and `size` (the source's, else 422 `size_conflict`) may be given beside it: the clone copies the source's command, workdir, env, size, network, `on_timeout`, `on_idle` and secrets deliveries. Any field not listed here is 400.",
        "properties": {
          "image": {
            "$ref": "#/components/schemas/ImageSpec"
          },
          "template": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "A template's id (`tpl-…`) or name, in place of `image`. The sandbox takes the template's image, start command, workdir, env and size: giving any of `image`, `command`, `workdir`, `env`, `cpu`, `memory_mib`, `disk_gib` beside it is 422 `template_field_conflict`, and a `size` other than the template's 422 `size_conflict`. An unknown template is 422 `unknown_template`, one not `ready` 409 `template_not_ready`."
          },
          "command": {
            "type": [
              "array",
              "null"
            ],
            "minItems": 1,
            "items": {
              "type": "string",
              "minLength": 1
            },
            "description": "The main process. Its exit ends the sandbox (`termination_reason` `exited`). Absent: the sandbox serves execs until its timeout, the idle rule or a terminate."
          },
          "workdir": {
            "type": [
              "string",
              "null"
            ],
            "description": "An absolute path (else 422 `invalid_workdir`): the main process's working directory and the execs' default."
          },
          "env": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Environment variables: POSIX names, not prefixed `TELNYX_SANDBOX_`, at most 256, values at most 32 KiB, 256 KiB together (else 422 `invalid_env`). A `{{secrets.<name>}}` marker in a value becomes a placeholder: a random string that stands for the secret and is worth nothing elsewhere. In this variable the sandbox reads the placeholder, not the value (`secrets_env` and `secrets_files` are what deliver a value into the sandbox). The proxy puts the value in place only in the headers a rule of `network.rules` sets for its host, over HTTPS; a placeholder the sandbox sends anywhere else, in another header, to another host or over plain HTTP, is forwarded as it is.",
            "maxProperties": 256
          },
          "size": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "small",
              "medium",
              "large",
              null
            ],
            "description": "A named size in place of `cpu`, `memory_mib` and `disk_gib`: `small` (1 vCPU, 1024 MiB, 5 GiB), `medium` (1 vCPU, 2048 MiB, 10 GiB) or `large` (2 vCPUs, 4096 MiB, 20 GiB). Give a size or the custom fields, not both (400 `bad_request` at the custom field); with neither the sandbox is `small`. Another value is 422 `unknown_size`; a size above the runtime's class is 422 `resources_not_allowed` at `/size`, naming the limit. With `template` or `from` the sandbox takes the template's or the source's size: a size given must be it, else 422 `size_conflict`."
          },
          "cpu": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0.125,
            "default": 1,
            "description": "vCPUs, with millicore precision (more is 400 `bad_request`). Only whole cores are honoured today (a fraction is 422 `resources_not_allowed`), as is anything above the runtime's class."
          },
          "memory_mib": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 256,
            "default": 1024,
            "description": "Memory in MiB, `small`'s when omitted. Above the runtime's class is 422 `resources_not_allowed`."
          },
          "disk_gib": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "default": 5,
            "description": "Disk in GiB, `small`'s when omitted. Above the runtime's class is 422 `resources_not_allowed`."
          },
          "network": {
            "$ref": "#/components/schemas/NetworkSpec"
          },
          "timeout": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 2147483647,
            "default": 300,
            "description": "The sandbox's lifetime in seconds, counted from its start; `null` for no limit. Its clock stops while the sandbox is paused."
          },
          "idle_timeout": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 2147483647,
            "description": "Seconds without activity (an exec, stdin, an attach, a file call, a connect, a request to one of the sandbox's ports that the sandbox answered) before `on_idle` applies; must not exceed `timeout`. `null` or absent: none."
          },
          "on_timeout": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "terminate",
              "pause",
              null
            ],
            "default": "terminate",
            "description": "What the timeout does."
          },
          "on_idle": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "pause",
              "terminate",
              null
            ],
            "default": "pause",
            "description": "What the idle timeout does."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[A-Za-z0-9._-]+$",
            "description": "Unique among the organization's sandboxes that are not terminated (409 `name_conflict`)."
          },
          "region": {
            "type": "string",
            "minLength": 1,
            "description": "The region the create is for, e.g. `us-east-1`. The control plane forwards the create to it (else to its default region); the region's host refuses another region with 422 `wrong_region`."
          },
          "tags": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "maxLength": 255
            },
            "description": "Key-value labels: at most 20, keys 1 to 63 characters, values at most 255.",
            "maxProperties": 20,
            "propertyNames": {
              "minLength": 1,
              "maxLength": 63
            }
          },
          "from": {
            "$ref": "#/components/schemas/FromSpec"
          },
          "secrets_env": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "By environment variable, the name of the organization's secret whose value the sandbox gets there: at most 16 variables, 128 KiB of delivered values in total with `secrets_files`. Not allowed with `from`.",
            "maxProperties": 16,
            "propertyNames": {
              "maxLength": 128
            }
          },
          "secrets_files": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "By absolute file path, the name of the organization's secret whose value is written there: at most 16 files, paths up to 1024 bytes. Not allowed with `from`.",
            "maxProperties": 16,
            "propertyNames": {
              "maxLength": 1024
            }
          }
        },
        "additionalProperties": false
      },
      "SandboxBatchRequest": {
        "type": "object",
        "description": "The create body plus `count`: `count` sandboxes of one image or template create, or, with `from`, `count` clones of one snapshot.",
        "required": [
          "count"
        ],
        "properties": {
          "image": {
            "$ref": "#/components/schemas/ImageSpec"
          },
          "template": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "A template's id (`tpl-…`) or name, in place of `image`. The sandbox takes the template's image, start command, workdir, env and size: giving any of `image`, `command`, `workdir`, `env`, `cpu`, `memory_mib`, `disk_gib` beside it is 422 `template_field_conflict`, and a `size` other than the template's 422 `size_conflict`. An unknown template is 422 `unknown_template`, one not `ready` 409 `template_not_ready`."
          },
          "command": {
            "type": [
              "array",
              "null"
            ],
            "minItems": 1,
            "items": {
              "type": "string",
              "minLength": 1
            },
            "description": "The main process. Its exit ends the sandbox (`termination_reason` `exited`). Absent: the sandbox serves execs until its timeout, the idle rule or a terminate."
          },
          "workdir": {
            "type": [
              "string",
              "null"
            ],
            "description": "An absolute path (else 422 `invalid_workdir`): the main process's working directory and the execs' default."
          },
          "env": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Environment variables: POSIX names, not prefixed `TELNYX_SANDBOX_`, at most 256, values at most 32 KiB, 256 KiB together (else 422 `invalid_env`). A `{{secrets.<name>}}` marker in a value becomes a placeholder: a random string that stands for the secret and is worth nothing elsewhere. In this variable the sandbox reads the placeholder, not the value (`secrets_env` and `secrets_files` are what deliver a value into the sandbox). The proxy puts the value in place only in the headers a rule of `network.rules` sets for its host, over HTTPS; a placeholder the sandbox sends anywhere else, in another header, to another host or over plain HTTP, is forwarded as it is.",
            "maxProperties": 256
          },
          "size": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "small",
              "medium",
              "large",
              null
            ],
            "description": "A named size in place of `cpu`, `memory_mib` and `disk_gib`: `small` (1 vCPU, 1024 MiB, 5 GiB), `medium` (1 vCPU, 2048 MiB, 10 GiB) or `large` (2 vCPUs, 4096 MiB, 20 GiB). Give a size or the custom fields, not both (400 `bad_request` at the custom field); with neither the sandbox is `small`. Another value is 422 `unknown_size`; a size above the runtime's class is 422 `resources_not_allowed` at `/size`, naming the limit. With `template` or `from` the sandbox takes the template's or the source's size: a size given must be it, else 422 `size_conflict`."
          },
          "cpu": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0.125,
            "default": 1,
            "description": "vCPUs. Only whole cores are honoured today (a fraction is 422 `resources_not_allowed`), as is anything above the runtime's class."
          },
          "memory_mib": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 256,
            "default": 1024,
            "description": "Memory in MiB, `small`'s when omitted. Above the runtime's class is 422 `resources_not_allowed`."
          },
          "disk_gib": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "default": 5,
            "description": "Disk in GiB, `small`'s when omitted. Above the runtime's class is 422 `resources_not_allowed`."
          },
          "network": {
            "$ref": "#/components/schemas/NetworkSpec"
          },
          "timeout": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 2147483647,
            "default": 300,
            "description": "The sandbox's lifetime in seconds, counted from its start; `null` for no limit. Its clock stops while the sandbox is paused."
          },
          "idle_timeout": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 2147483647,
            "description": "Seconds without activity (an exec, stdin, an attach, a file call, a connect, a request to one of the sandbox's ports that the sandbox answered) before `on_idle` applies; must not exceed `timeout`. `null` or absent: none."
          },
          "on_timeout": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "terminate",
              "pause",
              null
            ],
            "default": "terminate",
            "description": "What the timeout does."
          },
          "on_idle": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "pause",
              "terminate",
              null
            ],
            "default": "pause",
            "description": "What the idle timeout does."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[A-Za-z0-9._-]+$",
            "description": "Unique among the organization's sandboxes that are not terminated (409 `name_conflict`)."
          },
          "region": {
            "type": "string",
            "minLength": 1,
            "description": "The region the create is for, e.g. `us-east-1`. The control plane forwards the create to it (else to its default region); the region's host refuses another region with 422 `wrong_region`."
          },
          "tags": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "maxLength": 255
            },
            "description": "Key-value labels: at most 20, keys 1 to 63 characters, values at most 255.",
            "maxProperties": 20,
            "propertyNames": {
              "minLength": 1,
              "maxLength": 63
            }
          },
          "from": {
            "$ref": "#/components/schemas/FromSpec"
          },
          "secrets_env": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "By environment variable, the name of the organization's secret whose value the sandbox gets there: at most 16 variables, 128 KiB of delivered values in total with `secrets_files`. Not allowed with `from`.",
            "maxProperties": 16,
            "propertyNames": {
              "maxLength": 128
            }
          },
          "secrets_files": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "By absolute file path, the name of the organization's secret whose value is written there: at most 16 files, paths up to 1024 bytes. Not allowed with `from`.",
            "maxProperties": 16,
            "propertyNames": {
              "maxLength": 1024
            }
          },
          "count": {
            "type": "integer",
            "minimum": 1,
            "description": "How many sandboxes, 1 to the region's batch maximum (default 10). With `name`, item `i` is named `<name>-<i>`."
          }
        },
        "additionalProperties": false
      },
      "ResolvedSpec": {
        "type": "object",
        "description": "What runs, set once the sandbox has started.",
        "required": [
          "image",
          "command",
          "workdir"
        ],
        "properties": {
          "image": {
            "type": "string",
            "description": "The image reference as given."
          },
          "command": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "`[]` without a main process."
          },
          "workdir": {
            "type": "string",
            "description": "`/` when none was given."
          }
        },
        "additionalProperties": false
      },
      "Sandbox": {
        "type": "object",
        "description": "A sandbox: an isolated microVM running an OCI image.",
        "required": [
          "id",
          "region",
          "name",
          "tags",
          "state",
          "termination_reason",
          "exit_code",
          "ready",
          "image",
          "command",
          "workdir",
          "env",
          "size",
          "cpu",
          "memory_mib",
          "disk_gib",
          "timeout",
          "idle_timeout",
          "on_timeout",
          "on_idle",
          "network",
          "resolved",
          "created_at",
          "started_at",
          "terminated_at",
          "paused_at",
          "pause_reason",
          "fork_of",
          "swarm"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "`sb-<region>-<uuid>`; the region in the id is where the sandbox lives, for good.",
            "examples": [
              "sb-us-east-1-0193b0a2-7c1e-7f3a-9d2b-5e8f4a6c1d20"
            ]
          },
          "region": {
            "type": "string",
            "examples": [
              "us-east-1"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "tags": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "state": {
            "type": "string",
            "enum": [
              "starting",
              "running",
              "paused",
              "terminated"
            ],
            "description": "`starting` until it runs (and during a resume); `running`, also while a pause is being taken; `paused`; `terminated`, final."
          },
          "termination_reason": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "timeout",
              "idle_timeout",
              "paused_expired",
              "exited",
              "terminated",
              "build_failed",
              "node_lost",
              "internal_error",
              "no_capacity",
              null
            ],
            "description": "Set once `terminated`: `terminated` (a terminate call), `exited` (the main process exited), `timeout`, `idle_timeout` (with `on_idle: terminate`), `paused_expired` (paused past the retention), `build_failed` (the image or template build failed), `node_lost`, `internal_error`, or `no_capacity` (a fork sibling or clone no host could take)."
          },
          "exit_code": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The main process's exit code, once it exited; stays readable after the sandbox ends."
          },
          "ready": {
            "type": "boolean"
          },
          "image": {
            "$ref": "#/components/schemas/ImageView"
          },
          "command": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "The main process, `null` without one."
          },
          "workdir": {
            "type": [
              "string",
              "null"
            ]
          },
          "env": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "As given, secret markers included (never a secret value)."
          },
          "size": {
            "type": "string",
            "enum": [
              "small",
              "medium",
              "large",
              "custom"
            ],
            "description": "The named size whose numbers `cpu`, `memory_mib` and `disk_gib` are, or `custom` when they are no preset's."
          },
          "cpu": {
            "type": "number"
          },
          "memory_mib": {
            "type": "integer"
          },
          "disk_gib": {
            "type": "integer"
          },
          "timeout": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Seconds; `null` for no limit."
          },
          "idle_timeout": {
            "type": [
              "integer",
              "null"
            ]
          },
          "on_timeout": {
            "type": "string",
            "enum": [
              "terminate",
              "pause"
            ]
          },
          "on_idle": {
            "type": "string",
            "enum": [
              "pause",
              "terminate"
            ]
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "The expiry while `starting` or `running` with a timeout; absent before the start when no expiry was set explicitly, and otherwise."
          },
          "remaining": {
            "type": "integer",
            "description": "The seconds of lifetime left while `paused` with a timeout; absent otherwise."
          },
          "network": {
            "$ref": "#/components/schemas/NetworkView"
          },
          "traffic_token": {
            "type": "string",
            "description": "With `network.public_traffic` `false`: the value a request to one of the sandbox's ports carries in `Telnyx-Sandbox-Traffic-Token`. Absent otherwise."
          },
          "resolved": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ResolvedSpec"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "started_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "terminated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "paused_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the sandbox paused; `null` unless `paused`."
          },
          "pause_reason": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "customer",
              "idle_timeout",
              "timeout",
              null
            ],
            "description": "What paused it; `null` unless `paused`."
          },
          "secrets_env": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "The deliveries by secret name; absent without any."
          },
          "secrets_files": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "The deliveries by secret name; absent without any."
          },
          "fork_of": {
            "type": [
              "string",
              "null"
            ],
            "description": "On a fork sibling, the source sandbox's id."
          },
          "swarm": {
            "type": [
              "string",
              "null"
            ],
            "description": "`swm-<uuid>`: the swarm a fork put this sandbox in, on the source and every sibling."
          }
        },
        "additionalProperties": false
      },
      "SandboxResponse": {
        "type": "object",
        "description": "A sandbox in the data envelope.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Sandbox"
          }
        },
        "additionalProperties": false
      },
      "SandboxList": {
        "type": "object",
        "required": [
          "data",
          "meta"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Sandbox"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/PageMeta"
          },
          "unavailable_regions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Control plane only: the regions that failed or timed out in the fan-out. The list is then `200` with those regions' sandboxes missing."
          }
        },
        "additionalProperties": false
      },
      "BatchItem": {
        "type": "object",
        "description": "One item: its sandbox, or the error that refused it.",
        "required": [
          "index"
        ],
        "properties": {
          "index": {
            "type": "integer",
            "minimum": 1,
            "description": "The item's position in the request, from 1."
          },
          "sandbox": {
            "$ref": "#/components/schemas/Sandbox"
          },
          "error": {
            "$ref": "#/components/schemas/Error"
          }
        },
        "additionalProperties": false
      },
      "BatchResult": {
        "type": "object",
        "description": "The batch's items in index order. Not in the data envelope.",
        "required": [
          "items",
          "created",
          "failed"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BatchItem"
            }
          },
          "created": {
            "type": "integer"
          },
          "failed": {
            "type": "integer"
          }
        },
        "additionalProperties": false
      },
      "SandboxUpdateRequest": {
        "type": "object",
        "required": [
          "tags"
        ],
        "properties": {
          "tags": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "maxLength": 255
            },
            "description": "The whole tag set, replacing the current one; `{}` clears it.",
            "maxProperties": 20,
            "propertyNames": {
              "minLength": 1,
              "maxLength": 63
            }
          }
        },
        "additionalProperties": false
      },
      "ConnectRequest": {
        "type": "object",
        "properties": {
          "timeout": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 2147483647,
            "default": 300,
            "description": "Seconds: the expiry moves to at least now plus this (never earlier). `null` leaves the expiry as it is."
          }
        },
        "additionalProperties": false
      },
      "TimeoutRequest": {
        "type": "object",
        "required": [
          "seconds"
        ],
        "properties": {
          "seconds": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 2147483647,
            "description": "The new timeout in seconds, or `null` for none. On a running sandbox the expiry becomes now plus `seconds`; on a paused one it is the lifetime left at the resume."
          }
        },
        "additionalProperties": false
      },
      "ForkRequest": {
        "type": "object",
        "required": [
          "count"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "minimum": 1,
            "description": "How many siblings, 1 to the region's fork maximum (default 20). The fork is admitted while the organization's active sandboxes (those neither paused nor terminated, the source among them) plus `count` stay within its quota, else 429 `quota_exceeded` with nothing created: under a quota of 20, an organization whose only active sandbox is the source can fork at most 19."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[A-Za-z0-9._-]+$",
            "description": "With a name, sibling `i` is `<name>-<i>` (409 `name_conflict` on a live duplicate)."
          },
          "tags": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "maxLength": 255
            },
            "description": "Merged over the source's tags; the merged set is held to the tag limits.",
            "maxProperties": 20,
            "propertyNames": {
              "minLength": 1,
              "maxLength": 63
            }
          },
          "size": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "small",
              "medium",
              "large",
              null
            ],
            "description": "The siblings take the source's size: a size given must be it, else 422 `size_conflict`; a value that names no size is 422 `unknown_size`."
          }
        },
        "additionalProperties": false
      },
      "ForkItem": {
        "type": "object",
        "required": [
          "index",
          "sandbox"
        ],
        "properties": {
          "index": {
            "type": "integer",
            "minimum": 1,
            "description": "The item's position in the request, from 1."
          },
          "sandbox": {
            "$ref": "#/components/schemas/Sandbox"
          }
        },
        "additionalProperties": false
      },
      "ForkResult": {
        "type": "object",
        "description": "The siblings, each `starting`, and their swarm. Not in the data envelope.",
        "required": [
          "items",
          "swarm"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ForkItem"
            }
          },
          "swarm": {
            "type": "string",
            "description": "`swm-<uuid>`"
          }
        },
        "additionalProperties": false
      },
      "SnapshotCreateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[A-Za-z0-9._-]+$",
            "description": "Optional; not unique."
          }
        },
        "additionalProperties": false
      },
      "Snapshot": {
        "type": "object",
        "description": "A named snapshot of a sandbox: a checkpoint a new sandbox can be created from (`from.snapshot`).",
        "required": [
          "id",
          "sandbox_id",
          "name",
          "phase",
          "failure_cause",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "`snap-<uuid>`"
          },
          "sandbox_id": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "phase": {
            "type": "string",
            "enum": [
              "Preparing",
              "Paused",
              "DiskSnapshotted",
              "MemorySaved",
              "Exported",
              "Uploaded",
              "Published",
              "Failed"
            ],
            "description": "Usable in `from` once `Published`; `Failed` is final."
          },
          "failure_cause": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "SnapshotResponse": {
        "type": "object",
        "description": "A snapshot in the data envelope.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Snapshot"
          }
        },
        "additionalProperties": false
      },
      "SnapshotList": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Snapshot"
            }
          }
        },
        "additionalProperties": false
      },
      "TemplateCreateRequest": {
        "type": "object",
        "required": [
          "name",
          "image"
        ],
        "properties": {
          "region": {
            "type": "string",
            "minLength": 1,
            "description": "As on a sandbox create (422 `wrong_region`)."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[A-Za-z0-9._-]+$",
            "description": "Unique among the organization's templates (409 `name_conflict`); never begins `tpl-`."
          },
          "image": {
            "$ref": "#/components/schemas/ImageSpec"
          },
          "start_command": {
            "type": [
              "array",
              "null"
            ],
            "minItems": 1,
            "items": {
              "type": "string",
              "minLength": 1
            },
            "description": "The main process of every sandbox created from the template."
          },
          "ready_command": {
            "type": [
              "array",
              "null"
            ],
            "minItems": 1,
            "items": {
              "type": "string",
              "minLength": 1
            },
            "description": "Run once a second in the template's build sandbox until it exits 0; the template's ready state is then checkpointed."
          },
          "ready_timeout": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 600,
            "default": 60,
            "description": "Seconds for `ready_command` to pass; only with a `ready_command`."
          },
          "workdir": {
            "type": [
              "string",
              "null"
            ],
            "description": "An absolute path (else 422 `invalid_workdir`)."
          },
          "env": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "As a create's env, except that a `{{secrets.<name>}}` marker is 422 `template_env_secret`.",
            "maxProperties": 256
          },
          "size": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "small",
              "medium",
              "large",
              null
            ],
            "description": "A named size in place of `cpu`, `memory_mib` and `disk_gib`, as on a sandbox create: `small` (the default), `medium` or `large`; a size beside a custom field is 400 `bad_request`, another value 422 `unknown_size`. The sandboxes created from the template take its size."
          },
          "cpu": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0.125,
            "default": 1
          },
          "memory_mib": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 256,
            "default": 1024
          },
          "disk_gib": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "default": 5
          }
        },
        "additionalProperties": false
      },
      "Template": {
        "type": "object",
        "description": "A named template: an image built with its start command, workdir, env and sizes, checkpointed in its ready state, from which sandboxes start.",
        "required": [
          "id",
          "name",
          "region",
          "state",
          "image",
          "size",
          "cpu",
          "memory_mib",
          "disk_gib",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "`tpl-<region>-<uuid>`"
          },
          "name": {
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "enum": [
              "building",
              "ready",
              "failed"
            ]
          },
          "image": {
            "$ref": "#/components/schemas/ImageView"
          },
          "start_command": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "ready_command": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "ready_timeout": {
            "type": "integer"
          },
          "workdir": {
            "type": "string"
          },
          "env": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "As given."
          },
          "size": {
            "type": "string",
            "enum": [
              "small",
              "medium",
              "large",
              "custom"
            ],
            "description": "The named size whose numbers `cpu`, `memory_mib` and `disk_gib` are, or `custom` when they are no preset's; every sandbox created from the template has it."
          },
          "cpu": {
            "type": "number"
          },
          "memory_mib": {
            "type": "integer"
          },
          "disk_gib": {
            "type": "integer"
          },
          "failure": {
            "type": "string",
            "enum": [
              "image_pull_failed",
              "build_failed",
              "internal_error",
              "start_failed",
              "ready_timeout"
            ],
            "description": "Set when `failed`."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "TemplateResponse": {
        "type": "object",
        "description": "A template in the data envelope.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Template"
          }
        },
        "additionalProperties": false
      },
      "TemplateList": {
        "type": "object",
        "required": [
          "data",
          "meta"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Template"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/PageMeta"
          },
          "unavailable_regions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Control plane only: the regions that failed or timed out in the fan-out. The list is then `200` with those regions' templates missing."
          }
        },
        "additionalProperties": false
      },
      "Pty": {
        "type": "object",
        "description": "Runs the command under a pseudo-terminal: one output stream, stdin is terminal input.",
        "required": [
          "rows",
          "cols"
        ],
        "properties": {
          "rows": {
            "type": "integer",
            "minimum": 1,
            "maximum": 65535
          },
          "cols": {
            "type": "integer",
            "minimum": 1,
            "maximum": 65535
          },
          "term": {
            "type": "string",
            "maxLength": 64,
            "default": "xterm-256color",
            "description": "A terminfo name."
          }
        },
        "additionalProperties": false
      },
      "ExecStartRequest": {
        "type": "object",
        "required": [
          "command"
        ],
        "properties": {
          "command": {
            "type": "array",
            "minItems": 1,
            "maxItems": 4096,
            "items": {
              "type": "string",
              "maxLength": 131071
            },
            "description": "The argv, no shell. Arguments at most 131071 bytes each, no NUL, 1 MiB together (else 422 `invalid_command`)."
          },
          "env": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Added to the sandbox's environment (422 `invalid_env` as on the create)."
          },
          "workdir": {
            "type": [
              "string",
              "null"
            ],
            "description": "An absolute path (else 422 `invalid_workdir`); default the sandbox's."
          },
          "timeout": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 2147483647,
            "description": "Seconds; `null` or absent for none."
          },
          "pty": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Pty"
              },
              {
                "type": "null"
              }
            ]
          },
          "user": {
            "type": [
              "string",
              "null"
            ],
            "description": "A user name or a uid of the image to run as; `null` or absent for root. A name is `[A-Za-z_][A-Za-z0-9_.-]{0,63}` with an optional trailing `$`, a uid 1 to 10 digits; one the image does not have is 422 `unknown_user`."
          }
        },
        "additionalProperties": false
      },
      "Exec": {
        "type": "object",
        "description": "A command run in a sandbox.",
        "required": [
          "id",
          "sandbox_id",
          "command",
          "env",
          "workdir",
          "timeout",
          "pty",
          "user",
          "status",
          "exit_code",
          "reason",
          "created_at",
          "finished_at"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "sandbox_id": {
            "type": "string"
          },
          "command": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "env": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "workdir": {
            "type": [
              "string",
              "null"
            ]
          },
          "timeout": {
            "type": [
              "integer",
              "null"
            ]
          },
          "pty": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Pty"
              },
              {
                "type": "null"
              }
            ]
          },
          "user": {
            "type": [
              "string",
              "null"
            ],
            "description": "`null` for root."
          },
          "status": {
            "type": "string",
            "enum": [
              "starting",
              "running",
              "exited",
              "failed",
              "terminated",
              "interrupted"
            ],
            "description": "A start normally answers `running`, and a command that cannot start is refused at the request. `starting`: recorded, and the sandbox has not confirmed the start yet, which a start answers when its call to the sandbox failed on the way (the same `Idempotency-Key` returns that exec); `failed`: the sandbox refused the start afterwards, or ended before confirming it. `interrupted`: the exec was running when its sandbox paused. `exited`, `failed`, `terminated` and `interrupted` are final."
          },
          "exit_code": {
            "type": [
              "integer",
              "null"
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "sandbox_terminated",
              "timeout",
              "agent_error",
              null
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "finished_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "ExecResponse": {
        "type": "object",
        "description": "An exec in the data envelope.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Exec"
          }
        },
        "additionalProperties": false
      },
      "ExecList": {
        "type": "object",
        "required": [
          "data",
          "meta"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Exec"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/PageMeta"
          }
        },
        "additionalProperties": false
      },
      "ExecKillRequest": {
        "type": "object",
        "properties": {
          "signal": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "SIGTERM",
              "SIGKILL",
              "SIGINT",
              "SIGHUP",
              "SIGQUIT",
              "SIGUSR1",
              "SIGUSR2",
              null
            ],
            "default": "SIGKILL"
          }
        },
        "additionalProperties": false
      },
      "FileEntry": {
        "type": "object",
        "description": "A path in the sandbox.",
        "required": [
          "path",
          "name",
          "type",
          "size_bytes",
          "modified_at"
        ],
        "properties": {
          "path": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "file",
              "directory",
              "symlink",
              "other"
            ]
          },
          "size_bytes": {
            "type": "integer"
          },
          "modified_at": {
            "type": "string",
            "format": "date-time"
          },
          "mode": {
            "type": "integer",
            "description": "The permission bits with setuid, setgid and sticky, as a decimal integer (`420` is `0644`). On a list or stat entry, when reported; absent on a write's entry."
          },
          "uid": {
            "type": "integer",
            "description": "As `mode`."
          },
          "gid": {
            "type": "integer",
            "description": "As `mode`."
          }
        },
        "additionalProperties": false
      },
      "FileEntryResponse": {
        "type": "object",
        "description": "A file entry in the data envelope.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/FileEntry"
          }
        },
        "additionalProperties": false
      },
      "FileList": {
        "type": "object",
        "required": [
          "data",
          "meta"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FileEntry"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/PageMeta"
          }
        },
        "additionalProperties": false
      },
      "FileRenameRequest": {
        "type": "object",
        "required": [
          "from",
          "to"
        ],
        "properties": {
          "from": {
            "type": "string",
            "description": "An absolute path."
          },
          "to": {
            "type": "string",
            "description": "An absolute path."
          }
        },
        "additionalProperties": false
      },
      "LogLine": {
        "type": "object",
        "description": "One line of the main process's output.",
        "required": [
          "type",
          "ts",
          "stream",
          "line",
          "position"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "line"
          },
          "ts": {
            "type": "string",
            "format": "date-time"
          },
          "stream": {
            "type": "null",
            "description": "Always `null`: the output does not tell stdout and stderr apart."
          },
          "line": {
            "type": "string",
            "description": "The line; bytes that are not UTF-8 are replaced."
          },
          "position": {
            "type": "string",
            "description": "The line's cursor: pass it as `page[after]` or `Last-Event-ID` to read after it."
          }
        },
        "additionalProperties": false
      },
      "LogPage": {
        "type": "object",
        "required": [
          "data",
          "meta"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LogLine"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/CursorMeta"
          }
        },
        "additionalProperties": false
      },
      "MetricsSample": {
        "type": "object",
        "required": [
          "ts",
          "cpu_cores_avg",
          "cpu_cores_max",
          "net_rx_bytes",
          "net_tx_bytes",
          "mem_bytes_avg",
          "mem_bytes_max",
          "disk_bytes"
        ],
        "properties": {
          "ts": {
            "type": "string",
            "format": "date-time"
          },
          "cpu_cores_avg": {
            "type": "number"
          },
          "cpu_cores_max": {
            "type": "number"
          },
          "net_rx_bytes": {
            "type": "integer"
          },
          "net_tx_bytes": {
            "type": "integer"
          },
          "mem_bytes_avg": {
            "type": "integer"
          },
          "mem_bytes_max": {
            "type": "integer"
          },
          "disk_bytes": {
            "type": "integer",
            "description": "The workspace volume's allocated bytes on the host, including filesystem metadata; not guest filesystem usage. Excludes the root volume. Deleting files alone does not reclaim host allocation."
          }
        },
        "additionalProperties": false
      },
      "LatestMetrics": {
        "type": "object",
        "required": [
          "ts",
          "cpu_cores",
          "net_rx_bytes",
          "net_tx_bytes",
          "mem_bytes",
          "disk_bytes"
        ],
        "properties": {
          "ts": {
            "type": "string",
            "format": "date-time"
          },
          "cpu_cores": {
            "type": "number"
          },
          "net_rx_bytes": {
            "type": "integer"
          },
          "net_tx_bytes": {
            "type": "integer"
          },
          "mem_bytes": {
            "type": "integer"
          },
          "disk_bytes": {
            "type": "integer",
            "description": "The workspace volume's allocated bytes on the host, including filesystem metadata; not guest filesystem usage. Excludes the root volume. Deleting files alone does not reclaim host allocation."
          }
        },
        "additionalProperties": false
      },
      "Metrics": {
        "type": "object",
        "description": "The sandbox's resource usage over a window of at most 60 minutes, in 60 s steps. The series restarts when the sandbox starts or resumes and is empty while paused or terminated. Hosts retain only the last hour of samples in memory.",
        "required": [
          "sandbox_id",
          "from",
          "to",
          "step_seconds",
          "latest",
          "series"
        ],
        "properties": {
          "sandbox_id": {
            "type": "string"
          },
          "from": {
            "type": "string",
            "format": "date-time"
          },
          "to": {
            "type": "string",
            "format": "date-time"
          },
          "step_seconds": {
            "type": "integer"
          },
          "latest": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LatestMetrics"
              },
              {
                "type": "null"
              }
            ]
          },
          "series": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetricsSample"
            }
          }
        },
        "additionalProperties": false
      },
      "MetricsResponse": {
        "type": "object",
        "description": "Metrics in the data envelope.",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Metrics"
          }
        },
        "additionalProperties": false
      },
      "LifecycleEvent": {
        "type": "object",
        "description": "One committed state change of a sandbox.",
        "required": [
          "id",
          "ts",
          "type",
          "sandbox_id",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "`evt-<uuid>`"
          },
          "ts": {
            "type": "string",
            "format": "date-time"
          },
          "type": {
            "type": "string",
            "enum": [
              "created",
              "started",
              "paused",
              "resumed",
              "resume_failed",
              "snapshotted",
              "forked",
              "network_updated",
              "terminated"
            ]
          },
          "sandbox_id": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "By type: `created` `{}`, `{template}`, `{from_snapshot}` or `{fork_of, swarm}`; `started` and `resumed` `{}`; `paused` `{reason}`; `resume_failed` `{reason}` (`no_capacity` or `internal_error`: a resume that failed back to the checkpoint, the sandbox staying `paused`); `snapshotted` `{snapshot_id, name?}`; `forked` `{swarm, count, sandbox_ids}`; `network_updated` `{egress}`; `terminated` `{reason, exit_code?}`."
          }
        },
        "additionalProperties": false
      },
      "LifecycleEventPage": {
        "type": "object",
        "required": [
          "data",
          "meta"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LifecycleEvent"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/CursorMeta"
          }
        },
        "additionalProperties": false
      },
      "SandboxToken": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "token",
              "expires_at",
              "regions"
            ],
            "properties": {
              "token": {
                "type": "string",
                "description": "The sandbox token: send it as `Authorization: Bearer` to a region's host. One token serves the organization in every region."
              },
              "expires_at": {
                "type": "string",
                "format": "date-time"
              },
              "regions": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                },
                "description": "By region, the base URL of its host."
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "ErrorSource": {
        "type": "object",
        "description": "Where in the request the error is.",
        "properties": {
          "pointer": {
            "type": "string",
            "description": "A JSON pointer into the request body, e.g. `/network/egress`."
          },
          "parameter": {
            "type": "string",
            "description": "A query parameter, path parameter or header, e.g. `path` or `Idempotency-Key`."
          }
        },
        "additionalProperties": false
      }
    }
  },
  "x-error-codes": {
    "missing_parameter": "10004",
    "not_found": "10005",
    "bad_request": "10015",
    "method_not_allowed": "10015",
    "request_too_large": "10015",
    "invalid_string_length": "10025",
    "invalid_type": "10026",
    "service_unavailable": "10037",
    "resources_not_allowed": "90001",
    "registry_not_allowed": "90002",
    "invalid_env": "90003",
    "invalid_workdir": "90004",
    "invalid_command": "90005",
    "invalid_path": "90006",
    "cidr_not_allowed": "90007",
    "idempotency_key_reused": "90009",
    "name_conflict": "90010",
    "request_in_progress": "90011",
    "sandbox_not_running": "90012",
    "exec_not_running": "90013",
    "path_type_mismatch": "90014",
    "directory_not_empty": "90015",
    "file_too_large": "90016",
    "quota_exceeded": "90017",
    "no_capacity": "90019",
    "internal_error": "90020",
    "operation_in_progress": "90021",
    "snapshot_not_published": "90022",
    "source_terminated": "90025",
    "invalid_egress_rule": "90026",
    "unknown_secret": "90027",
    "rules_not_allowed": "90028",
    "invalid_token": "90029",
    "invalid_identity": "90030",
    "wrong_region": "90031",
    "sandbox_paused": "90032",
    "invalid_state": "90033",
    "unknown_user": "90034",
    "cross_device": "90035",
    "allow_out_not_allowed": "90036",
    "no_command": "90037",
    "rules_immutable": "90038",
    "sandbox_terminated": "90039",
    "snapshot_quota": "90040",
    "template_field_conflict": "90041",
    "unknown_template": "90042",
    "template_not_ready": "90043",
    "template_env_secret": "90044",
    "secrets_unavailable": "90045",
    "logs_expired": "90046",
    "port_closed": "90047",
    "port_unreachable": "90048",
    "port_refused": "90049",
    "traffic_token_required": "90050",
    "too_many_connections": "90051",
    "exec_limit": "90052",
    "unknown_size": "90053",
    "size_conflict": "90054"
  },
  "x-endpoint-cost": "light",
  "x-latency-category": "responsive"
}
