Experimental
CreateSandbox admits a sandbox.
/v1/sandboxes Connection and access
API connection and authentication guidance
https://connect.docker.com/sandboxes
—
The API base URL. Append the /v1 paths while preserving this URL's path prefix.
Use one of these alternatives. Requirements within an alternative apply together.
bearer
Parameters
Idempotency-Key
header
Type:
string
All schema constraints and annotations
{
"description": "Idempotency key. A replay returns the first result; the same key with a different payload fails with FAILED_PRECONDITION; retained at least 24 hours.",
"title": "Idempotency-Key",
"type": "string"
}Request and responses
Request
application/json
Schema:
CreateSandboxRequest
Response
201
application/json
Headers
ETagThe etag of the resource this response carries, which the next mutation of it sends as If-Match.
{
"description": "The etag of the resource this response carries, which the next mutation of it sends as If-Match.",
"schema": {
"type": "string"
}
}All constraints apply
Schema:
Sandbox
All schema constraints and annotations
{
"not": {
"properties": {
"core": {
"properties": {
"status": {
"enum": [
"creating",
"starting"
]
}
},
"required": [
"status"
]
}
},
"required": [
"core"
]
}
}All schema constraints and annotations
{
"allOf": [
{
"$ref": "#/components/schemas/Sandbox"
},
{
"not": {
"properties": {
"core": {
"properties": {
"status": {
"enum": [
"creating",
"starting"
]
}
},
"required": [
"status"
]
}
},
"required": [
"core"
]
}
}
]
}Response
202
application/json
Headers
ETagThe etag of the resource this response carries, which the next mutation of it sends as If-Match.
{
"description": "The etag of the resource this response carries, which the next mutation of it sends as If-Match.",
"schema": {
"type": "string"
}
}All constraints apply
Schema:
Sandbox
core
· required
status
· required
All schema constraints and annotations
{
"enum": [
"creating",
"starting"
]
}All schema constraints and annotations
{
"properties": {
"status": {
"enum": [
"creating",
"starting"
]
}
},
"required": [
"status"
]
}All schema constraints and annotations
{
"properties": {
"core": {
"properties": {
"status": {
"enum": [
"creating",
"starting"
]
}
},
"required": [
"status"
]
}
},
"required": [
"core"
]
}All schema constraints and annotations
{
"allOf": [
{
"$ref": "#/components/schemas/Sandbox"
},
{
"properties": {
"core": {
"properties": {
"status": {
"enum": [
"creating",
"starting"
]
}
},
"required": [
"status"
]
}
},
"required": [
"core"
]
}
]
}Response
409
Creation conflicts with an existing resource (ALREADY_EXISTS).
Kit admission was refused; an available settled report describes the rejected fields.
The Idempotency-Key was already used with a different payload.
application/json
Schema:
Error
failedPrecondition
{
"code": "failedPrecondition",
"message": "The Idempotency-Key was already used with a different payload."
}Response
default
application/json
Schema:
Error
Schema example
{
"code": "notFound",
"details": [],
"message": "sandbox not found"
}Referenced schemas
#/components/schemas/CreateSandboxRequest
#/components/schemas/KitFieldOutcomeReport
Complete operation contract
{
"description": "CreateSandbox admits a sandbox. Unknown fields at any level are rejected before\nreplay lookup, reservation, policy binding, or workload effects.",
"operationId": "createSandbox",
"parameters": [
{
"description": "Replay key. Reusing it with a different payload fails with failedPrecondition; accepted keys are retained for at least 24 hours.",
"in": "header",
"name": "Idempotency-Key",
"schema": {
"description": "Idempotency key. A replay returns the first result; the same key with a different payload fails with FAILED_PRECONDITION; retained at least 24 hours.",
"title": "Idempotency-Key",
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateSandboxRequest"
}
}
},
"required": true
},
"responses": {
"201": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Sandbox"
},
{
"not": {
"properties": {
"core": {
"properties": {
"status": {
"enum": [
"creating",
"starting"
]
}
},
"required": [
"status"
]
}
},
"required": [
"core"
]
}
}
]
}
}
},
"description": "Success",
"headers": {
"ETag": {
"description": "The etag of the resource this response carries, which the next mutation of it sends as If-Match.",
"schema": {
"type": "string"
}
}
}
},
"202": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Sandbox"
},
{
"properties": {
"core": {
"properties": {
"status": {
"enum": [
"creating",
"starting"
]
}
},
"required": [
"status"
]
}
},
"required": [
"core"
]
}
]
}
}
},
"description": "Accepted. The resource is still progressing; read it or follow its events until completion.",
"headers": {
"ETag": {
"description": "The etag of the resource this response carries, which the next mutation of it sends as If-Match.",
"schema": {
"type": "string"
}
}
}
},
"409": {
"content": {
"application/json": {
"examples": {
"failedPrecondition": {
"summary": "The Idempotency-Key was already used with a different payload.",
"value": {
"code": "failedPrecondition",
"message": "The Idempotency-Key was already used with a different payload."
}
}
},
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "Creation conflicts with an existing resource (ALREADY_EXISTS).\n\nKit admission was refused; an available settled report describes the rejected fields.\n\nThe Idempotency-Key was already used with a different payload."
},
"default": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "The structured Error body identifies the failure with a stable code and optional typed details."
}
},
"security": [
{
"bearer": []
}
],
"summary": "CreateSandbox admits a sandbox.",
"tags": [
"Sandboxes"
],
"x-sbx-authenticated-only": false,
"x-sbx-conditional-permissions": [
{
"permission": "mcpWrite",
"requestFieldPresent": "mcp"
}
],
"x-sbx-error-details": {
"KitFieldOutcomeReport": {
"$ref": "#/components/schemas/KitFieldOutcomeReport"
}
},
"x-sbx-error-responses": [
{
"code": "FAILED_PRECONDITION",
"description": "Kit admission was refused; an available settled report describes the rejected fields.",
"detailType": "docker.sandboxes.v1.KitFieldOutcomeReport"
},
{
"code": "FAILED_PRECONDITION",
"description": "The Idempotency-Key was already used with a different payload."
}
],
"x-sbx-plane": "control",
"x-sbx-required-permissions": [
"sandboxesCreate"
],
"x-sbx-resource-response": {
"$ref": "#/components/schemas/Sandbox"
},
"x-sbx-serving-surface": "management"
}