> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymorfa.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List usage gates

> Returns every usage gate with its mode, limit, current usage and decisions in the last 30 days. Gate state covers the whole team, so it needs a team API key; project tokens are refused. Pass `session` to include limits that apply per number, and `projectId` to require that the number belongs to that project. The active outbound monthly gate is record-only: an action over its limit is counted but allowed. It cannot be switched to enforce until placement reservations are available. An action whose limit cannot be checked fails with `503`.

Requires a team API key with `sessions:read`. Project tokens are not accepted.



## OpenAPI

````yaml api-reference/features/operate.json GET /platform/gates
openapi: 3.0.3
info:
  title: Operate API methods
  version: 1.0.0
  description: Task-focused operate methods across supported Polymorfa connection types.
servers: []
security: []
paths:
  /platform/gates:
    get:
      tags:
        - Usage
      summary: List usage gates
      description: >-
        Returns every usage gate with its mode, limit, current usage and
        decisions in the last 30 days. Gate state covers the whole team, so it
        needs a team API key; project tokens are refused. Pass `session` to
        include limits that apply per number, and `projectId` to require that
        the number belongs to that project. The active outbound monthly gate is
        record-only: an action over its limit is counted but allowed. It cannot
        be switched to enforce until placement reservations are available. An
        action whose limit cannot be checked fails with `503`.


        Requires a team API key with `sessions:read`. Project tokens are not
        accepted.
      operationId: managementListUsageGates
      parameters:
        - name: projectId
          in: query
          required: false
          description: >-
            Use with `session` to require that the number belongs to this
            project. Gate limits and usage remain team-wide or per number.
          schema:
            type: string
        - name: session
          in: query
          required: false
          schema:
            type: string
            minLength: 1
            maxLength: 128
            description: Number (session name).
          description: |-
            Identifier of the connected Polymorfa session.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | String length | `1` through `128` characters |
      responses:
        '200':
          description: Success
          headers:
            X-Request-Id:
              schema:
                type: string
              description: Stable request correlation identifier.
            Polymorfa-Version:
              schema:
                type: string
              description: API version applied to this response.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  data:
                    allOf:
                      - $ref: '#/components/schemas/management__UsageGateList'
                    description: Structured data carried by this object.
                required:
                  - data
        '400':
          $ref: '#/components/responses/management__BadRequest'
        '401':
          $ref: '#/components/responses/management__Unauthorized'
        '403':
          $ref: '#/components/responses/management__Forbidden'
        '404':
          $ref: '#/components/responses/management__NotFound'
      security:
        - management__ApiKeyAuth: []
      servers:
        - url: https://api.polymorfa.com
