Productmind API

A sandbox is the container a coding session runs in: which applications it clones and starts, in what order, and its image, size and environment variables. Create, update and delete sandboxes, choose the workspace's default, and set the attached applications and their startup order. See Sandboxes.


List sandboxes in a workspace

GET
https://api.productmind.ai
/workspaces/{workspaceId}/sandboxes

Returns the workspace's sandboxes - reusable workspace-container specs (image, size, sidecar env, environment variables with secret values masked). The runnable config lives on the attached Applications, surfaced as the ordered applicationIds. As an MCP tool it is offered to Owners and Admins, on their own AI assistant.

List sandboxes in a workspace › path Parameters

workspaceId
​string · required

Workspace UUID

List sandboxes in a workspace › query Parameters

page
​number

Page number (1-indexed, default 1)

limit
​number

Items per page (default 50)

sortBy
​string · enum

Field to sort by

Enum values:
name
isDefault
createdAt
sortOrder
​string · enum

Sort direction (default desc)

Enum values:
asc
desc
search
​string

Full-text search across searchable fields

List sandboxes in a workspace › Responses

200

List of sandboxes

​SandboxDTO[] · required
​object
​object

Create a sandbox

POST
https://api.productmind.ai
/workspaces/{workspaceId}/sandboxes

Create a reusable sandbox (container image URI + resource hints + sidecar env). Attach Applications separately. Needs sandbox:create (Owner, Admin, Power User and Developer by default).

Create a sandbox › path Parameters

workspaceId
​string · required

Workspace UUID

Create a sandbox › Request Body

name
​string · minLength: 1 · maxLength: 200 · required
description
​string
​
​
size
​SandboxSize · enum

Sandbox size: small (2 vCPU, 8 GB), medium (4 vCPU, 16 GB) or large (8 vCPU, 32 GB)

Enum values:
small
medium
large
​SidecarEnv[] · maxItems: 50
​WorkspaceEnvVar[] · maxItems: 100
isDefault
​boolean

Create a sandbox › Responses

Created sandbox

​SandboxDTO · required

Get a sandbox by ID

GET
https://api.productmind.ai
/workspaces/{workspaceId}/sandboxes/{id}

Returns one sandbox: its size, its environment variables (secret values masked) and the ids of the applications it runs, in startup order. As an MCP tool it is offered to Owners and Admins, on their own AI assistant.

Get a sandbox by ID › path Parameters

workspaceId
​string · required

Workspace UUID

id
​string · required

Sandbox UUID

Get a sandbox by ID › Responses

200

Sandbox details

​SandboxDTO · required

Update a sandbox

PUT
https://api.productmind.ai
/workspaces/{workspaceId}/sandboxes/{id}

Update name, image, env vars, resource hints, or default flag. A secret env entry sent with an empty value preserves the stored secret. Needs sandbox:update (Owner, Admin, Power User and Developer by default).

Update a sandbox › path Parameters

workspaceId
​string · required

Workspace UUID

id
​string · required

Sandbox UUID

Update a sandbox › Request Body

name
​string · minLength: 1 · maxLength: 200
​
​
​
size
​SandboxSize · enum

Sandbox size: small (2 vCPU, 8 GB), medium (4 vCPU, 16 GB) or large (8 vCPU, 32 GB)

Enum values:
small
medium
large
​SidecarEnv[] · maxItems: 50
​WorkspaceEnvVar[] · maxItems: 100
isDefault
​boolean

Update a sandbox › Responses

200

Updated sandbox

​SandboxDTO · required

Delete a sandbox

DELETE
https://api.productmind.ai
/workspaces/{workspaceId}/sandboxes/{id}

Sessions referencing it fall back to the workspace default (FK ON DELETE SET NULL). Needs sandbox:delete (Owner, Admin, Power User and Developer by default).

Delete a sandbox › path Parameters

workspaceId
​string · required

Workspace UUID

id
​string · required

Sandbox UUID

Delete a sandbox › Responses

200

Deleted

No data returned

Set the ordered applications attached to a sandbox

PUT
https://api.productmind.ai
/workspaces/{workspaceId}/sandboxes/{id}/applications

Replaces the sandbox's attached applications with the given ordered list (array order = startup order). Needs sandbox:update (Owner, Admin, Power User and Developer by default). A session's credential is refused with 403: every later session on the sandbox takes these applications' repositories and base branches. As an MCP tool it is offered to Owners and Admins, on their own AI assistant.

Set the ordered applications attached to a sandbox › path Parameters

workspaceId
​string · required

Workspace UUID

id
​string · required

Sandbox UUID

Set the ordered applications attached to a sandbox › Request Body

applicationIds
​string[] · maxItems: 50 · required

Every application the sandbox runs, by id (from list-applications), in startup order: the first starts first. Replaces the whole list, so send the ones to keep too; [] detaches them all. New sessions on the sandbox take these applications' repositories, and the first one's base branch is what their pull requests merge into. At most 50.

Set the ordered applications attached to a sandbox › Responses

200

Updated sandbox

​SandboxDTO · required

Set a sandbox's size

PUT
https://api.productmind.ai
/workspaces/{workspaceId}/sandboxes/{id}/size

Sets the sandbox's size: small (2 vCPU, 8 GB), medium (4 vCPU, 16 GB) or large (8 vCPU, 32 GB). The new size applies from the sandbox's next hosted run, which starts on a new machine and continues from the work the coding agent pushed to the session's branch; a run already going keeps its size. Sandbox time is billed at the size's own rate. Owner and Admin only: needs configuration-tools:manage as well as sandbox:update. A coding session's token is refused with 403. Answers the updated sandbox.

Set a sandbox's size › path Parameters

workspaceId
​string · required

Workspace UUID

id
​string · required

Sandbox UUID

Set a sandbox's size › Request Body

size
​string · enum · required

small (2 vCPU, 8 GB), medium (4 vCPU, 16 GB) or large (8 vCPU, 32 GB). Applies from the sandbox's next hosted run, which starts on a new machine and continues from the work the coding agent pushed: a run already going keeps its size. Sandbox time is billed at the size's own hourly rate.

Enum values:
small
medium
large

Set a sandbox's size › Responses

200

The updated sandbox, secret values masked

​SandboxDTO · required

Change a sandbox's environment variables

PATCH
https://api.productmind.ai
/workspaces/{workspaceId}/sandboxes/{id}/env-vars

Adds, replaces and removes the sandbox's own environment variables by key, which every session in the sandbox gets beside its applications' own: set adds a key or replaces it, remove deletes one, and every variable not named is kept as it is. A secret is stored encrypted and never shown again. Leaving secret out keeps a variable's kind, and leaving a secret's value out keeps its stored value. Refused with 400: a secret with no value to keep, a secret made plain without a new value, a key in both set and remove, and more than 100 variables in the result. Owner and Admin only: needs configuration-tools:manage as well as sandbox:update. A coding session's token is refused with 403. Answers the updated sandbox, secret values masked.

Change a sandbox's environment variables › path Parameters

workspaceId
​string · required

Workspace UUID

id
​string · required

Sandbox UUID

Change a sandbox's environment variables › Request Body

​WorkspaceEnvVarPatchEntry[] · maxItems: 100

Variables to add, or to replace by key, each { key, value?, secret? }. A key already stored is replaced in place; a new one is added at the end. Every key once.

remove
​string[] · maxItems: 100

Keys to delete. A key that is not set is ignored. A key cannot be in both set and remove.

Change a sandbox's environment variables › Responses

200

The updated sandbox, secret values masked

​SandboxDTO · required