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

# Update a Five9 Domain's margins and lanes

> Admin only. Three independent edits, any subset per request:

- `margins` — a per-rate-bucket safety margin as a percentage of the provider cap. DOWNWARD-ONLY: values outside 1–100 are rejected, because a margin above the provider cap would hand out budget Five9 never granted, and a 0% margin is a permanent outage. Only the named buckets' margins are written; the raw `caps` are never touched.
- `lane_overrides` — move one action into a different named dispatch lane for this Domain.
- `lane_order` — fix the deterministic ordering of actions within a lane (an ordered list, not numeric weights).

Every referenced action id is re-validated against the catalog. An empty body is a no-op. Explicit JSON `null` is rejected — omit a field to leave it unchanged. Cross-tenant access returns 404, never 403.



## OpenAPI

````yaml /openapi.json patch /platforms/five9/domains/{tenancy_id}
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}:
    patch:
      tags:
        - five9-domains
      summary: Update a Five9 Domain's margins and lanes
      description: >-
        Admin only. Three independent edits, any subset per request:


        - `margins` — a per-rate-bucket safety margin as a percentage of the
        provider cap. DOWNWARD-ONLY: values outside 1–100 are rejected, because
        a margin above the provider cap would hand out budget Five9 never
        granted, and a 0% margin is a permanent outage. Only the named buckets'
        margins are written; the raw `caps` are never touched.

        - `lane_overrides` — move one action into a different named dispatch
        lane for this Domain.

        - `lane_order` — fix the deterministic ordering of actions within a lane
        (an ordered list, not numeric weights).


        Every referenced action id is re-validated against the catalog. An empty
        body is a no-op. Explicit JSON `null` is rejected — omit a field to
        leave it unchanged. Cross-tenant access returns 404, never 403.
      operationId: patch_five9_domain_platforms_five9_domains__tenancy_id__patch
      parameters:
        - name: tenancy_id
          in: path
          required: true
          schema:
            type: string
            title: Tenancy Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Five9DomainUpdate'
      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
        '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:
    Five9DomainUpdate:
      properties:
        margins:
          anyOf:
            - additionalProperties:
                type: integer
              type: object
            - type: 'null'
          title: Margins
        lane_overrides:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Lane Overrides
        lane_order:
          anyOf:
            - additionalProperties:
                items:
                  type: string
                type: array
              type: object
            - type: 'null'
          title: Lane Order
      type: object
      title: Five9DomainUpdate
      description: >-
        Admin edits to a Domain: per-bucket safety margins and lane placement.


        All three fields are optional and an omitted field is left untouched
        rather

        than cleared. `margins` is keyed on the rate bucket (the provider's own

        operation-type name), so a safety margin can be applied to one bucket

        without affecting the others; values are a percentage of the provider
        cap

        and are downward-only. `lane_overrides` moves one action into a
        different

        named dispatch lane for this Domain, and `lane_order` fixes the order

        actions run in within a lane as an ordered list of action ids rather
        than

        numeric weights.
      example:
        lane_order:
          compliance:
            - five9__configuration_service__add_numbers_to_dnc
        lane_overrides:
          five9__configuration_service__add_to_list: bulk
        margins:
          Upload: 80
    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

````