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

# Update organization settings

> Changes organization settings. For `fallback_enabled`, `allowed_models` and `long_context_disabled_models`: leaving a field out changes nothing, `null` restores the default, and a value sets it. An empty `long_context_disabled_models` list is the same as `null`; an empty `allowed_models` list is rejected. Changing model lists is for owners and admins only. Responds 422 when the body is not accepted.



## OpenAPI

````yaml /api-reference/cloud-platform-openapi.json patch /v1/organizations/{org_id}/settings
openapi: 3.1.0
info:
  description: Account, organization, workspace and billing routes of NEAR AI Cloud.
  title: NEAR AI Cloud Platform API
  version: '5'
servers:
  - url: https://cloud-platform.near.ai
    description: NEAR AI Cloud Platform
security: []
paths:
  /v1/organizations/{org_id}/settings:
    patch:
      tags:
        - Organizations
      summary: Update organization settings
      description: >-
        Changes organization settings. For `fallback_enabled`, `allowed_models`
        and `long_context_disabled_models`: leaving a field out changes nothing,
        `null` restores the default, and a value sets it. An empty
        `long_context_disabled_models` list is the same as `null`; an empty
        `allowed_models` list is rejected. Changing model lists is for owners
        and admins only. Responds 422 when the body is not accepted.
      operationId: update_organization_settings
      parameters:
        - description: The organization id (a UUID).
          in: path
          name: org_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchOrganizationSettingsRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationSettingsResponse'
          description: The settings after the change.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: The request is invalid.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Missing or invalid credential.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: The caller is not allowed to do this.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: The resource does not exist.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: The request body is not accepted.
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal error.
      security:
        - session: []
components:
  schemas:
    PatchOrganizationSettingsRequest:
      description: >-
        A partial update of organization settings. For each field: omitted
        leaves the setting

        unchanged, `null` restores its default, and a value sets it.
      properties:
        allowed_models:
          description: >-
            Limit the organization's API keys to these models (names or aliases,
            at most 256; stored

            and returned as canonical names). Null allows every model again; an
            empty list is

            rejected. Omitted: no change. Owners and admins only.
          items:
            type: string
          type:
            - array
            - 'null'
        fallback_enabled:
          description: >-
            Enable or disable fallback providers. Omitted: no change. Null:
            restore the default.
          type:
            - boolean
            - 'null'
        long_context_disabled_models:
          description: >-
            Turn the long-context tier off for these models (names or aliases,
            at most 256; stored

            and returned as canonical names). Null or an empty list turns it on
            for every model again.

            Omitted: no change. Owners and admins only.
          items:
            type: string
          type:
            - array
            - 'null'
      type: object
    OrganizationSettingsResponse:
      description: The organization settings.
      properties:
        settings:
          $ref: '#/components/schemas/OrganizationSettings'
      required:
        - settings
      type: object
    ErrorResponse:
      description: The body of every error answer on the user routes.
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
      required:
        - error
      type: object
    OrganizationSettings:
      description: The settings of an organization.
      properties:
        allowed_models:
          description: >-
            The only models the organization's API keys may use (canonical
            names,

            sorted). Null: every model.
          items:
            type: string
          type:
            - array
            - 'null'
        fallback_enabled:
          description: Whether requests may use providers configured as fallbacks.
          type: boolean
        long_context:
          description: >-
            One entry per model the organization may use that has a long-context
            tier, by model name.

            Read-only: derived from the model catalog and the list above; it
            cannot be set through settings.
          items:
            $ref: '#/components/schemas/LongContextModel'
          type: array
        long_context_disabled_models:
          description: >-
            The models whose long-context tier the organization turned off
            (canonical names,

            sorted), leaving out models it may no longer use. Null: none, or a
            stored value that is

            not a list, which turns the tier off for every model (each
            `long_context` entry then

            reads `enabled: false`).
          items:
            type: string
          type:
            - array
            - 'null'
      required:
        - fallback_enabled
      type: object
    ErrorDetail:
      properties:
        code:
          type:
            - string
            - 'null'
        message:
          type: string
        param:
          type:
            - string
            - 'null'
        type:
          type: string
      required:
        - message
        - type
      type: object
    LongContextModel:
      description: >-
        One model's long-context tier for one organization. The tier is
        available only when both

        `enabled` (the organization's switch) and `allowed` (the platform's
        switch) are true; otherwise

        requests to the model are limited to `base_context_tokens`.
      properties:
        allowed:
          description: Whether the long-context tier is available for this model at all.
          type: boolean
        base_context_tokens:
          description: The context limit that applies when the tier is not available.
          format: int32
          minimum: 0
          type: integer
        enabled:
          description: The organization's switch for the long-context tier.
          type: boolean
        model:
          description: Canonical model name.
          type: string
      required:
        - model
        - enabled
        - allowed
        - base_context_tokens
      type: object
  securitySchemes:
    session:
      bearerFormat: Session token
      description: 'Session token from signing in, sent as `Authorization: Bearer <token>`.'
      scheme: bearer
      type: http

````

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