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

# Administration API: Workspaces

> Create, update, delete, and list your account's workspaces, and read their dbt™ version, branches, and partial parsing setting with the Administration API.

Manage the workspaces of your Paradime account from code: create a workspace for a new team, change its name, dbt™ version and branches, read its settings, and delete it.

> [!NOTE]
>
> **Prerequisites:**
>
> * Reading workspaces and their settings works on every plan. `createWorkspace`, `updateWorkspace`, and `deleteWorkspace` are part of the Enterprise plan; on other plans, they fail with `PLAN_UPGRADE_REQUIRED`.
> * An account API key. `createWorkspace`, `updateWorkspace`, and `deleteWorkspace` need an account API key and no `X-Paradime-Workspace` header. A workspace API key can read only its own workspace.
> * The **Workspace admin** capability group to create, update, and delete workspaces. To list workspaces and read their settings, **Workspace admin** or **Workspace metadata viewer** is enough.
>
> Keys, errors, and pagination work the same in every area. See [Conventions](https://docs.paradime.io/developers/graphql-api/admin-api/conventions.md).

## Operations

| Operation | Type | What it does | Capability group |
| - | - | - | - |
| [`workspace`](https://docs.paradime.io/graphql-reference/queries/workspace) | Query | Reads one workspace the key can reach: the targeted one, or the one you name with `workspaceUid`. | Any key for `uid`, `name`, and `createdAt` |
| [`workspaces`](https://docs.paradime.io/graphql-reference/queries/workspaces) | Query | Lists every workspace the key can reach, ordered by UID. | Workspace admin or Workspace metadata viewer |
| [`Workspace.dbtVersion`](https://docs.paradime.io/graphql-reference/types/Workspace) | Field | Reads the dbt™ version the workspace runs. `supportedDbtVersions` lists the versions you can set. | Workspace admin or Workspace metadata viewer |
| [`Workspace.dbtPartialParsing`](https://docs.paradime.io/graphql-reference/types/Workspace) | Field | Reads whether dbt™ partial parsing is on. | Workspace admin or Workspace metadata viewer |
| [`Workspace.defaultBranch`](https://docs.paradime.io/graphql-reference/types/Workspace) | Field | Reads the git branch Paradime treats as the repository's default. `scheduleDeploymentBranch` reads the branch Bolt schedules deploy from. | Workspace admin or Workspace metadata viewer |
| [`createWorkspace`](https://docs.paradime.io/graphql-reference/mutations/createWorkspace) | Mutation | Creates a workspace and gives the calling key access to it. Account keys only. Enterprise plan. | Workspace admin |
| [`updateWorkspace`](https://docs.paradime.io/graphql-reference/mutations/updateWorkspace) | Mutation | Changes a workspace's name, dbt™ version, partial parsing, and branches. Account keys only. Enterprise plan. | Workspace admin |
| [`deleteWorkspace`](https://docs.paradime.io/graphql-reference/mutations/deleteWorkspace) | Mutation | Deletes a workspace. Account keys only. Enterprise plan. | Workspace admin |

The other fields of [`Workspace`](https://docs.paradime.io/graphql-reference/types/Workspace), such as `environments` and `gitRepository`, belong to their own areas. Each one needs its own capability group.

> [!TIP]
>
> For new code, use `workspaces` rather than `listWorkspaces` from the [Workspace Management API](https://docs.paradime.io/developers/graphql-api/api-reference/workspace-management-api). `workspaces` pages its results, and its workspaces return the settings fields. A `Workspace` that you read through `listWorkspaces` returns `null` for every field except `uid` and `name`.

## List workspaces and their settings

`workspaces` lists the workspaces the key can reach: every workspace that you granted to an account API key, or the own workspace of a workspace API key. It needs no `X-Paradime-Workspace` header, and one query reads the settings of every workspace on the page.

```graphql theme={"system"}
query ListWorkspaces($first: Int, $after: String) {
  workspaces(first: $first, after: $after) {
    totalCount
    pageInfo {
      hasNextPage
      endCursor
    }
    edges {
      node {
        uid
        name
        createdAt
        dbtVersion
        supportedDbtVersions
        dbtPartialParsing
        defaultBranch
        scheduleDeploymentBranch
      }
    }
  }
}
```

```json theme={"system"}
{ "first": 100, "after": null }
```

> [accordion] Example response
>
> ```json theme={"system"}
> {
>   "data": {
>     "workspaces": {
>       "totalCount": 1,
>       "pageInfo": { "hasNextPage": false, "endCursor": "WyJhMWIyYzNkNGU1ZjZnN2g4Il0=" },
>       "edges": [
>         {
>           "node": {
>             "uid": "a1b2c3d4e5f6g7h8",
>             "name": "Analytics",
>             "createdAt": "2026-03-02T09:12:44+00:00",
>             "dbtVersion": "1.11",
>             "supportedDbtVersions": ["1.10", "1.11"],
>             "dbtPartialParsing": true,
>             "defaultBranch": "main",
>             "scheduleDeploymentBranch": null
>           }
>         }
>       ]
>     }
>   }
> }
> ```

To read one workspace, use `workspace`. Leave out `workspaceUid` to read the workspace the key targets: a workspace key's own, or the one in the `X-Paradime-Workspace` header.

```graphql theme={"system"}
query ReadWorkspace($workspaceUid: String) {
  workspace(workspaceUid: $workspaceUid) {
    uid
    name
    dbtVersion
  }
}
```

```json theme={"system"}
{ "workspaceUid": "a1b2c3d4e5f6g7h8" }
```

A key with no settings group can still read `uid`, `name`, and `createdAt`. A settings field it can't read returns `null` with a `MISSING_CAPABILITY` error.

## Create a workspace

`createWorkspace` creates a workspace with no members. Paradime sets it up as the app does: it gets a default Bolt environment, and a default agent environment that defers to it. Paradime also adds the new workspace to the workspaces of the calling key, so the same key can target it on its next request.

* `name` must be unique among your account's workspaces, ignoring case.
* `dbtVersion` must be one of `supportedDbtVersions`. Leave it out for the latest version.
* Sending the same input again returns the same workspace. A workspace with the same name and another `dbtVersion` is a `CONFLICT`.

```graphql theme={"system"}
mutation CreateWorkspace($input: CreateWorkspaceInput!) {
  createWorkspace(input: $input) {
    workspace {
      uid
      name
      dbtVersion
    }
  }
}
```

```json theme={"system"}
{
  "input": {
    "name": "Marketing analytics",
    "dbtVersion": "1.11"
  }
}
```

> [accordion] Example response
>
> ```json theme={"system"}
> {
>   "data": {
>     "createWorkspace": {
>       "workspace": {
>         "uid": "q9w8e7r6t5y4u3i2",
>         "name": "Marketing analytics",
>         "dbtVersion": "1.11"
>       }
>     }
>   }
> }
> ```

Then set up the new workspace. Send its `uid` in the `X-Paradime-Workspace` header:

**1. Invite the first admin**

Invite a person with the Admin role with [`createUser`](https://docs.paradime.io/developers/graphql-api/admin-api/users#invite-a-user).

**2. Connect the repository**

Connect the dbt™ project's repository with [`connectGitRepository`](https://docs.paradime.io/developers/graphql-api/admin-api/git-repositories).

**3. Add the warehouse connections**

Add the warehouse connections with [`createWarehouseConnection`](https://docs.paradime.io/developers/graphql-api/admin-api/warehouse-connections).

**4. Check what is left**

Read the [setup status](https://docs.paradime.io/developers/graphql-api/admin-api/setup-status.md) checklist.

The guide [Onboard a workspace with the API](https://docs.paradime.io/guides/set-up-and-configure/onboard-a-workspace-with-the-api.md) runs every step in order.

## Change a workspace's settings

`updateWorkspace` changes only the settings you send. A setting that you leave out keeps its value.

| Input | What it changes |
| - | - |
| `name` | The workspace name, unique among your account's workspaces. |
| `dbtVersion` | The dbt™ version, one of `supportedDbtVersions`. Paradime restarts the workspace's editors and redeploys its Bolt schedules. |
| `dbtPartialParsing` | Whether dbt™ uses partial parsing. |
| `defaultBranch` | The branch Paradime treats as the repository's default. `null` clears it. Paradime reparses the Bolt schedules. |
| `scheduleDeploymentBranch` | The branch Bolt schedules deploy from. `null` deploys from the default branch. Paradime reparses the Bolt schedules. |

`name`, `dbtVersion`, and `dbtPartialParsing` can't be `null`: to keep a value, leave the field out.

```graphql theme={"system"}
mutation UpdateWorkspace($input: UpdateWorkspaceInput!) {
  updateWorkspace(input: $input) {
    workspace {
      uid
      name
      dbtVersion
      dbtPartialParsing
      defaultBranch
      scheduleDeploymentBranch
    }
  }
}
```

```json theme={"system"}
{
  "input": {
    "workspaceUid": "q9w8e7r6t5y4u3i2",
    "dbtVersion": "1.11",
    "defaultBranch": "main",
    "scheduleDeploymentBranch": "release"
  }
}
```

## Delete a workspace

`deleteWorkspace` deletes a workspace and removes its members from it. The name is free to use again. You can't delete your account's last workspace.

> [!WARNING]
>
> Deleting a workspace removes every member's access to it. The API can't restore a deleted workspace.

Deleting a workspace that is already deleted is not an error: the call returns the deleted workspace again. Its settings fields read as `null`.

```graphql theme={"system"}
mutation DeleteWorkspace($input: DeleteWorkspaceInput!) {
  deleteWorkspace(input: $input) {
    workspace {
      uid
      name
    }
  }
}
```

```json theme={"system"}
{ "input": { "workspaceUid": "q9w8e7r6t5y4u3i2" } }
```

## Errors

These are the cases specific to workspaces. For the error format and the codes every area shares, see [Errors](https://docs.paradime.io/developers/graphql-api/admin-api/conventions.md#errors).

| Code | When |
| - | - |
| `CONFLICT` | Another workspace already has the name, or a workspace with the name exists with another `dbtVersion`. Or the workspace is your account's last workspace, on delete. |
| `MISSING_CAPABILITY` | A workspace API key called `createWorkspace`, `updateWorkspace`, or `deleteWorkspace`. |
| `PLAN_UPGRADE_REQUIRED` | The account isn't on the Enterprise plan and called `createWorkspace`, `updateWorkspace`, or `deleteWorkspace`. |
| `NOT_FOUND` | The key can't reach a workspace with the `workspaceUid`. `extensions.field` is `["workspaceUid"]` on `workspace` and `["input", "workspaceUid"]` on the mutations. |
| `PLAN_UPGRADE_REQUIRED` | Your account has used every workspace that its plan allows. |
| `VALIDATION_FAILED` | The name is blank. The `dbtVersion` is not one your account can use. `name`, `dbtVersion`, or `dbtPartialParsing` is `null` on update. |

## Related

* [Python SDK: Workspaces](https://docs.paradime.io/developers/python-sdk/modules/admin/workspaces.md): the same operations in `paradime.admin.workspaces`.
* [Paradime CLI: `paradime admin`](https://docs.paradime.io/developers/paradime-cli/admin-cli): `paradime admin workspaces` lists, creates, updates, and deletes workspaces.
* [Rename or delete a workspace](https://docs.paradime.io/products/settings/configuration/rename-or-delete-workspace.md) and [Manage dbt™ version](https://docs.paradime.io/products/settings/configuration/manage-dbt-version.md): the same settings in the app.
* [Administration API: Users](https://docs.paradime.io/developers/graphql-api/admin-api/users): invite the first members of a new workspace.
* [Administration API: Setup status](https://docs.paradime.io/developers/graphql-api/admin-api/setup-status.md): what a new workspace still needs.


## Related topics

- [Administration API](https://docs.paradime.io/developers/graphql-api/admin-api/index.md)
- [Administration API: API keys](https://docs.paradime.io/developers/graphql-api/admin-api/api-keys.md)
- [Administration API: Conventions](https://docs.paradime.io/developers/graphql-api/admin-api/conventions.md)
- [Administration API: Usage](https://docs.paradime.io/developers/graphql-api/admin-api/usage.md)
- [Administration API: Notifications](https://docs.paradime.io/developers/graphql-api/admin-api/notifications.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.