> ## Documentation Index
> Fetch the complete documentation index at: https://unkey-eng-3082-add-portal-config-crud-api-endpoints-v2portal.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get domain

> Retrieve a custom domain and its verification status.

Address the domain by its id or by its name. Names are unique per workspace, so
`api.acme.com` is sufficient. You do not need to supply a project, app, or environment.

Use this endpoint to poll after `domains.createDomain`. Verification runs in the background
and checks DNS approximately each minute.

`status: verified` means the domain is verified. Unkey has configured routing and requested a
certificate. Each entry in `dnsRecords` has a `verified` flag. The flag shows which records
Unkey has read back, so you can see which records are still missing. Some providers hide a
record from DNS lookups, for example a proxied or flattened routing record. Such a record stays
`false` while it serves traffic. `verificationError` gives the reason for the last failed
attempt.

`dnsRecords` contains the same values that `domains.createDomain` returned. Use it to recover
the values without creating the domain again.

**Important**: verification stops 24 hours after the domain was created, and the status becomes
`failed`. The window starts at `createdAt`, not at the last attempt.

**Required Permissions**

Your root key must have one of the following permissions:
- `environment.*.read_domain` (to read domains in any environment)
- `environment.<environment_id>.read_domain` (to read domains in a specific environment)




## OpenAPI

````yaml https://spec.speakeasy.com/unkey/unkey/openapi-json-with-code-samples post /v2/domains.getDomain
openapi: 3.1.0
info:
  description: >-
    Unkey's API provides programmatic access for all resources within our
    platform.



    ### Authentication

    #

    This API accepts HTTP Bearer credentials. Public integrations use root keys.
    Dashboard-originated requests use a short-lived dashboard proxy JWT minted
    by the dashboard server. Most endpoints require permissions associated with
    the authenticated principal. When making public API requests, include your
    root key in the `Authorization` header:

    ```

    Authorization: Bearer unkey_xxxxxxxxxxx

    ```


    All responses follow a consistent envelope structure that separates
    operational metadata from actual data. This design provides several
    benefits:

    - Debugging: Every response includes a unique requestId for tracing issues

    - Consistency: Predictable response format across all endpoints

    - Extensibility: Easy to add new metadata without breaking existing
    integrations

    - Error Handling: Unified error format with actionable information


    ### Success Response Format:

    ```json

    {
      "meta": {
        "requestId": "req_123456"
      },
      "data": {
        // Actual response data here
      }
    }

    ```


    The meta object contains operational information:

    - `requestId`: Unique identifier for this request (essential for support)


    The data object contains the actual response data specific to each endpoint.


    ### Paginated Response Format:

    ```json

    {
      "meta": {
        "requestId": "req_123456"
      },
      "data": [
        // Array of results
      ],
      "pagination": {
        "cursor": "next_page_token",
        "hasMore": true
      }
    }

    ```


    The pagination object appears on list endpoints and contains:

    - `cursor`: Token for requesting the next page

    - `hasMore`: Whether more results are available


    ### Error Response Format:

    ```json

    {
      "meta": {
        "requestId": "req_2c9a0jf23l4k567"
      },
      "error": {
        "detail": "The resource you are attempting to modify is protected and cannot be changed",
        "status": 403,
        "title": "Forbidden",
        "type": "https://unkey.com/docs/errors/unkey/application/protected_resource"
      }
    }

    ```


    Error responses include comprehensive diagnostic information:

    - `title`: Human-readable error summary

    - `detail`: Specific description of what went wrong

    - `status`: HTTP status code

    - `type`: Link to error documentation

    - `errors`: Array of validation errors (for 400 responses)


    This structure ensures you always have the context needed to debug issues
    and take corrective action.
  title: Unkey API
  version: 2.0.0
servers:
  - url: https://api.unkey.com
security:
  - bearer: []
