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

# Workspaces

> Choosing which workspace an API call acts in.

An organisation is divided into **workspaces**: offices, regions or teams, each with its own packages, templates, contacts and members. Every organisation has a default workspace.

An API key belongs to the organisation and acts in exactly one workspace per request.

## Listing workspaces

`GET /api/v1/workspaces` returns the workspaces the key's user can act in, and which one the call itself acted in.

```bash theme={null}
curl https://my.flowsign.app/api/v1/workspaces \
  -H "Authorization: Bearer fsk_your_key_here"
```

```json theme={null}
{
  "data": {
    "active": "ws_default",
    "workspaces": [
      { "id": "ws_default", "name": "Head office", "slug": "head-office", "isDefault": true },
      { "id": "ws_akl", "name": "Auckland", "slug": "auckland", "isDefault": false }
    ]
  }
}
```

## Choosing a workspace

Send the `X-Workspace-Id` header with a workspace id from the list above. Packages and templates you list, create or act on are scoped to that workspace.

```bash theme={null}
curl "https://my.flowsign.app/api/v1/packages?status=IN_PROGRESS" \
  -H "Authorization: Bearer fsk_your_key_here" \
  -H "X-Workspace-Id: ws_akl"
```

Rules:

* **Omit the header** to act in the organisation's default workspace.
* **An id the key cannot act in** (unknown, or a workspace the key's user is not a member of) is treated as if the header were omitted: the call lands in the default workspace. It is never widened to the whole organisation.
* `GET /api/v1/workspaces` reports the workspace actually used in `active`, so you can confirm a header was honoured.

<Tip>
  Webhook endpoints belong to the organisation, not a workspace. Events from every workspace are delivered to every subscribed endpoint.
</Tip>
