---
search:
  tags:
    - Sandboxes
    - PATCH
seo:
  description: >-
    Reference for the PATCH /v1/sandboxes/{id}/labels endpoint in the Carton API
    reference.
sidebar:
  label: PATCH /v1/sandboxes/{id}/labels
  badge: PATCH
title: PATCH /v1/sandboxes/{id}/labels
type: openapi-operation
---
`PATCH /v1/sandboxes/{id}/labels`

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

- `labels` (object, required)

Request body example:

```json
{
  "labels": {
    "property1": "string",
    "property2": "string"
  }
}
```

**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
- `404` — Unknown resource
- `410` — Sandbox existed and is gone; details contains its reason
- `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
{
  "capabilities": {
    "files_archive@1": {
      "format": "tar",
      "implementation": "native"
    },
    "ports_unexpose@1": {},
    "pty@1": {
      "features": [
        "stdin"
      ],
      "output": "merged"
    },
    "property1": {},
    "property2": {}
  },
  "created_at": "2019-08-24T14:15:22Z",
  "deadline": {
    "expires_at": "2019-08-24T14:15:22Z",
    "idle_timeout_seconds": 1,
    "max_lifetime_seconds": 1
  },
  "diagnostics": [
    {
      "execution_id": "string",
      "exit": {
        "code": -2147483648,
        "reason": "exited",
        "signal": "string"
      },
      "name": "string",
      "output_truncated": true,
      "passed": true,
      "phase": "provisioning",
      "required": true,
      "stderr": {
        "data": "string",
        "encoding": "base64"
      },
      "stdout": {
        "data": "string",
        "encoding": "base64"
      }
    }
  ],
  "id": "string",
  "isolation": {
    "boundary": "vm",
    "notes": "string"
  },
  "labels": {
    "property1": "string",
    "property2": "string"
  },
  "name": "string",
  "offering": "string",
  "placement": {
    "fallback_step": 0,
    "route": "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"
      }
    ]
  },
  "posix_userland": true,
  "resources": {
    "granted": {
      "cpu_ceiling_millicores": 1,
      "cpu_millicores": 1,
      "disk_bytes": 1,
      "guarantee": "best_effort",
      "memory_bytes": 1
    },
    "requested": {
      "cpu_millicores": {
        "max": 250,
        "min": 250
      },
      "disk_bytes": {
        "max": 1,
        "min": 1
      },
      "guarantee": "best_effort",
      "memory_bytes": {
        "max": 268435456,
        "min": 268435456
      },
      "size": "xsmall"
    }
  },
  "revision": "string",
  "status": {
    "phase": "provisioning",
    "reason": "string",
    "vendor_state": "string"
  },
  "target": "string",
  "updated_at": "2019-08-24T14:15:22Z"
}
```
