---
search:
  tags:
    - Sandboxes
    - POST
seo:
  description: Reference for the POST /v1/resolve endpoint in the Carton API reference.
sidebar:
  label: POST /v1/resolve
  badge: POST
title: POST /v1/resolve
type: openapi-operation
---
`POST /v1/resolve`

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

- `checks` (ReadinessCheck[])
- `deadline` (DeadlineRequest)
- `env` (object)
- `files` (CopyFile[])
- `labels` (object)
- `name` (Text)
- `placement` (PlacementRequest)
- `platform` (Platform)
- `project` (Text)
- `provider_options` (object)
- `requires` (CapabilityName[])
- `resources` (ResourceRequest)
- `secret_env` (object)
- `source` (SandboxSource, required)

Request body example:

```json
{
  "checks": [
    {
      "command": {
        "argv": [
          "string"
        ],
        "cwd": "string",
        "env": {
          "property1": "string",
          "property2": "string"
        }
      },
      "expect_exit": -2147483648,
      "name": "string",
      "required": true
    }
  ],
  "deadline": {
    "idle_timeout_seconds": 1,
    "max_lifetime_seconds": 1
  },
  "env": {
    "property1": "string",
    "property2": "string"
  },
  "files": [
    {
      "content": {
        "blob": "string",
        "mode": 0,
        "type": "file"
      },
      "ignore": [
        "string"
      ],
      "path": "string"
    }
  ],
  "labels": {
    "property1": "string",
    "property2": "string"
  },
  "name": "string",
  "placement": {
    "alternatives": [
      {
        "cpu_millicores": {
          "max": 250,
          "min": 250
        },
        "disk_bytes": {
          "max": 1,
          "min": 1
        },
        "guarantee": "best_effort",
        "memory_bytes": {
          "max": 268435456,
          "min": 268435456
        },
        "size": "xsmall"
      }
    ],
    "ignore": [
      "string"
    ],
    "max_price_usd_per_hour": "string",
    "minimum_isolation": "vm",
    "offering": "string",
    "only": [
      "string"
    ],
    "route": "string",
    "sort": "order",
    "target": "string"
  },
  "platform": "string",
  "project": "string",
  "provider_options": {
    "property1": {
      "property1": null,
      "property2": null
    },
    "property2": {
      "property1": null,
      "property2": null
    }
  },
  "requires": [
    "string"
  ],
  "resources": {
    "cpu_millicores": {
      "max": 250,
      "min": 250
    },
    "disk_bytes": {
      "max": 1,
      "min": 1
    },
    "guarantee": "best_effort",
    "memory_bytes": {
      "max": 268435456,
      "min": 268435456
    },
    "size": "xsmall"
  },
  "secret_env": {
    "property1": "string",
    "property2": "string"
  },
  "source": {
    "revision": "string",
    "type": "revision"
  }
}
```

**Responses**

- `200` — Success
- `400` — Typed error; Retry-After is present when retryable
- `401` — Typed error; Retry-After is present when retryable
- `403` — Typed error; Retry-After is present when retryable
- `409` — Idempotency request in progress, expired response, or conflicting state
- `413` — Request exceeds policy body limit
- `415` — Expected application/json
- `422` — Typed error; Retry-After is present when retryable
- `429` — Typed error; Retry-After is present when retryable
- `500` — Typed error; Retry-After is present when retryable
- `503` — Typed error; Retry-After is present when retryable

Response example, 200:

```json
{
  "candidates": [
    {
      "offering": "string",
      "resources": {
        "bounds": {
          "cpu_max_millicores": 1,
          "disk_max_bytes": 1,
          "memory_max_bytes": 1
        },
        "cpu_ceiling_millicores": 1,
        "cpu_millicores": 1,
        "disk_bytes": 1,
        "guarantee": "best_effort",
        "memory_bytes": 1,
        "offering": "string"
      },
      "shape_index": 0,
      "target": "string"
    }
  ],
  "route": "string",
  "selected": {
    "offering": "string",
    "resources": {
      "bounds": {
        "cpu_max_millicores": 1,
        "disk_max_bytes": 1,
        "memory_max_bytes": 1
      },
      "cpu_ceiling_millicores": 1,
      "cpu_millicores": 1,
      "disk_bytes": 1,
      "guarantee": "best_effort",
      "memory_bytes": 1,
      "offering": "string"
    },
    "shape_index": 0,
    "target": "string"
  },
  "trace": [
    {
      "detail": "string",
      "error": {
        "code": "unsupported_capability",
        "details": {
          "capability": null,
          "field": null,
          "outcome": null,
          "reason": null,
          "scope": null,
          "trace": null,
          "vendor_details": {},
          "violations": null
        },
        "message": "string",
        "retryable": true
      },
      "result": "offline",
      "target": "string"
    }
  ]
}
```
