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

# Workspaces

> Create and manage workspace containers for engagements

# Workspaces

Workspaces are project containers scoped to a single target domain. They hold audits, scheduled audits, and custom domain configurations.

***

## Create a workspace

`POST /api/workspaces`

**Body**

```json theme={null}
{
  "name": "Acme Production",
  "domain": "acme.example.com"
}
```

**Response (201)**

```json theme={null}
{
  "success": true,
  "data": {
    "workspace": {
      "id": "ws_abc123",
      "name": "Acme Production",
      "domain": "acme.example.com",
      "createdAt": "2026-05-18T12:00:00.000Z"
    }
  }
}
```

***

## List workspaces

`GET /api/workspaces`

**Response (200)**

```json theme={null}
{
  "success": true,
  "data": {
    "workspaces": [
      {
        "id": "ws_abc123",
        "name": "Acme Production",
        "domain": "acme.example.com",
        "auditCount": 47,
        "lastAuditAt": "2026-05-18T14:02:00.000Z",
        "createdAt": "2026-05-01T00:00:00.000Z"
      }
    ]
  }
}
```

***

## Get a workspace

`GET /api/workspaces/{id}`

**Response (200)**

```json theme={null}
{
  "success": true,
  "data": {
    "workspace": {
      "id": "ws_abc123",
      "name": "Acme Production",
      "domain": "acme.example.com",
      "auditCount": 47,
      "customDomain": "audits.acme.com",
      "averageScore": 78,
      "createdAt": "2026-05-01T00:00:00.000Z"
    }
  }
}
```

***

## Update a workspace

`PUT /api/workspaces/{id}`

**Body**

```json theme={null}
{
  "name": "Acme Production (renamed)",
  "customDomain": "reports.acme.com"
}
```

Only `name` and `customDomain` are updatable. The `domain` field is immutable once the workspace is created.

**Response (200)**

```json theme={null}
{
  "success": true,
  "data": {
    "workspace": { ... }
  }
}
```

***

## Delete a workspace

Permanently removes the workspace and all audits, findings, schedules, and reports within it.

`DELETE /api/workspaces/{id}`

**Response (200)**

```json theme={null}
{
  "success": true,
  "message": "Workspace deleted"
}
```

<Warning>
  This cannot be undone. Running audits in the workspace are immediately terminated. Stored PDFs and recordings are purged.
</Warning>
