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

# Set a quota

> Admins only. `*` sets the limit across every template.



## OpenAPI

````yaml /api-reference/openapi.json put /v1/quotas/{template}
openapi: 3.1.0
info:
  title: envlink API
  version: 1.0.0
  description: >-
    Lease build environments, wire them to your sandbox, and keep snapshots and
    artifacts.
servers:
  - url: https://envlink-api.projectinwork.com
security:
  - bearerAuth: []
tags:
  - name: Environments
  - name: Templates
  - name: Sandboxes
  - name: Snapshots
  - name: Artifacts
  - name: Projects
  - name: Tokens
  - name: Usage
  - name: Account
paths:
  /v1/quotas/{template}:
    put:
      tags:
        - Usage
      summary: Set a quota
      description: Admins only. `*` sets the limit across every template.
      parameters:
        - name: template
          in: path
          required: true
          schema:
            type: string
          description: A template, or *.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                maxLeases:
                  type: integer
                  minimum: 0
                  maximum: 1000
                idle:
                  type: string
                hard:
                  type: string
              required:
                - maxLeases
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  quota:
                    $ref: '#/components/schemas/Quota'
components:
  schemas:
    Quota:
      type: object
      properties:
        template:
          type: string
          description: A template, or * for every template.
        maxLeases:
          type: integer
        running:
          type: integer
        idle:
          type: string
        hard:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A CLI token or an organization API key.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.