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

# Refresh a Five9 Domain's live limits

> Admin only. Re-reads Five9's live rate-limit counters through an active bound Connection and folds the observed caps into the stored record. The safety margin is never touched, and an observed cap of zero (or an unrecognized window) never overwrites a good stored cap.

A provider failure is NOT an error response: the Domain comes back with `sync_status="stale"` and its caps unchanged, so inspect that field rather than the status code. 409 means the refresh could not be attempted at all — either no active Connection is bound to this Domain, or Five9 did not answer within the request budget. Cross-tenant access returns 404, never 403.



## OpenAPI

````yaml /openapi.json post /platforms/five9/domains/{tenancy_id}/refresh-limits
openapi: 3.1.0
info:
  title: GetDialed Flows API
  version: 0.1.0
servers:
  - url: https://api.getdialed.ai/flows
    description: Production
security: []
paths:
  /platforms/five9/domains/{tenancy_id}/refresh-limits:
    post:
      tags:
        - five9-domains
      summary: Refresh a Five9 Domain's live limits
      description: >-
        Admin only. Re-reads Five9's live rate-limit counters through an active
        bound Connection and folds the observed caps into the stored record. The
        safety margin is never touched, and an observed cap of zero (or an
        unrecognized window) never overwrites a good stored cap.


        A provider failure is NOT an error response: the Domain comes back with
        `sync_status="stale"` and its caps unchanged, so inspect that field
        rather than the status code. 409 means the refresh could not be
        attempted at all — either no active Connection is bound to this Domain,
        or Five9 did not answer within the request budget. Cross-tenant access
        returns 404, never 403.
      operationId: >-
        refresh_five9_domain_limits_platforms_five9_domains__tenancy_id__refresh_limits_post
      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/Five9DomainResponse'
        '401':
          description: Missing or invalid authentication
          content:
            application/json:
              example:
                detail: Authentication required
        '403':
          description: Caller is authenticated but not an admin
          content:
            application/json:
              example:
                detail: Admin role required
        '404':
          description: >-
            No such Domain for this organization (cross-tenant access also
            returns 404)
          content:
            application/json:
              example:
                detail: Domain not found
        '409':
          description: >-
            The refresh could not be performed: the Domain has no active bound
            Connection to authenticate as, or the provider did not answer in
            time.
          content:
            application/json:
              example:
                detail: >-
                  No active connection is bound to this Domain — add or
                  re-enable a connection before refreshing limits.
        '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:
    Five9DomainResponse:
      properties:
        id:
          type: string
          title: Id
        org_id:
          type: string
          title: Org Id
        platform_id:
          type: string
          title: Platform Id
        domain_id:
          type: string
          title: Domain Id
        domain_name:
          type: string
          title: Domain Name
        api_host:
          type: string
          title: Api Host
        tenancy_unit:
          additionalProperties: true
          type: object
          title: Tenancy Unit
        buckets:
          additionalProperties:
            additionalProperties: true
            type: object
          type: object
          title: Buckets
        bucket_map:
          additionalProperties:
            additionalProperties: true
            type: object
          type: object
          title: Bucket Map
        lane_overrides:
          additionalProperties:
            type: string
          type: object
          title: Lane Overrides
        lane_order:
          additionalProperties:
            items:
              type: string
            type: array
          type: object
          title: Lane Order
        sync_status:
          type: string
          title: Sync Status
        counters_synced_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Counters Synced At
        status:
          type: string
          title: Status
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
      type: object
      required:
        - id
        - org_id
        - platform_id
        - domain_id
        - domain_name
        - api_host
        - tenancy_unit
        - buckets
        - bucket_map
        - lane_overrides
        - lane_order
        - sync_status
        - counters_synced_at
        - status
        - created_at
        - updated_at
      title: Five9DomainResponse
      description: >-
        One Five9 Domain: the provider-tenant record that anchors rate limits.


        N Connections resolving to the same Domain share ONE quota budget. Each

        rate bucket reports the provider's raw `caps` per time window, the

        operator's `margin_pct` safety margin, and the `effective` budget
        computed

        from both. `tenancy_unit` carries the platform's own vocabulary for this

        record so it can be labelled correctly without a second lookup, and

        `sync_status` reports whether the caps are provider-observed (`live`),

        catalog defaults (`catalog_default`), or unchanged after a refresh
        returned

        unusable counters (`stale`).
      example:
        api_host: api.five9.com
        bucket_map:
          five9__configuration_service__add_to_list:
            operation_types:
              - Upload
            resolved: true
        buckets:
          Upload:
            caps:
              '60': 20
              '3600': 400
              '86400': 2000
            effective:
              '60': 16
              '3600': 320
              '86400': 1600
            label: Uploading (batch)
            margin_pct: 80
            max_records_per_request: 50000
            observed_at: '2026-07-25T18:00:00Z'
            source: live
        counters_synced_at: '2026-07-25T18:00:00Z'
        created_at: '2026-07-25T17:00:00Z'
        domain_id: '100200'
        domain_name: Acme Corp
        id: ten_9f2c1a7b3d4e5f60
        lane_order:
          bulk:
            - five9__configuration_service__add_to_list
        lane_overrides:
          five9__configuration_service__add_to_list: bulk
        org_id: org_a1b2c3d4
        platform_id: five9
        status: active
        sync_status: live
        tenancy_unit:
          key_field: domain_id
          key_source: getVCCConfiguration.domainId
          name: Domain
          plural: Domains
        updated_at: '2026-07-25T18:00:00Z'
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    HTTPBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````