{
  "openapi": "3.1.1",
  "info": {
    "title": "Users and access API",
    "description": "Manage who can use your DigiCert DNS account and what they can do. Enable and disable users,\ncreate service users for scripts and integrations, and grant roles to both. Create and delete\nthe API tokens they use to call the DigiCert DNS APIs, list the available roles, and check the\neffective permissions of any user or service user, including your own. Each request acts on\nthe account that owns the API key, so account IDs never appear in the path.\n",
    "version": "2.0.0"
  },
  "servers": [
    {
      "url": "https://api.dns.digicert.com/v1",
      "description": "Production"
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "tags": [
    {
      "name": "Me",
      "description": "The `/me` operations act on you: the user or service user whose\ncredential made the request. Get your account and identity, get your\neffective permissions, and list, create, update, and delete your own\nAPI tokens.\n"
    },
    {
      "name": "Users",
      "description": "A user is a person in your account who signs in to DigiCert DNS. List\nand get users, and enable or disable them. You manage a user's roles\nand API tokens through the Role Assignments and API Tokens operations.\n"
    },
    {
      "name": "Service Users",
      "description": "A service user is a non-human identity, such as a script or an\nintegration, that authenticates only with API tokens. Create, list,\nget, update, and delete service users. You manage a service user's\nroles and API tokens through the Role Assignments and API Tokens\noperations.\n\nSome service users are protected. You can't change a protected service\nuser's name, description, enabled state, or role assignments, or\ncreate, update, or delete its API tokens. If you try, the API returns\n`403 SERVICE_USER_IMMUTABLE`. You can still delete a protected service\nuser. You can't set or remove protection through this API. If you think\na service user is protected by mistake, contact DigiCert Support.\n"
    },
    {
      "name": "Role Assignments",
      "description": "A role assignment grants a role to a user or service user across your\naccount. The role determines its scope, and you can't choose it. Its\n`principalId` identifies who holds it. A\nprincipal is the identity that roles and tokens attach to: a user or a\nservice user. List, add, replace, and revoke the role assignments of a\nuser or service user. Changes apply to their effective permissions\nright away.\n\nEvery user and service user also holds the built-in `self` role, which\nlets them use the `/me` operations. The role assignment lists don't\ninclude it, but `principal.roleAssignments` does, and you can't assign\nor revoke it. You can't change your own role assignments.\n"
    },
    {
      "name": "Roles",
      "description": "A role is a named set of permissions, such as Zone Editor. System roles\n(`isSystem: true`) are built in and are the same in every account. List\nroles, get a role, and get every permission a role grants. Roles are\nread-only through this API: you can't create, change, or delete them,\nand you can't change `isSystem`.\n"
    },
    {
      "name": "API Tokens",
      "description": "An API token is the secret that a user or service user sends in the\n`X-API-Key` header to call the DigiCert DNS APIs. List, create, update,\nand delete the API tokens of a user or service user in your account. To\nmanage your own tokens, use the `/me/tokens` operations.\n\nThe token value appears only in the response to the create request, so\nstore it securely. Later reads show only the token prefix\n(`tokenPrefix`), which is the first 12 characters of the token value.\nDisabling or deleting a token stops it working right away.\n"
    },
    {
      "name": "Permissions",
      "description": "Effective permissions are what a user or service user can do once all\ntheir roles are combined. Get the effective permissions of a user or\nservice user in your account. To get your own, use\n`GET /me/permissions:effective`.\n"
    }
  ],
  "paths": {
    "/me": {
      "get": {
        "operationId": "getMe",
        "x-required-permission": "account.self:read",
        "summary": "Get your account and identity",
        "description": "Returns the account you're acting in and your own identity: your user\nor service user details. Use it to check which user or service user an\nAPI key belongs to.\n\n- If you're a user, the response includes a `user` object.\n- If you're a service user, the response includes a `serviceUser`\n  object.\n\nEither object includes a `principal` object with your enabled state,\nyour role assignments, and your API token count.\n",
        "tags": [
          "Me"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "responses": {
          "200": {
            "description": "Your account, and your user or service user details.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeContext"
                },
                "examples": {
                  "humanUser": {
                    "summary": "A user",
                    "value": {
                      "account": {
                        "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
                        "name": "Example Corp",
                        "status": "ACTIVE"
                      },
                      "user": {
                        "id": "8b1e0d8a-7f3b-4a52-9c11-9a4e1d2c8f31",
                        "username": "jane.doe",
                        "email": "jane.doe@example.com",
                        "firstName": "Jane",
                        "lastName": "Doe",
                        "phone": "+1-555-0142",
                        "status": "ACTIVE",
                        "principal": {
                          "principalId": "0fa6b8d2-3c47-4e9d-bf1c-58be91e07a40",
                          "isEnabled": true,
                          "roleAssignments": [
                            {
                              "roleId": "9f8c2a14-2b1e-4f3a-8d2c-1b9e8d7c6a5b",
                              "name": "Zone Editor"
                            }
                          ],
                          "tokenCount": 2
                        },
                        "createdAt": "2025-11-04T13:21:09Z",
                        "updatedAt": "2026-05-02T09:18:33Z"
                      }
                    }
                  },
                  "serviceUser": {
                    "summary": "A service user",
                    "value": {
                      "account": {
                        "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
                        "name": "Example Corp",
                        "status": "ACTIVE"
                      },
                      "serviceUser": {
                        "id": "d1f23a4c-5e67-48b9-90a1-2c3d4e5f6789",
                        "accountId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
                        "name": "ci-deploy-bot",
                        "username": "d1f23a4c-5e67-48b9-90a1-2c3d4e5f6789",
                        "description": "Used by the CI pipeline to push DNS records.",
                        "status": "ACTIVE",
                        "createdBy": {
                          "id": "8b1e0d8a-7f3b-4a52-9c11-9a4e1d2c8f31",
                          "username": "jane.doe",
                          "type": "USER"
                        },
                        "principal": {
                          "principalId": "7b22e3a1-c9f4-4a18-b6e2-0d4f3a8e1c2b",
                          "isEnabled": true,
                          "roleAssignments": [
                            {
                              "roleId": "9f8c2a14-2b1e-4f3a-8d2c-1b9e8d7c6a5b",
                              "name": "Zone Editor"
                            }
                          ],
                          "tokenCount": 1
                        },
                        "createdAt": "2026-01-12T15:44:01Z",
                        "updatedAt": "2026-04-22T11:09:55Z"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/me/permissions:effective": {
      "get": {
        "operationId": "getMeEffectivePermissions",
        "x-required-permission": "account.self:read",
        "summary": "Get your effective permissions",
        "description": "Returns your effective permissions: what you can do in your account\nonce all your roles are combined. It works for users and service\nusers, and you don't need to know your own ID. The result is the same\nas `GET /users/{userId}/permissions:effective` or\n`GET /service-users/{serviceUserId}/permissions:effective` returns for\nyou.\n",
        "tags": [
          "Me"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "responses": {
          "200": {
            "description": "Your effective permissions.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EffectivePermissions"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/me/tokens": {
      "get": {
        "operationId": "listMyApiTokens",
        "x-required-permission": "account.self:read",
        "summary": "List your API tokens",
        "description": "Returns your own API tokens, one page at a time. The list includes\nenabled and disabled tokens. It never includes token values: each\ntoken shows only its token prefix.\n\nUse `name` to filter the list, and `sortBy` and `sortOrder` to order\nit.\n",
        "tags": [
          "Me"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/pageSize"
          },
          {
            "$ref": "#/components/parameters/pageToken"
          },
          {
            "$ref": "#/components/parameters/ApiTokenName"
          },
          {
            "$ref": "#/components/parameters/ApiTokenSortBy"
          },
          {
            "$ref": "#/components/parameters/ApiTokenSortOrder"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of your API tokens.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTokenList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "operationId": "createMyApiToken",
        "x-required-permission": "account.self:create",
        "summary": "Create an API token for yourself",
        "description": "Creates an API token for you. The response's `token` field holds the\ntoken value. The token value appears only in the response to the\ncreate request, so store it securely. Later reads show only the token\nprefix.\n\nIf you omit `expiresAt`, the token never expires. There's no maximum\nlifetime. If `expiresAt` isn't in the future, the API returns\n`400 INVALID_TOKEN_EXPIRATION`.\n\nIf you're a protected service user, the API returns\n`403 SERVICE_USER_IMMUTABLE`.\n",
        "tags": [
          "Me"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTokenCreate"
              },
              "examples": {
                "ciToken": {
                  "summary": "One-year token",
                  "value": {
                    "name": "my-cli-2026",
                    "description": "Personal CLI token.",
                    "expiresAt": "2027-05-22T00:00:00Z"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The API token was created. The `token` field holds the token value,\nwhich later reads don't return.\n",
            "headers": {
              "Location": {
                "$ref": "#/components/headers/Location"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-Idempotent-Replayed": {
                "$ref": "#/components/headers/XIdempotentReplayed"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTokenCreated"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/me/tokens/{tokenId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/TokenId"
        }
      ],
      "patch": {
        "operationId": "updateMyApiToken",
        "x-required-permission": "account.self:update",
        "summary": "Update one of your API tokens",
        "description": "Updates the name, description, or enabled state of one of your API\ntokens. Fields you omit stay the same. You can't change `expiresAt`\nafter you create a token.\n\nSetting `isEnabled` to `false` disables the token, and it stops\nworking right away. The API sets `revokedAt` when you disable the\ntoken and clears it when you enable the token again.\n\nIf you're a protected service user, the API returns\n`403 SERVICE_USER_IMMUTABLE`.\n",
        "tags": [
          "Me"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTokenUpdate"
              },
              "examples": {
                "disable": {
                  "summary": "Disable the token",
                  "value": {
                    "isEnabled": false
                  }
                },
                "rename": {
                  "summary": "Rename the token",
                  "value": {
                    "name": "my-cli-2027"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated API token.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-Idempotent-Replayed": {
                "$ref": "#/components/headers/XIdempotentReplayed"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiToken"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "operationId": "deleteMyApiToken",
        "x-required-permission": "account.self:delete",
        "summary": "Delete one of your API tokens",
        "description": "Permanently deletes one of your API tokens. The token stops working\nright away. DigiCert DNS records the deletion in the audit log.\n\nIf the token doesn't exist or isn't one of your API tokens, the API\nstill returns `204` and changes nothing.\n\nIf you're a protected service user, the API returns\n`403 SERVICE_USER_IMMUTABLE`.\n",
        "tags": [
          "Me"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "responses": {
          "204": {
            "description": "The API token was deleted, or it didn't exist. The response has no body.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-Idempotent-Replayed": {
                "$ref": "#/components/headers/XIdempotentReplayed"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/users": {
      "get": {
        "operationId": "listUsers",
        "x-required-permission": "account.iam.users:read",
        "summary": "List users",
        "description": "Returns the users in your account, one page at a time. Use the\nfilters to narrow the list, and `sortBy` and `sortOrder` to order it.\nWhen you use more than one filter, a user must match all of them.\n\n**Which users are listed**\n\nThe list includes `ACTIVE` and `INACTIVE` users. It never includes\n`DELETED`, `LOCKED`, or `PENDING` users, whatever filters you use.\n\n**Enabled state and status**\n\n- `isEnabled` shows whether the user is enabled in your account. You\n  set it with `PATCH /users/{userId}`.\n- `status` is the lifecycle status of the user's sign-in identity,\n  and it's separate from `isEnabled`. The `status` filter and the\n  `status` sort key are deprecated but still work. Use `isEnabled`\n  instead.\n\nThe `filter` and `sort` parameters are deprecated and ignored. Use\nthe other filter parameters, and `sortBy` and `sortOrder`, instead.\n",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/pageSize"
          },
          {
            "$ref": "#/components/parameters/pageToken"
          },
          {
            "$ref": "#/components/parameters/UserUsername"
          },
          {
            "$ref": "#/components/parameters/UserName"
          },
          {
            "$ref": "#/components/parameters/UserEmail"
          },
          {
            "$ref": "#/components/parameters/UserIsEnabled"
          },
          {
            "$ref": "#/components/parameters/UserStatusFilter"
          },
          {
            "$ref": "#/components/parameters/UserApiTokenCount"
          },
          {
            "$ref": "#/components/parameters/UserRoleIds"
          },
          {
            "$ref": "#/components/parameters/UserSortBy"
          },
          {
            "$ref": "#/components/parameters/UserSortOrder"
          },
          {
            "$ref": "#/components/parameters/Filter"
          },
          {
            "$ref": "#/components/parameters/Sort"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of users.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserList"
                },
                "examples": {
                  "twoUsers": {
                    "summary": "An active user and an inactive user",
                    "value": {
                      "data": [
                        {
                          "id": "8b1e0d8a-7f3b-4a52-9c11-9a4e1d2c8f31",
                          "username": "jane.doe",
                          "email": "jane.doe@example.com",
                          "firstName": "Jane",
                          "lastName": "Doe",
                          "phone": "+1-555-0142",
                          "status": "ACTIVE",
                          "principal": {
                            "principalId": "0fa6b8d2-3c47-4e9d-bf1c-58be91e07a40",
                            "isEnabled": true,
                            "roleAssignments": [
                              {
                                "roleId": "9f8c2a14-2b1e-4f3a-8d2c-1b9e8d7c6a5b",
                                "name": "Zone Editor"
                              }
                            ],
                            "tokenCount": 2
                          },
                          "createdAt": "2025-11-04T13:21:09Z",
                          "updatedAt": "2026-05-02T09:18:33Z"
                        },
                        {
                          "id": "92ee1f3c-1a04-4b89-9d77-3a2b5c6d7e8f",
                          "username": "eric.exiting",
                          "email": "eric.exiting@example.com",
                          "firstName": "Eric",
                          "lastName": "Exiting",
                          "status": "INACTIVE",
                          "principal": {
                            "principalId": "112ad48f-22bc-4f3a-8e1d-0c2b3a4d5e6f",
                            "isEnabled": false,
                            "roleAssignments": [],
                            "tokenCount": 0
                          },
                          "createdAt": "2024-08-12T11:00:00Z",
                          "updatedAt": "2026-03-01T17:42:08Z"
                        }
                      ],
                      "pagination": {
                        "nextPageToken": null,
                        "hasMore": false
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/users/{userId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/UserId"
        }
      ],
      "get": {
        "operationId": "getUser",
        "x-required-permission": "account.iam.users:read",
        "summary": "Get a user",
        "description": "Returns a user in your account, with their enabled state, role\nassignments, and API token count.\n\nYou can get `ACTIVE` and `INACTIVE` users, the same users that\n`GET /users` lists. For a user with any other status, the API returns\n`404`, the same as for a user that doesn't exist.\n",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "responses": {
          "200": {
            "description": "The user.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "operationId": "updateUser",
        "x-required-permission": "account.iam.users:update",
        "summary": "Update a user",
        "description": "Enables or disables a user in your account. Send a JSON object with\n`isEnabled`, not a JSON Patch document.\n\nWhile a user is disabled, DigiCert DNS rejects their requests,\nincluding requests made with their API tokens. Enable the user again\nto restore access.\n\nYou can't change a user's profile details, such as their name, email\naddress, or phone number, or their `status` through this API.\n\nYou can't enable or disable yourself. If the user is you, the API\nreturns `403 SELF_STATUS_CHANGE_NOT_ALLOWED`.\n",
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserUpdate"
              },
              "examples": {
                "disable": {
                  "summary": "Disable a user",
                  "value": {
                    "isEnabled": false
                  }
                },
                "enable": {
                  "summary": "Enable a user",
                  "value": {
                    "isEnabled": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated user.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-Idempotent-Replayed": {
                "$ref": "#/components/headers/XIdempotentReplayed"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/users/{userId}/role-assignments": {
      "parameters": [
        {
          "$ref": "#/components/parameters/UserId"
        }
      ],
      "get": {
        "operationId": "listUserRoleAssignments",
        "x-required-permission": "account.iam.roles:read",
        "summary": "List a user's role assignments",
        "description": "Returns the role assignments of a user in your account. The list\ndoesn't include the built-in `self` role.\n",
        "tags": [
          "Role Assignments"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/pageSize"
          },
          {
            "$ref": "#/components/parameters/pageToken"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of the user's role assignments.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleAssignmentList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "operationId": "createUserRoleAssignment",
        "x-required-permission": "account.iam.roles:update",
        "summary": "Assign a role to a user",
        "description": "Grants a role to a user in your account. The change applies to the\nuser's effective permissions right away.\n\nIf the user already has the role, the API returns `200` with the\nexisting assignment and doesn't create a duplicate. Otherwise, it\nreturns `201` with the new assignment.\n\n**Error codes**\n\n| HTTP | Code                          | When                                                               |\n| ---- | ----------------------------- | ------------------------------------------------------------------ |\n| 403  | `SELF_ASSIGNMENT_NOT_ALLOWED` | The user is you. You can't change your own role assignments.       |\n| 404  | `ROLE_NOT_FOUND`              | No role has the `roleId` you sent.                                 |\n| 422  | `SELF_ROLE_NOT_ASSIGNABLE`    | The `roleId` is the built-in `self` role, which you can't assign.  |\n",
        "tags": [
          "Role Assignments"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleAssignmentCreate"
              },
              "examples": {
                "assignRole": {
                  "summary": "Assign a role",
                  "value": {
                    "roleId": "9f8c2a14-2b1e-4f3a-8d2c-1b9e8d7c6a5b"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The user already had the role. The body is the existing assignment.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-Idempotent-Replayed": {
                "$ref": "#/components/headers/XIdempotentReplayed"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleAssignment"
                }
              }
            }
          },
          "201": {
            "description": "The role was assigned. The body is the new assignment.",
            "headers": {
              "Location": {
                "$ref": "#/components/headers/Location"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-Idempotent-Replayed": {
                "$ref": "#/components/headers/XIdempotentReplayed"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleAssignment"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "put": {
        "operationId": "replaceUserRoleAssignments",
        "x-required-permission": "account.iam.roles:update",
        "summary": "Replace a user's role assignments",
        "description": "Replaces all of a user's role assignments with the roles in the\nrequest body. Afterward, the user holds exactly those roles, plus the\nbuilt-in `self` role, which never changes. The API adds the roles the\nuser doesn't have yet and revokes the ones that aren't in the body.\nThe changes apply to the user's effective permissions right away.\n\nThe response lists the user's role assignments after the change.\n\n**Error codes**\n\n| HTTP | Code                          | When                                                               |\n| ---- | ----------------------------- | ------------------------------------------------------------------ |\n| 403  | `SELF_ASSIGNMENT_NOT_ALLOWED` | The user is you. You can't change your own role assignments.       |\n| 404  | `ROLE_NOT_FOUND`              | No role has one of the `roleId` values you sent.                   |\n| 422  | `SELF_ROLE_NOT_ASSIGNABLE`    | A `roleId` is the built-in `self` role, which you can't assign.    |\n",
        "tags": [
          "Role Assignments"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleAssignmentCreateList"
              },
              "examples": {
                "twoRoles": {
                  "summary": "Set two roles",
                  "value": [
                    {
                      "roleId": "9f8c2a14-2b1e-4f3a-8d2c-1b9e8d7c6a5b"
                    },
                    {
                      "roleId": "1c2b3a4d-5e6f-4789-9abc-def012345678"
                    }
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The user's role assignments after the change.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-Idempotent-Replayed": {
                "$ref": "#/components/headers/XIdempotentReplayed"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RoleAssignment"
                  }
                },
                "examples": {
                  "twoAssignments": {
                    "summary": "Two role assignments",
                    "value": [
                      {
                        "id": "c0ffee00-cafe-4bad-feed-faceb00cf00d",
                        "principalId": "0fa6b8d2-3c47-4e9d-bf1c-58be91e07a40",
                        "roleId": "9f8c2a14-2b1e-4f3a-8d2c-1b9e8d7c6a5b"
                      },
                      {
                        "id": "d1e2f3a4-b5c6-4d7e-8f90-1a2b3c4d5e6f",
                        "principalId": "0fa6b8d2-3c47-4e9d-bf1c-58be91e07a40",
                        "roleId": "1c2b3a4d-5e6f-4789-9abc-def012345678"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/users/{userId}/role-assignments/{assignmentId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/UserId"
        },
        {
          "$ref": "#/components/parameters/AssignmentId"
        }
      ],
      "delete": {
        "operationId": "deleteUserRoleAssignment",
        "x-required-permission": "account.iam.roles:update",
        "summary": "Revoke a user's role assignment",
        "description": "Revokes a role assignment from a user in your account. The change\napplies to the user's effective permissions right away. If the\nassignment doesn't exist or belongs to someone else, the API still\nreturns `204` and changes nothing.\n\nA user must keep at least 1 role besides `self`. To swap a user's\nonly role for another, assign the new role first, or use\n`PUT /users/{userId}/role-assignments`.\n\n**Error codes**\n\n| HTTP | Code                          | When                                                               |\n| ---- | ----------------------------- | ------------------------------------------------------------------ |\n| 403  | `SELF_ASSIGNMENT_NOT_ALLOWED` | The user is you. You can't change your own role assignments.       |\n| 409  | `LAST_ROLE_REQUIRED`          | The assignment is the user's only role besides `self`.             |\n",
        "tags": [
          "Role Assignments"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "responses": {
          "204": {
            "description": "The role assignment was revoked, or it didn't exist. The response has no body.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-Idempotent-Replayed": {
                "$ref": "#/components/headers/XIdempotentReplayed"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/users/{userId}/tokens": {
      "parameters": [
        {
          "$ref": "#/components/parameters/UserId"
        }
      ],
      "get": {
        "operationId": "listUserApiTokens",
        "x-required-permission": "account.iam.tokens:read",
        "summary": "List API tokens for a user",
        "description": "Returns a user's API tokens, one page at a time. The list includes\nenabled and disabled tokens. It never includes token values: each\ntoken shows only its token prefix.\n\nUse `name` to filter the list, and `sortBy` and `sortOrder` to order\nit.\n",
        "tags": [
          "API Tokens"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/pageSize"
          },
          {
            "$ref": "#/components/parameters/pageToken"
          },
          {
            "$ref": "#/components/parameters/ApiTokenName"
          },
          {
            "$ref": "#/components/parameters/ApiTokenSortBy"
          },
          {
            "$ref": "#/components/parameters/ApiTokenSortOrder"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of the user's API tokens.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTokenList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "operationId": "createUserApiToken",
        "x-required-permission": "account.iam.tokens:create",
        "summary": "Create an API token for a user",
        "description": "Creates an API token for a user. The response's `token` field holds\nthe token value. The token value appears only in the response to the\ncreate request, so store it securely. Later reads show only the token\nprefix.\n\nIf you omit `expiresAt`, the token never expires. There's no maximum\nlifetime. If `expiresAt` isn't in the future, the API returns\n`400 INVALID_TOKEN_EXPIRATION`.\n",
        "tags": [
          "API Tokens"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTokenCreate"
              },
              "examples": {
                "ciToken": {
                  "summary": "One-year token",
                  "value": {
                    "name": "ci-prod-2026",
                    "description": "CI deploy token, prod pipeline.",
                    "expiresAt": "2027-05-22T00:00:00Z"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The API token was created. The `token` field holds the token value,\nwhich later reads don't return.\n",
            "headers": {
              "Location": {
                "$ref": "#/components/headers/Location"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-Idempotent-Replayed": {
                "$ref": "#/components/headers/XIdempotentReplayed"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTokenCreated"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/users/{userId}/tokens/{tokenId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/UserId"
        },
        {
          "$ref": "#/components/parameters/TokenId"
        }
      ],
      "patch": {
        "operationId": "updateUserApiToken",
        "x-required-permission": "account.iam.tokens:update",
        "summary": "Update an API token for a user",
        "description": "Updates the name, description, or enabled state of a user's API\ntoken. Fields you omit stay the same. You can't change `expiresAt`\nafter you create a token.\n\nSetting `isEnabled` to `false` disables the token, and it stops\nworking right away. The API sets `revokedAt` when you disable the\ntoken and clears it when you enable the token again.\n",
        "tags": [
          "API Tokens"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTokenUpdate"
              },
              "examples": {
                "disable": {
                  "summary": "Disable the token",
                  "value": {
                    "isEnabled": false
                  }
                },
                "rename": {
                  "summary": "Rename the token",
                  "value": {
                    "name": "ci-prod-2027"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated API token.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-Idempotent-Replayed": {
                "$ref": "#/components/headers/XIdempotentReplayed"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiToken"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "operationId": "deleteUserApiToken",
        "x-required-permission": "account.iam.tokens:delete",
        "summary": "Delete an API token for a user",
        "description": "Permanently deletes a user's API token. The token stops working right\naway. DigiCert DNS records the deletion in the audit log.\n\nIf the token doesn't exist or belongs to someone else, the API still\nreturns `204` and changes nothing.\n",
        "tags": [
          "API Tokens"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "responses": {
          "204": {
            "description": "The API token was deleted, or it didn't exist. The response has no body.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-Idempotent-Replayed": {
                "$ref": "#/components/headers/XIdempotentReplayed"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/users/{userId}/permissions:effective": {
      "parameters": [
        {
          "$ref": "#/components/parameters/UserId"
        }
      ],
      "get": {
        "operationId": "getUserEffectivePermissions",
        "x-required-permission": "account.iam.users:read",
        "summary": "Get a user's effective permissions",
        "description": "Returns every permission a user has in your account, combined from\nall of the user's role assignments. Use it to check what a user can\ndo before they try.\n",
        "tags": [
          "Permissions"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "responses": {
          "200": {
            "description": "The user's effective permissions.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EffectivePermissions"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/service-users": {
      "get": {
        "operationId": "listServiceUsers",
        "x-required-permission": "account.iam.service_users:read",
        "summary": "List service users",
        "description": "Returns the service users in your account, one page at a time. Use\nthe filters to narrow the list, and `sortBy` and `sortOrder` to order\nit. When you use more than one filter, a service user must match all\nof them.\n\n**Which service users are listed**\n\nThe list includes `ACTIVE` and `INACTIVE` service users. It never\nincludes deleted service users, even when you filter on\n`isEnabled=false`.\n\n**Enabled state and status**\n\n- `isEnabled` shows whether the service user is enabled in your\n  account. You set it with `PATCH /service-users/{serviceUserId}`.\n- `status` is the lifecycle status of the service user's identity,\n  and it's separate from `isEnabled`. The `status` filter and the\n  `status` sort key are deprecated but still work. Use `isEnabled`\n  instead.\n\nThe `filter` and `sort` parameters are deprecated and ignored. Use\nthe other filter parameters, and `sortBy` and `sortOrder`, instead.\n",
        "tags": [
          "Service Users"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/pageSize"
          },
          {
            "$ref": "#/components/parameters/pageToken"
          },
          {
            "$ref": "#/components/parameters/ServiceUserName"
          },
          {
            "$ref": "#/components/parameters/ServiceUserIsEnabled"
          },
          {
            "$ref": "#/components/parameters/ServiceUserStatusFilter"
          },
          {
            "$ref": "#/components/parameters/ServiceUserApiTokenCount"
          },
          {
            "$ref": "#/components/parameters/ServiceUserRoleIds"
          },
          {
            "$ref": "#/components/parameters/ServiceUserSortBy"
          },
          {
            "$ref": "#/components/parameters/ServiceUserSortOrder"
          },
          {
            "$ref": "#/components/parameters/Filter"
          },
          {
            "$ref": "#/components/parameters/Sort"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of service users.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUserList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "operationId": "createServiceUser",
        "x-required-permission": "account.iam.service_users:create",
        "summary": "Create a service user",
        "description": "Creates a service user and assigns it the roles in `roleAssignments`.\nEvery service user also gets the built-in `self` role. The response\nincludes the service user's `id`. Use it to create the service user's\nfirst API token with `POST /service-users/{serviceUserId}/tokens`.\n\nThe service user's `name` must be unique among the service users in\nyour account. Names are case-sensitive, so `Bot` and `bot` are\ndifferent names. You can reuse the name of a deleted service user.\n\nIf the API can't finish setting up the service user, it creates\nnothing and returns `422 PROVISIONING_REJECTED` or\n`503 PROVISIONING_UNAVAILABLE`. Retrying after\n`PROVISIONING_REJECTED` won't succeed. After\n`PROVISIONING_UNAVAILABLE`, retry the request.\n\n**Error codes**\n\n| HTTP | Code                          | When                                                               |\n| ---- | ----------------------------- | ------------------------------------------------------------------ |\n| 404  | `ROLE_NOT_FOUND`              | No role has one of the `roleId` values you sent.                   |\n| 409  | `SERVICE_USER_NAME_CONFLICT`  | Another service user in your account has this `name`.              |\n| 422  | `SELF_ROLE_NOT_ASSIGNABLE`    | A `roleId` is the built-in `self` role, which you can't assign.    |\n| 422  | `PROVISIONING_REJECTED`       | The API couldn't set up the service user. Don't retry the same request. |\n| 503  | `PROVISIONING_UNAVAILABLE`    | Setting up the service user is temporarily unavailable. Retry the request. |\n",
        "tags": [
          "Service Users"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceUserCreate"
              },
              "examples": {
                "ciDeployBot": {
                  "summary": "CI deploy bot",
                  "value": {
                    "name": "ci-deploy-bot",
                    "roleAssignments": [
                      {
                        "roleId": "9f8c2a14-2b1e-4f3a-8d2c-1b9e8d7c6a5b"
                      }
                    ],
                    "description": "Used by the CI pipeline to push DNS records."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The service user was created.",
            "headers": {
              "Location": {
                "$ref": "#/components/headers/Location"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-Idempotent-Replayed": {
                "$ref": "#/components/headers/XIdempotentReplayed"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUser"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "description": "The request is valid, but the API can't create the service user. The `code` field says why.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                },
                "examples": {
                  "provisioningRejected": {
                    "summary": "Service user setup was rejected",
                    "value": {
                      "type": "https://errors.dns.digicert.com/unprocessable-entity",
                      "title": "Provisioning rejected",
                      "status": 422,
                      "code": "PROVISIONING_REJECTED",
                      "detail": "Unable to provision the service user. Retrying the same request will not succeed."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "description": "Setting up the service user is temporarily unavailable, and no service user was created. Retry the request.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                },
                "example": {
                  "type": "https://errors.dns.digicert.com/service-unavailable",
                  "title": "Provisioning unavailable",
                  "status": 503,
                  "code": "PROVISIONING_UNAVAILABLE",
                  "detail": "Unable to provision the service user because provisioning is temporarily unavailable. Please try again."
                }
              }
            }
          }
        }
      }
    },
    "/service-users/{serviceUserId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ServiceUserId"
        }
      ],
      "get": {
        "operationId": "getServiceUser",
        "x-required-permission": "account.iam.service_users:read",
        "summary": "Get a service user",
        "description": "Returns a service user, including its `principal` details. You can\nget `ACTIVE` and `INACTIVE` service users. A deleted service user\nreturns `404`, the same as one that doesn't exist.\n",
        "tags": [
          "Service Users"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "responses": {
          "200": {
            "description": "The service user.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUser"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "patch": {
        "operationId": "updateServiceUser",
        "x-required-permission": "account.iam.service_users:update",
        "summary": "Update a service user",
        "description": "Updates a service user's name, description, or enabled state. Send a\nJSON object with only the fields you want to change. This isn't JSON\nPatch. Fields you omit stay the same.\n\nSetting `isEnabled` to `false` disables the service user, and its API\ntokens stop working right away. You can update `ACTIVE` and\n`INACTIVE` service users. A deleted service user returns `404`.\n\n**Error codes**\n\n| HTTP | Code                             | When                                                            |\n| ---- | -------------------------------- | --------------------------------------------------------------- |\n| 403  | `SERVICE_USER_IMMUTABLE`         | The service user is protected. You can still delete it.         |\n| 403  | `SELF_STATUS_CHANGE_NOT_ALLOWED` | The request includes `isEnabled` and the service user is you.   |\n| 409  | `SERVICE_USER_NAME_CONFLICT`     | Another service user in your account has this `name`.           |\n",
        "tags": [
          "Service Users"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ServiceUserUpdate"
              },
              "examples": {
                "rename": {
                  "summary": "Rename a service user",
                  "value": {
                    "name": "ci-deploy-bot-v2",
                    "description": "Replaces the legacy bot."
                  }
                },
                "describe": {
                  "summary": "Update the description",
                  "value": {
                    "description": "CI deploy token used by the deploy pipeline."
                  }
                },
                "disable": {
                  "summary": "Disable a service user",
                  "value": {
                    "isEnabled": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated service user.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-Idempotent-Replayed": {
                "$ref": "#/components/headers/XIdempotentReplayed"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceUser"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "operationId": "deleteServiceUser",
        "x-required-permission": "account.iam.service_users:delete",
        "summary": "Delete a service user",
        "description": "Deletes a service user. The service user is disabled, and all of its\nAPI tokens are permanently deleted and stop working right away. You\ncan't restore a deleted service user, but you can reuse its name.\n\nYou can delete a protected service user. If the service user doesn't\nexist or is already deleted, the API still returns `204`.\n",
        "tags": [
          "Service Users"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "responses": {
          "204": {
            "description": "The service user was deleted, or it didn't exist. The response has no body.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-Idempotent-Replayed": {
                "$ref": "#/components/headers/XIdempotentReplayed"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/service-users/{serviceUserId}/role-assignments": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ServiceUserId"
        }
      ],
      "get": {
        "operationId": "listServiceUserRoleAssignments",
        "x-required-permission": "account.iam.roles:read",
        "summary": "List a service user's role assignments",
        "description": "Returns the role assignments of a service user in your account. The\nlist doesn't include the built-in `self` role.\n",
        "tags": [
          "Role Assignments"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/pageSize"
          },
          {
            "$ref": "#/components/parameters/pageToken"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of the service user's role assignments.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleAssignmentList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "operationId": "createServiceUserRoleAssignment",
        "x-required-permission": "account.iam.roles:update",
        "summary": "Assign a role to a service user",
        "description": "Grants a role to a service user in your account. The change applies\nto the service user's effective permissions right away.\n\nIf the service user already has the role, the API returns `200` with\nthe existing assignment and doesn't create a duplicate. Otherwise, it\nreturns `201` with the new assignment.\n\n**Error codes**\n\n| HTTP | Code                          | When                                                               |\n| ---- | ----------------------------- | ------------------------------------------------------------------ |\n| 403  | `SELF_ASSIGNMENT_NOT_ALLOWED` | The service user is you. You can't change your own role assignments. |\n| 403  | `SERVICE_USER_IMMUTABLE`      | The service user is protected.                                     |\n| 404  | `ROLE_NOT_FOUND`              | No role has the `roleId` you sent.                                 |\n| 422  | `SELF_ROLE_NOT_ASSIGNABLE`    | The `roleId` is the built-in `self` role, which you can't assign.  |\n",
        "tags": [
          "Role Assignments"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleAssignmentCreate"
              },
              "examples": {
                "assignRole": {
                  "summary": "Assign a role",
                  "value": {
                    "roleId": "9f8c2a14-2b1e-4f3a-8d2c-1b9e8d7c6a5b"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The service user already had the role. The body is the existing assignment.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-Idempotent-Replayed": {
                "$ref": "#/components/headers/XIdempotentReplayed"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleAssignment"
                }
              }
            }
          },
          "201": {
            "description": "The role was assigned. The body is the new assignment.",
            "headers": {
              "Location": {
                "$ref": "#/components/headers/Location"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-Idempotent-Replayed": {
                "$ref": "#/components/headers/XIdempotentReplayed"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleAssignment"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "put": {
        "operationId": "replaceServiceUserRoleAssignments",
        "x-required-permission": "account.iam.roles:update",
        "summary": "Replace a service user's role assignments",
        "description": "Replaces all of a service user's role assignments with the roles in\nthe request body. Afterward, the service user holds exactly those\nroles, plus the built-in `self` role, which never changes. The API\nadds the roles the service user doesn't have yet and revokes the ones\nthat aren't in the body. The changes apply to the service user's\neffective permissions right away.\n\nThe response lists the service user's role assignments after the\nchange.\n\n**Error codes**\n\n| HTTP | Code                          | When                                                               |\n| ---- | ----------------------------- | ------------------------------------------------------------------ |\n| 403  | `SELF_ASSIGNMENT_NOT_ALLOWED` | The service user is you. You can't change your own role assignments. |\n| 403  | `SERVICE_USER_IMMUTABLE`      | The service user is protected.                                     |\n| 404  | `ROLE_NOT_FOUND`              | No role has one of the `roleId` values you sent.                   |\n| 422  | `SELF_ROLE_NOT_ASSIGNABLE`    | A `roleId` is the built-in `self` role, which you can't assign.    |\n",
        "tags": [
          "Role Assignments"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleAssignmentCreateList"
              },
              "examples": {
                "twoRoles": {
                  "summary": "Set two roles",
                  "value": [
                    {
                      "roleId": "9f8c2a14-2b1e-4f3a-8d2c-1b9e8d7c6a5b"
                    },
                    {
                      "roleId": "1c2b3a4d-5e6f-4789-9abc-def012345678"
                    }
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The service user's role assignments after the change.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-Idempotent-Replayed": {
                "$ref": "#/components/headers/XIdempotentReplayed"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RoleAssignment"
                  }
                },
                "examples": {
                  "twoAssignments": {
                    "summary": "Two role assignments",
                    "value": [
                      {
                        "id": "c0ffee00-cafe-4bad-feed-faceb00cf00d",
                        "principalId": "7b22e3a1-c9f4-4a18-b6e2-0d4f3a8e1c2b",
                        "roleId": "9f8c2a14-2b1e-4f3a-8d2c-1b9e8d7c6a5b"
                      },
                      {
                        "id": "d1e2f3a4-b5c6-4d7e-8f90-1a2b3c4d5e6f",
                        "principalId": "7b22e3a1-c9f4-4a18-b6e2-0d4f3a8e1c2b",
                        "roleId": "1c2b3a4d-5e6f-4789-9abc-def012345678"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/service-users/{serviceUserId}/role-assignments/{assignmentId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ServiceUserId"
        },
        {
          "$ref": "#/components/parameters/AssignmentId"
        }
      ],
      "delete": {
        "operationId": "deleteServiceUserRoleAssignment",
        "x-required-permission": "account.iam.roles:update",
        "summary": "Revoke a service user's role assignment",
        "description": "Revokes a role assignment from a service user in your account. The\nchange applies to the service user's effective permissions right\naway. If the assignment doesn't exist or belongs to someone else, the\nAPI still returns `204` and changes nothing.\n\nA service user must keep at least 1 role besides `self`. To swap a\nservice user's only role for another, assign the new role first, or\nuse `PUT /service-users/{serviceUserId}/role-assignments`.\n\n**Error codes**\n\n| HTTP | Code                          | When                                                               |\n| ---- | ----------------------------- | ------------------------------------------------------------------ |\n| 403  | `SELF_ASSIGNMENT_NOT_ALLOWED` | The service user is you. You can't change your own role assignments. |\n| 403  | `SERVICE_USER_IMMUTABLE`      | The service user is protected.                                     |\n| 409  | `LAST_ROLE_REQUIRED`          | The assignment is the service user's only role besides `self`.     |\n",
        "tags": [
          "Role Assignments"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "responses": {
          "204": {
            "description": "The role assignment was revoked, or it didn't exist. The response has no body.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-Idempotent-Replayed": {
                "$ref": "#/components/headers/XIdempotentReplayed"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/service-users/{serviceUserId}/tokens": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ServiceUserId"
        }
      ],
      "get": {
        "operationId": "listServiceUserApiTokens",
        "x-required-permission": "account.iam.tokens:read",
        "summary": "List API tokens for a service user",
        "description": "Returns a service user's API tokens, one page at a time. The list\nincludes enabled and disabled tokens. It never includes token values:\neach token shows only its token prefix.\n\nUse `name` to filter the list, and `sortBy` and `sortOrder` to order\nit.\n",
        "tags": [
          "API Tokens"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/pageSize"
          },
          {
            "$ref": "#/components/parameters/pageToken"
          },
          {
            "$ref": "#/components/parameters/ApiTokenName"
          },
          {
            "$ref": "#/components/parameters/ApiTokenSortBy"
          },
          {
            "$ref": "#/components/parameters/ApiTokenSortOrder"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of the service user's API tokens.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTokenList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "post": {
        "operationId": "createServiceUserApiToken",
        "x-required-permission": "account.iam.tokens:create",
        "summary": "Create an API token for a service user",
        "description": "Creates an API token for a service user. The response's `token` field\nholds the token value. The token value appears only in the response\nto the create request, so store it securely. Later reads show only\nthe token prefix.\n\nIf you omit `expiresAt`, the token never expires. There's no maximum\nlifetime. If `expiresAt` isn't in the future, the API returns\n`400 INVALID_TOKEN_EXPIRATION`.\n\nIf the service user is protected, the API returns\n`403 SERVICE_USER_IMMUTABLE`.\n",
        "tags": [
          "API Tokens"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTokenCreate"
              },
              "examples": {
                "ciToken": {
                  "summary": "One-year token",
                  "value": {
                    "name": "ci-prod-2026",
                    "description": "CI deploy token, prod pipeline.",
                    "expiresAt": "2027-05-22T00:00:00Z"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The API token was created. The `token` field holds the token value,\nwhich later reads don't return.\n",
            "headers": {
              "Location": {
                "$ref": "#/components/headers/Location"
              },
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-Idempotent-Replayed": {
                "$ref": "#/components/headers/XIdempotentReplayed"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTokenCreated"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/service-users/{serviceUserId}/tokens/{tokenId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ServiceUserId"
        },
        {
          "$ref": "#/components/parameters/TokenId"
        }
      ],
      "patch": {
        "operationId": "updateServiceUserApiToken",
        "x-required-permission": "account.iam.tokens:update",
        "summary": "Update an API token for a service user",
        "description": "Updates the name, description, or enabled state of a service user's\nAPI token. Fields you omit stay the same. You can't change\n`expiresAt` after you create a token.\n\nSetting `isEnabled` to `false` disables the token, and it stops\nworking right away. The API sets `revokedAt` when you disable the\ntoken and clears it when you enable the token again.\n\nIf the service user is protected, the API returns\n`403 SERVICE_USER_IMMUTABLE`.\n",
        "tags": [
          "API Tokens"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiTokenUpdate"
              },
              "examples": {
                "disable": {
                  "summary": "Disable the token",
                  "value": {
                    "isEnabled": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated API token.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-Idempotent-Replayed": {
                "$ref": "#/components/headers/XIdempotentReplayed"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiToken"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      },
      "delete": {
        "operationId": "deleteServiceUserApiToken",
        "x-required-permission": "account.iam.tokens:delete",
        "summary": "Delete an API token for a service user",
        "description": "Permanently deletes a service user's API token. The token stops\nworking right away. DigiCert DNS records the deletion in the audit\nlog.\n\nIf the token doesn't exist or belongs to someone else, the API still\nreturns `204` and changes nothing. If the service user is protected,\nthe API returns `403 SERVICE_USER_IMMUTABLE`.\n",
        "tags": [
          "API Tokens"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKeyOptional"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "responses": {
          "204": {
            "description": "The API token was deleted, or it didn't exist. The response has no body.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-Idempotent-Replayed": {
                "$ref": "#/components/headers/XIdempotentReplayed"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/service-users/{serviceUserId}/permissions:effective": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ServiceUserId"
        }
      ],
      "get": {
        "operationId": "getServiceUserEffectivePermissions",
        "x-required-permission": "account.iam.service_users:read",
        "summary": "Get a service user's effective permissions",
        "description": "Returns every permission a service user has in your account,\ncombined from all of the service user's role assignments. Use it to\ncheck what a service user can do before it tries.\n",
        "tags": [
          "Permissions"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "responses": {
          "200": {
            "description": "The service user's effective permissions.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EffectivePermissions"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/roles": {
      "get": {
        "operationId": "listRoles",
        "x-required-permission": "account.iam.roles:read",
        "summary": "List roles",
        "description": "Returns the roles available in your account, one page at a time:\nthe built-in system roles first, then any custom roles in your\naccount. Built-in internal roles, such as `self`, aren't listed, and\ngetting one by its ID returns `404`.\n",
        "tags": [
          "Roles"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/pageSize"
          },
          {
            "$ref": "#/components/parameters/pageToken"
          },
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of roles.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/roles/{roleId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/RoleId"
        }
      ],
      "get": {
        "operationId": "getRole",
        "x-required-permission": "account.iam.roles:read",
        "summary": "Get a role",
        "description": "Returns a role, including the permissions granted directly on it. To\nsee every resource and action the role covers, including resources\nthat inherit a permission from a parent resource, use\n`GET /roles/{roleId}/permissions`.\n\nIf no role you can see has the `roleId`, the API returns\n`404 ROLE_NOT_FOUND`.\n",
        "tags": [
          "Roles"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "responses": {
          "200": {
            "description": "The role.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Role"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    },
    "/roles/{roleId}/permissions": {
      "parameters": [
        {
          "$ref": "#/components/parameters/RoleId"
        }
      ],
      "get": {
        "operationId": "getRolePermissions",
        "x-required-permission": "account.iam.roles:read",
        "summary": "Get the permissions a role grants",
        "description": "Returns every permission a role grants, keyed by resource. A\npermission granted on a resource also covers the resources under it,\nso the result includes those resources too. Each value lists the\ngranted actions in lower case. If an action isn't listed, the role\ndoesn't grant it.\n",
        "tags": [
          "Roles"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/XRequestId"
          }
        ],
        "responses": {
          "200": {
            "description": "The permissions the role grants.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/XRateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/XRateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/XRateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RolePermissionMap"
                },
                "examples": {
                  "zoneEditor": {
                    "summary": "Zone Editor role",
                    "value": {
                      "roleId": "9f8c2a14-2b1e-4f3a-8d2c-1b9e8d7c6a5b",
                      "slug": "zone-editor",
                      "permissions": {
                        "account.zones": [
                          "create",
                          "read",
                          "update",
                          "delete"
                        ],
                        "account.zones.records": [
                          "create",
                          "read",
                          "update",
                          "delete"
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "A public API key, issued through the DigiCert customer portal. The key determines which\naccount a request acts on, so account IDs never appear in the URL path.\n"
      }
    },
    "parameters": {
      "XRequestId": {
        "name": "X-Request-Id",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string",
          "pattern": "^[A-Za-z0-9._~-]{8,128}$",
          "example": "req_2033dc03-f17d-47fe-a619-897ae3629d16"
        },
        "description": "You can send this header, but don't rely on getting the same value back. The API can replace it\nwith its own ID, which has a `req_` prefix. When you contact support, use the ID from the\n`X-Request-Id` response header.\n"
      },
      "pageSize": {
        "name": "pageSize",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "default": 25
        },
        "description": "The maximum number of items to return in a page, from 1 to 100. The default is 25."
      },
      "pageToken": {
        "name": "pageToken",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "An opaque cursor from a previous list response, such as `nextPageToken`. Send it to fetch that page."
      },
      "ApiTokenName": {
        "name": "name",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        "description": "Filter API tokens by `name`. The match is case-insensitive and can be any part of the name, so\n`ci` matches `ci-prod`.\n",
        "example": "ci-prod"
      },
      "ApiTokenSortBy": {
        "name": "sortBy",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "name",
            "createdAt",
            "lastUsedAt",
            "expiresAt"
          ],
          "default": "createdAt"
        },
        "description": "Field to sort API tokens by. By default, tokens are sorted by `createdAt` in descending order,\nso the newest token comes first.\n\n- `name`: The token name, sorted case-insensitively.\n- `createdAt`: When the token was created. This is the default.\n- `lastUsedAt`: When the token was last used to authenticate a request. It's `null` for a\n  token that hasn't been used.\n- `expiresAt`: When the token expires. It's `null` for a token that doesn't expire.\n\nTokens with a `null` value sort last in both directions, so tokens that haven't been used or\ndon't expire never come first. Tokens with the same value are sorted by `id`, so the order is\nstable from page to page.\n",
        "example": "createdAt"
      },
      "ApiTokenSortOrder": {
        "name": "sortOrder",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "asc",
            "desc"
          ],
          "default": "desc"
        },
        "description": "Sort direction: `asc` for ascending or `desc` for descending. The default is `desc`, so with\nthe default `sortBy` the newest token comes first.\n",
        "example": "desc"
      },
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid",
          "maxLength": 36
        },
        "description": "A client-generated UUID that makes the request safe to retry. If you repeat a request with the\nsame key, method, and path, the API returns the stored response without running the request\nagain. It doesn't compare query parameters or the request body, so use a new key for each new\nrequest.\n\nThe API doesn't store `429` or `5xx` responses, so a retry after one of them runs the request\nagain. If the first request with the key is still running, a retry gets `409 Conflict` with the\ncode `IDEMPOTENCY_IN_FLIGHT`.\n\nThe header is required on POST and PATCH, optional on PUT and DELETE, and mustn't be sent on\nGET.\n"
      },
      "TokenId": {
        "name": "tokenId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        },
        "description": "The ID (UUID) of an API token.",
        "example": "31415926-5358-9793-2384-626433832795"
      },
      "IdempotencyKeyOptional": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string",
          "format": "uuid",
          "maxLength": 36
        },
        "description": "An optional client-generated UUID that makes a retry return the original response. PUT and\nDELETE are already idempotent. With a key, if you repeat a request with the same key, method,\nand path, the API returns the stored response without running the request again. It doesn't\ncompare query parameters or the request body, so use a new key for each new request.\n\nThe API doesn't store `429` or `5xx` responses, so a retry after one of them runs the request\nagain. If an earlier request with the same key is still running, the API returns\n`409 Conflict` with the code `IDEMPOTENCY_IN_FLIGHT`. Retry after the first request completes.\n\nWithout a key, every request runs.\n"
      },
      "UserUsername": {
        "name": "username",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 320
        },
        "description": "Filter users by `username`. The match is case-insensitive and can be any part of the username,\nso `jane` matches `jane.doe`.\n",
        "example": "jane"
      },
      "UserName": {
        "name": "name",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 257
        },
        "description": "Filter users by full name: `firstName` and `lastName` joined by a space. The match is\ncase-insensitive and can be any part of the full name, so `jane d` matches \"Jane Doe\". A user\nwith only a first name or only a last name matches on that name.\n",
        "example": "jane d"
      },
      "UserEmail": {
        "name": "email",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 320
        },
        "description": "Filter users by email address. The match is case-insensitive and can be any part of the\naddress, so a domain such as `example.com` matches every address at that domain. It isn't an\nexact match: a full address also matches any longer address that contains it.\n",
        "example": "example.com"
      },
      "UserIsEnabled": {
        "name": "isEnabled",
        "in": "query",
        "required": false,
        "schema": {
          "type": "boolean"
        },
        "description": "Filter users by whether they're enabled, as returned in `principal.isEnabled`.\n\n- `true` returns only enabled users.\n- `false` returns only users that have been disabled with `isEnabled` on\n  `PATCH /users/{userId}`.\n- If you omit `isEnabled`, the API returns both.\n\n`isEnabled` is independent of the deprecated `status` filter. A user can be `ACTIVE` and\ndisabled at the same time.\n\nThe filter only narrows the list. `isEnabled=false` returns the disabled users from the same\nset that `GET /users` returns without the filter.\n\nA value other than `true` or `false`, including an empty `isEnabled=`, returns `400` with the\nerror code `VALIDATION_ERROR`.\n",
        "example": true
      },
      "UserStatusFilter": {
        "name": "status",
        "in": "query",
        "required": false,
        "deprecated": true,
        "schema": {
          "type": "string",
          "enum": [
            "ACTIVE",
            "INACTIVE"
          ]
        },
        "description": "**Deprecated.** Use `isEnabled` instead. `status` still works.\n\nFilter users by `status`.\n\n- `ACTIVE`: The user can authenticate.\n- `INACTIVE`: The user is deactivated. The API keeps the user, and you can still manage them.\n\n`GET /users` lists only `ACTIVE` and `INACTIVE` users, so if you omit `status`, the API\nreturns both. Any other value returns `400` with the error code `VALIDATION_ERROR`.\n\n`status` is independent of `isEnabled`, and the `status` filter doesn't consider whether a user\nis enabled. A user can be `ACTIVE` and disabled at the same time.\n",
        "example": "ACTIVE"
      },
      "UserApiTokenCount": {
        "name": "apiTokenCount",
        "in": "query",
        "required": false,
        "style": "deepObject",
        "explode": true,
        "schema": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "gte": {
              "type": "integer",
              "minimum": 0,
              "description": "Minimum active token count, inclusive."
            },
            "lte": {
              "type": "integer",
              "minimum": 0,
              "description": "Maximum active token count, inclusive."
            },
            "gt": {
              "type": "integer",
              "minimum": 0,
              "description": "Minimum active token count, exclusive."
            },
            "lt": {
              "type": "integer",
              "minimum": 0,
              "description": "Maximum active token count, exclusive."
            },
            "eq": {
              "type": "integer",
              "minimum": 0,
              "description": "Exact active token count."
            }
          }
        },
        "description": "Filter users by their number of active API tokens, using bracket-suffix notation. Supply one or\nmore of the sub-keys `gte`, `lte`, `gt`, `lt`, and `eq`.\n\nAn active token is enabled and hasn't expired. Disabled and expired tokens aren't counted, so\nthe filter uses the same count as `principal.tokenCount`.\n\nFor example:\n- `apiTokenCount[eq]=0` returns users with no active tokens.\n- `apiTokenCount[gte]=5` returns users with at least 5 active tokens.\n- `apiTokenCount[gte]=1&apiTokenCount[lte]=3` returns users with 1 to 3 active tokens.\n\nA user matches only when their count meets every sub-key you send, `eq` included. For example,\n`apiTokenCount[eq]=2&apiTokenCount[gte]=1` returns users with exactly 2 active tokens. A\ncombination that no count can meet, such as `apiTokenCount[gte]=10&apiTokenCount[lte]=5`,\nreturns an empty `data` array, not an error.\n\nThe API returns `400` with the error code `VALIDATION_ERROR` for an unknown sub-key, such as\n`apiTokenCount[between]=1`, or for a value that's empty, negative, or not an integer.\n"
      },
      "UserRoleIds": {
        "name": "roleIds",
        "in": "query",
        "required": false,
        "style": "form",
        "explode": false,
        "description": "Filter users by role, as a comma-separated list of role IDs, for example\n`roleIds=9f8c2a14-2b1e-4f3a-8d2c-1b9e8d7c6a5b,1c6d0e9a-4b2f-4e8a-9d3c-7a5b2e1f0c84`. A user\nmatches when they hold any of the roles, at any scope, so each extra role ID widens the\nresults.\n\nThe `self` role never matches. Every user and service user holds it, so a filter with only the\n`self` role returns no users. A role ID that doesn't exist in your account matches no users,\nand the API doesn't reject it.\n",
        "schema": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string",
            "format": "uuid"
          },
          "example": [
            "9f8c2a14-2b1e-4f3a-8d2c-1b9e8d7c6a5b"
          ]
        }
      },
      "UserSortBy": {
        "name": "sortBy",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "username",
            "name",
            "email",
            "isEnabled",
            "status",
            "apiTokenCount"
          ],
          "default": "username"
        },
        "description": "Field to sort users by. By default, users are sorted by `username` in ascending order.\n\n- `username`: The username. This is the default.\n- `name`: The full name, that is `firstName` and `lastName` joined by a space.\n- `email`: The email address.\n- `isEnabled`: Whether the user is enabled, from `principal.isEnabled`. In ascending order,\n  disabled users come first.\n- `status`: **Deprecated.** The user's `status`, sorted alphabetically by value, so `ACTIVE`\n  comes before `INACTIVE` in ascending order. Use `isEnabled` instead.\n- `apiTokenCount`: The number of active API tokens, from `principal.tokenCount`.\n\nText sorts are case-insensitive, so `alice` comes before `Zoe`. Users with the same value are\nsorted by `principal.principalId`, so the order is stable from page to page.\n\nYou can't sort by role, because a user can hold several roles. To narrow the list by role, use\n`roleIds`.\n",
        "example": "username"
      },
      "UserSortOrder": {
        "name": "sortOrder",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "asc",
            "desc"
          ],
          "default": "asc"
        },
        "description": "Sort direction: `asc` for ascending or `desc` for descending. The default is `asc`, so with\nthe default `sortBy` users are listed A to Z by `username`. In ascending order, text sorts A\nto Z, `apiTokenCount` sorts lowest first, and `isEnabled` lists disabled users first.\n",
        "example": "asc"
      },
      "Filter": {
        "name": "filter",
        "in": "query",
        "required": false,
        "deprecated": true,
        "schema": {
          "type": "string"
        },
        "description": "**Deprecated.** The API ignores `filter`. A request that includes it still succeeds, but the\nresults aren't filtered by it.\n\nTo filter the list, use the filter parameters for each field instead, such as `name` and\n`isEnabled`.\n"
      },
      "Sort": {
        "name": "sort",
        "in": "query",
        "required": false,
        "deprecated": true,
        "schema": {
          "type": "string"
        },
        "description": "**Deprecated.** The API ignores `sort`. A request that includes it still succeeds, but the\nresults aren't sorted by it.\n\nTo sort the list, use `sortBy` and `sortOrder` instead.\n"
      },
      "UserId": {
        "name": "userId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        },
        "description": "The ID (UUID) of a user.\n",
        "example": "8b1e0d8a-7f3b-4a52-9c11-9a4e1d2c8f31"
      },
      "AssignmentId": {
        "name": "assignmentId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        },
        "description": "The ID (UUID) of a role assignment.",
        "example": "c0ffee00-cafe-4bad-feed-faceb00cf00d"
      },
      "ServiceUserName": {
        "name": "name",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        "description": "Filter service users by `name`. The match is case-insensitive and can be any part of the name,\nso `deploy` matches `ci-deploy`.\n\nThe filter text doesn't have to be a valid service user name, so a fragment such as `-bot`\nworks.\n",
        "example": "ci-deploy"
      },
      "ServiceUserIsEnabled": {
        "name": "isEnabled",
        "in": "query",
        "required": false,
        "schema": {
          "type": "boolean"
        },
        "description": "Filter service users by whether they're enabled, as returned in `principal.isEnabled`.\n\n- `true` returns only enabled service users.\n- `false` returns only service users that have been disabled with `isEnabled` on\n  `PATCH /service-users/{serviceUserId}`.\n- If you omit `isEnabled`, the API returns both.\n\n`isEnabled` is independent of the deprecated `status` filter. A service user can be `ACTIVE`\nand disabled at the same time.\n\nThe filter only narrows the list. `isEnabled=false` returns the disabled service users from\nthe same set that `GET /service-users` returns without the filter. Deleting a service user also\ndisables it, but deleted service users aren't listed for either value.\n\nA value other than `true` or `false`, including an empty `isEnabled=`, returns `400` with the\nerror code `VALIDATION_ERROR`.\n",
        "example": true
      },
      "ServiceUserStatusFilter": {
        "name": "status",
        "in": "query",
        "required": false,
        "deprecated": true,
        "schema": {
          "type": "string",
          "enum": [
            "ACTIVE",
            "INACTIVE"
          ]
        },
        "description": "**Deprecated.** Use `isEnabled` instead. `status` still works.\n\nFilter service users by `status`.\n\n- `ACTIVE`: The service user isn't deactivated.\n- `INACTIVE`: The service user is deactivated. The API keeps the service user, and you can\n  still manage it.\n\n`status` doesn't affect whether a service user can authenticate. A service user can\nauthenticate with its API tokens when it's enabled and your account is active.\n\n`GET /service-users` lists only `ACTIVE` and `INACTIVE` service users, so if you omit\n`status`, the API returns both. Deleted service users aren't listed. Any other value returns\n`400` with the error code `VALIDATION_ERROR`.\n\n`status` is independent of `isEnabled`, and the `status` filter doesn't consider whether a\nservice user is enabled. A service user can be `ACTIVE` and disabled at the same time.\n",
        "example": "ACTIVE"
      },
      "ServiceUserApiTokenCount": {
        "name": "apiTokenCount",
        "in": "query",
        "required": false,
        "style": "deepObject",
        "explode": true,
        "schema": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "gte": {
              "type": "integer",
              "minimum": 0,
              "description": "Minimum active token count, inclusive."
            },
            "lte": {
              "type": "integer",
              "minimum": 0,
              "description": "Maximum active token count, inclusive."
            },
            "gt": {
              "type": "integer",
              "minimum": 0,
              "description": "Minimum active token count, exclusive."
            },
            "lt": {
              "type": "integer",
              "minimum": 0,
              "description": "Maximum active token count, exclusive."
            },
            "eq": {
              "type": "integer",
              "minimum": 0,
              "description": "Exact active token count."
            }
          }
        },
        "description": "Filter service users by their number of active API tokens, using bracket-suffix notation.\nSupply one or more of the sub-keys `gte`, `lte`, `gt`, `lt`, and `eq`.\n\nAn active token is enabled and hasn't expired. Disabled and expired tokens aren't counted, so\nthe filter uses the same count as `principal.tokenCount`.\n\nFor example:\n- `apiTokenCount[eq]=0` returns service users with no active tokens.\n- `apiTokenCount[gte]=5` returns service users with at least 5 active tokens.\n- `apiTokenCount[gte]=1&apiTokenCount[lte]=3` returns service users with 1 to 3 active tokens.\n\nA service user matches only when its count meets every sub-key you send, `eq` included. For\nexample, `apiTokenCount[eq]=2&apiTokenCount[gte]=1` returns service users with exactly 2 active\ntokens. A combination that no count can meet, such as\n`apiTokenCount[gte]=10&apiTokenCount[lte]=5`, returns an empty `data` array, not an error.\n\nThe API returns `400` with the error code `VALIDATION_ERROR` for an unknown sub-key, such as\n`apiTokenCount[between]=1`, or for a value that's empty, negative, or not an integer.\n"
      },
      "ServiceUserRoleIds": {
        "name": "roleIds",
        "in": "query",
        "required": false,
        "style": "form",
        "explode": false,
        "description": "Filter service users by role, as a comma-separated list of role IDs, for example\n`roleIds=9f8c2a14-2b1e-4f3a-8d2c-1b9e8d7c6a5b,1c6d0e9a-4b2f-4e8a-9d3c-7a5b2e1f0c84`. A service\nuser matches when it holds any of the roles, at any scope, so each extra role ID widens the\nresults.\n\nThe `self` role never matches. Every user and service user holds it, so a filter with only the\n`self` role returns no service users. A role ID that doesn't exist in your account matches no\nservice users, and the API doesn't reject it.\n",
        "schema": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string",
            "format": "uuid"
          },
          "example": [
            "9f8c2a14-2b1e-4f3a-8d2c-1b9e8d7c6a5b"
          ]
        }
      },
      "ServiceUserSortBy": {
        "name": "sortBy",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "name",
            "createdAt",
            "updatedAt",
            "isEnabled",
            "status",
            "apiTokenCount"
          ],
          "default": "name"
        },
        "description": "Field to sort service users by. By default, service users are sorted by `name` in ascending\norder.\n\n- `name`: The service user name. This is the default.\n- `createdAt`: When the service user was created.\n- `updatedAt`: When the service user was last changed.\n- `isEnabled`: Whether the service user is enabled, from `principal.isEnabled`. In ascending\n  order, disabled service users come first.\n- `status`: **Deprecated.** The service user's `status`, sorted alphabetically by value, so\n  `ACTIVE` comes before `INACTIVE` in ascending order. Use `isEnabled` instead.\n- `apiTokenCount`: The number of active API tokens, from `principal.tokenCount`.\n\nText sorts are case-insensitive. Service users with the same value are sorted by\n`principal.principalId`, so the order is stable from page to page.\n\nYou can't sort by role, because a service user can hold several roles. To narrow the list by\nrole, use `roleIds`.\n",
        "example": "name"
      },
      "ServiceUserSortOrder": {
        "name": "sortOrder",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "asc",
            "desc"
          ],
          "default": "asc"
        },
        "description": "Sort direction: `asc` for ascending or `desc` for descending. The default is `asc`, so with\nthe default `sortBy` service users are listed A to Z by `name`. In ascending order, text sorts\nA to Z, timestamps sort oldest first, `apiTokenCount` sorts lowest first, and `isEnabled` lists\ndisabled service users first.\n",
        "example": "asc"
      },
      "ServiceUserId": {
        "name": "serviceUserId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        },
        "description": "The ID (UUID) of a service user.\n",
        "example": "d1f23a4c-5e67-48b9-90a1-2c3d4e5f6789"
      },
      "RoleId": {
        "name": "roleId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        },
        "description": "The ID (UUID) of a role.",
        "example": "9f8c2a14-2b1e-4f3a-8d2c-1b9e8d7c6a5b"
      }
    },
    "headers": {
      "XRequestId": {
        "description": "The ID of the request, for example `req_2033dc03-f17d-47fe-a619-897ae3629d16`. It can differ from an `X-Request-Id` that you sent. Include it when you contact support.",
        "schema": {
          "type": "string",
          "pattern": "^[A-Za-z0-9._~-]{8,128}$",
          "example": "req_2033dc03-f17d-47fe-a619-897ae3629d16"
        }
      },
      "XRateLimitLimit": {
        "description": "Maximum number of requests permitted in the current rate-limit window.",
        "schema": {
          "type": "integer",
          "minimum": 0,
          "example": 1000
        }
      },
      "XRateLimitRemaining": {
        "description": "Number of requests remaining in the current rate-limit window.",
        "schema": {
          "type": "integer",
          "minimum": 0,
          "example": 950
        }
      },
      "XRateLimitReset": {
        "description": "Unix timestamp (seconds) at which the current rate-limit window resets.",
        "schema": {
          "type": "integer",
          "minimum": 0,
          "example": 1719014400
        }
      },
      "RetryAfter": {
        "description": "Number of seconds the client should wait before retrying the request.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "examples": [
            30
          ]
        }
      },
      "Location": {
        "description": "The URI of a resource related to the response. Most `201 Created` and `202 Accepted` responses\ninclude it.\n\n- On `201 Created`, it's the URI of the new resource, for example `/v1/zones/example.com.`.\n  Not every `201` response includes it.\n- On `202 Accepted`, it's the URI of the asynchronous task, for example\n  `/v1/tasks/async/{taskId}`. Poll it to get the final result. If a `202` response doesn't\n  include it, the task already finished, and the body shows its final status.\n\nTreat the URI as opaque and follow it as it is. The API doesn't put client state in its query\nstring.\n\nThe URI is a path that starts with `/v1`. Add it to the scheme and host that you sent the\nrequest to, for example `https://api.dns.digicert.com/v1/zones/example.com.`.\n",
        "schema": {
          "type": "string",
          "format": "uri-reference",
          "examples": [
            "/v1/zones/example.com.",
            "/v1/tasks/async/5b7d2c1a-3f8e-4a2c-9d1b-7f6e5a4c3b2a"
          ]
        }
      },
      "XIdempotentReplayed": {
        "description": "Set to `true` when the response is a stored copy of the response to an earlier request with the same `Idempotency-Key`, and the request didn't run again. The header isn't sent the first time a request runs.",
        "schema": {
          "type": "boolean",
          "enum": [
            true
          ],
          "example": true
        }
      }
    },
    "schemas": {
      "AccountStatus": {
        "type": "string",
        "description": "Status of an account.\n\n- `ACTIVE`: The account is in normal use.\n- `INACTIVE`: The account is disabled. DigiCert DNS keeps its data, but its users and service\n  users can't authenticate.\n- `DELETED`: The account is deleted. DigiCert DNS keeps a record of it, but its users and\n  service users can't authenticate or use the API.\n",
        "enum": [
          "ACTIVE",
          "INACTIVE",
          "DELETED"
        ],
        "example": "ACTIVE"
      },
      "AccountSummary": {
        "type": "object",
        "description": "The ID, name, and status of an account. The API includes it where the full account record\nisn't needed, for example in the `GET /me` response.\n",
        "required": [
          "id",
          "name",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true,
            "description": "ID of the account."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "description": "Display name of the account."
          },
          "status": {
            "$ref": "#/components/schemas/AccountStatus"
          }
        },
        "example": {
          "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
          "name": "Example Corp",
          "status": "ACTIVE"
        }
      },
      "VisibleUserStatus": {
        "type": "string",
        "description": "Status of a user or service user.\n\n- `ACTIVE`: The user or service user is active. They can authenticate and use their roles\n  unless they're disabled (`principal.isEnabled` is `false`).\n- `INACTIVE`: The user is deactivated and can't authenticate. The API keeps them, and you\n  can still manage them. A service user's `status` doesn't affect whether it can\n  authenticate. To stop a service user from authenticating, set `principal.isEnabled` to\n  `false`.\n\nThe API returns only these two values. `GET /users` and `GET /service-users` leave out users\nand service users with any other status, and getting or updating one returns `404`, the same\nas for an ID that doesn't exist or belongs to another account. A deleted service user is one\nexample.\n",
        "enum": [
          "ACTIVE",
          "INACTIVE"
        ],
        "example": "ACTIVE"
      },
      "PrincipalSummary": {
        "type": "object",
        "description": "The access details of a user or service user: whether they're enabled, their roles, and how\nmany active API tokens they have. A principal is the identity that roles and API tokens attach\nto: a user or a service user.\n",
        "required": [
          "principalId",
          "isEnabled",
          "roleAssignments",
          "tokenCount"
        ],
        "properties": {
          "principalId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true,
            "description": "ID of the principal for the user or service user."
          },
          "isEnabled": {
            "type": "boolean",
            "description": "Whether the user or service user is enabled in the account. A disabled user or service\nuser can't authenticate. To change it, set `isEnabled` with `PATCH /users/{userId}` or\n`PATCH /service-users/{serviceUserId}`.\n\n`isEnabled` is independent of `status`. An `ACTIVE` user or service user can be disabled,\nand an `INACTIVE` one can still be enabled. The `isEnabled` filter and sort on `GET /users`\nand `GET /service-users` are based on `principal.isEnabled`.\n"
          },
          "roleAssignments": {
            "type": "array",
            "description": "The roles assigned to the user or service user, with the ID and name of each. This\nincludes the built-in `self` role, which the role assignment lists leave out. For the full\nrole assignments, use `GET /users/{userId}/role-assignments` or\n`GET /service-users/{serviceUserId}/role-assignments`.\n",
            "items": {
              "type": "object",
              "required": [
                "roleId",
                "name"
              ],
              "properties": {
                "roleId": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128
                }
              }
            }
          },
          "tokenCount": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of active API tokens that the user or service user has. A token is active when\nit's enabled and hasn't expired. Disabled and expired tokens don't count.\n"
          }
        },
        "example": {
          "principalId": "0fa6b8d2-3c47-4e9d-bf1c-58be91e07a40",
          "isEnabled": true,
          "roleAssignments": [
            {
              "roleId": "9f8c2a14-2b1e-4f3a-8d2c-1b9e8d7c6a5b",
              "name": "Zone Editor"
            }
          ],
          "tokenCount": 2
        }
      },
      "User": {
        "type": "object",
        "description": "A user in an account: a person who signs in to DigiCert DNS.\n\n`principal` shows whether the user is enabled, their roles, and how many active API tokens\nthey have. The user's name, email address, and phone number come from their identity\nprovider profile.\n",
        "required": [
          "id",
          "username",
          "email",
          "status",
          "principal",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true,
            "description": "ID of the user."
          },
          "username": {
            "type": "string",
            "minLength": 1,
            "maxLength": 320,
            "description": "Username that the user signs in with. No two users share a username.\n"
          },
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 320,
            "description": "Primary email address of the user."
          },
          "firstName": {
            "type": "string",
            "maxLength": 128,
            "description": "First name of the user, from their identity provider profile. It's missing when the\nprofile doesn't include one.\n"
          },
          "lastName": {
            "type": "string",
            "maxLength": 128,
            "description": "Last name of the user, from their identity provider profile. It's missing when the\nprofile doesn't include one.\n"
          },
          "phone": {
            "type": "string",
            "maxLength": 64,
            "description": "Phone number of the user, from their identity provider profile, as free-form text. It's\nmissing when the profile doesn't include one. The API doesn't check its format.\n"
          },
          "status": {
            "$ref": "#/components/schemas/VisibleUserStatus",
            "readOnly": true,
            "description": "Status of the user. The API returns only `ACTIVE` or `INACTIVE`. Users with any other\nstatus aren't listed, and getting or updating them returns `404`. You can't set `status`.\nTo enable or disable the user, use `principal.isEnabled`.\n"
          },
          "principal": {
            "$ref": "#/components/schemas/PrincipalSummary"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "example": {
          "id": "8b1e0d8a-7f3b-4a52-9c11-9a4e1d2c8f31",
          "username": "jane.doe",
          "email": "jane.doe@example.com",
          "firstName": "Jane",
          "lastName": "Doe",
          "phone": "+1-555-0142",
          "status": "ACTIVE",
          "principal": {
            "principalId": "0fa6b8d2-3c47-4e9d-bf1c-58be91e07a40",
            "isEnabled": true,
            "roleAssignments": [
              {
                "roleId": "9f8c2a14-2b1e-4f3a-8d2c-1b9e8d7c6a5b",
                "name": "Zone Editor"
              }
            ],
            "tokenCount": 2
          },
          "createdAt": "2025-11-04T13:21:09Z",
          "updatedAt": "2026-05-02T09:18:33Z"
        }
      },
      "PrincipalType": {
        "type": "string",
        "description": "The kind of identity a principal is. A principal is the identity that roles and API tokens\nattach to: a user or a service user.\n\n- `USER`: A user, that is, a person who signs in to DigiCert DNS.\n- `SERVICE_USER`: A service user, that is, a non-human identity such as a script or\n  integration. A service user authenticates only with API tokens.\n",
        "enum": [
          "USER",
          "SERVICE_USER"
        ],
        "example": "USER"
      },
      "ActorRef": {
        "type": "object",
        "description": "The user or service user that performed an action.\n\n`id` is the ID of the user or service user, as `type` indicates. Use it to look up the actor\nwith `GET /users/{userId}` or `GET /service-users/{serviceUserId}`.\n\nA service user has no sign-in name, so when `type` is `SERVICE_USER`, `username` is the service\nuser's ID. If you display the actor, expect a UUID in that case.\n",
        "required": [
          "id",
          "username",
          "type"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true,
            "description": "ID of the user (when `type` is `USER`) or service user (when `type` is `SERVICE_USER`)\nthat performed the action.\n"
          },
          "username": {
            "type": "string",
            "minLength": 1,
            "readOnly": true,
            "description": "Username of the actor, for display. For a service user, it's the service user's ID."
          },
          "type": {
            "$ref": "#/components/schemas/PrincipalType",
            "readOnly": true
          }
        },
        "example": {
          "id": "8b1e0d8a-7f3b-4a52-9c11-9a4e1d2c8f31",
          "username": "jane.doe",
          "type": "USER"
        }
      },
      "ServiceUser": {
        "type": "object",
        "description": "A service user in an account. A service user is a non-human identity, for example a script or\nintegration, that authenticates only with API tokens.\n\n`principal` shows whether the service user is enabled, its roles, and how many active API\ntokens it has.\n",
        "required": [
          "id",
          "accountId",
          "name",
          "username",
          "status",
          "principal",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "accountId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true,
            "description": "ID of the account that the service user belongs to."
          },
          "name": {
            "type": "string",
            "minLength": 2,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,126}[A-Za-z0-9]$",
            "description": "Name of the service user. It's unique among the service users in the account. After you\ndelete a service user, you can reuse its name.\n\nUse letters, digits, hyphens (`-`), and underscores (`_`). The first and last characters\nhave to be a letter or a digit. The API keeps the case you use, and names are\ncase-sensitive, so `Bot` and `bot` are different names.\n"
          },
          "username": {
            "type": "string",
            "minLength": 1,
            "maxLength": 320,
            "readOnly": true,
            "description": "Username of the service user. The API sets it to the service user's `id` when it creates\nthe service user, and you can't change it.\n"
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "description": "Description of the service user."
          },
          "status": {
            "$ref": "#/components/schemas/VisibleUserStatus",
            "readOnly": true,
            "description": "Status of the service user. The API returns only `ACTIVE` or `INACTIVE`. A deleted\nservice user isn't listed, and getting or updating it returns `404`. You can't set\n`status`. To enable or disable the service user, use `principal.isEnabled`.\n"
          },
          "createdBy": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ActorRef"
              },
              {
                "type": "null"
              }
            ],
            "readOnly": true,
            "description": "The user or service user that created the service user. `id` is the creator's user or\nservice user ID, as `type` indicates.\n\nIt's `null` when DigiCert DNS created the service user itself, or when the creator can't\nbe identified.\n"
          },
          "principal": {
            "$ref": "#/components/schemas/PrincipalSummary"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "example": {
          "id": "d1f23a4c-5e67-48b9-90a1-2c3d4e5f6789",
          "accountId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
          "name": "ci-deploy-bot",
          "username": "d1f23a4c-5e67-48b9-90a1-2c3d4e5f6789",
          "description": "Used by the CI pipeline to push DNS records.",
          "status": "ACTIVE",
          "createdBy": {
            "id": "8b1e0d8a-7f3b-4a52-9c11-9a4e1d2c8f31",
            "username": "jane.doe",
            "type": "USER"
          },
          "principal": {
            "principalId": "7b22e3a1-c9f4-4a18-b6e2-0d4f3a8e1c2b",
            "isEnabled": true,
            "roleAssignments": [
              {
                "roleId": "9f8c2a14-2b1e-4f3a-8d2c-1b9e8d7c6a5b",
                "name": "Zone Editor"
              }
            ],
            "tokenCount": 1
          },
          "createdAt": "2026-01-12T15:44:01Z",
          "updatedAt": "2026-04-22T11:09:55Z"
        }
      },
      "MeContext": {
        "type": "object",
        "description": "Your account and your profile, as returned by `GET /me`. \"You\" means the user or service user\nwhose credential made the call.\n\nThe response includes exactly one of `user` or `serviceUser`:\n\n- If you're a user, the response includes `user` and not `serviceUser`.\n- If you're a service user, the response includes `serviceUser` and not `user`.\n\n`user` and `serviceUser` are the same as the responses from `GET /users/{userId}` and\n`GET /service-users/{serviceUserId}`. Each one includes a `principal` with your role\nassignments and the number of your active API tokens.\n\nThe API determines your account from the credential you sent.\n",
        "required": [
          "account"
        ],
        "properties": {
          "account": {
            "$ref": "#/components/schemas/AccountSummary"
          },
          "user": {
            "$ref": "#/components/schemas/User"
          },
          "serviceUser": {
            "$ref": "#/components/schemas/ServiceUser"
          }
        },
        "oneOf": [
          {
            "title": "MeUserContext",
            "description": "Your account and profile, when you're a user.",
            "required": [
              "user"
            ],
            "not": {
              "required": [
                "serviceUser"
              ]
            }
          },
          {
            "title": "MeServiceUserContext",
            "description": "Your account and profile, when you're a service user.",
            "required": [
              "serviceUser"
            ],
            "not": {
              "required": [
                "user"
              ]
            }
          }
        ],
        "example": {
          "account": {
            "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
            "name": "Example Corp",
            "status": "ACTIVE"
          },
          "user": {
            "id": "8b1e0d8a-7f3b-4a52-9c11-9a4e1d2c8f31",
            "username": "jane.doe",
            "email": "jane.doe@example.com",
            "firstName": "Jane",
            "lastName": "Doe",
            "phone": "+1-555-0142",
            "status": "ACTIVE",
            "principal": {
              "principalId": "0fa6b8d2-3c47-4e9d-bf1c-58be91e07a40",
              "isEnabled": true,
              "roleAssignments": [
                {
                  "roleId": "9f8c2a14-2b1e-4f3a-8d2c-1b9e8d7c6a5b",
                  "name": "Zone Editor"
                }
              ],
              "tokenCount": 2
            },
            "createdAt": "2025-11-04T13:21:09Z",
            "updatedAt": "2026-05-02T09:18:33Z"
          }
        }
      },
      "ProblemDetail": {
        "type": "object",
        "description": "An error response in the Problem Details format that RFC 9457 defines.",
        "required": [
          "type",
          "title",
          "status",
          "code"
        ],
        "properties": {
          "type": {
            "type": "string",
            "format": "uri",
            "description": "A URI that identifies the type of problem.",
            "examples": [
              "https://errors.dns.digicert.com/bad-request"
            ]
          },
          "title": {
            "type": "string",
            "description": "A short, readable summary of the problem.",
            "examples": [
              "Validation Error"
            ]
          },
          "status": {
            "type": "integer",
            "description": "The HTTP status code.",
            "examples": [
              400
            ]
          },
          "detail": {
            "type": "string",
            "description": "A readable explanation of the specific error. When the error comes from the DNS provider,\nit's the provider's message, which can start with a numeric provider code, for example\n`[53001] Invalid zone type`. Several provider messages are joined with `; `.\n",
            "examples": [
              "[53001] Invalid zone type",
              "The 'name' field mustn't be empty."
            ]
          },
          "code": {
            "type": "string",
            "description": "A stable, machine-readable code for the error category. It never changes for a given\ncategory, so you can build automation on it. It's different from `errors[].code`, which\nclassifies a single field error.\n\nThe codes depend on the operation. The two examples are what zone and record operations\nand user and role operations return for the same `400` error. Don't assume that every\noperation returns every code.\n",
            "examples": [
              "VALIDATION_FAILED",
              "VALIDATION_ERROR"
            ]
          },
          "instance": {
            "type": "string",
            "format": "uri",
            "description": "A URI that identifies this occurrence of the problem."
          },
          "errors": {
            "type": "array",
            "maxItems": 100,
            "description": "The field-level validation errors. They're present when a request body or a batch fails\nvalidation, and absent when the error comes from the DNS provider. The list holds at most\n100 entries. If there are more, the list stops at 100 and `detail` says so.\n",
            "items": {
              "type": "object",
              "required": [
                "message"
              ],
              "properties": {
                "field": {
                  "type": "string",
                  "description": "The path of the field within the request or sub-request."
                },
                "message": {
                  "type": "string",
                  "description": "A readable message about the field error."
                },
                "code": {
                  "type": "string",
                  "description": "A machine-readable code for the field error, such as `REQUIRED`, `INVALID_FORMAT`, `INVALID_VALUE`, or `OUT_OF_RANGE`. It's different from the top-level `code`.\n"
                },
                "index": {
                  "type": "integer",
                  "minimum": 0,
                  "description": "The zero-based position of the sub-request in a batch. It's present only in batch responses."
                }
              }
            }
          }
        }
      },
      "PermissionAction": {
        "type": "string",
        "description": "An action that a permission allows on a resource. Actions are always in lower case.\n\n- `create`: Create the resource.\n- `read`: View the resource.\n- `update`: Change the resource.\n- `delete`: Delete the resource.\n",
        "enum": [
          "create",
          "read",
          "update",
          "delete"
        ],
        "example": "read"
      },
      "EffectivePermissions": {
        "type": "object",
        "description": "What a user or service user can do in an account once all their roles are combined.\n\n`permissions` maps each resource to its scope targets, and each scope target to the actions\nallowed on it:\n\n- Each key in `permissions` is a resource, such as `account.zones`.\n- Each key under a resource is a scope target. `*` means every target in the account. Any\n  other key is the ID of a single target, such as a zone.\n- Each array lists the allowed actions, in lower case. An action that isn't in the array isn't\n  allowed. An empty array means no actions are allowed on that target.\n\nA permission granted on a resource also applies to the resources nested under it, and\n`permissions` already includes them. For example, a permission on `account.zones` also appears\non `account.zones.records`. A resource that isn't in `permissions` has no permissions at all.\n",
        "required": [
          "principalId",
          "accountId",
          "permissions"
        ],
        "properties": {
          "principalId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "accountId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "permissions": {
            "type": "object",
            "description": "The allowed actions, keyed by resource and then by scope target.\n",
            "additionalProperties": {
              "type": "object",
              "additionalProperties": {
                "type": "array",
                "uniqueItems": true,
                "items": {
                  "$ref": "#/components/schemas/PermissionAction"
                }
              }
            }
          }
        },
        "example": {
          "principalId": "0fa6b8d2-3c47-4e9d-bf1c-58be91e07a40",
          "accountId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
          "permissions": {
            "account.zones": {
              "*": [
                "read"
              ],
              "5a1f9d3c-7e22-4f8b-b1a0-0c4d2e6f8a91": [
                "create",
                "read",
                "update",
                "delete"
              ]
            },
            "account.zones.records": {
              "*": [
                "read"
              ],
              "5a1f9d3c-7e22-4f8b-b1a0-0c4d2e6f8a91": [
                "create",
                "read",
                "update",
                "delete"
              ]
            },
            "account.dns_settings.inbound": {
              "*": [
                "create",
                "read",
                "update",
                "delete"
              ]
            },
            "account.dns_settings.nameserver_sets": {
              "*": [
                "create",
                "read",
                "update",
                "delete"
              ]
            },
            "account.dns_settings.outbound": {
              "*": [
                "create",
                "read",
                "update",
                "delete"
              ]
            },
            "account.dns_settings.tsigs": {
              "*": [
                "create",
                "read",
                "update",
                "delete"
              ]
            }
          }
        }
      },
      "ApiToken": {
        "type": "object",
        "description": "An API token that belongs to a user or service user. You send the token value in the\n`X-API-Key` header to authenticate requests.\n\nThe API returns the token value only once, in the response when you create the token. No other\nresponse includes it. To recognize a token later, use its `name` or `tokenPrefix`.\n\n- `isEnabled` controls whether the token can authenticate requests. You can disable and\n  re-enable a token as often as you need.\n- `expiresAt` is when the token stops working. It's `null` for a token that doesn't expire.\n- `revokedAt` is when the token was disabled. It's `null` while the token is enabled.\n- `lastUsedAt` is when the token was last used to authenticate a request.\n\nDeleting a token removes it permanently. To stop a token from working but keep it, disable it\ninstead.\n",
        "required": [
          "id",
          "principalId",
          "name",
          "tokenPrefix",
          "isEnabled",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "principalId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "Display name of the token. Names don't have to be unique."
          },
          "description": {
            "type": "string",
            "maxLength": 1024
          },
          "tokenPrefix": {
            "type": "string",
            "minLength": 8,
            "maxLength": 32,
            "readOnly": true,
            "description": "The first 12 characters of the token value. It isn't secret, so you can display it to\nhelp recognize the token. It never reveals the full token value.\n",
            "example": "ExampleToken"
          },
          "isEnabled": {
            "type": "boolean",
            "description": "Whether the token can authenticate requests. Setting `isEnabled` to `false` disables the\ntoken right away and sets `revokedAt`. Setting it back to `true` re-enables the token and\nclears `revokedAt`.\n"
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the token stops working. The API rejects the token from this time on. It's `null` for\na token that doesn't expire. There's no maximum lifetime.\n"
          },
          "lastUsedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true,
            "description": "When the token was last used to authenticate a request. It's `null` for a token that\nhasn't been used. The API records usage periodically, so `lastUsedAt` can trail the most\nrecent request by a short time.\n"
          },
          "revokedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true,
            "description": "When the token was disabled. The API sets `revokedAt` when you set `isEnabled` to `false`\nand clears it when you re-enable the token. It's `null` while the token is enabled.\n"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "example": {
          "id": "31415926-5358-9793-2384-626433832795",
          "principalId": "7b22e3a1-c9f4-4a18-b6e2-0d4f3a8e1c2b",
          "name": "ci-prod-2026",
          "description": "CI deploy token, prod pipeline.",
          "tokenPrefix": "ExampleToken",
          "isEnabled": true,
          "expiresAt": "2027-05-22T00:00:00Z",
          "lastUsedAt": "2026-05-21T16:04:11Z",
          "revokedAt": null,
          "createdAt": "2026-05-22T09:00:00Z"
        }
      },
      "Pagination": {
        "type": "object",
        "description": "The pagination details that every list operation returns.\n\nTest `hasMore` to decide whether to fetch another page. It's the only field to test, and it's\nreliable on every list operation.\n\nOn a **cursor-based** operation, `nextPageToken` is set whenever `hasMore` is `true`. Send it\nas the `pageToken` query parameter on the next request. When `prevPageToken`,\n`firstPageToken`, and `lastPageToken` are present, they're cursors for moving back or jumping\nto the first or last page.\n\nOn an **offset-based** operation, `nextPageToken` is always `null`, and the other cursors\naren't returned. Use `offset` to move between pages. A response with `hasMore: true` and\n`nextPageToken: null` is normal on these operations.\n",
        "required": [
          "nextPageToken",
          "hasMore"
        ],
        "properties": {
          "nextPageToken": {
            "type": [
              "string",
              "null"
            ],
            "description": "An opaque cursor for the next page. On a cursor-based operation, it's set only when\n`hasMore` is `true`. On an offset-based operation, it's always `null`. Use it to fetch the\nnext page, and test `hasMore` to decide whether there is one.\n"
          },
          "prevPageToken": {
            "type": [
              "string",
              "null"
            ],
            "description": "An opaque cursor for the previous page. It's `null` on the first page, or when the\noperation doesn't support moving back.\n"
          },
          "firstPageToken": {
            "type": [
              "string",
              "null"
            ],
            "description": "An opaque cursor for the first page. Sending it usually has the same effect as omitting\n`pageToken`.\n"
          },
          "lastPageToken": {
            "type": [
              "string",
              "null"
            ],
            "description": "An opaque cursor for the last page. It's `null` when there are no results, or when the\noperation doesn't support jumping to the last page. If the data changes after the cursor\nis issued, the API still returns a valid page, which can contain fewer than `pageSize`\nitems.\n"
          },
          "hasMore": {
            "type": "boolean",
            "description": "`true` when more results exist after the current page. Test it to decide whether to fetch the next page."
          }
        }
      },
      "ApiTokenList": {
        "type": "object",
        "description": "A page of a user's or service user's API tokens, with pagination details. The list includes\ndisabled tokens, and it never includes token values.\n",
        "required": [
          "data",
          "pagination"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiToken"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        }
      },
      "ApiTokenCreate": {
        "type": "object",
        "description": "The details of an API token to create for a user or service user.\n",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "Display name of the token. Names don't have to be unique."
          },
          "description": {
            "type": "string",
            "maxLength": 1024
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the token stops working. If you omit `expiresAt`, the token doesn't expire. There's\nno maximum lifetime, but the time has to be in the future. Otherwise, the API returns `400`\nwith the error code `INVALID_TOKEN_EXPIRATION`.\n"
          }
        },
        "example": {
          "name": "ci-prod-2026",
          "description": "CI deploy token, prod pipeline.",
          "expiresAt": "2027-05-22T00:00:00Z"
        }
      },
      "ApiTokenCreated": {
        "type": "object",
        "description": "A new API token, including its token value. The API returns the token value only in this\nresponse, so store it securely right away. Later responses show only `tokenPrefix`.\n",
        "allOf": [
          {
            "$ref": "#/components/schemas/ApiToken"
          },
          {
            "type": "object",
            "required": [
              "token"
            ],
            "properties": {
              "token": {
                "type": "string",
                "minLength": 32,
                "maxLength": 256,
                "description": "The token value. Send it in the `X-API-Key` header to authenticate requests. The API\nreturns it only when you create the token. If you lose it, delete the token and create\na new one.\n",
                "example": "ExampleToken0123456789abcdefghijklmnopqrstu"
              }
            }
          }
        ]
      },
      "ApiTokenUpdate": {
        "type": "object",
        "description": "Changes to an API token. Include at least one property. The API leaves any property you omit\nunchanged.\n\nSet `isEnabled` to `false` to disable the token, or to `true` to re-enable it. You can't change\n`expiresAt` after you create the token. To remove a token permanently, delete it.\n",
        "minProperties": 1,
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "description": {
            "type": "string",
            "maxLength": 1024
          },
          "isEnabled": {
            "type": "boolean",
            "description": "Set to `false` to disable the token, or to `true` to re-enable it. Disabling a token stops\nit from authenticating requests right away and sets `revokedAt`, but it doesn't delete the\ntoken. Re-enabling clears `revokedAt`.\n"
          }
        },
        "example": {
          "isEnabled": false
        }
      },
      "UserList": {
        "type": "object",
        "description": "A page of the users in your account, with pagination details.",
        "required": [
          "data",
          "pagination"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/User"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        }
      },
      "UserUpdate": {
        "type": "object",
        "description": "Changes to a user. You can change only `isEnabled`, so include it.\n\nThe user's name, email address, phone number, and `status` come from their identity provider,\nand you can't change them with the API.\n",
        "minProperties": 1,
        "properties": {
          "isEnabled": {
            "type": "boolean",
            "description": "Set to `false` to disable the user, or to `true` to enable them again. A disabled user\ncan't authenticate. You can't set your own `isEnabled`: the API returns `403` with the\nerror code `SELF_STATUS_CHANGE_NOT_ALLOWED`.\n"
          }
        },
        "example": {
          "isEnabled": false
        }
      },
      "RoleAssignment": {
        "type": "object",
        "description": "A role assigned to a user or service user. A user or service user can hold several role\nassignments, one for each role.\n",
        "required": [
          "id",
          "principalId",
          "roleId"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "principalId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true,
            "description": "ID of the principal that holds the role, that is, the user or service user."
          },
          "roleId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the assigned role."
          }
        },
        "example": {
          "id": "c0ffee00-cafe-4bad-feed-faceb00cf00d",
          "principalId": "0fa6b8d2-3c47-4e9d-bf1c-58be91e07a40",
          "roleId": "9f8c2a14-2b1e-4f3a-8d2c-1b9e8d7c6a5b"
        }
      },
      "RoleAssignmentList": {
        "type": "object",
        "description": "A page of the role assignments that a user or service user holds, with pagination details.",
        "required": [
          "data",
          "pagination"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoleAssignment"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        }
      },
      "RoleAssignmentCreate": {
        "type": "object",
        "description": "A role to assign to a user or service user. The API never creates duplicate assignments. If\nthe user or service user already holds the role, the API keeps the existing assignment.\n",
        "required": [
          "roleId"
        ],
        "properties": {
          "roleId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the role to assign."
          }
        },
        "example": {
          "roleId": "9f8c2a14-2b1e-4f3a-8d2c-1b9e8d7c6a5b"
        }
      },
      "RoleAssignmentCreateList": {
        "type": "array",
        "description": "The complete set of roles for a user or service user, used to replace their role\nassignments. Include at least one role. Each role has to be a system role or a custom role in\nthe same account. If you list a role more than once, the API assigns it once.\n",
        "minItems": 1,
        "items": {
          "$ref": "#/components/schemas/RoleAssignmentCreate"
        },
        "example": [
          {
            "roleId": "9f8c2a14-2b1e-4f3a-8d2c-1b9e8d7c6a5b"
          },
          {
            "roleId": "1c2b3a4d-5e6f-4789-9abc-def012345678"
          }
        ]
      },
      "ServiceUserList": {
        "type": "object",
        "description": "A page of the service users in your account, with pagination details.",
        "required": [
          "data",
          "pagination"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServiceUser"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        }
      },
      "ServiceUserCreate": {
        "type": "object",
        "description": "The details of a service user to create.\n\nInclude at least one role in `roleAssignments`, so the service user has the access it needs\nfrom the start. The API checks every role before it creates anything, so if a role isn't\nvalid, the API doesn't create the service user.\n",
        "required": [
          "name",
          "roleAssignments"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 2,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,126}[A-Za-z0-9]$",
            "description": "Name of the service user. It has to be unique among the service users in your account.\nIf another service user already has the name, the API returns `409` with the error code\n`SERVICE_USER_NAME_CONFLICT`. You can reuse the name of a service user that you deleted.\n\nUse letters, digits, hyphens (`-`), and underscores (`_`). The first and last characters\nhave to be a letter or a digit. The API keeps the case you use, and names are\ncase-sensitive, so `Bot` and `bot` are different names.\n"
          },
          "roleAssignments": {
            "type": "array",
            "minItems": 1,
            "description": "Roles to assign to the new service user. Include at least one. Each role has to exist and\nbe one that you can assign. Otherwise, the API returns `404` with the error code\n`ROLE_NOT_FOUND`.\n",
            "items": {
              "$ref": "#/components/schemas/RoleAssignmentCreate"
            }
          },
          "description": {
            "type": "string",
            "maxLength": 1024
          }
        },
        "example": {
          "name": "ci-deploy-bot",
          "roleAssignments": [
            {
              "roleId": "9f8c2a14-2b1e-4f3a-8d2c-1b9e8d7c6a5b"
            }
          ],
          "description": "Used by the CI pipeline to push DNS records."
        }
      },
      "ServiceUserUpdate": {
        "type": "object",
        "description": "Changes to a service user. Include at least one property. The API leaves any property you omit\nunchanged.\n\nUse `isEnabled` to enable or disable the service user. You can't change a protected service\nuser: the API returns `403` with the error code `SERVICE_USER_IMMUTABLE`.\n",
        "minProperties": 1,
        "properties": {
          "name": {
            "type": "string",
            "minLength": 2,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,126}[A-Za-z0-9]$",
            "description": "New name for the service user. The same rules apply as when you create a service user:\nthe name has to be unique among the service users in your account, and you can reuse the\nname of a service user that you deleted. If another service user already has the name, the\nAPI returns `409` with the error code `SERVICE_USER_NAME_CONFLICT`.\n\nNames are case-sensitive, so `Bot` and `bot` are different names.\n"
          },
          "description": {
            "type": "string",
            "maxLength": 1024
          },
          "isEnabled": {
            "type": "boolean",
            "description": "Set to `false` to disable the service user, or to `true` to enable it again. A disabled\nservice user can't authenticate. Disabling a service user doesn't delete it or its API\ntokens. A service user can't set its own `isEnabled`: the API returns `403` with the error\ncode `SELF_STATUS_CHANGE_NOT_ALLOWED`.\n"
          }
        },
        "example": {
          "name": "ci-deploy-bot-v2",
          "description": "Replaces the legacy bot.",
          "isEnabled": false
        }
      },
      "Permission": {
        "type": "object",
        "description": "A permission: the actions that are allowed on a resource. A single permission is written as\n`resource:action`, for example `account.zones:read`.\n\nResources are named with dotted names that follow the resource hierarchy, for example\n`account.zones`, `account.zones.records`, and `account.iam.users`.\n",
        "required": [
          "resource",
          "actions"
        ],
        "properties": {
          "resource": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[a-z][a-z0-9._-]*$",
            "description": "Name of the resource, for example `account.zones`, `account.zones.records`, or\n`account.iam.users`.\n"
          },
          "actions": {
            "type": "array",
            "minItems": 1,
            "uniqueItems": true,
            "items": {
              "$ref": "#/components/schemas/PermissionAction"
            },
            "description": "Actions allowed on the resource, in lower case."
          },
          "description": {
            "type": "string",
            "maxLength": 512,
            "description": "A description of the permission. It isn't currently returned."
          }
        },
        "example": {
          "resource": "account.zones",
          "actions": [
            "read",
            "update"
          ]
        }
      },
      "Role": {
        "type": "object",
        "description": "A role: a named set of permissions that you can assign to users and service users.\n\nThere are two kinds of role:\n\n- System roles (`isSystem: true`, `accountId: null`) are built in to DigiCert DNS and are the\n  same in every account. You can't change them.\n- Custom roles (`isSystem: false`, `accountId` set) belong to one account, and only that\n  account can see them.\n\nA custom role's slug is unique within its account. A system role's slug is unique among\nsystem roles.\n\n`permissions` lists only the permissions granted directly on the role. A permission on a\nresource also applies to the resources nested under it. To get the full list with those\nincluded, use `GET /roles/{roleId}/permissions`.\n",
        "required": [
          "id",
          "slug",
          "name",
          "isSystem",
          "permissions",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true,
            "description": "ID of the role."
          },
          "slug": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9-]*$",
            "description": "Short name of the role, in lower case with hyphens, for example `zone-admin`."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "Display name of the role."
          },
          "isSystem": {
            "type": "boolean",
            "readOnly": true,
            "description": "`true` for a system role, which is built in to DigiCert DNS. `false` for a custom role\nthat belongs to one account. System roles can't be changed, and the API sets `isSystem`\nitself.\n"
          },
          "accountId": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "readOnly": true,
            "description": "ID of the account that owns the role. It's `null` for a system role. A custom role always\nhas an `accountId`.\n"
          },
          "description": {
            "type": "string",
            "maxLength": 1024
          },
          "permissions": {
            "type": "array",
            "description": "The permissions granted directly on the role. They don't include the permissions that\nnested resources inherit. For the full list, use `GET /roles/{roleId}/permissions`.\n",
            "items": {
              "$ref": "#/components/schemas/Permission"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        },
        "example": {
          "id": "9f8c2a14-2b1e-4f3a-8d2c-1b9e8d7c6a5b",
          "slug": "zone-admin",
          "name": "Zone Administrator",
          "isSystem": true,
          "accountId": null,
          "description": "Full control over zones and record sets within the assigned scope.",
          "permissions": [
            {
              "resource": "account.zones",
              "actions": [
                "create",
                "read",
                "update",
                "delete"
              ]
            },
            {
              "resource": "account.zones.records",
              "actions": [
                "create",
                "read",
                "update",
                "delete"
              ]
            }
          ],
          "createdAt": "2025-09-01T10:14:22Z",
          "updatedAt": "2025-09-01T10:14:22Z"
        }
      },
      "RoleList": {
        "type": "object",
        "description": "A page of the roles available in your account, with pagination details.",
        "required": [
          "data",
          "pagination"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Role"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        }
      },
      "RolePermissionMap": {
        "type": "object",
        "description": "The full set of permissions that a role grants, for each resource.\n\nResources form a hierarchy, and a permission on a resource also applies to the resources nested\nunder it. The map already includes those: each resource lists the actions granted on it\ndirectly and the actions it inherits from its parent resources. Roles don't inherit from other\nroles, so every action in the map comes from the role itself. Resources with no allowed\nactions aren't included.\n\nEach array lists only the allowed actions. An action that isn't in the array isn't allowed.\n\nThe map doesn't include a scope. The role determines the scope where it applies.\n",
        "required": [
          "roleId",
          "slug",
          "permissions"
        ],
        "properties": {
          "roleId": {
            "type": "string",
            "format": "uuid",
            "readOnly": true,
            "description": "ID of the role."
          },
          "slug": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9-]*$",
            "description": "Short name of the role, in lower case with hyphens."
          },
          "permissions": {
            "type": "object",
            "description": "The allowed actions for each resource, keyed by resource name. Actions are in lower case:\n`create`, `read`, `update`, and `delete`.\n",
            "additionalProperties": {
              "type": "array",
              "uniqueItems": true,
              "items": {
                "$ref": "#/components/schemas/PermissionAction"
              }
            }
          }
        },
        "example": {
          "roleId": "9f8c2a14-2b1e-4f3a-8d2c-1b9e8d7c6a5b",
          "slug": "zone-editor",
          "permissions": {
            "account.zones": [
              "create",
              "read",
              "update",
              "delete"
            ],
            "account.zones.records": [
              "create",
              "read",
              "update",
              "delete"
            ]
          }
        }
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "The API key is missing or isn't valid.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetail"
            },
            "example": {
              "type": "https://errors.dns.digicert.com/unauthorized",
              "title": "Unauthorized",
              "status": 401,
              "detail": "The X-API-Key header is missing or invalid",
              "code": "UNAUTHORIZED"
            }
          }
        }
      },
      "Forbidden": {
        "description": "The caller doesn't have the permission that the operation requires.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetail"
            },
            "example": {
              "type": "https://errors.dns.digicert.com/forbidden",
              "title": "Forbidden",
              "status": 403,
              "detail": "You do not have permission to access this resource",
              "code": "FORBIDDEN"
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "The request exceeded the rate limit. Retry after the time in the `Retry-After` header.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          },
          "Retry-After": {
            "$ref": "#/components/headers/RetryAfter"
          },
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/XRateLimitLimit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/XRateLimitRemaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/XRateLimitReset"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetail"
            },
            "example": {
              "type": "https://errors.dns.digicert.com/rate-limited",
              "title": "Rate Limited",
              "status": 429,
              "detail": "You have exceeded the allowed request rate. Retry after the Retry-After period."
            }
          }
        }
      },
      "InternalServerError": {
        "description": "An unexpected error occurred.\n\nThe `code` depends on the operation. Zone and record operations return\n`INTERNAL_SERVER_ERROR`. User and role operations return `INTERNAL_ERROR`.\n",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetail"
            },
            "examples": {
              "internalErrorUnifiedApi": {
                "summary": "An unexpected error in a zone or record request",
                "value": {
                  "type": "https://errors.dns.digicert.com/internal-error",
                  "title": "Internal Server Error",
                  "status": 500,
                  "detail": "An unexpected server error occurred",
                  "code": "INTERNAL_SERVER_ERROR"
                }
              },
              "internalErrorRbac": {
                "summary": "An unexpected error in a user or role request",
                "value": {
                  "type": "https://errors.dns.digicert.com/internal-error",
                  "title": "Internal server error",
                  "status": 500,
                  "detail": "An unexpected server error occurred",
                  "code": "INTERNAL_ERROR"
                }
              }
            }
          }
        }
      },
      "ServiceUnavailable": {
        "description": "The service is temporarily unavailable. If the response has a `Retry-After` header, wait that long before you retry.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          },
          "Retry-After": {
            "$ref": "#/components/headers/RetryAfter"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetail"
            },
            "example": {
              "type": "https://errors.dns.digicert.com/service-unavailable",
              "title": "Service Unavailable",
              "status": 503,
              "detail": "The service is temporarily unavailable. Please try again later.",
              "code": "SERVICE_UNAVAILABLE"
            }
          }
        }
      },
      "BadRequest": {
        "description": "The request isn't valid. One or more fields failed validation.\n\nThe `code` depends on the operation. Zone and record operations return `VALIDATION_FAILED`.\nUser and role operations return `VALIDATION_ERROR`. The examples show both.\n",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetail"
            },
            "examples": {
              "validationErrorUnifiedApi": {
                "summary": "A request body field failed validation in a zone or record request",
                "value": {
                  "type": "https://errors.dns.digicert.com/bad-request",
                  "title": "Validation Error",
                  "status": 400,
                  "detail": "Request body contains invalid fields",
                  "code": "VALIDATION_FAILED",
                  "errors": [
                    {
                      "field": "name",
                      "message": "mustn't be empty",
                      "code": "REQUIRED"
                    }
                  ]
                }
              },
              "batchValidation": {
                "summary": "One or more sub-requests in a batch failed validation",
                "value": {
                  "type": "https://errors.dns.digicert.com/bad-request",
                  "title": "Validation Error",
                  "status": 400,
                  "detail": "One or more sub-requests failed validation",
                  "code": "VALIDATION_FAILED",
                  "errors": [
                    {
                      "index": 3,
                      "field": "ttl",
                      "message": "must be a positive integer",
                      "code": "OUT_OF_RANGE"
                    },
                    {
                      "index": 7,
                      "field": "content",
                      "message": "is not valid BIND presentation format",
                      "code": "INVALID_FORMAT"
                    }
                  ]
                }
              },
              "validationErrorRbac": {
                "summary": "A query parameter failed validation in a user or role request",
                "value": {
                  "type": "https://errors.dns.digicert.com/bad-request",
                  "title": "Validation Error",
                  "status": 400,
                  "detail": "Failed to convert 'roleIds': 'not-a-uuid' is not a valid UUID",
                  "code": "VALIDATION_ERROR"
                }
              }
            }
          }
        }
      },
      "Conflict": {
        "description": "The resource already exists, or an earlier request with the same `Idempotency-Key` is still running.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetail"
            },
            "examples": {
              "resourceConflict": {
                "summary": "A resource with this identifier already exists",
                "value": {
                  "type": "https://errors.dns.digicert.com/conflict",
                  "title": "Conflict",
                  "status": 409,
                  "detail": "A resource with this identifier already exists.",
                  "code": "CONFLICT"
                }
              },
              "idempotencyInFlight": {
                "summary": "An earlier request with the same Idempotency-Key is still running",
                "value": {
                  "type": "https://errors.dns.digicert.com/idempotency-in-flight",
                  "title": "Idempotency In Flight",
                  "status": 409,
                  "detail": "A request with this Idempotency-Key is already in progress. Retry after the first request completes.",
                  "code": "IDEMPOTENCY_IN_FLIGHT"
                }
              }
            }
          }
        }
      },
      "UnprocessableEntity": {
        "description": "The request is well formed, but the API can't process it.\n\nThe `code` and `type` depend on the operation. User and role operations return a specific\ncode such as `INVALID_SCOPE` or `INVALID_ROLE_FOR_SCOPE`, or `UNPROCESSABLE_ENTITY` for a\ngeneral rejection, all with the `unprocessable-entity` type. Zone and record operations\nreturn `INTER_COMMUNICATION_ERROR` or `DNS_ZONE_ERROR`, each with its own type.\n",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetail"
            },
            "examples": {
              "unprocessableRbac": {
                "summary": "A user or role request that the API rejected",
                "value": {
                  "type": "https://errors.dns.digicert.com/unprocessable-entity",
                  "title": "Unprocessable Entity",
                  "status": 422,
                  "detail": "The request was well-formed but could not be processed due to semantic errors",
                  "code": "UNPROCESSABLE_ENTITY"
                }
              },
              "dnsZoneErrorUnifiedApi": {
                "summary": "A zone request that the API rejected for a DNS reason",
                "value": {
                  "type": "https://errors.dns.digicert.com/dns-zone-error",
                  "title": "DNS Zone Error",
                  "status": 422,
                  "detail": "[53001] Invalid zone type",
                  "code": "DNS_ZONE_ERROR"
                }
              }
            }
          }
        }
      },
      "NotFound": {
        "description": "The resource doesn't exist.\n\nThe `code` depends on the operation. Zone and record operations return `RESOURCE_NOT_FOUND`.\nUser and role operations return `NOT_FOUND`, or a more specific code such as\n`PRINCIPAL_NOT_FOUND` or `ROLE_NOT_FOUND`.\n",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetail"
            },
            "examples": {
              "notFoundUnifiedApi": {
                "summary": "The resource in a zone or record request was not found",
                "value": {
                  "type": "https://errors.dns.digicert.com/not-found",
                  "title": "Not Found",
                  "status": 404,
                  "detail": "The requested resource does not exist",
                  "code": "RESOURCE_NOT_FOUND"
                }
              },
              "notFoundRbac": {
                "summary": "The resource in a user or role request was not found",
                "value": {
                  "type": "https://errors.dns.digicert.com/not-found",
                  "title": "Not Found",
                  "status": 404,
                  "detail": "The requested resource does not exist",
                  "code": "NOT_FOUND"
                }
              }
            }
          }
        }
      }
    }
  }
}
