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

# Update Environment Quotas

> Update operational safety limits; this endpoint does not change billing.



## OpenAPI

````yaml /openapi.json patch /v1/organizations/{organization_id}/apps/{app_id}/environments/{environment_id}/quotas
openapi: 3.1.0
info:
  description: Are we on the same page?
  title: Synapse
  version: 0.1.0
servers: []
security: []
paths:
  /v1/organizations/{organization_id}/apps/{app_id}/environments/{environment_id}/quotas:
    patch:
      tags:
        - v1 control plane
      summary: Update Environment Quotas
      description: Update operational safety limits; this endpoint does not change billing.
      operationId: >-
        update_environment_quotas_v1_organizations__organization_id__apps__app_id__environments__environment_id__quotas_patch
      parameters:
        - in: header
          name: Idempotency-Key
          required: true
          schema:
            maxLength: 255
            minLength: 1
            title: Idempotency-Key
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnvironmentQuotaUpdateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentQuotaResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - BearerAuth: []
        - ApiKeyAuth: []
        - SessionCookie: []
components:
  schemas:
    EnvironmentQuotaUpdateRequest:
      additionalProperties: false
      properties:
        expected_revision:
          minimum: 1
          title: Expected Revision
          type: integer
        limits:
          $ref: '#/components/schemas/EnvironmentQuotaLimitChanges'
      required:
        - expected_revision
        - limits
      title: EnvironmentQuotaUpdateRequest
      type: object
    EnvironmentQuotaResponse:
      additionalProperties: false
      properties:
        limits:
          $ref: '#/components/schemas/EnvironmentQuotaLimits'
        revision:
          minimum: 1
          title: Revision
          type: integer
        schema_version:
          const: 1
          title: Schema Version
          type: integer
        usage:
          $ref: '#/components/schemas/EnvironmentQuotaUsage'
      required:
        - schema_version
        - revision
        - limits
        - usage
      title: EnvironmentQuotaResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    EnvironmentQuotaLimitChanges:
      additionalProperties: false
      properties:
        active_participant_sessions:
          anyOf:
            - maximum: 1000000
              minimum: 1
              type: integer
            - type: 'null'
          title: Active Participant Sessions
        active_subjects:
          anyOf:
            - maximum: 10000000
              minimum: 1
              type: integer
            - type: 'null'
          title: Active Subjects
        behavioral_event_batch_size:
          anyOf:
            - maximum: 100
              minimum: 1
              type: integer
            - type: 'null'
          title: Behavioral Event Batch Size
        continuous_event_batch_size:
          anyOf:
            - maximum: 100
              minimum: 1
              type: integer
            - type: 'null'
          title: Continuous Event Batch Size
        evaluations:
          anyOf:
            - maximum: 100000000
              minimum: 1
              type: integer
            - type: 'null'
          title: Evaluations
        programs:
          anyOf:
            - maximum: 100000
              minimum: 1
              type: integer
            - type: 'null'
          title: Programs
        webhook_endpoints:
          anyOf:
            - maximum: 10000
              minimum: 1
              type: integer
            - type: 'null'
          title: Webhook Endpoints
      title: EnvironmentQuotaLimitChanges
      type: object
    EnvironmentQuotaLimits:
      additionalProperties: false
      properties:
        active_participant_sessions:
          maximum: 1000000
          minimum: 1
          title: Active Participant Sessions
          type: integer
        active_subjects:
          maximum: 10000000
          minimum: 1
          title: Active Subjects
          type: integer
        behavioral_event_batch_size:
          maximum: 100
          minimum: 1
          title: Behavioral Event Batch Size
          type: integer
        continuous_event_batch_size:
          maximum: 100
          minimum: 1
          title: Continuous Event Batch Size
          type: integer
        evaluations:
          maximum: 100000000
          minimum: 1
          title: Evaluations
          type: integer
        programs:
          maximum: 100000
          minimum: 1
          title: Programs
          type: integer
        webhook_endpoints:
          maximum: 10000
          minimum: 1
          title: Webhook Endpoints
          type: integer
      required:
        - active_subjects
        - programs
        - evaluations
        - active_participant_sessions
        - webhook_endpoints
        - behavioral_event_batch_size
        - continuous_event_batch_size
      title: EnvironmentQuotaLimits
      type: object
    EnvironmentQuotaUsage:
      additionalProperties: false
      properties:
        active_participant_sessions:
          minimum: 0
          title: Active Participant Sessions
          type: integer
        active_subjects:
          minimum: 0
          title: Active Subjects
          type: integer
        behavioral_event_batch_size:
          const: 0
          title: Behavioral Event Batch Size
          type: integer
        continuous_event_batch_size:
          const: 0
          title: Continuous Event Batch Size
          type: integer
        evaluations:
          minimum: 0
          title: Evaluations
          type: integer
        programs:
          minimum: 0
          title: Programs
          type: integer
        webhook_endpoints:
          minimum: 0
          title: Webhook Endpoints
          type: integer
      required:
        - active_subjects
        - programs
        - evaluations
        - active_participant_sessions
        - webhook_endpoints
        - behavioral_event_batch_size
        - continuous_event_batch_size
      title: EnvironmentQuotaUsage
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    BearerAuth:
      description: Named syn_ API key or migration-only legacy key.
      scheme: bearer
      type: http
    ApiKeyAuth:
      description: Header alias for a named or legacy API key.
      in: header
      name: X-API-Key
      type: apiKey
    SessionCookie:
      description: Opaque administrator browser session.
      in: cookie
      name: synapse_session
      type: apiKey

````