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

# Workspaces

> Resolve the authenticated OrgX workspace and client setup state.

The workspace bootstrap endpoint is the recommended first REST call. It proves
that the API key is valid, resolves the active workspace, and returns client
setup state.

## Retrieve Bootstrap Context

```http theme={"dark"}
GET /api/client/bootstrap
```

```bash theme={"dark"}
curl https://useorgx.com/api/client/bootstrap \
  -H "Authorization: Bearer $ORGX_API_KEY" \
  -H "Accept: application/json"
```

### Query Parameters

| Parameter               | Type      | Description                                                          |
| ----------------------- | --------- | -------------------------------------------------------------------- |
| `source_client`         | string    | Optional client name, for example `cursor`, `openclaw`, or `custom`. |
| `skill_pack`            | string    | Optional skill pack name to include in setup hints.                  |
| `required_capabilities` | string\[] | Repeatable query param for capabilities the client needs.            |
| `capability_hints`      | string\[] | Repeatable query param for requested setup hints.                    |

### Response

```json theme={"dark"}
{
  "ok": true,
  "data": {
    "workspace": {
      "id": "d85d7e6f-58f2-4637-b3a0-3cf2c3b8a638",
      "name": "Acme"
    },
    "sourceClient": "custom",
    "setup": {
      "ready": true
    },
    "capabilities": []
  }
}
```

## Bootstrap with POST

Use `POST` when the capability arrays are easier to send as JSON.

```http theme={"dark"}
POST /api/client/bootstrap
```

```bash theme={"dark"}
curl https://useorgx.com/api/client/bootstrap \
  -X POST \
  -H "Authorization: Bearer $ORGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "source_client": "custom",
    "required_capabilities": ["github", "org-memory"]
  }'
```

## Errors

| Status | Meaning                                              |
| ------ | ---------------------------------------------------- |
| `401`  | API key missing, invalid, or revoked.                |
| `500`  | Workspace or database context could not be resolved. |
