# CreateProcess starts a durable interactive process and returns its resource name.


[API catalog](/reference/api/) · [Docker Sandboxes overview](/reference/api/sandboxes/latest/) · [Product manual](https://docs.docker.com/ai/sandboxes-api/) · [OpenAPI specification](/reference/api/sandboxes/api.yaml)

API version: v1


> This API is experimental. Features, interfaces,
> and behavior may change.




`POST /v1/processes`

CreateProcess starts a durable interactive process and returns its resource name.

## Connection and access

[API connection and authentication guidance](/reference/api/sandboxes/latest/#authentication)


Server: `{endpoint}`

`endpoint`: The sandbox API base URL from Sandbox.core.endpoint.uri; preserve its path prefix when appending /v1 routes. HTTP endpoints require a scoped endpoint bearer; direct Unix sockets use socket access control.

Effective security: alternatives are OR; schemes within an alternative are AND. An empty array declares no HTTP authentication requirement.

```json
[
  {
    "sandboxBearer": []
  }
]
```

## Example request

Replace placeholders and provide the required credentials or request body.

```console
curl \
  --request POST \
  --header "Authorization: Bearer ${TOKEN}" \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data-binary @request-body \
  'https://sandbox.invalid/v1/processes'
```


Prepare request-body using the selected media type and schema.


## Parameters

### Idempotency-Key

Location: header. Required: no.

Replay key. Reusing it with a different payload fails with failedPrecondition; accepted keys are retained for at least 24 hours.

```json
{
  "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",
  "pointer": "/paths/~1v1~1processes/post/parameters/0",
  "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"
  }
}
```

## Request and responses

### Request  application/json




Schema:

```json
{
  "$ref": "#/components/schemas/CreateProcessRequest"
}
```










### Response 201 application/json

Success


Schema:

```json
{
  "$ref": "#/components/schemas/Process"
}
```










### Response 409 application/json

Creation conflicts with an existing resource (ALREADY_EXISTS).

The Idempotency-Key was already used with a different payload.


Schema:

```json
{
  "$ref": "#/components/schemas/Error"
}
```









failedPrecondition:
```json
{
  "code": "failedPrecondition",
  "message": "The Idempotency-Key was already used with a different payload."
}
```


### Response default application/json

The structured Error body identifies the failure with a stable code and optional typed details.


Schema:

```json
{
  "$ref": "#/components/schemas/Error"
}
```









Schema example:
```json
{
  "code": "notFound",
  "details": [],
  "message": "sandbox not found"
}
```


## Complete operation contract

```json
{
  "description": "CreateProcess starts a durable interactive process and returns its resource name.",
  "operationId": "createProcess",
  "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/CreateProcessRequest"
        }
      }
    },
    "required": true
  },
  "responses": {
    "201": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Process"
          }
        }
      },
      "description": "Success"
    },
    "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\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": [
    {
      "sandboxBearer": []
    }
  ],
  "servers": [
    {
      "url": "{endpoint}",
      "variables": {
        "endpoint": {
          "default": "https://sandbox.invalid",
          "description": "The sandbox API base URL from Sandbox.core.endpoint.uri; preserve its path prefix when appending /v1 routes. HTTP endpoints require a scoped endpoint bearer; direct Unix sockets use socket access control."
        }
      }
    }
  ],
  "summary": "CreateProcess starts a durable interactive process and returns its resource name.",
  "tags": [
    "Processes"
  ],
  "x-sbx-authenticated-only": false,
  "x-sbx-conditional-permissions": [],
  "x-sbx-error-responses": [
    {
      "code": "FAILED_PRECONDITION",
      "description": "The Idempotency-Key was already used with a different payload."
    }
  ],
  "x-sbx-plane": "data",
  "x-sbx-required-permissions": [
    "sandboxesExec"
  ],
  "x-sbx-serving-surface": "sandboxEndpoint"
}
```

## Referenced schemas

- [#/components/schemas/CreateProcessRequest](/reference/api/sandboxes/latest/schemas/CreateProcessRequest/)

- [#/components/schemas/Error](/reference/api/sandboxes/latest/schemas/Error/)

- [#/components/schemas/Process](/reference/api/sandboxes/latest/schemas/Process/)




