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

# Workspace API

> Read-only API access to your workspace data using workspace API keys

The Workspace API gives external systems read-only access to workspace-level and per-agent data — the same information visible in the Workspace Explorer capability, but accessible over HTTP.

## Authentication

Requests are authenticated with workspace API keys (`wk_...`) that have the **Workspace read API** scope enabled.

Include the key as a Bearer token:

```
Authorization: Bearer wk_your_key_here
```

### Enabling workspace API access

1. Go to **Workspace Settings → API Keys**
2. Create a new key (or edit an existing one)
3. Check the **Workspace read API** scope
4. Save and copy the key

<Warning>
  Workspace API keys grant read access to all workspace data including chat histories, messages, member information, and agent configurations. Keep them secure and rotate them regularly.
</Warning>

## Workspace endpoints

All endpoints are `GET` requests under `/workspaceapi/`. No workspace ID is needed in the URL — the key identifies the workspace.

| Endpoint                            | Description                                                      |
| ----------------------------------- | ---------------------------------------------------------------- |
| `/workspaceapi/overview`            | Workspace settings, feature flags, and configuration             |
| `/workspaceapi/credits`             | Credit balance and per-agent/per-team usage                      |
| `/workspaceapi/members`             | All workspace members with roles and team memberships            |
| `/workspaceapi/invites`             | Pending and expired workspace invitations                        |
| `/workspaceapi/teams`               | All teams (add `?includeMembers=true` for member lists)          |
| `/workspaceapi/teams/:teamId`       | Single team details with full member list                        |
| `/workspaceapi/secrets`             | Secret names and metadata (values are never exposed)             |
| `/workspaceapi/http-apis`           | Shared HTTP API capability configurations                        |
| `/workspaceapi/capability-settings` | Which capabilities are available and their defaults              |
| `/workspaceapi/security-settings`   | Security alert configuration                                     |
| `/workspaceapi/agents`              | All agents (add `?includeOverview=true` for management overview) |
| `/workspaceapi/value-capture`       | Value capture compliance summary across agents                   |

## Per-agent endpoints

Drill into a specific agent's data. The agent must belong to the workspace and not be private (restricted access).

| Endpoint                                             | Description                                                                                            |
| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| `/workspaceapi/agents/:agentId`                      | Full agent configuration                                                                               |
| `/workspaceapi/agents/:agentId/chats`                | Chat conversation list                                                                                 |
| `/workspaceapi/agents/:agentId/chats/:chatId`        | Single chat with full message history                                                                  |
| `/workspaceapi/agents/:agentId/documents`            | Agent documents and folders                                                                            |
| `/workspaceapi/agents/:agentId/documents/:docId`     | Single document with content                                                                           |
| `/workspaceapi/agents/:agentId/diary`                | Diary entries (filters: `?date=`, `?conversationId=`, `?year=&month=`)                                 |
| `/workspaceapi/agents/:agentId/activity-log`         | Activity log (filters: `?limit=`, `?page=`, `?pageSize=`, `?entryId=`, `?newerThan=`)                  |
| `/workspaceapi/agents/:agentId/messages`             | Email/SMS messages (filters: `?page=`, `?pageSize=`, `?direction=`, `?channel=`, `?since=`, `?until=`) |
| `/workspaceapi/agents/:agentId/evals`                | Eval definitions (add `?includeRecentResults=true` for results)                                        |
| `/workspaceapi/agents/:agentId/connected-agents`     | Agent-to-agent connections                                                                             |
| `/workspaceapi/agents/:agentId/mcp-servers`          | Connected MCP servers                                                                                  |
| `/workspaceapi/agents/:agentId/tool-usage/:toolName` | Usage stats for a specific tool (filters: `?since=`, `?limit=`)                                        |

## Example

```bash theme={null}
curl -s https://api.abundly.ai/workspaceapi/agents \
  -H "Authorization: Bearer wk_your_key_here" | jq
```

## Data redaction

Credential values, API keys, and secret values are automatically stripped from all responses — the same redaction rules applied by the Workspace Explorer capability. Secret names and metadata are included so you can see what's configured without exposing sensitive values.

## API key scopes

Workspace API keys support two scopes that can be enabled independently:

| Scope                      | What it grants                                                                                                   |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| **Custom agent endpoints** | Access to agent-exposed APIs (HTTP API, Document API, MCP, Widget) on agents with "Allow Workspace Keys" enabled |
| **Workspace read API**     | Read-only access to workspace and agent data via the `/workspaceapi/` endpoints                                  |

Existing keys default to **Custom agent endpoints** only. Enable **Workspace read API** explicitly to use the endpoints documented on this page.

## Learn more

<CardGroup cols={2}>
  <Card title="API Access" icon="key" href="/features/agent-api-endpoint">
    Expose agents as HTTP APIs, MCP servers, webhooks, or chat widgets
  </Card>

  <Card title="Access Control" icon="shield" href="/security/access-control">
    Workspace roles, team permissions, and agent access levels
  </Card>
</CardGroup>
