---
title: "Pause a running turn"
---

> 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.

# Pause a running turn

Path: CloudRaker Workspace API › Workspace Sessions

`POST /workspace/sessions/{sessionId}/turns/{turnId}/pause`

Pauses a running turn; `resume` picks it back up. **Authorization:** `work_session:comment` on the session, OR `space:contribute` on one of its linked spaces; a desk session is writable only by its owner. Any denial is 404.

## Authentication

- `bearerAuth`, http, header `Authorization`

## Path parameters

- `sessionId` (`pauseWorkspaceTurn.path.sessionId`; string, required)
- `turnId` (`pauseWorkspaceTurn.path.turnId`; string, required)

## Code samples

### cURL

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

### TypeScript

```typescript
const url = 'https://api.cloudraker.com/workspace/sessions/<sessionId>/turns/<turnId>/pause';
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>/turns/<turnId>/pause"

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

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

print(response.text)
```

## Responses

### 200

The engine’s own result for the turn.

#### Example

```json
{
  "data": {
    "property1": null,
    "property2": null
  }
}
```

- `data` (`pauseWorkspaceTurn.response.200.data`; map<unknown>, required)

### 400

`validation_failed` — a malformed body.

### 404

No such session or turn, or the caller may not write it.

### 409

`run_not_running` — the turn is already terminal.


Source: https://docs.cloudraker.com/workspace/api/workspace-sessions/pause-workspace-turn/index.md
