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

# Read a Domain's remaining budget per bucket

> Read how much of this Domain's provider budget is left — every rate bucket and every window in one request. `remaining` is the effective budget (the provider's cap after any safety margin the operator has applied) minus what the ledger currently records as spent, and `escalated` reports a bucket that is backing off near exhaustion.

These values are a LIVE PROJECTION of the quota ledger, never a reservation. Nothing here sets budget aside for you: every credential that resolves to this Domain draws on the SAME allowance, and other systems can spend the same Domain's provider budget without going through this platform at all. A `remaining` value is therefore not a guarantee that the next call will be accepted, and it must not be used as a client-side gate before submitting work — whether a call may proceed is decided at the moment of the call, by the platform's own dispatcher. Read this to show how much room is left and to explain why work is pacing.

`as_of` is when the underlying counters were read, and is `null` for a Domain that has never dispatched. Readable by any organization member. Cross-tenant access returns 404, never 403.



## OpenAPI

````yaml /openapi.json get /platforms/five9/domains/{tenancy_id}/headroom
openapi: 3.1.0
info:
  title: GetDialed API
  version: 0.1.0
servers:
  - url: https://api.getdialed.ai/v1
    description: Production
security: []
paths:
  /platforms/five9/domains/{tenancy_id}/headroom:
    get:
      tags:
        - five9-domains
      summary: Read a Domain's remaining budget per bucket
      description: >-
        Read how much of this Domain's provider budget is left — every rate
        bucket and every window in one request. `remaining` is the effective
        budget (the provider's cap after any safety margin the operator has
        applied) minus what the ledger currently records as spent, and
        `escalated` reports a bucket that is backing off near exhaustion.


        These values are a LIVE PROJECTION of the quota ledger, never a
        reservation. Nothing here sets budget aside for you: every credential
        that resolves to this Domain draws on the SAME allowance, and other
        systems can spend the same Domain's provider budget without going
        through this platform at all. A `remaining` value is therefore not a
        guarantee that the next call will be accepted, and it must not be used
        as a client-side gate before submitting work — whether a call may
        proceed is decided at the moment of the call, by the platform's own
        dispatcher. Read this to show how much room is left and to explain why
        work is pacing.


        `as_of` is when the underlying counters were read, and is `null` for a
        Domain that has never dispatched. Readable by any organization member.
        Cross-tenant access returns 404, never 403.
      operationId: >-
        get_five9_domain_headroom_platforms_five9_domains__tenancy_id__headroom_get
      parameters:
        - name: tenancy_id
          in: path
          required: true
          schema:
            type: string
            title: Tenancy Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Five9DomainHeadroomResponse'
        '401':
          description: Missing or invalid authentication
          content:
            application/json:
              example:
                detail: Authentication required
        '404':
          description: >-
            No such Domain for this organization (cross-tenant access also
            returns 404)
          content:
            application/json:
              example:
                detail: Domain not found
        '422':
          description: >-
            The body failed validation — an out-of-range safety margin, an
            unknown lane, an unknown rate bucket, an unknown action id, or an
            explicit null.
          content:
            application/json:
              example:
                detail: margins['Upload'] must be between 1 and 100
        '429':
          description: Rate limit exceeded — retry after the Retry-After header
          headers:
            Retry-After:
              description: Seconds to wait before retrying
              schema:
                type: integer
          content:
            application/json:
              example:
                detail: 'Rate limit exceeded: 100 per 1 minute'
      security:
        - APIKeyHeader: []
        - HTTPBearer: []
components:
  schemas:
    Five9DomainHeadroomResponse:
      properties:
        tenancy_id:
          type: string
          title: Tenancy Id
        as_of:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: As Of
        buckets:
          additionalProperties:
            $ref: '#/components/schemas/Five9BucketHeadroom'
          type: object
          title: Buckets
      type: object
      required:
        - tenancy_id
        - buckets
      title: Five9DomainHeadroomResponse
      description: >-
        Live remaining provider budget for one Five9 Domain, by bucket and
        window.


        This is a PROJECTION of the quota ledger, not a reservation. A value
        here is

        not a guarantee that a call will be accepted: budget is spent by every

        credential sharing this Domain, and other systems can spend the same
        Domain's

        provider budget outside this platform entirely. Read it to show a
        customer how

        much room is left and to explain why work is pacing — never as a
        client-side

        gate before submitting work. The platform's own dispatcher is the only

        component that decides whether a call may proceed, and it decides at the

        moment of the call.


        `buckets` is keyed by the provider's operation-type name (for example

        `Upload`), and `as_of` is when the underlying counters were read; it is
        `null`

        for a Domain that has never dispatched.
      example:
        as_of: '2026-08-14T18:00:00Z'
        buckets:
          Upload:
            escalated: false
            label: Uploading (batch)
            windows:
              '60':
                cap: 20
                remaining: 16
                used: 4
              '3600':
                cap: 400
                remaining: 280
                used: 120
              '86400':
                cap: 2000
                remaining: 1100
                used: 900
        tenancy_id: ten_9f2c1a7b3d4e5f60
    Five9BucketHeadroom:
      properties:
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        windows:
          additionalProperties:
            $ref: '#/components/schemas/Five9WindowHeadroom'
          type: object
          title: Windows
        escalated:
          type: boolean
          title: Escalated
          default: false
        next_allowed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Next Allowed At
      type: object
      required:
        - windows
      title: Five9BucketHeadroom
      description: >-
        Headroom for one rate bucket across every window.


        `windows` is keyed by window length in seconds — `"60"` for the
        per-minute

        budget, `"3600"` per hour, `"86400"` per day. `escalated` reports that
        the

        bucket is in a near-exhaustion backoff state, and `next_allowed_at` is
        the

        earliest moment the next call is expected to be permitted, or `null`
        when no

        wait is in force.
      example:
        escalated: false
        label: Uploading (batch)
        windows:
          '60':
            cap: 20
            remaining: 16
            used: 4
          '3600':
            cap: 400
            remaining: 280
            used: 120
          '86400':
            cap: 2000
            remaining: 1100
            used: 900
    Five9WindowHeadroom:
      properties:
        used:
          type: integer
          title: Used
        cap:
          type: integer
          title: Cap
        remaining:
          type: integer
          title: Remaining
      type: object
      required:
        - used
        - cap
        - remaining
      title: Five9WindowHeadroom
      description: >-
        Budget consumed and left for one rate window.


        `remaining` is `cap` minus `used` as the ledger currently reads it.
        `cap` is

        the effective budget — the provider's published cap after any safety
        margin

        the operator has applied to this bucket — so it can be lower than the
        raw

        provider limit.
      example:
        cap: 20
        remaining: 16
        used: 4
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    HTTPBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````