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

# Workspaces

> Which workspace a call works in, and who may do what there.

Every call (except `/me`, `/workspaces` and `/health`) works inside one workspace. CaptureFlow picks it in this order:

1. The `workspace_id` query parameter (or the `workspace_id` argument of an MCP tool).
2. The workspace the key is locked to.
3. The credential's default workspace: the one the key was created in, or the one chosen when connecting the app. If you have since left it, the call is refused with [`workspace_not_found`](https://docs.captureflow.ai/api/errors#workspace_not_found): pass `workspace_id`.
4. Your only workspace, if you belong to just one.

Otherwise the call is refused with [`workspace_required`](https://docs.captureflow.ai/api/errors#workspace_required), and `details.workspaces` lists the workspaces to choose from. `GET /v1/workspaces` lists them too, with your role, whether the workspace has a paid plan and whether API access is on.

## Rules that apply in a workspace

| Situation | Result |
| - | - |
| Not a member of the workspace | [`workspace_not_found`](https://docs.captureflow.ai/api/errors#workspace_not_found) |
| A key locked to another workspace | [`workspace_locked`](https://docs.captureflow.ai/api/errors#workspace_locked) |
| No paid plan or trial | [`plan_required`](https://docs.captureflow.ai/api/errors#plan_required) |
| API access switched off by an owner or admin | [`api_disabled`](https://docs.captureflow.ai/api/errors#api_disabled) |
| You are a viewer and the call changes something | [`viewer_read_only`](https://docs.captureflow.ai/api/errors#viewer_read_only) |
| The account or workspace is scheduled for deletion | [`deletion_pending`](https://docs.captureflow.ai/api/errors#deletion_pending) |

## Agency client workspaces

In a client workspace managed by an agency, members review and accept what the agency prepares. As in the app, a member there can't create or edit draft posts or start the content agent through the API ([`managed_member_restricted`](https://docs.captureflow.ai/api/errors#managed_member_restricted)); they can read content, create ideas and inputs, and accept or reject proposals in CaptureFlow.

## Your own content

Ideas, inputs and posts belong to a person within a workspace. The API reads and writes the content of the person the credential acts for (or of the member named by [`as_user`](https://docs.captureflow.ai/guides/authentication#as-user)), never a colleague's.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.