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

# Get Workspace

> Retrieve a specific workspace by ID

# Get Workspace

Retrieves detailed information about a specific workspace.

Access is membership-aware:

* TEAM-owned workspace: all members can read.
* Non-TEAM workspace: owner-only.

## Endpoint

```
GET /workspaces/{id}
```

## Authentication

Requires a valid API token in the Authorization header.

## Request

### Headers

| Header          | Value        | Required |
| --------------- | ------------ | -------- |
| `Authorization` | Bearer token | Yes      |

### Path Parameters

| Parameter | Type   | Required | Description  |
| --------- | ------ | -------- | ------------ |
| `id`      | string | Yes      | Workspace ID |

## Response

### Success Response

**Status:** `200 OK`

```json theme={null}
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Design System",
  "description": "Main product design system",
  "user_id": "user-123",
  "created_at": "2025-01-15T10:00:00Z",
  "updated_at": "2025-01-15T10:00:00Z"
}
```

### Response Fields

| Field         | Type         | Description                 |
| ------------- | ------------ | --------------------------- |
| `id`          | string       | Unique workspace identifier |
| `name`        | string       | Workspace name              |
| `description` | string\|null | Optional description        |
| `user_id`     | string       | Owner's user ID             |
| `created_at`  | string       | ISO 8601 timestamp          |
| `updated_at`  | string       | ISO 8601 timestamp          |

## Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -H "Authorization: Bearer tkc_your_token_here" \
    https://app.tokencraft.dev/api/v1/workspaces/550e8400-e29b-41d4-a716-446655440000
  ```

  ```javascript JavaScript theme={null}
  const workspaceId = '550e8400-e29b-41d4-a716-446655440000';
  const token = 'tkc_your_token_here';

  const response = await fetch(
    `https://app.tokencraft.dev/api/v1/workspaces/${workspaceId}`,
    {
      headers: {
        'Authorization': `Bearer ${token}`
      }
    }
  );

  const workspace = await response.json();
  console.log(workspace);
  ```

  ```python Python theme={null}
  import requests

  workspace_id = '550e8400-e29b-41d4-a716-446655440000'
  token = 'tkc_your_token_here'

  response = requests.get(
      f'https://app.tokencraft.dev/api/v1/workspaces/{workspace_id}',
      headers={'Authorization': f'Bearer {token}'}
  )

  workspace = response.json()
  print(workspace)
  ```
</CodeGroup>

## Error Responses

### 401 Unauthorized

```json theme={null}
{
  "error": "Invalid API token"
}
```

### 404 Not Found

```json theme={null}
{
  "error": "Workspace not found"
}
```

**Causes:**

* Workspace ID doesn't exist
* You do not have access to this workspace
* Invalid ID format

### 500 Internal Server Error

```json theme={null}
{
  "error": "Internal server error"
}
```

## Next Steps

<CardGroup cols={2}>
  <Card title="List Tokensets" icon="layer-group" href="/api-reference/workspaces/tokensets">
    Get all tokensets in this workspace
  </Card>

  <Card title="List Workspaces" icon="folder" href="/api-reference/workspaces/list">
    Get all workspaces
  </Card>
</CardGroup>
