---
seo:
  description: >-
    Use the HTTP API to create sandboxes, execute commands, and transfer files.
    These pages are generated from Carton's Rust-authored public OpenAPI
    contract.
sidebar:
  label: Overview
title: Carton API reference
---
Use the HTTP API to create sandboxes, execute commands, and transfer files.
These pages are generated from Carton's Rust-authored public OpenAPI contract.

### Connection and authentication

Replace `https://carton.example.com` in the request examples with your
Carton server URL. This is an example address, not a hosted Carton service.
Authenticate with your Carton bearer token, not a provider API key.
See [Setup and connection](/docs/configuration).

### Implementation status

This reference includes the full declared contract. Operations in the
**Planned** section are not exposed by the current server.
Live request execution is disabled throughout this reference.

Version 1.0.0

Base URL: `https://carton.example.com`

## Sandboxes

- [`POST /v1/resolve`](/docs/api/sandboxes/resolve-placement)
- [`GET /v1/sandboxes`](/docs/api/sandboxes/list-sandboxes)
- [`POST /v1/sandboxes`](/docs/api/sandboxes/create-sandbox)
- [`DELETE /v1/sandboxes/{id}`](/docs/api/sandboxes/destroy-sandbox)
- [`GET /v1/sandboxes/{id}`](/docs/api/sandboxes/get-sandbox)
- [`POST /v1/sandboxes/{id}/deadline`](/docs/api/sandboxes/set-deadline)
- [`GET /v1/sandboxes/{id}/events`](/docs/api/sandboxes/get-sandbox-events)
- [`PATCH /v1/sandboxes/{id}/labels`](/docs/api/sandboxes/set-labels)

## Executions

- [`POST /v1/sandboxes/{id}/executions`](/docs/api/executions/start-execution)
- [`GET /v1/sandboxes/{id}/executions/{execution_id}`](/docs/api/executions/get-execution)
- [`POST /v1/sandboxes/{id}/executions/{execution_id}/signals`](/docs/api/executions/signal-execution)
- [`POST /v1/sandboxes/{id}/executions/{execution_id}/stdin`](/docs/api/executions/write-execution-stdin)

## Files

- [`DELETE /v1/sandboxes/{id}/files`](/docs/api/files/delete-file)
- [`GET /v1/sandboxes/{id}/files`](/docs/api/files/read-file)
- [`HEAD /v1/sandboxes/{id}/files`](/docs/api/files/stat-file)
- [`PUT /v1/sandboxes/{id}/files`](/docs/api/files/write-file)
- [`GET /v1/sandboxes/{id}/files/archive`](/docs/api/files/read-archive)
- [`PUT /v1/sandboxes/{id}/files/archive`](/docs/api/files/write-archive)
- [`GET /v1/sandboxes/{id}/files/list`](/docs/api/files/list-files)

## Ports

- [`GET /v1/sandboxes/{id}/ports`](/docs/api/ports/list-ports)
- [`POST /v1/sandboxes/{id}/ports`](/docs/api/ports/expose-port)

## Environments

- [`HEAD /v1/blobs/{digest}`](/docs/api/environments/stat-blob)
- [`PUT /v1/blobs/{digest}`](/docs/api/environments/upload-blob)
- [`GET /v1/environments`](/docs/api/environments/list-environments)
- [`POST /v1/environments`](/docs/api/environments/create-environment)
- [`GET /v1/environments/{environment_id}`](/docs/api/environments/get-environment)
- [`GET /v1/environments/{environment_id}/revisions`](/docs/api/environments/list-revisions)
- [`POST /v1/environments/{environment_id}/revisions`](/docs/api/environments/create-revision)
- [`GET /v1/preparations/{prepare_id}`](/docs/api/environments/get-preparation)
- [`GET /v1/revisions/{revision_id}`](/docs/api/environments/get-revision)
- [`POST /v1/revisions/{revision_id}/prepare`](/docs/api/environments/prepare-revision)

## Targets

- [`GET /v1/targets`](/docs/api/targets/list-targets)
- [`GET /v1/targets/{target}`](/docs/api/targets/get-target)

## Contract

- [`GET /openapi.json`](/docs/api/contract/get-open-api)

## Planned

Declared contract operations that the current server does not expose.

- [`GET /v1/limits`](/docs/api/planned/list-limits)
- [`GET /v1/sandboxes/{id}/executions/{execution_id}/attach`](/docs/api/planned/attach-execution)
- [`DELETE /v1/sandboxes/{id}/ports/{port}`](/docs/api/planned/unexpose-port)
- [`GET /v1/tokens`](/docs/api/planned/list-tokens)
- [`POST /v1/tokens`](/docs/api/planned/create-token)
- [`DELETE /v1/tokens/{token_id}`](/docs/api/planned/revoke-token)
