---
title: "Stop the session’s sandbox container now"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.cloudraker.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Stop the session’s sandbox container now

Path: CloudRaker Workspace API › Workspace Sessions

`POST /workspace/sessions/{sessionId}/sandbox/kill`

Destroys the container and releases the organization’s container slot and any credit hold the turn was holding. The next sandbox turn provisions a fresh container and restores the last `/workspace` backup into it, so nothing that was backed up is lost. Safe to call when no container is running. Answers `204`. **Authorization:** `work_session:manage` — the OWNER relation (spec §8.1), not the `comment` every participant holds. A session the caller cannot see answers 404; one they can see but do not own answers 403.

## Authentication

- `bearerAuth`, http, header `Authorization`

## Path parameters

- `sessionId` (`killWorkspaceSessionSandbox.path.sessionId`; string, required)

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.cloudraker.com/workspace/sessions/<sessionId>/sandbox/kill' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.cloudraker.com/workspace/sessions/<sessionId>/sandbox/kill';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.cloudraker.com/workspace/sessions/<sessionId>/sandbox/kill"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.text)
```

## Responses

### 204

The container is stopped.

### 403

`forbidden` — only a session owner may destroy its container.

#### Example

```json
{
  "error": "string",
  "error_code": "string",
  "issues": [
    {
      "path": "string",
      "code": "string",
      "message": "string"
    }
  ]
}
```

- `error` (`killWorkspaceSessionSandbox.response.403.error`; string, required) — The sentence a human reads.
- `error_code` (`killWorkspaceSessionSandbox.response.403.error_code`; string, required) — The stable snake_case branch key.
- `issues` (`killWorkspaceSessionSandbox.response.403.issues`; array<object>, optional) — Per-field detail, present only on a validation failure.
  - `path` (`killWorkspaceSessionSandbox.response.403.issues.path`; string, required)
  - `code` (`killWorkspaceSessionSandbox.response.403.issues.code`; string, required)
  - `message` (`killWorkspaceSessionSandbox.response.403.issues.message`; string, required)

### 404

No such session, or the caller may not see it.


Source: https://docs.cloudraker.com/workspace/api/workspace-sessions/kill-workspace-session-sandbox/index.md
