> ## 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: Conventions

> How every Administration API operation authenticates, targets a workspace, reports typed errors, limits requests, pages lists, runs jobs, and keeps secrets.

Every Administration API operation follows the rules on this page. The area pages describe only what is specific to each area.

> [!NOTE]
>
> **Prerequisites:**
>
> * Some areas of the Administration API are part of the Enterprise plan: creating, updating, and deleting workspaces, git repositories, warehouse connections, environments, environment variables, integrations, notifications, and usage. On other plans, those operations fail with `PLAN_UPGRADE_REQUIRED`. Every other operation works on every plan. See [Plans](https://docs.paradime.io/developers/graphql-api/admin-api/index#plans).
> * An [API key](https://docs.paradime.io/developers/api-keys.md) that holds the [capability groups](#capability-groups) of the operations you call.

## Authentication

Send every request as a `POST` to your API endpoint, with the `Content-Type: application/json` header and your API key. The Administration API uses the same endpoint as every other Paradime GraphQL operation. Use the endpoint that Paradime shows when you generate the key. It has the form `https://<host>/api/v1/<company_token>/graphql`, and the host depends on your region.

| Key | Where you create it | Headers |
| - | - | - |
| Account API key | **Settings > API Keys**, **Company** tab | `Authorization: Bearer <token>`. The token starts with `prdm_cmp_`. For an operation on one workspace, also send `X-Paradime-Workspace: <workspace UID>`. |
| Workspace API key | **Settings > API Keys**, **Workspace** tab | `X-API-KEY: <API Key>` and `X-API-SECRET: <API Secret>`. If the secret starts with `prdm_wsp_`, you can send `Authorization: Bearer <API Secret>` instead. |

The schema calls an account API key a company API key, for example in `CompanyApiKey` and `createCompanyApiKey`. The keys that `createApiKey` and `createCompanyApiKey` return are bearer tokens.

```bash Account API key theme={"system"}
curl -X POST "<YOUR_API_ENDPOINT>" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "X-Paradime-Workspace: <YOUR_WORKSPACE_UID>" \
  -d '{"query": "query { workspace { uid name } }"}'
```

```bash Workspace API key theme={"system"}
curl -X POST "<YOUR_API_ENDPOINT>" \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: <YOUR_API_KEY>" \
  -H "X-API-SECRET: <YOUR_API_SECRET>" \
  -d '{"query": "query { workspace { uid name } }"}'
```

Every valid key can read the `uid`, `name`, and `createdAt` of its workspace, so this request is a quick check of the key and the header:

```json theme={"system"}
{ "data": { "workspace": { "uid": "a1b2c3d4e5f6g7h8", "name": "Analytics" } } }
```

## Target a workspace

* **Workspace API key.** The key always acts on its own workspace. It can't reach another workspace, and it needs no `X-Paradime-Workspace` header.
* **Account API key.** The key reaches the workspaces you selected when you created it. For an operation on one workspace, send `X-Paradime-Workspace` with the workspace UID:
  * Without the header, the operation fails with `WORKSPACE_REQUIRED`.
  * With the UID of a workspace that the key was not granted, the request fails with `MISSING_CAPABILITY`.

Writes always act on the workspace that the key targets. Reads can name the workspace in the query instead: `workspace(workspaceUid: "...")` reads one workspace, and `workspaces` lists every workspace the key reaches. The fields under a workspace read that workspace, so one query can read several workspaces without the header.

The account-level operations need an account API key and no header: `createWorkspace`, `updateWorkspace`, `deleteWorkspace`, `companyApiKeys`, `createCompanyApiKey`, `revokeCompanyApiKey`, and `disconnectSlack`. A workspace API key that calls one of them gets `MISSING_CAPABILITY`.

The workspace UID is the value that the [Company & Workspace token](https://docs.paradime.io/developers/company-and-workspace-token.md) page calls `workspace_token`. You can also read it from `workspaces`.

## Capability groups

You choose what a key can do when you create it: in **Settings > API Keys**, under **Capabilities**, or in the `capabilityGroups` input of `createApiKey` and `createCompanyApiKey`. Each capability group grants a set of capabilities, such as `environments:read`. The reference pages name the capability that each field needs.

> [!WARNING]
>
> A key keeps the capabilities that its groups granted when you created it. To give a key more access, create a new key with the groups you need, then revoke the old key. A key that you created before your account had the Administration API holds no Administration API group.

The Administration API adds these groups. The key creation screen shows the groups that your plan includes. Groups for Enterprise areas show only on the Enterprise plan.

| Capability group | Key types | Capabilities | Area |
| - | - | - | - |
| **Workspace admin** | Account API keys only | `workspaces:list`, `workspaces:create`, `workspaces:update`, `workspaces:delete` | [Workspaces](https://docs.paradime.io/developers/graphql-api/admin-api/workspaces), [Setup status](https://docs.paradime.io/developers/graphql-api/admin-api/setup-status.md) |
| **Git repository admin** | Both | `git:read`, `git:write` | [Git repositories](https://docs.paradime.io/developers/graphql-api/admin-api/git-repositories) |
| **Warehouse connections admin** | Both | `connections:read`, `connections:write` | [Warehouse connections](https://docs.paradime.io/developers/graphql-api/admin-api/warehouse-connections) |
| **Environment admin** | Both | `environments:read`, `environments:write` | [Environments](https://docs.paradime.io/developers/graphql-api/admin-api/environments) |
| **Environment variables admin** | Both | `env_vars:read`, `env_vars:write` | [Environment variables](https://docs.paradime.io/developers/graphql-api/admin-api/environment-variables) |
| **Environment variable values viewer** | Both | `env_vars:reveal` | [Environment variables](https://docs.paradime.io/developers/graphql-api/admin-api/environment-variables) |
| **Bolt admin** | Both | `bolt:schedules:list`, `bolt:schedule:create`, `bolt:schedule:update`, `bolt:schedule:delete`, `bolt:schedule:parse`, `bolt:trigger_urls:read`, `bolt:trigger_urls:write` | [Bolt](https://docs.paradime.io/developers/graphql-api/admin-api/bolt) |
| **Notifications admin** | Both | `notifications:read`, `notifications:write` | [Notifications](https://docs.paradime.io/developers/graphql-api/admin-api/notifications) |
| **Integrations admin** | Both | `integration_settings:read`, `integration_settings:write` | [Integrations](https://docs.paradime.io/developers/graphql-api/admin-api/integrations) |
| **External secret managers admin** | Both | `external_secrets:read`, `external_secrets:write` | [Integrations](https://docs.paradime.io/developers/graphql-api/admin-api/integrations) |
| **DinoAI admin** | Both | `dinoai:admin:read`, `dinoai:admin:write`, `budgets:write` | [DinoAI](https://docs.paradime.io/developers/graphql-api/admin-api/dinoai) |
| **User access admin** | Both | `users:admin:read`, `users:admin:write` | [Users](https://docs.paradime.io/developers/graphql-api/admin-api/users) |
| **User access viewer** | Both | `users:admin:read` | [Users](https://docs.paradime.io/developers/graphql-api/admin-api/users) |
| **Usage viewer** | Both | `usage:read` | [Usage](https://docs.paradime.io/developers/graphql-api/admin-api/usage) |
| **API keys admin** | Both | `api_keys:read`, `api_keys:write` | [API keys](https://docs.paradime.io/developers/graphql-api/admin-api/api-keys) |

**Git repository admin** also covers the older `gitRepository` query and `setGitRepository` mutation. These older groups also unlock some Administration API operations:

| Capability group | Administration API operations |
| - | - |
| **Workspace metadata viewer** (`workspaces:list`) | `workspaces`, the workspace settings fields such as `Workspace.dbtVersion`, and `Workspace.setupStatus` |
| **Discovery API viewer** (`discovery:read`) | `Environment.discovery` |
| **Bolt schedules metadata viewer** (`bolt:schedules:list`) | `Workspace.boltSchedules` and `Environment.deferSchedule` |
| **Bolt schedules admin** (`bolt:schedules:list`, `bolt:schedule:create`, `bolt:schedule:delete`, and more) | `Workspace.boltSchedules`, `Environment.deferSchedule`, `createBoltScheduleDefinition`, and `deleteBoltScheduleDefinition` |

To see the capabilities a key holds, read `apiKeyIdentity { capabilities }`.

## Errors

Errors come back in the top-level `errors` array, as in any GraphQL API. Every Administration API error has a code in `extensions.code`. An error about the input also has `extensions.field`: the path to the input field, as a list. Make your scripts branch on the code, not on the message: the message text can change.

```json theme={"system"}
{
  "errors": [
    {
      "message": "An environment with this slug already exists with other settings.",
      "locations": [{ "line": 2, "column": 3 }],
      "path": ["createEnvironment"],
      "extensions": { "code": "CONFLICT", "field": ["input", "slug"] }
    }
  ],
  "data": null
}
```

A path into a list uses the item's position as a string, for example `["input", "variables", "0", "name"]`.

| Code | What it means | What to do |
| - | - | - |
| `UNAUTHENTICATED` | The API key is missing, not valid, expired, or revoked. | Check the headers. Create a new key if this one expired. |
| `MISSING_CAPABILITY` | The key does not hold the capability. Or the `X-Paradime-Workspace` header names a workspace that the key was not granted. Or a workspace API key called an operation that needs an account API key. | Create a key with the group or the workspace you need. |
| `WORKSPACE_REQUIRED` | An account API key called a workspace operation without the `X-Paradime-Workspace` header. | Send the header. |
| `NOT_FOUND` | The object does not exist, or the key can't reach it. | Check the UID, slug, or name. |
| `VALIDATION_FAILED` | The input is not valid. `extensions.field` names the input field. A query over the [query limits](#query-limits) fails with this code too. | Correct the input. |
| `CONNECTION_TEST_FAILED` | Paradime could not open a connection with the settings: to a warehouse, an integration, a secret manager, or a repository. Paradime saved nothing. | Read the message, then correct the settings. |
| `CONFLICT` | The operation conflicts with the current state. For example, an object with the same key exists with other settings. | Read the current object, then change the input or the object. |
| `RATE_LIMITED` | The key sent too many requests. | Wait for `retryAfter` seconds, then send the same request again. See [Rate limits](#rate-limits). |
| `PLAN_UPGRADE_REQUIRED` | Your account's plan does not include the operation. | Contact Paradime. |
| `INTERNAL` | An unexpected error occurred. The message holds a reference ID, never the internal error. | Contact support and give the reference ID. |

Errors that occur while an operation runs come back with HTTP status `200`. Two checks run before the operation and use other statuses: the rate limit (`429`) and the query limits (`400`).

An error in one field does not stop the other fields. A field that the key can't read returns `null` with its own error, and the rest of the query returns data. Check `errors` even when `data` holds values.

## Rate limits

Each API key has two budgets over a sliding window of 60 seconds:

| Budget | Requests per minute, per key |
| - | - |
| Reads: every request whose operation is a query | 1,200 |
| Writes: every request whose operation is a mutation | 300 |

The limits apply to every request that the key sends to the endpoint, the older operations included. When a key is over a budget, Paradime does not run the request. The response has HTTP status `429`, a `Retry-After` header in seconds, and a `RATE_LIMITED` error with the `budget` and `retryAfter`:

```json theme={"system"}
{
  "errors": [
    {
      "message": "Rate limit exceeded for this API key's writes. Retry in 12 seconds.",
      "extensions": { "code": "RATE_LIMITED", "budget": "write", "retryAfter": 12 }
    }
  ]
}
```

Paradime did not run the refused request, so you can send it again after the wait, mutations included. A refused request does not count against the budget. The [Python SDK admin client](https://docs.paradime.io/developers/python-sdk/modules/admin/index) waits and retries for you.

## Query limits

Paradime checks the size of a query before it runs any part of it:

| Limit | Maximum |
| - | - |
| Depth: field levels on the longest path | 15 |
| Aliases, in the whole request | 30 |
| Fields, with fragments expanded | 500 |
| Fragment nesting | 15 |

A query over a limit fails with HTTP status `400`, no `data`, and one `VALIDATION_FAILED` error for each limit it exceeds, for example `The query uses 31 aliases; the limit is 30.` A fragment that you spread twice counts twice.

## Introspection

The endpoint does not answer introspection queries: `__schema` and `__type` fail with `Introspection disabled`. `__typename` works, so you can tell the members of a union apart. To browse the schema, use the [API reference](https://docs.paradime.io/developers/graphql-api/api-reference), for example the [`Workspace`](https://docs.paradime.io/graphql-reference/types/Workspace) type.

## Pagination

Lists are connections, in the shape that the [Discovery API](https://docs.paradime.io/developers/graphql-api/api-reference/discovery-api) uses:

* `edges` holds one page. Each edge has a `cursor` and a `node`, in the order that the connection's description gives.
* `pageInfo` tells you if there is another page (`hasNextPage`) and where it starts (`endCursor`).
* `totalCount` counts the items on all pages.

Every connection takes two arguments:

* `first`: how many items to return. The default is 100 and the maximum is 500. A larger value returns 500 items. `first: 0` returns only `totalCount`.
* `after`: the `endCursor` of the previous page. A cursor that the API did not return fails with `VALIDATION_FAILED` on `after`.

```graphql theme={"system"}
query EnvironmentsPage($first: Int, $after: String) {
  workspace {
    environments(first: $first, after: $after) {
      totalCount
      pageInfo {
        hasNextPage
        endCursor
      }
      edges {
        node {
          slug
          type
        }
      }
    }
  }
}
```

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

To read the next page, send the same query with `after` set to the `endCursor` you received. Stop when `hasNextPage` is `false`.

## Async jobs

Some mutations start work that takes longer than one request. They return an `AdminJob` at once, and the work continues in the background:

| Mutation | `kind` | `result` type | Time limit |
| - | - | - | - |
| [`connectGitRepository`](https://docs.paradime.io/graphql-reference/mutations/connectGitRepository), with `deployKey` and `validate: true` | `CONNECT_GIT_REPOSITORY` | `GitRepositoryConnectResult` | 5 minutes |
| [`checkGitRepository`](https://docs.paradime.io/graphql-reference/mutations/checkGitRepository) | `CHECK_GIT_REPOSITORY` | `GitRepositoryCheckResult` | 2 minutes |
| [`deployBoltSchedules`](https://docs.paradime.io/graphql-reference/mutations/deployBoltSchedules) | `DEPLOY_BOLT_SCHEDULES` | `DeployBoltSchedulesResult` | 15 minutes |
| [`syncDinoAiAgentDefinitionsFromCode`](https://docs.paradime.io/graphql-reference/mutations/syncDinoAiAgentDefinitionsFromCode) | `SYNC_DINOAI_AGENT_DEFINITIONS_FROM_CODE` | `DinoAiAgentSyncResult` | 10 minutes |

Poll [`adminJob`](https://docs.paradime.io/graphql-reference/queries/adminJob) with the job `id` until `status` is `SUCCEEDED` or `FAILED`:

| `status` | What it means |
| - | - |
| `QUEUED` | Paradime accepted the job, and the job waits to start. |
| `RUNNING` | The job started and is not finished. |
| `SUCCEEDED` | The job finished. `result` holds what it produced. |
| `FAILED` | The job did not do its work. `failure.code` and `failure.reason` tell you why. |

Treat `QUEUED` and `RUNNING` the same: the job is not finished. `result` is a union, one type for each `kind`, so select its fields with an inline fragment:

```graphql theme={"system"}
query PollJob($jobId: String!) {
  adminJob(jobId: $jobId) {
    id
    kind
    status
    failure {
      code
      reason
    }
    result {
      __typename
      ... on GitRepositoryConnectResult {
        uri
        provider
        dbtProjectDir
      }
      ... on GitRepositoryCheckResult {
        uri
      }
    }
    updatedAt
  }
}
```

```json theme={"system"}
{ "jobId": "k3j9x0q2m5n8p1r4t7w0y3a6c9e2g5h8" }
```

> [accordion] Example response
>
> ```json theme={"system"}
> {
>   "data": {
>     "adminJob": {
>       "id": "k3j9x0q2m5n8p1r4t7w0y3a6c9e2g5h8",
>       "kind": "CONNECT_GIT_REPOSITORY",
>       "status": "SUCCEEDED",
>       "failure": null,
>       "result": {
>         "__typename": "GitRepositoryConnectResult",
>         "uri": "git@github.com:acme/analytics.git",
>         "provider": "GITHUB",
>         "dbtProjectDir": null
>       },
>       "updatedAt": "2026-11-27T10:15:42+00:00"
>     }
>   }
> }
> ```

* A job that is still running when its time limit ends reads as `FAILED`, with the code `INTERNAL` and the reason `The job did not finish within its time limit.`
* If Paradime finds an error before the work starts, such as an input that is not valid, the mutation itself fails. The job reports only what happens after the work starts.
* Only the API key that started a job can read it, and only in the workspace where it runs. With an account API key, send that workspace's UID in `X-Paradime-Workspace`. Another key, or another workspace, gets `NOT_FOUND`.
* Reading a job needs no capability group of its own.
* Poll every few seconds. Each poll counts against the key's read budget.

## Secrets

Secrets go in, and they never come out. No query returns a password, a private key, a token, or a variable value.

* Reads tell you that a secret is set, and sometimes when it changed or a short hint. Look for `has…` fields such as `hasPassword` on warehouse connection settings, `isSet` and `updatedAt` on environment variables, `secretUpdatedAt` on Trigger URLs, and `…Hint` fields such as `accessKeyIdHint` on secret managers.
* An update can leave a secret out, and the stored value stays. If a warehouse connection update changes the warehouse type or where the connection points, such as the Snowflake account, send every required secret again. Otherwise the update fails with `VALIDATION_FAILED`.
* To read a value, use the operation made for it, with its own capability group. Paradime writes every read to the audit log. The one such operation is `revealEnvironmentVariable`, which needs **Environment variable values viewer**.
* Some values show once, in the response that creates them: the `token` of a new API key (`createApiKey`, `createCompanyApiKey`), and the `secret` of a Trigger URL (`createTriggerUrl`, `rotateTriggerUrlSecret`). Store them at once. No query returns them again.
* Many secret inputs take a reference to a secret in AWS Secrets Manager, Azure Key Vault, or GCP Secret Manager in place of the value. To set up the secret manager, see [Integrations](https://docs.paradime.io/developers/graphql-api/admin-api/integrations).

## Pending user action

Some steps need a person in a browser: for example, to install the Paradime GitHub App, to connect Slack, or to connect an account through OAuth. The API does not fail on these steps. It reports the status `PENDING_USER_ACTION` and, if one exists, a URL for that person to open:

| Status field | URL field |
| - | - |
| `GitRepository.state` | `GitRepository.githubAppInstallUrl` |
| `SlackInstallation.status` | `SlackInstallation.installUrl` |
| `AgentIntegration.status` | `AgentIntegration.installUrl` |
| `WorkspaceSetupStep.status` | `WorkspaceSetupStep.installUrl` |

An API call can't finish these steps. Send the URL to the person, then read the object again until its status changes. The [setup status](https://docs.paradime.io/developers/graphql-api/admin-api/setup-status.md) checklist lists every step that waits for a person.

## Audit log

Every write through the Administration API adds an entry to the [audit log](https://docs.paradime.io/products/settings/configuration/audit-logs.md) of the workspace it changes, with the API key as the actor. The entry's metadata names the key in `actor_api_key`: its `key_type` (`company` or `workspace`), its `id`, and its `name`. Read the entries in the app, or with the [Audit Logs API](https://docs.paradime.io/developers/graphql-api/api-reference/audit-logs-api).

A write that changes nothing, such as the same input sent twice, adds no entry. `revealEnvironmentVariable` adds an entry for every value it reads.

## Idempotency and natural keys

Operations name objects by natural keys, not by internal IDs: a workspace by its `uid`, an environment, a schedule, or an agent by its `slug`, a variable by its `name`, and a warehouse connection by its scope, environment slug, and `connectionId`. A slug never changes after you create it.

You can send every write again safely. The verb tells you what a second call does:

| Verb | The same input again | A different state |
| - | - | - |
| `create…` | Returns the existing object, unchanged | The same key with other settings fails with `CONFLICT` |
| `update…` | Changes nothing | An object that does not exist fails with `NOT_FOUND` |
| `delete…` | Succeeds | |
| `set…`, for settings and other single values | Changes nothing | Creates or replaces the value |

A write that changes nothing also starts no redeploy and adds no audit entry. Some operations work differently:

* `createUser` answers an email that already belongs to a user or to a pending invitation with `CONFLICT`.
* `createApiKey` and `createCompanyApiKey` answer a name that a working key already has with `CONFLICT`. A retry can't create a second key whose token nobody saw.
* A `create…` that can make a slug for you, such as `createEnvironment`, creates a new object on every call when you leave out the slug. Send your own slug to make the call safe to retry.
* `rotateGitDeployKey` and `rotateTriggerUrlSecret` make a new key or secret on every call.

## Versioning and deprecation

The Paradime GraphQL API has one schema, with no versions. It changes by addition: new types, fields, and operations can appear at any time. A client gets only the fields it selects, so an addition does not break it.

Paradime removes a field only after a deprecation. The deprecation reason gives the removal date in the form `Removal: YYYY-MM-DD`, at least three months after the deprecation ships. The [API reference](https://docs.paradime.io/developers/graphql-api/api-reference) shows deprecated fields with their reason.

## Related

* [Administration API overview](https://docs.paradime.io/developers/graphql-api/admin-api): the areas and how they differ from the older operations.
* [API keys](https://docs.paradime.io/developers/api-keys.md): create account and workspace API keys in the app.
* [Python SDK: Administration API](https://docs.paradime.io/developers/python-sdk/modules/admin/index): typed errors, pages as iterators, job waits, and rate limit retries.
* [Paradime CLI: `paradime admin`](https://docs.paradime.io/developers/paradime-cli/admin-cli): the same operations from the terminal.


## 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: Bolt](https://docs.paradime.io/developers/graphql-api/admin-api/bolt.md)
- [Administration API: Notifications](https://docs.paradime.io/developers/graphql-api/admin-api/notifications.md)
- [Administration API: Users](https://docs.paradime.io/developers/graphql-api/admin-api/users.md)


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