tags:
  - description: Analytics query operations
    name: analytics
  - description: API management operations
    name: apis
  - description: App management operations
    name: apps
  - description: Deployment operations
    name: deploy
  - description: Deployment operations
    name: deployments
  - description: Custom domain operations
    name: domains
  - description: Environment management operations
    name: environments
  - description: Identity management operations
    name: identities
  - description: API key management operations
    name: keys
  - description: Health check operations
    name: liveness
  - description: Permission and role management operations
    name: permissions
  - description: Gateway policy operations
    name: gateway
  - description: Customer Portal session management
    name: portal
  - description: Rate limiting operations
    name: ratelimit
  - description: GitHub App installation operations
    name: github
paths:
  /v2/domains.getDomain:
    post:
      tags:
        - domains
      summary: Get domain
      description: >
        Retrieve a custom domain and its verification status.


        Address the domain by its id or by its name. Names are unique per
        workspace, so

        `api.acme.com` is sufficient. You do not need to supply a project, app,
        or environment.


        Use this endpoint to poll after `domains.createDomain`. Verification
        runs in the background

        and checks DNS approximately each minute.


        `status: verified` means the domain is verified. Unkey has configured
        routing and requested a

        certificate. Each entry in `dnsRecords` has a `verified` flag. The flag
        shows which records

        Unkey has read back, so you can see which records are still missing.
        Some providers hide a

        record from DNS lookups, for example a proxied or flattened routing
        record. Such a record stays

        `false` while it serves traffic. `verificationError` gives the reason
        for the last failed

        attempt.


        `dnsRecords` contains the same values that `domains.createDomain`
        returned. Use it to recover

        the values without creating the domain again.


        **Important**: verification stops 24 hours after the domain was created,
        and the status becomes

        `failed`. The window starts at `createdAt`, not at the last attempt.


        **Required Permissions**


        Your root key must have one of the following permissions:

        - `environment.*.read_domain` (to read domains in any environment)

        - `environment.<environment_id>.read_domain` (to read domains in a
        specific environment)
      operationId: domains.getDomain
      requestBody:
        content:
          application/json:
            examples:
              byId:
                description: Uses the id that domains.createDomain returned.
                summary: Retrieve by domain ID
                value:
                  domain: dom_1234abcd
              byName:
                description: >-
                  The name is unique per workspace. It addresses the domain on
                  its own.
                summary: Retrieve by domain name
                value:
                  domain: api.acme.com
            schema:
              $ref: '#/components/schemas/V2DomainsGetDomainRequestBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              examples:
                failed:
                  description: The required DNS records did not appear within 24 hours.
                  summary: Verification timed out
                  value:
                    data:
                      appId: app_1234abcd
                      createdAt: 1704067200000
                      dnsRecords:
                        - name: api.acme.com
                          note: >-
                            Create as DNS-only if your provider offers the
                            choice.
                          ttl: 60
                          type: CNAME
                          value: a1b2c3d4e5f6g7h8.cname.unkey.com
                          verified: false
                        - name: _unkey.api.acme.com
                          note: >-
                            Proves ownership. Create it alongside the routing
                            record.
                          ttl: 60
                          type: TXT
                          value: unkey-domain-verify=3ZQ8xK1mP7vT5nR2wY6bJ4hL
                          verified: false
                      domain: api.acme.com
                      environmentId: env_1234abcd
                      id: dom_1234abcd
                      projectId: proj_1234abcd
                      status: failed
                      updatedAt: 1704153600000
                      verificationError: domain verification timed out after 24 hours
                    meta:
                      requestId: req_1234abcd
                pending:
                  description: >-
                    No DNS check has run yet. Neither record is verified, and
                    updatedAt is absent.
                  summary: Domain created, not checked yet
                  value:
                    data:
                      appId: app_1234abcd
                      createdAt: 1704067200000
                      dnsRecords:
                        - name: api.acme.com
                          note: >-
                            Create as DNS-only if your provider offers the
                            choice.
                          ttl: 60
                          type: CNAME
                          value: a1b2c3d4e5f6g7h8.cname.unkey.com
                          verified: false
                        - name: _unkey.api.acme.com
                          note: >-
                            Proves ownership. Create it alongside the routing
                            record.
                          ttl: 60
                          type: TXT
                          value: unkey-domain-verify=3ZQ8xK1mP7vT5nR2wY6bJ4hL
                          verified: false
                      domain: api.acme.com
                      environmentId: env_1234abcd
                      id: dom_1234abcd
                      projectId: proj_1234abcd
                      status: pending
                    meta:
                      requestId: req_1234abcd
                verified:
                  description: >-
                    The routing record verified the domain. Unkey did not need
                    the TXT record.
                  summary: Domain serving traffic
                  value:
                    data:
                      appId: app_1234abcd
                      createdAt: 1704067200000
                      dnsRecords:
                        - name: api.acme.com
                          note: >-
                            Create as DNS-only if your provider offers the
                            choice.
                          ttl: 60
                          type: CNAME
                          value: a1b2c3d4e5f6g7h8.cname.unkey.com
                          verified: true
                        - name: _unkey.api.acme.com
                          note: >-
                            Proves ownership. Create it alongside the routing
                            record.
                          ttl: 60
                          type: TXT
                          value: unkey-domain-verify=3ZQ8xK1mP7vT5nR2wY6bJ4hL
                          verified: false
                      domain: api.acme.com
                      environmentId: env_1234abcd
                      id: dom_1234abcd
                      projectId: proj_1234abcd
                      status: verified
                      updatedAt: 1704067260000
                    meta:
                      requestId: req_1234abcd
                verifiedThroughOwnership:
                  description: >-
                    An apex domain routes through an alias that Unkey cannot
                    read back. Only its TXT record reports verified while the
                    domain serves traffic.
                  summary: Apex domain serving, routing record unreadable
                  value:
                    data:
                      appId: app_1234abcd
                      createdAt: 1704067200000
                      dnsRecords:
                        - name: acme.com
                          note: >-
                            Apex domains cannot hold a CNAME. Use ALIAS, ANAME,
                            or a flattened CNAME depending on your provider.
                          ttl: 60
                          type: ALIAS
                          value: a1b2c3d4e5f6g7h8.cname.unkey.com
                          verified: false
                        - name: _unkey.acme.com
                          note: >-
                            Proves ownership. An apex domain cannot be verified
                            through its routing record, so this is the only
                            proof available.
                          ttl: 60
                          type: TXT
                          value: unkey-domain-verify=3ZQ8xK1mP7vT5nR2wY6bJ4hL
                          verified: true
                      domain: acme.com
                      environmentId: env_1234abcd
                      id: dom_1234abcd
                      projectId: proj_1234abcd
                      status: verified
                      updatedAt: 1704067260000
                    meta:
                      requestId: req_1234abcd
              schema:
                $ref: '#/components/schemas/V2DomainsGetDomainResponseBody'
          description: |
            Successfully retrieved the domain.
        '400':
          content:
            application/json:
              examples:
                invalidIdentifier:
                  description: >-
                    The schema only bounds the identifier's length. An
                    identifier that is neither a valid name nor a stored id
                    returns a 404.
                  summary: Identifier too short
                  value:
                    error:
                      detail: >-
                        The domain identifier must be between 4 and 253
                        characters.
                      errors:
                        - fix: >-
                            Pass a domain name such as 'api.acme.com' or an id
                            such as 'dom_1234abcd'
                          location: body.domain
                          message: minLength must be at least 4 characters
                      status: 400
                      title: Bad Request
                      type: validation-error
                    meta:
                      requestId: req_1234abcd
              schema:
                $ref: '#/components/schemas/BadRequestErrorResponse'
          description: Bad request
        '401':
          content:
            application/json:
              examples:
                invalidRootKey:
                  summary: Root key not found
                  value:
                    error:
                      detail: The provided root key is invalid.
                      status: 401
                      title: Unauthorized
                      type: unauthorized
                    meta:
                      requestId: req_1234abcd
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              examples:
                keyDisabled:
                  summary: Root key disabled
                  value:
                    error:
                      detail: The provided root key is disabled.
                      status: 403
                      title: Forbidden
                      type: forbidden
                    meta:
                      requestId: req_1234abcd
              schema:
                $ref: '#/components/schemas/ForbiddenErrorResponse'
          description: >
            Forbidden - The root key or its workspace is disabled. A root key
            that simply lacks

            `environment.*.read_domain` receives a 404 instead, so permissions
            cannot be used to discover

            which domains exist.
        '404':
          content:
            application/json:
              examples:
                domainNotFound:
                  summary: Domain not found
                  value:
                    error:
                      detail: The requested domain does not exist.
                      status: 404
                      title: Not Found
                      type: not-found
                    meta:
                      requestId: req_1234abcd
              schema:
                $ref: '#/components/schemas/NotFoundErrorResponse'
          description: >
            Not Found - The domain does not exist in your workspace, or your
            root key may not read it.
        '429':
          content:
            application/json:
              examples:
                rateLimited:
                  summary: Workspace rate limit exceeded
                  value:
                    error:
                      detail: >-
                        You have exceeded the rate limit for this operation.
                        Retry after the window resets.
                      status: 429
                      title: Too Many Requests
                      type: rate-limited
                    meta:
                      requestId: req_1234abcd
              schema:
                $ref: '#/components/schemas/TooManyRequestsErrorResponse'
          description: Too Many Requests
        '500':
          content:
            application/json:
              examples:
                internalError:
                  summary: Unexpected server error
                  value:
                    error:
                      detail: >-
                        An unexpected error occurred. Contact support@unkey.com
                        with the requestId.
                      status: 500
                      title: Internal Server Error
                      type: internal-server-error
                    meta:
                      requestId: req_1234abcd
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
          description: Internal server error
      security:
        - bearer: []
      x-codeSamples:
        - lang: typescript
          label: Typescript (SDK)
          source: |-
            import { Unkey } from "@unkey/api";

            const unkey = new Unkey({
              rootKey: process.env["UNKEY_ROOT_KEY"] ?? "",
            });

            async function run() {
              const result = await unkey.domains.getDomain({
                domain: "dom_1234abcd",
              });

              console.log(result);
            }

            run();
