> This page is for Workspace app.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.cloudraker.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.cloudraker.com/_mcp/server.

# Read one work session

GET https://api.cloudraker.com/workspace/sessions/{sessionId}

The authoritative session — read live, never from the list projection, so status and counts are always fresh. `counts.unread` is the CALLER’s own open `inbox_items` rows on this session (spec §6) — per viewer, so it is resolved here rather than held on the session record. **Authorization:** `work_session:read` on the session, OR `space:contribute` on one of its linked spaces; a desk session is readable only by its owner, even by an administrator. Any denial is 404. A caller who may read but not WRITE the session reads the SANITIZED view, the same one its live socket and its `/entries` page get: url-ish keys and url-ish values are redacted.

Reference: https://docs.cloudraker.com/workspace/api/workspace-sessions/get-workspace-session

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `sessionId` (string, required)

## Response

### 200

The work session.

- `data` (WorkspaceSession, required)

## Errors

### 404 Not Found Error

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

- `any`

## Types

### WorkspaceSession

- `id` (string, required)
- `title` (string, required)
- `description` (string, required)
- `status` (enum, required)
  - Allowed values: `open`, `working`, `waiting`, `done`, `archived`
- `workStatus` (enum, required) — Whether the WORK is done, which only people decide. `status` stays the derived state of the turns.
  - Allowed values: `active`, `ready_for_review`, `done`
- `openedBy` (WorkSessionSender, required)
- `openedVia` (enum, required)
  - Allowed values: `web`, `desktop`, `api`, `email`, `webhook`, `schedule`, `slack`, `assistant`
- `participants` (WorkspaceSessionParticipants, required)
- `spaces` (list of WorkspaceSessionSpacesItems, required)
- `files` (list of WorkspaceSessionFilesItems, required)
- `triggerId` (string, required, nullable)
- `parentSessionId` (string, required, nullable)
- `counts` (WorkspaceSessionCounts, required)
- `lastActivityAt` (datetime, required)
- `createdAt` (datetime, required)
- `closedAt` (string, required, nullable)

### WorkSessionSender

- `kind` (enum, required)
  - Allowed values: `user`, `agent`, `api_key`, `trigger`, `external`
- `id` (string, required)
- `name` (string, required)
- `avatarUrl` (string, optional)
- `source` (enum, optional)
  - Allowed values: `web`, `desktop`, `api`, `email`, `webhook`, `schedule`, `slack`, `assistant`, `manual`, `trigger`

### WorkspaceSessionParticipants

- `humans` (list of string, required)
- `agents` (list of WorkspaceSessionParticipantsAgentsItems, required)

### WorkspaceSessionSpacesItems

- `spaceId` (string, required)
- `access` (enum, required)
  - Allowed values: `read`, `commit`

### WorkspaceSessionFilesItems

- `fileId` (string, required)
- `role` (enum, required)
  - Allowed values: `input`, `artifact`

### WorkspaceSessionCounts

- `turns` (double, required)
- `approvalsPending` (double, required)
- `tasksPending` (double, required)
- `unread` (double, required)

### WorkspaceSessionParticipantsAgentsItems

- `agentId` (string, required)
- `versionId` (string, required)
- `handle` (string, required)
- `name` (string, required)
- `role` (string, required)
- `joinedAt` (datetime, required)

## Examples

**Response**

```json
{
  "data": {
    "id": "string",
    "title": "string",
    "description": "string",
    "status": "open",
    "workStatus": "active",
    "openedBy": {
      "kind": "user",
      "id": "string",
      "name": "string",
      "avatarUrl": "string",
      "source": "web"
    },
    "openedVia": "web",
    "participants": {
      "humans": [
        "string"
      ],
      "agents": [
        {
          "agentId": "string",
          "versionId": "string",
          "handle": "string",
          "name": "string",
          "role": "string",
          "joinedAt": "2024-01-15T09:30:00Z"
        }
      ]
    },
    "spaces": [
      {
        "spaceId": "string",
        "access": "read"
      }
    ],
    "files": [
      {
        "fileId": "string",
        "role": "input"
      }
    ],
    "triggerId": "string",
    "parentSessionId": "string",
    "counts": {
      "turns": 1.1,
      "approvalsPending": 1.1,
      "tasksPending": 1.1,
      "unread": 1.1
    },
    "lastActivityAt": "2024-01-15T09:30:00Z",
    "createdAt": "2024-01-15T09:30:00Z",
    "closedAt": "string"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.cloudraker.com/workspace/sessions/sessionId"

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

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

print(response.json())
```

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

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.cloudraker.com/workspace/sessions/sessionId"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.cloudraker.com/workspace/sessions/sessionId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.cloudraker.com/workspace/sessions/sessionId")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.cloudraker.com/workspace/sessions/sessionId', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.cloudraker.com/workspace/sessions/sessionId");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.cloudraker.com/workspace/sessions/sessionId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```