> ## 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.

# Estimate what an upload will cost against a Domain's budget

> Ask what an upload would cost BEFORE committing to it. This endpoint COMMITS NOTHING: no records are ingested, no batch is created, no budget is reserved and nothing is written. It reads this Domain's current budget and the work already queued against it, and returns the projected cost — how many provider `calls` the rows come to, how much of today's remaining budget that is, and whether the work would run past today's cap.

Give exactly ONE row source: `record_set_id` for rows you have already uploaded, or `record_count` for a hypothetical size. Give at least one of `bucket` or `action_id` so the estimate knows which provider budget to price against; an action that this Domain does not meter, or that spends more than one of its budgets, is rejected rather than priced against a guess.

A `spills_past_day_cap` verdict of `true` does NOT mean the work would be refused. It means the work needs more calls than today's remaining budget, so the overflow is delivered at your Domain's permitted rate and continues into the following day. The verdict counts the work already queued ahead of you, which is why a modest upload can read as a small percentage and still be flagged as spilling. `pct_of_remaining_day`, `day_remaining_calls` and the spill verdict all read `null` when the remaining budget cannot be read — a share of an unknown budget is unknown, not zero.

Like every budget surface here, the figures are a live projection of the quota ledger and never a reservation: other credentials on this Domain — and systems outside this platform entirely — can spend the same budget between this call and your upload. Readable by any organization member. Cross-tenant access returns 404, never 403.



## OpenAPI

````yaml /openapi.json post /platforms/five9/domains/{tenancy_id}/estimate
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}/estimate:
    post:
      tags:
        - five9-domains
      summary: Estimate what an upload will cost against a Domain's budget
      description: >-
        Ask what an upload would cost BEFORE committing to it. This endpoint
        COMMITS NOTHING: no records are ingested, no batch is created, no budget
        is reserved and nothing is written. It reads this Domain's current
        budget and the work already queued against it, and returns the projected
        cost — how many provider `calls` the rows come to, how much of today's
        remaining budget that is, and whether the work would run past today's
        cap.


        Give exactly ONE row source: `record_set_id` for rows you have already
        uploaded, or `record_count` for a hypothetical size. Give at least one
        of `bucket` or `action_id` so the estimate knows which provider budget
        to price against; an action that this Domain does not meter, or that
        spends more than one of its budgets, is rejected rather than priced
        against a guess.


        A `spills_past_day_cap` verdict of `true` does NOT mean the work would
        be refused. It means the work needs more calls than today's remaining
        budget, so the overflow is delivered at your Domain's permitted rate and
        continues into the following day. The verdict counts the work already
        queued ahead of you, which is why a modest upload can read as a small
        percentage and still be flagged as spilling. `pct_of_remaining_day`,
        `day_remaining_calls` and the spill verdict all read `null` when the
        remaining budget cannot be read — a share of an unknown budget is
        unknown, not zero.


        Like every budget surface here, the figures are a live projection of the
        quota ledger and never a reservation: other credentials on this Domain —
        and systems outside this platform entirely — can spend the same budget
        between this call and your upload. Readable by any organization member.
        Cross-tenant access returns 404, never 403.
      operationId: >-
        estimate_five9_domain_dispatch_cost_platforms_five9_domains__tenancy_id__estimate_post
      parameters:
        - name: tenancy_id
          in: path
          required: true
          schema:
            type: string
            title: Tenancy Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DispatchCostEstimateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DispatchCostEstimate'
        '401':
          description: Missing or invalid authentication
          content:
            application/json:
              example:
                detail: Authentication required
        '404':
          description: >-
            No such Domain or record set for this organization (cross-tenant
            access also returns 404)
          content:
            application/json:
              example:
                detail: Record set not found
        '422':
          description: >-
            The body failed validation — both row sources or neither were
            supplied, a record count outside the permitted range, no bucket and
            no action id, or an action this Domain does not meter (or meters in
            more than one bucket).
          content:
            application/json:
              example:
                detail: >-
                  This action is not rate limited on this Domain, so there is no
                  provider budget to price it against — name a bucket
                  explicitly, or estimate against an action this Domain meters.
        '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:
    DispatchCostEstimateRequest:
      properties:
        bucket:
          anyOf:
            - type: string
            - type: 'null'
          title: Bucket
        action_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Action Id
        record_set_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Record Set Id
        record_count:
          anyOf:
            - type: integer
              maximum: 50000000
              minimum: 1
            - type: 'null'
          title: Record Count
      type: object
      title: DispatchCostEstimateRequest
      description: >-
        Ask what an upload would cost, without committing to it.


        Give exactly ONE row source — either `record_set_id` for rows already

        uploaded, or `record_count` for a hypothetical size — and at least one
        of

        `bucket` or `action_id` so the estimate knows which provider budget to
        price

        against. Supplying both row sources, or neither, is rejected: two
        sources

        could disagree and there would be no principled way to choose between
        them.
      example:
        action_id: five9__configuration_service__add_to_list
        bucket: Upload
        record_count: 1000000
    DispatchCostEstimate:
      properties:
        bucket:
          type: string
          title: Bucket
        records:
          type: integer
          title: Records
        calls:
          type: integer
          title: Calls
        max_records_per_call:
          type: integer
          title: Max Records Per Call
        day_remaining_calls:
          anyOf:
            - type: integer
            - type: 'null'
          title: Day Remaining Calls
        pct_of_remaining_day:
          anyOf:
            - type: number
            - type: 'null'
          title: Pct Of Remaining Day
        queued_estimated_calls:
          type: integer
          title: Queued Estimated Calls
          default: 0
        spills_past_day_cap:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Spills Past Day Cap
        warning:
          anyOf:
            - type: string
            - type: 'null'
          title: Warning
        as_of:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: As Of
      type: object
      required:
        - bucket
        - records
        - calls
        - max_records_per_call
      title: DispatchCostEstimate
      description: >-
        What an upload will cost against the Domain's provider budget.


        A spill warning is INFORMATIONAL and never refuses a trigger. Uploading
        more

        than a day's remaining budget is a supported way to use the platform:
        the

        dispatcher paces the overflow into the following day and keeps going.
        Use

        this to tell someone what an upload will consume before they commit to
        it —

        and if they change their mind after triggering, cancel the batch rather
        than

        expecting this estimate to have blocked it.


        `calls` is how many provider calls `records` rows cost at

        `max_records_per_call`; `pct_of_remaining_day` is THIS upload's own
        share of

        what is left today, while `spills_past_day_cap` also counts the work
        already

        queued ahead of it — so a modest upload can read as a small percentage
        and

        still be flagged as spilling because of the backlog in front of it.

        `day_remaining_calls`, `pct_of_remaining_day` and `spills_past_day_cap`
        are

        `null` when the remaining daily budget cannot be read, because a
        percentage

        of an unknown budget is unknown rather than zero.
      example:
        as_of: '2026-08-14T18:00:00Z'
        bucket: Upload
        calls: 20
        day_remaining_calls: 1100
        max_records_per_call: 50000
        pct_of_remaining_day: 1.8
        queued_estimated_calls: 0
        records: 1000000
        spills_past_day_cap: false
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    HTTPBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````