components:
  schemas:
    V2DomainsGetDomainRequestBody:
      type: object
      required:
        - domain
      properties:
        domain:
          type: string
          minLength: 4
          maxLength: 253
          description: >
            Identifies a domain by its Unkey ID or by its name. Pass a
            'dom_'-prefixed ID, or a fully

            qualified domain name such as 'api.acme.com' without a scheme, port,
            or path. You can give an

            internationalized name in Unicode or Punycode form. Both forms
            address the same domain.


            Domain names are unique per workspace, so the name alone addresses
            the domain. You do not

            need to supply a project, app, or environment.
          example: api.acme.com
      additionalProperties: false
    V2DomainsGetDomainResponseBody:
      type: object
      required:
        - meta
        - data
      properties:
        meta:
          $ref: '#/components/schemas/Meta'
        data:
          $ref: '#/components/schemas/Domain'
      additionalProperties: false
    BadRequestErrorResponse:
      type: object
      required:
        - meta
        - error
      properties:
        meta:
          $ref: '#/components/schemas/Meta'
        error:
          $ref: '#/components/schemas/BadRequestErrorDetails'
      description: >-
        Error response for invalid requests that cannot be processed due to
        client-side errors. This typically occurs when request parameters are
        missing, malformed, or fail validation rules. The response includes
        detailed information about the specific errors in the request, including
        the location of each error and suggestions for fixing it. When receiving
        this error, check the 'errors' array in the response for specific
        validation issues that need to be addressed before retrying.
    UnauthorizedErrorResponse:
      type: object
      required:
        - meta
        - error
      properties:
        meta:
          $ref: '#/components/schemas/Meta'
        error:
          $ref: '#/components/schemas/BaseError'
      description: >-
        Error response when authentication has failed or credentials are
        missing. This occurs when:

        - No authentication token is provided in the request

        - The provided token is invalid, expired, or malformed

        - The token format doesn't match expected patterns


        To resolve this error, ensure you're including a valid root key in the
        Authorization header.
    ForbiddenErrorResponse:
      type: object
      required:
        - meta
        - error
      properties:
        meta:
          $ref: '#/components/schemas/Meta'
        error:
          $ref: '#/components/schemas/BaseError'
      description: >-
        Error response when the provided credentials are valid but lack
        sufficient permissions for the requested operation. This occurs when:

        - The root key doesn't have the required permissions for this endpoint

        - The operation requires elevated privileges that the current key lacks

        - Access to the requested resource is restricted based on workspace
        settings


        To resolve this error, ensure your root key has the necessary
        permissions or contact your workspace administrator.
    NotFoundErrorResponse:
      type: object
      required:
        - meta
        - error
      properties:
        meta:
          $ref: '#/components/schemas/Meta'
        error:
          $ref: '#/components/schemas/BaseError'
      description: >-
        Error response when the requested resource cannot be found. This occurs
        when:

        - The specified resource ID doesn't exist in your workspace

        - The resource has been deleted or moved

        - The resource exists but is not accessible with current permissions


        To resolve this error, verify the resource ID is correct and that you
        have access to it.
    TooManyRequestsErrorResponse:
      type: object
      required:
        - meta
        - error
      properties:
        meta:
          $ref: '#/components/schemas/Meta'
        error:
          $ref: '#/components/schemas/BaseError'
      description: >-
        Error response when the client has sent too many requests in a given
        time period. This occurs when you've exceeded a rate limit or quota for
        the resource you're accessing.


        The rate limit resets automatically after the time window expires. To
        avoid this error:

        - Implement exponential backoff when retrying requests

        - Cache results where appropriate to reduce request frequency

        - Check the error detail message for specific quota information

        - Contact support if you need a higher quota for your use case
    InternalServerErrorResponse:
      type: object
      required:
        - meta
        - error
      properties:
        meta:
          $ref: '#/components/schemas/Meta'
        error:
          $ref: '#/components/schemas/BaseError'
      description: >-
        Error response when an unexpected error occurs on the server. This
        indicates a problem with Unkey's systems rather than your request.


        When you encounter this error:

        - The request ID in the response can help Unkey support investigate the
        issue

        - The error is likely temporary and retrying may succeed

        - If the error persists, contact Unkey support with the request ID
    Meta:
      type: object
      required:
        - requestId
      properties:
        requestId:
          description: >-
            A unique id for this request. Always include this ID when contacting
            support about a specific API request. This identifier allows Unkey's
            support team to trace the exact request through logs and diagnostic
            systems to provide faster assistance.
          example: req_123
          type: string
      additionalProperties: false
      description: >-
        Metadata object included in every API response. This provides context
        about the request and is essential for debugging, audit trails, and
        support inquiries. The `requestId` is particularly important when
        troubleshooting issues with the Unkey support team.
    Domain:
      type: object
      required:
        - id
        - domain
        - projectId
        - appId
        - environmentId
        - status
        - dnsRecords
        - createdAt
      properties:
        id:
          $ref: '#/components/schemas/ResourceIdentifier'
        domain:
          type: string
          minLength: 4
          maxLength: 253
          description: Fully qualified domain name attached to the environment.
          example: api.acme.com
        projectId:
          type: string
          minLength: 8
          maxLength: 255
          pattern: ^[a-zA-Z0-9_]+$
          description: The project the domain's environment belongs to.
          example: proj_1234abcd
        appId:
          type: string
          minLength: 8
          maxLength: 255
          pattern: ^[a-zA-Z0-9_]+$
          description: The app the domain's environment belongs to.
          example: app_1234abcd
        environmentId:
          type: string
          minLength: 8
          maxLength: 255
          pattern: ^[a-zA-Z0-9_]+$
          description: >
            The environment this domain serves. Traffic to the domain reaches
            whatever is currently

            deployed to this environment.
          example: env_1234abcd
        status:
          type: string
          enum:
            - pending
            - verifying
            - verified
            - failed
          x-enum-varnames:
            - DomainStatusPending
            - DomainStatusVerifying
            - DomainStatusVerified
            - DomainStatusFailed
          description: >
            The verification status of the domain.


            - `pending`: the domain is created. No DNS check has completed yet.

            - `verifying`: Unkey checks the DNS records approximately each
            minute.

            - `verified`: the domain is verified. Unkey has configured routing
            and requested a certificate.

            - `failed`: the required DNS records did not appear within 24 hours.
            Fix the records, then retry verification.
          example: verified
        verificationError:
          type: string
          maxLength: 512
          description: >
            Why the most recent verification attempt did not succeed, in plain
            language.

            Omitted while verification is progressing normally.
          example: domain verification timed out after 24 hours
        dnsRecords:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/DnsRecord'
          description: >
            The DNS records this domain needs. Create each record at your DNS
            provider.

            Each record has a `verified` flag. The flag shows whether Unkey has
            read that record back,

            so it tells you which records are still missing.
        createdAt:
          type: integer
          format: int64
          description: >-
            Unix timestamp in milliseconds when the domain was created. The 24
            hour verification window runs from here.
          example: 1704067200000
        updatedAt:
          type: integer
          format: int64
          description: >-
            Unix timestamp in milliseconds of the last change to this domain.
            Omitted if it has never changed.
          example: 1704153600000
      additionalProperties: false
    BadRequestErrorDetails:
      allOf:
        - $ref: '#/components/schemas/BaseError'
        - type: object
          properties:
            errors:
              description: >-
                List of individual validation errors that occurred in the
                request. Each error provides specific details about what failed
                validation, where the error occurred in the request, and
                suggestions for fixing it. This granular information helps
                developers quickly identify and resolve multiple issues in a
                single request without having to make repeated API calls.
              items:
                $ref: '#/components/schemas/ValidationError'
              type: array
          required:
            - errors
      description: >-
        Extended error details specifically for bad request (400) errors. This
        builds on the BaseError structure by adding an array of individual
        validation errors, making it easy to identify and fix multiple issues at
        once.
    BaseError:
      properties:
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem. This provides detailed information about what went wrong
            and potential remediation steps. The message is intended to be
            helpful for developers troubleshooting the issue.
          example: Property foo is required but is missing.
          type: string
        status:
          description: >-
            HTTP status code that corresponds to this error. This will match the
            status code in the HTTP response. Common codes include `400` (Bad
            Request), `401` (Unauthorized), `403` (Forbidden), `404` (Not
            Found), `409` (Conflict), and `500` (Internal Server Error).
          example: 404
          format: int
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This remains
            constant from occurrence to occurrence of the same problem and
            should be used for programmatic handling.
          example: Not Found
          type: string
        type:
          description: >-
            A URI reference that identifies the problem type. This provides a
            stable identifier for the error that can be used for documentation
            lookups and programmatic error handling. When followed, this URI
            should provide human-readable documentation for the problem type.
          example: https://unkey.com/docs/errors/unkey/resource/not_found
          type: string
      required:
        - title
        - detail
        - status
        - type
      type: object
      additionalProperties: false
      description: >-
        Base error structure following Problem Details for HTTP APIs (RFC 7807).
        This provides a standardized way to carry machine-readable details of
        errors in HTTP response content.
    ResourceIdentifier:
      type: string
      minLength: 3
      maxLength: 255
      pattern: ^[a-zA-Z0-9_-]+$
      description: |
        Identifies a resource by either its unique ID or its slug.
        Accepts a prefixed ID (such as 'proj_' or 'app_') or a slug.
      example: proj_1234abcd
    DnsRecord:
      type: object
      required:
        - type
        - name
        - value
        - ttl
        - verified
      properties:
        type:
          type: string
          enum:
            - CNAME
            - ALIAS
            - TXT
          description: >
            Record type to create. `ALIAS` is not a real DNS record type: it
            means an apex-compatible

            alias, which providers expose as ALIAS, ANAME, or a flattened CNAME.
            Apex domains cannot

            hold a plain CNAME, so they receive `ALIAS` where a subdomain
            receives `CNAME`.
          example: CNAME
        name:
          type: string
          minLength: 1
          maxLength: 253
          description: >
            Fully qualified name of the record, ready to use as-is.


            Some providers want a name relative to the zone instead. Drop the
            zone and its trailing dot:

            in zone `acme.com`, `api.acme.com` becomes `api` and
            `_unkey.api.acme.com` becomes

            `_unkey.api`. A name equal to the zone itself is usually entered as
            `@`.
          example: api.acme.com
        value:
          type: string
          minLength: 1
          maxLength: 512
          description: >
            The value to set on the record, exactly as given, including any
            prefix.

            Do not trim or reformat it: verification compares the published
            record against this string.


            Use the lowest TTL your provider allows until the domain is
            verified. Verification polls DNS,

            so a long TTL keeps a stale value cached and can burn the
            verification window on a value you

            have already corrected. Raise it afterwards if you want.
          example: a1b2c3d4e5f6g7h8.cname.unkey.com
        ttl:
          type: integer
          minimum: 1
          description: >
            Seconds a resolver may cache this record. Set it in your provider
            alongside the record's

            name and value.
          example: 60
        verified:
          type: boolean
          description: >
            Whether Unkey has read this record back with the expected value. Use
            it to see which

            records are still outstanding.


            False does not always mean the record is missing. A provider that
            does not expose the

            published value to a DNS lookup, such as a proxied or flattened
            routing record, leaves

            this false for as long as it serves traffic; such a domain verifies
            through its TXT

            record instead. Always false on a domain no check has run against
            yet.
          example: false
        note:
          type: string
          maxLength: 512
          description: >
            What this record is for and any provider-specific caveat that
            applies to it.

            Worth surfacing to whoever edits the DNS zone. Treat it as optional:
            it carries

            no data the record itself needs, so a future record type may omit
            it.
          example: Create as DNS-only if your provider offers the choice.
      additionalProperties: false
    ValidationError:
      additionalProperties: false
      properties:
        location:
          description: >-
            JSON path indicating exactly where in the request the error
            occurred. This helps pinpoint the problematic field or parameter.
            Examples include:

            - 'body.name' (field in request body)

            - 'body.items[3].tags' (nested array element)

            - 'path.apiId' (path parameter)

            - 'query.limit' (query parameter)

            Use this location to identify exactly which part of your request
            needs correction.
          type: string
          example: body.permissions[0].name
        message:
          description: >-
            Detailed error message explaining what validation rule was violated.
            This provides specific information about why the field or parameter
            was rejected, such as format errors, invalid values, or constraint
            violations.
          type: string
          example: Must be at least 3 characters long
        fix:
          description: >-
            A human-readable suggestion describing how to fix the error. This
            provides practical guidance on what changes would satisfy the
            validation requirements. Not all validation errors include fix
            suggestions, but when present, they offer specific remediation
            advice.
          type: string
          example: >-
            Ensure the name uses only alphanumeric characters, underscores, and
            hyphens
      required:
        - location
        - message
      type: object
      description: >-
        Individual validation error details. Each validation error provides
        precise information about what failed, where it failed, and how to fix
        it, enabling efficient error resolution.
  securitySchemes:
    bearer:
      bearerFormat: bearer token
      description: >-
        Unkey uses bearer tokens for authentication. Public integrations use
        root keys, while the dashboard proxy uses short-lived JWTs.

        To authenticate, include the token in the Authorization header of each
        request:

        ```

        Authorization: Bearer unkey_123

        ```

        Root keys have specific permissions attached to them, controlling what
        operations they can perform. Legacy permissions use tuple strings like
        `api.*.create_key`; resource permissions use Unkey Resource Names plus
        actions, like `unkey:v1:ws_123:keyspaces/*#create_key`.

        Security best practices:

        - Keep root keys secure and never expose them in client-side code

        - Use different root keys for different environments

        - Rotate keys periodically, especially after team member departures

        - Create keys with minimal necessary permissions following least
        privilege principle

        - Monitor key usage with audit logs.
      scheme: bearer
      type: http
      x-speakeasy-name-override: rootKey

````