> ## 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 per-credential budget attribution for a Domain

> Read which of your credentials spent this Domain's provider budget — every rate bucket and every window (per-minute, hourly and daily) in one request. Several credentials can point at the same Domain and they all draw on ONE shared allowance, so this is what answers "which credential lane is consuming the budget?".

Each window carries an entry per credential plus one entry whose `credential_id` is `null`: the UNATTRIBUTED remainder. That entry is expected and is not an error. Two things land in it — other systems can spend the same Domain's provider budget without going through this platform at all, and a small number of this platform's own calls are made outside the paced dispatch path (testing a credential, for example) and are not attributed. Because the remainder is always present, `pct_of_used` totals 100 within every window, and the spend nobody can attribute stays visible instead of being quietly spread across your credentials.

Display names are resolved when you read, so a renamed credential is never stale. A credential you have since DELETED keeps its row with a `credential_name` of `null` — the calls were really made, and dropping the row would move real spend out of the total.

Like every budget surface here this is a live projection of the quota ledger and never a reservation. `as_of` is when the 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}/attribution
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}/attribution:
    get:
      tags:
        - five9-domains
      summary: Read per-credential budget attribution for a Domain
      description: >-
        Read which of your credentials spent this Domain's provider budget —
        every rate bucket and every window (per-minute, hourly and daily) in one
        request. Several credentials can point at the same Domain and they all
        draw on ONE shared allowance, so this is what answers "which credential
        lane is consuming the budget?".


        Each window carries an entry per credential plus one entry whose
        `credential_id` is `null`: the UNATTRIBUTED remainder. That entry is
        expected and is not an error. Two things land in it — other systems can
        spend the same Domain's provider budget without going through this
        platform at all, and a small number of this platform's own calls are
        made outside the paced dispatch path (testing a credential, for example)
        and are not attributed. Because the remainder is always present,
        `pct_of_used` totals 100 within every window, and the spend nobody can
        attribute stays visible instead of being quietly spread across your
        credentials.


        Display names are resolved when you read, so a renamed credential is
        never stale. A credential you have since DELETED keeps its row with a
        `credential_name` of `null` — the calls were really made, and dropping
        the row would move real spend out of the total.


        Like every budget surface here this is a live projection of the quota
        ledger and never a reservation. `as_of` is when the 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_attribution_platforms_five9_domains__tenancy_id__attribution_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/Five9DomainAttributionResponse'
        '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:
    Five9DomainAttributionResponse:
      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/Five9BucketAttribution'
          type: object
          title: Buckets
      type: object
      required:
        - tenancy_id
        - buckets
      title: Five9DomainAttributionResponse
      description: >-
        Which credentials spent one Five9 Domain's provider budget.


        Several credentials can resolve to the same Domain and they all draw on
        ONE

        shared provider budget, so this breaks each window's spend down by the

        credential that caused it.


        An `unattributed` entry — an entry whose `credential_id` is `null` — is

        EXPECTED and is not an error. Two things land there. Other systems can
        spend

        the same Domain's provider budget without going through this platform at
        all,

        and a small number of this platform's own calls are made outside the
        paced

        dispatch path (for example when you test a credential), which are not

        attributed. Showing the remainder explicitly is what keeps the
        percentages

        honest: they always total 100, and the part nobody can attribute stays

        visible rather than being silently spread across your credentials.
      example:
        as_of: '2026-08-14T18:00:00Z'
        buckets:
          Upload:
            label: Uploading (batch)
            windows:
              '86400':
                cap: 2000
                entries:
                  - credential_id: cred_1a2b3c4d
                    credential_name: Acme Outbound
                    pct_of_used: 77.8
                    used: 700
                  - pct_of_used: 22.2
                    used: 200
                used: 900
        tenancy_id: ten_9f2c1a7b3d4e5f60
    Five9BucketAttribution:
      properties:
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        windows:
          additionalProperties:
            $ref: '#/components/schemas/Five9WindowAttribution'
          type: object
          title: Windows
      type: object
      required:
        - windows
      title: Five9BucketAttribution
      description: >-
        Per-credential attribution for one rate bucket, across every window.


        `windows` is keyed by window length in seconds (`"60"`, `"3600"`,
        `"86400"`),

        so the same breakdown is available for the per-minute, hourly and daily

        budgets.
      example:
        label: Uploading (batch)
        windows:
          '60':
            cap: 20
            entries:
              - credential_id: cred_1a2b3c4d
                credential_name: Acme Outbound
                pct_of_used: 100
                used: 4
            used: 4
          '3600':
            cap: 400
            entries:
              - credential_id: cred_1a2b3c4d
                credential_name: Acme Outbound
                pct_of_used: 83.3
                used: 100
              - pct_of_used: 16.7
                used: 20
            used: 120
          '86400':
            cap: 2000
            entries:
              - credential_id: cred_1a2b3c4d
                credential_name: Acme Outbound
                pct_of_used: 77.8
                used: 700
              - pct_of_used: 22.2
                used: 200
            used: 900
    Five9WindowAttribution:
      properties:
        used:
          type: integer
          title: Used
        cap:
          type: integer
          title: Cap
        entries:
          items:
            $ref: '#/components/schemas/Five9AttributionEntry'
          type: array
          title: Entries
      type: object
      required:
        - used
        - cap
        - entries
      title: Five9WindowAttribution
      description: >-
        How one window's spend divides across the credentials that caused it.


        `used` is the window total and `cap` its effective budget; `entries`
        breaks

        the total down per credential and always includes the unattributed
        remainder

        so the entries sum to `used`.
      example:
        cap: 2000
        entries:
          - credential_id: cred_1a2b3c4d
            credential_name: Acme Outbound
            pct_of_used: 77.8
            used: 700
          - pct_of_used: 22.2
            used: 200
        used: 900
    Five9AttributionEntry:
      properties:
        credential_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Credential Id
        credential_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Credential Name
        used:
          type: integer
          title: Used
        pct_of_used:
          type: number
          title: Pct Of Used
      type: object
      required:
        - used
        - pct_of_used
      title: Five9AttributionEntry
      description: >-
        One credential's share of a window's spend, or the unattributed
        remainder.


        A `credential_id` of `null` is the unattributed remainder rather than an

        error: it is the spend this platform cannot assign to one of your

        credentials. A `credential_name` of `null` on an entry that HAS an id
        means

        the credential has since been deleted; its spend is still counted.


        `pct_of_used` is this entry's share of the window's total `used`, so the

        entries of a window always total 100.
      example:
        credential_id: cred_1a2b3c4d
        credential_name: Acme Outbound
        pct_of_used: 77.8
        used: 700
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    HTTPBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````