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

# Rename a tenant

> Admin only. Change a tenant's display label — and only its label. Nothing is keyed on the label, so no credential, no stored rate budget and no queued work is affected by a rename. Any field other than `label` in the body is rejected: a tenant's identity is fixed when it is created, because the records that point at it are keyed on that identity. Cross-tenant access returns 404, never 403.



## OpenAPI

````yaml /openapi.json patch /tenants/{tenancy_id}
openapi: 3.1.0
info:
  title: GetDialed API
  version: 0.1.0
servers:
  - url: https://api.getdialed.ai/v1
    description: Production
security: []
paths:
  /tenants/{tenancy_id}:
    patch:
      tags:
        - tenants
      summary: Rename a tenant
      description: >-
        Admin only. Change a tenant's display label — and only its label.
        Nothing is keyed on the label, so no credential, no stored rate budget
        and no queued work is affected by a rename. Any field other than `label`
        in the body is rejected: a tenant's identity is fixed when it is
        created, because the records that point at it are keyed on that
        identity. Cross-tenant access returns 404, never 403.
      operationId: rename_tenant_tenants__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/TenantRename'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantResponse'
        '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 tenant for this organization (cross-tenant access also
            returns 404)
          content:
            application/json:
              example:
                detail: Tenant not found
        '422':
          description: >-
            The request failed validation — an unknown sort field, a page size
            outside the permitted range, a filter pair that cannot both hold, an
            empty label, or a field other than `label` in a rename body.
          content:
            application/json:
              example:
                detail: is_manual=true and platform_id disagree
        '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:
    TenantRename:
      properties:
        label:
          type: string
          maxLength: 200
          minLength: 1
          title: Label
      additionalProperties: false
      type: object
      required:
        - label
      title: TenantRename
      description: >-
        A new display label for a tenant.


        Renaming a tenant changes its label and nothing else — no credential, no

        stored rate budget and no queued work is affected, because none of them
        is

        keyed on the label. Any other field in the body is rejected: a tenant's

        identity is fixed when it is created, and the records that point at it
        are

        keyed on that identity.
      example:
        label: Acme Corp (EU)
    TenantResponse:
      properties:
        id:
          type: string
          title: Id
        org_id:
          type: string
          title: Org Id
        platform_id:
          type: string
          title: Platform Id
        label:
          type: string
          title: Label
        is_manual:
          type: boolean
          title: Is Manual
        status:
          type: string
          title: Status
        buckets:
          additionalProperties:
            additionalProperties: true
            type: object
          type: object
          title: Buckets
        sync_status:
          type: string
          title: Sync Status
        counters_synced_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Counters Synced At
        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
        - label
        - is_manual
        - status
        - buckets
        - sync_status
        - counters_synced_at
        - created_at
        - updated_at
      title: TenantResponse
      description: >-
        One tenant: the record that anchors a credential and its rate budget.


        A tenant is the thing your credentials belong to — a vendor account

        discovered from the credentials themselves (a Five9 Domain, for
        example), or

        a tenant you named yourself when the platform has nothing to discover. N

        credentials against the same tenant share ONE rate 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. `min_interval_ms` is the minimum spacing enforced between two

        consecutive calls on the bucket — a floor applied on top of the window

        budget, so a bucket can be well inside its hourly cap and still be
        paced;

        `null` means no explicit floor. The margin is deliberately NOT applied
        to it

        (it multiplies call counts, and shortening a duration would loosen the

        budget rather than tighten it). `is_manual` is true for a tenant you
        named

        rather than one

        discovered from a vendor, and such a tenant has no provider-published
        caps,

        so its budget is empty. `sync_status` reports whether the caps are

        provider-observed (`live`), catalog defaults (`catalog_default`), or

        unchanged after a refresh returned unusable counters (`stale`).
      example:
        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
            min_interval_ms: 250
            observed_at: '2026-08-22T18:00:00Z'
            source: live
        counters_synced_at: '2026-08-22T18:00:00Z'
        created_at: '2026-08-22T17:00:00Z'
        id: ten_9f2c1a7b3d4e5f60
        is_manual: false
        label: Acme Corp
        org_id: org_a1b2c3d4
        platform_id: five9
        status: active
        sync_status: live
        updated_at: '2026-08-22T18:00:00Z'
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    HTTPBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````