---
title: "Get live user presence counts by workspace"
description: "Returns per-workspace online, available, and away counts based on agent presence heartbeats received in the last two minutes. SaaS owner only."
---

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

Path: Channel Automation API › Workspaces

`GET /api/admin/workspace-presence`

Returns per-workspace online, available, and away counts based on agent presence heartbeats received in the last two minutes. SaaS owner only.

## Authentication

- `BearerAuth`, http, header `Authorization`, format `JWT`

## Code samples

### cURL

```bash
curl --request GET \
  --url https://api.channelautomation.com/api/admin/workspace-presence \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.channelautomation.com/api/admin/workspace-presence';
const options = {method: 'GET', 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.channelautomation.com/api/admin/workspace-presence"

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

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

print(response.text)
```

## Responses

### 200

Live presence counts grouped by workspace

### 401

Authentication required

#### Example

```json
{
  "error": "Authentication required",
  "success": false
}
```

- `error` (`get/api/admin/workspace-presence.response.401.error`; string, optional)
  - example `"Authentication required"`
- `success` (`get/api/admin/workspace-presence.response.401.success`; boolean, optional)
  - example `false`

### 500

Internal server error

#### Example

```json
{
  "error": "Internal server error",
  "details": "string",
  "success": false
}
```

- `error` (`get/api/admin/workspace-presence.response.500.error`; string, optional)
  - example `"Internal server error"`
- `details` (`get/api/admin/workspace-presence.response.500.details`; string, optional)
- `success` (`get/api/admin/workspace-presence.response.500.success`; boolean, optional)
  - example `false`


Source: https://developer.channelautomations.com/api/get-api-admin-workspace-presence/index.md
