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

# Set quotas

> Usage limits per tenant. A Niadra operations route.



## OpenAPI

````yaml openapi/en/control.json PUT /v1/quotas
openapi: 3.1.0
info:
  title: Niadra control API
  version: '1'
  description: >-
    Tenants, projects, sources, keys, people, configuration and usage. It never
    receives customer content.
servers:
  - url: https://control.api.niadra.com
security: []
paths:
  /v1/quotas:
    put:
      summary: Set quotas
      description: >-
        Sets a usage limit for a tenant, per metric and period. Used by Niadra
        operations.


        **Authentication.** Operator credential (`X-Niadra-Operator-Token`).
        Used by Niadra operations, not by your code.
      operationId: set_quota_v1_quotas_put
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuotaIn'
            example:
              tenant_id: 0192f0a0-1b2c-7d3e-8f40-5a6b7c8d9e01
              metric: session_billable
              limit: 250000
              period: month
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuotaIn'
              example:
                tenant_id: 0192f0a0-1b2c-7d3e-8f40-5a6b7c8d9e01
                metric: session_billable
                limit: 250000
                period: month
          description: The quota in force.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The request does not match the contract.
      security:
        - operatorToken: []
components:
  schemas:
    QuotaIn:
      additionalProperties: false
      properties:
        limit:
          minimum: 0
          title: Limit
          type: integer
        metric:
          maxLength: 256
          minLength: 1
          title: Metric
          type: string
        period:
          default: month
          title: Period
          type: string
          description: The period the limit counts over. Defaults to `month`.
        tenant_id:
          format: uuid
          title: Tenant Id
          type: string
      required:
        - tenant_id
        - metric
        - limit
      title: QuotaIn
      type: object
    Problem:
      additionalProperties: false
      description: RFC 9457 problem details; `code` comes from the versioned error catalog.
      properties:
        code:
          title: Code
          type: string
        detail:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Detail
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Request Id
        status:
          title: Status
          type: integer
        title:
          title: Title
          type: string
        type:
          default: about:blank
          title: Type
          type: string
      required:
        - title
        - status
        - code
      title: Problem
      type: object
  securitySchemes:
    operatorToken:
      type: apiKey
      in: header
      name: X-Niadra-Operator-Token

````