> For the complete documentation index, see [llms.txt](https://docs.flora.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flora.ai/api/guides/workspaces.md).

# Workspaces

List the FLORA workspaces your API key can reach, and check a workspace's balance and recent spend in US dollars.

Workspaces are the top-level containers for projects, assets, Techniques, runs and billing. Most API calls that create or list something need a `workspace_id`, and every run is billed to a workspace.

## List workspaces

{% tabs %}
{% tab title="curl" %}

```bash
curl https://app.flora.ai/api/v1/workspaces \
  -H "Authorization: Bearer $FLORA_API_KEY"
```

{% endtab %}

{% tab title="TypeScript" %}

```ts
import { FloraClient } from "@flora-ai/flora"

const client = new FloraClient()
const { workspaces } = await client.workspaces.list()
```

{% endtab %}
{% endtabs %}

Response:

```json
{
  "workspaces": [
    {
      "workspace_id": "ws_abc123",
      "name": "My Workspace",
      "role": "admin",
      "organization_id": "org_abc123",
      "organization_name": "Example Studio",
      "app_url": "https://app.flora.ai/projects?workspace=jd7abc123"
    }
  ]
}
```

`app_url` opens FLORA in that workspace. It is stable, so you can share it, but the person opening it must be a member.

The list holds every workspace where your key has **read** permission. Use a `workspace_id` in later requests, such as listing projects or creating assets. If you get more than one and your code doesn't know which to use, don't guess: make it a setting, or ask the person running the script which workspace should pay.

## Check balance and spend

`GET /workspaces/{workspaceId}/usage` returns, in US dollars, the balance you can draw on and, if you're allowed to see it, what the workspace was charged over a period (default: the last 30 days; at most 31 days):

```bash
curl "https://app.flora.ai/api/v1/workspaces/ws_abc123/usage?start_date=2026-09-01&end_date=2026-09-30" \
  -H "Authorization: Bearer $FLORA_API_KEY"
```

The response has `available_cost`, `balance_scope`, `member_limit` and `spend`. With billing permission on a plan that includes usage reporting, `balance_scope` is `workspace` and you get the workspace's balance and totals. Otherwise it's `caller`: you get only your own allowance and any member limit, and `spend` says why it's unavailable (`entitlement_missing` or `permission_missing`) instead of reporting zero. `available_cost` is current and doesn't guarantee a run will be admitted. An API key needs **billing** permission on the workspace.

For totals across many workspaces, see [Organization usage](https://docs.flora.ai/api/guides/organizations.md).

## Find a member by email

`GET /workspaces/{workspaceId}/members?email=` returns only the member with that email address, or an empty list when nobody with that address belongs to the workspace. Use it to check whether someone is already a member before you share work with them. At Gmail and Googlemail, dots before the `@` are ignored. With `email`, `cursor` and `limit` are ignored and `meta.next_cursor` is `null`.

```bash
curl "https://app.flora.ai/api/v1/workspaces/ws_abc123/members?email=ana@example.com" \
  -H "Authorization: Bearer $FLORA_API_KEY"
```

## Common endpoints

| Method | Path                                | Description                                                                                            |
| ------ | ----------------------------------- | ------------------------------------------------------------------------------------------------------ |
| GET    | `/workspaces`                       | [List workspaces your key can read](https://docs.flora.ai/api/reference/workspaces/listworkspaces.md)  |
| GET    | `/workspaces/{workspaceId}/usage`   | [Balance and spend in US dollars](https://docs.flora.ai/api/reference/workspaces/getworkspaceusage.md) |
| GET    | `/workspaces/{workspaceId}/members` | [List the workspace's members](https://docs.flora.ai/api/reference/workspaces/listworkspacemembers.md) |

## Notes

* API keys carry per-workspace read, write and billing permissions chosen in **Settings → API Keys**. See [Authentication](https://docs.flora.ai/api/platform/authentication.md#permissions).
* Keep `workspace_id` in your server-side configuration next to your API key.
* Don't expose API keys or workspace IDs in front-end code.
* For how workspaces work in the app, see [Workspaces](https://docs.flora.ai/faqs-how-to.../workspaces.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flora.ai/api/guides/workspaces.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