components:
  schemas:
    management__UsageGateList:
      type: object
      additionalProperties: false
      properties:
        session:
          type: string
          nullable: true
          description: |-
            Identifier of the connected Polymorfa session.

            <!-- polymorfa-input-table -->
            **Accepted alternatives**
            | Alternative | Accepted input |
            | --- | --- |
            | Alternative 1 | Type: `string` |
            | Alternative 2 | `null` |
        gates:
          type: array
          items:
            $ref: '#/components/schemas/management__UsageGate'
          description: Gates associated with this management usage gate list.
      required:
        - session
        - gates
    management__UsageGate:
      type: object
      additionalProperties: false
      properties:
        key:
          type: string
          enum:
            - calls.outbound_monthly
            - voice.campaigns
            - voice.campaigns.recipients
            - voice.campaigns.calls_monthly
            - voice.channels.concurrent
            - voice.audio_library
            - voice.audio_library.assets
            - voice.flows
            - voice.agents.elevenlabs
            - voice.agents.openai_realtime
            - voice.providers.managed
            - voice.providers.customer_key
            - voice.agent_minutes_monthly
            - voice.tts_characters_monthly
            - voice.stt_minutes_monthly
            - voice.storage.recordings
            - voice.storage.transcripts
          description: |-
            Specifies key for this management usage gate.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `calls.outbound_monthly` | Calls.outbound monthly. |
            | `voice.campaigns` | Voice.campaigns. |
            | `voice.campaigns.recipients` | Voice.campaigns.recipients. |
            | `voice.campaigns.calls_monthly` | Voice.campaigns.calls monthly. |
            | `voice.channels.concurrent` | Voice.channels.concurrent. |
            | `voice.audio_library` | Voice.audio library. |
            | `voice.audio_library.assets` | Voice.audio library.assets. |
            | `voice.flows` | Voice.flows. |
            | `voice.agents.elevenlabs` | Voice.agents.elevenlabs. |
            | `voice.agents.openai_realtime` | Voice.agents.openai realtime. |
            | `voice.providers.managed` | Voice.providers.managed. |
            | `voice.providers.customer_key` | Voice.providers.customer key. |
            | `voice.agent_minutes_monthly` | Voice.agent minutes monthly. |
            | `voice.tts_characters_monthly` | Voice.tts characters monthly. |
            | `voice.stt_minutes_monthly` | Voice.stt minutes monthly. |
            | `voice.storage.recordings` | Voice.storage.recordings. |
            | `voice.storage.transcripts` | Voice.storage.transcripts. |
        kind:
          type: string
          enum:
            - capability
            - quota
            - limit
            - concurrency
          description: |-
            Kind discriminator for this object.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `capability` | Capability. |
            | `quota` | Quota. |
            | `limit` | Limit. |
            | `concurrency` | Concurrency. |
        subject:
          type: string
          enum:
            - team
            - number
            - project
            - campaign
          description: |-
            What the limit applies to.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `team` | Team. |
            | `number` | Number. |
            | `project` | Project. |
            | `campaign` | Campaign. |
        mode:
          type: string
          enum:
            - 'off'
            - record
            - enforce
          description: >-
            `record` counts actions over the limit without refusing them.
            `enforce` refuses them with `gate_limit_reached`. `off` does not
            check.


            <!-- polymorfa-input-table -->

            **Allowed values**

            | Value | Meaning |

            | --- | --- |

            | `off` | Off. |

            | `record` | Record. |

            | `enforce` | Enforce. |
        active:
          type: boolean
          description: >-
            Whether an action checks this gate today. Voice automation gates are
            inactive until those features ship.
        limit:
          type: number
          nullable: true
          description: >-
            For capability gates, 1 when included and 0 when not. Otherwise the
            limit, or -1 for no limit. Null when the limit applies per number
            and no `session` was given.


            <!-- polymorfa-input-table -->

            **Accepted alternatives**

            | Alternative | Accepted input |

            | --- | --- |

            | Alternative 1 | Type: `number` |

            | Alternative 2 | `null` |
        used:
          type: number
          nullable: true
          description: >-
            Usage this calendar month (UTC) counted against a quota. Per-number
            quotas count only the current number; retained usage from a deleted
            number with the same name is excluded.


            <!-- polymorfa-input-table -->

            **Accepted alternatives**

            | Alternative | Accepted input |

            | --- | --- |

            | Alternative 1 | Type: `number` |

            | Alternative 2 | `null` |
        unit:
          type: string
          nullable: true
          enum:
            - second
            - pulse
            - call
            - character
            - token
            - provider_unit
            - channel
            - byte_day
            - count
            - minute
            - null
          description: >-
            Specifies unit for this management usage gate.


            <!-- polymorfa-input-table -->

            **Allowed values**

            | Value | Meaning |

            | --- | --- |

            | `second` | Second. |

            | `pulse` | Pulse. |

            | `call` | Call. |

            | `character` | Character. |

            | `token` | Token. |

            | `provider_unit` | Provider unit. |

            | `channel` | Channel. |

            | `byte_day` | Byte day. |

            | `count` | Count. |

            | `minute` | Minute. |

            | `null` | Null. |


            **Accepted alternatives**

            | Alternative | Accepted input |

            | --- | --- |

            | Alternative 1 | Type: `string`; Value `second` or `pulse` or
            `call` or `character` or `token` or `provider_unit` or `channel` or
            `byte_day` or `count` or `minute` |

            | Alternative 2 | `null` |
        overLimit:
          type: boolean
          nullable: true
          description: |-
            Whether the next action would exceed the limit.

            <!-- polymorfa-input-table -->
            **Accepted alternatives**
            | Alternative | Accepted input |
            | --- | --- |
            | Alternative 1 | Type: `boolean` |
            | Alternative 2 | `null` |
        decisions:
          type: object
          additionalProperties: false
          description: Checks over the limit in the last 30 days (UTC).
          properties:
            wouldBlock:
              type: integer
              minimum: 0
              description: |-
                Allowed because the gate records only.

                <!-- polymorfa-input-table -->
                **Value constraints**
                | Constraint | Accepted input |
                | --- | --- |
                | Numeric value | `0` or greater |
            blocked:
              type: integer
              minimum: 0
              description: |-
                Refused because the gate enforces.

                <!-- polymorfa-input-table -->
                **Value constraints**
                | Constraint | Accepted input |
                | --- | --- |
                | Numeric value | `0` or greater |
            evaluationError:
              type: integer
              minimum: 0
              description: |-
                Could not be evaluated.

                <!-- polymorfa-input-table -->
                **Value constraints**
                | Constraint | Accepted input |
                | --- | --- |
                | Numeric value | `0` or greater |
          required:
            - wouldBlock
            - blocked
            - evaluationError
      required:
        - key
        - kind
        - subject
        - mode
        - active
        - limit
        - used
        - unit
        - overLimit
        - decisions
    management__ErrorEnvelope:
      type: object
      required:
        - error
        - data
        - docs
      properties:
        error:
          type: object
          required:
            - type
            - code
            - message
            - param
            - request_id
          properties:
            type:
              type: string
              enum:
                - invalid_request_error
                - authentication_error
                - permission_error
                - conflict_error
                - rate_limit_error
                - api_error
                - upstream_error
              description: |-
                Type discriminator for this object.

                <!-- polymorfa-input-table -->
                **Allowed values**
                | Value | Meaning |
                | --- | --- |
                | `invalid_request_error` | Invalid request error. |
                | `authentication_error` | Authentication error. |
                | `permission_error` | Permission error. |
                | `conflict_error` | Conflict error. |
                | `rate_limit_error` | Rate limit error. |
                | `api_error` | Api error. |
                | `upstream_error` | Upstream error. |
            code:
              type: string
              description: Stable failure code. Use this value for programmatic handling.
            message:
              type: string
              description: Safe explanation of the failure.
            param:
              type: string
              nullable: true
              description: |-
                Invalid request field, or null when no field applies.

                <!-- polymorfa-input-table -->
                **Accepted alternatives**
                | Alternative | Accepted input |
                | --- | --- |
                | Alternative 1 | Type: `string` |
                | Alternative 2 | `null` |
            request_id:
              type: string
              description: >-
                Matches the X-Request-Id response header. Include it when you
                contact support.
            request_log_url:
              type: string
              format: uri
              description: >-
                Console page that shows this request. Returned only to
                organization and project credentials whose request was logged.


                <!-- polymorfa-input-table -->

                **Value constraints**

                | Constraint | Accepted input |

                | --- | --- |

                | Format | `uri` |
          description: Error details returned when the operation fails.
        data:
          type: string
          nullable: true
          enum:
            - null
          description: |-
            Always null for a failed request.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `null` | Null. |

            **Accepted alternatives**
            | Alternative | Accepted input |
            | --- | --- |
            | Alternative 1 | Type: `string` |
            | Alternative 2 | `null` |
        docs:
          type: string
          format: uri
          description: |-
            Documentation link to this failure code.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `uri` |
  responses:
    management__BadRequest:
      description: A path, query, or request-body value did not pass validation.
      headers:
        X-Request-Id:
          schema:
            type: string
          description: Stable request correlation identifier.
        Polymorfa-Version:
          schema:
            type: string
          description: API version applied to this response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/management__ErrorEnvelope'
    management__Unauthorized:
      description: Missing/invalid credential for this audience.
      headers:
        X-Request-Id:
          schema:
            type: string
          description: Stable request correlation identifier.
        Polymorfa-Version:
          schema:
            type: string
          description: API version applied to this response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/management__ErrorEnvelope'
    management__Forbidden:
      description: Authenticated but lacks the required scope/role/audience.
      headers:
        X-Request-Id:
          schema:
            type: string
          description: Stable request correlation identifier.
        Polymorfa-Version:
          schema:
            type: string
          description: API version applied to this response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/management__ErrorEnvelope'
    management__NotFound:
      description: >-
        The requested resource was not found inside the authenticated team or
        project scope.
      headers:
        X-Request-Id:
          schema:
            type: string
          description: Stable request correlation identifier.
        Polymorfa-Version:
          schema:
            type: string
          description: API version applied to this response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/management__ErrorEnvelope'
  securitySchemes:
    management__ApiKeyAuth:
      type: http
      scheme: bearer
      description: >-
        Send your team API key or project token as `Authorization: Bearer
        <token>`. The credential must have the required permissions. Project
        tokens can access only their own project.

````