# Workspaces

## Create

**post** `/compute/v1/admin/workspaces`

Create a workspace

### Body Parameters

- `data_retention: optional object { unit, value }`

  How long result data is retained before automatic deletion. Defaults to 7 days if not specified. Maximum retention is 14 days (336 hours).

  - `unit: "hours" or "days"`

    Time unit for retention duration

    - `"hours"`

    - `"days"`

  - `value: number`

    Duration value. Maximum retention is 14 days (or 336 hours).

- `name: optional string`

  Workspace name

### Returns

- `id: string`

  Workspace ID

- `archived_at: string`

- `created_at: string`

- `data_retention: object { unit, value }`

  How long result data is retained before automatic deletion. Defaults to 7 days if not specified. Maximum retention is 14 days (336 hours).

  - `unit: "hours" or "days"`

    Time unit for retention duration

    - `"hours"`

    - `"days"`

  - `value: number`

    Duration value. Maximum retention is 14 days (or 336 hours).

- `is_default: boolean`

  Whether this is the default workspace

- `name: string`

  Workspace name

- `updated_at: string`

### Example

```http
curl https://api.boltz.bio/compute/v1/admin/workspaces \
    -H 'Content-Type: application/json' \
    -H "x-api-key: $BOLTZ_API_KEY" \
    -d '{}'
```

## List

**get** `/compute/v1/admin/workspaces`

List workspaces

### Query Parameters

- `after_id: optional string`

  Return results after this ID

- `before_id: optional string`

  Return results before this ID

- `limit: optional number`

  Max items to return

### Returns

- `data: array of object { id, archived_at, created_at, 4 more }`

  - `id: string`

    Workspace ID

  - `archived_at: string`

  - `created_at: string`

  - `data_retention: object { unit, value }`

    How long result data is retained before automatic deletion. Defaults to 7 days if not specified. Maximum retention is 14 days (336 hours).

    - `unit: "hours" or "days"`

      Time unit for retention duration

      - `"hours"`

      - `"days"`

    - `value: number`

      Duration value. Maximum retention is 14 days (or 336 hours).

  - `is_default: boolean`

    Whether this is the default workspace

  - `name: string`

    Workspace name

  - `updated_at: string`

- `first_id: string`

  ID of the first item. Use as before_id for the previous page.

- `has_more: boolean`

- `last_id: string`

  ID of the last item. Use as after_id for the next page.

### Example

```http
curl https://api.boltz.bio/compute/v1/admin/workspaces \
    -H "x-api-key: $BOLTZ_API_KEY"
```

## Retrieve

**get** `/compute/v1/admin/workspaces/{workspace_id}`

Get a workspace

### Path Parameters

- `workspace_id: string`

### Returns

- `id: string`

  Workspace ID

- `archived_at: string`

- `created_at: string`

- `data_retention: object { unit, value }`

  How long result data is retained before automatic deletion. Defaults to 7 days if not specified. Maximum retention is 14 days (336 hours).

  - `unit: "hours" or "days"`

    Time unit for retention duration

    - `"hours"`

    - `"days"`

  - `value: number`

    Duration value. Maximum retention is 14 days (or 336 hours).

- `is_default: boolean`

  Whether this is the default workspace

- `name: string`

  Workspace name

- `updated_at: string`

### Example

```http
curl https://api.boltz.bio/compute/v1/admin/workspaces/$WORKSPACE_ID \
    -H "x-api-key: $BOLTZ_API_KEY"
```

## Update

**post** `/compute/v1/admin/workspaces/{workspace_id}`

Update a workspace

### Path Parameters

- `workspace_id: string`

### Body Parameters

- `data_retention: optional object { unit, value }`

  How long result data is retained before automatic deletion. Defaults to 7 days if not specified. Maximum retention is 14 days (336 hours).

  - `unit: "hours" or "days"`

    Time unit for retention duration

    - `"hours"`

    - `"days"`

  - `value: number`

    Duration value. Maximum retention is 14 days (or 336 hours).

- `name: optional string`

### Returns

- `id: string`

  Workspace ID

- `archived_at: string`

- `created_at: string`

- `data_retention: object { unit, value }`

  How long result data is retained before automatic deletion. Defaults to 7 days if not specified. Maximum retention is 14 days (336 hours).

  - `unit: "hours" or "days"`

    Time unit for retention duration

    - `"hours"`

    - `"days"`

  - `value: number`

    Duration value. Maximum retention is 14 days (or 336 hours).

- `is_default: boolean`

  Whether this is the default workspace

- `name: string`

  Workspace name

- `updated_at: string`

### Example

```http
curl https://api.boltz.bio/compute/v1/admin/workspaces/$WORKSPACE_ID \
    -H 'Content-Type: application/json' \
    -H "x-api-key: $BOLTZ_API_KEY" \
    -d '{}'
```

## Archive

**post** `/compute/v1/admin/workspaces/{workspace_id}/archive`

Archives a workspace and deactivates all its API keys. This action is irreversible.

### Path Parameters

- `workspace_id: string`

### Returns

- `id: string`

  Workspace ID

- `archived_at: string`

- `created_at: string`

- `data_retention: object { unit, value }`

  How long result data is retained before automatic deletion. Defaults to 7 days if not specified. Maximum retention is 14 days (336 hours).

  - `unit: "hours" or "days"`

    Time unit for retention duration

    - `"hours"`

    - `"days"`

  - `value: number`

    Duration value. Maximum retention is 14 days (or 336 hours).

- `is_default: boolean`

  Whether this is the default workspace

- `name: string`

  Workspace name

- `updated_at: string`

### Example

```http
curl https://api.boltz.bio/compute/v1/admin/workspaces/$WORKSPACE_ID/archive \
    -X POST \
    -H "x-api-key: $BOLTZ_API_KEY"
```
