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

# Update organization security settings

> Switches the organization's two-factor requirement on or off. While it is on, members who have not enrolled in 2FA get `403 two_factor_required_by_org` on every endpoint until they enrol, can't turn their own 2FA off, and can't invite, remove or change members. API keys are not affected, and can't call this endpoint: it needs a signed-in dashboard session. Each change is recorded in the audit trail as an `access_change` event.

Switching it on needs a plan with MFA (Growth and up), and you must have 2FA yourself. Switching it off is always allowed, including after a downgrade.

**Required permission:** `settings:write`




## OpenAPI

````yaml /api-reference/openapi.yaml patch /api/v1/org-security
openapi: 3.1.0
info:
  title: Igris Management API
  version: '1'
  description: >-
    REST API for managing Igris connections, policies, sessions, audit events
    and alerts.
servers:
  - url: https://api.igrisecurity.com
security:
  - bearerAuth: []
tags:
  - name: Connections
  - name: Policies
  - name: Sessions
  - name: Audit Events
  - name: Incidents
  - name: Webhooks
  - name: API Keys
  - name: Members
  - name: Security
  - name: LLM Providers
  - name: LLM Cost
  - name: Observe
paths:
  /api/v1/org-security:
    patch:
      tags:
        - Security
      summary: Update organization security settings
      description: >
        Switches the organization's two-factor requirement on or off. While it
        is on, members who have not enrolled in 2FA get `403
        two_factor_required_by_org` on every endpoint until they enrol, can't
        turn their own 2FA off, and can't invite, remove or change members. API
        keys are not affected, and can't call this endpoint: it needs a
        signed-in dashboard session. Each change is recorded in the audit trail
        as an `access_change` event.


        Switching it on needs a plan with MFA (Growth and up), and you must have
        2FA yourself. Switching it off is always allowed, including after a
        downgrade.


        **Required permission:** `settings:write`
      operationId: updateOrgSecurity
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - requireTwoFactor
              properties:
                requireTwoFactor:
                  type: boolean
            example:
              requireTwoFactor: true
      responses:
        '200':
          description: The stored setting.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      requireTwoFactor:
                        type: boolean
              example:
                data:
                  requireTwoFactor: true
        '400':
          $ref: '#/components/responses/ZodBadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: >
            Missing permission, the call used an API key (`session_required`:
            change it from the dashboard), the plan has no MFA
            (`plan_feature_unavailable`, only when switching it on), or the
            requirement is on and you have not enrolled
            (`two_factor_required_by_org`).
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ForbiddenError'
                  - $ref: '#/components/schemas/PlanError'
                  - $ref: '#/components/schemas/Error'
              example:
                error: plan_feature_unavailable
                feature: mfa
                currentPlan: starter
                upgradeTo: growth
        '409':
          description: >
            You are switching the requirement on without 2FA yourself
            (`enable_your_own_two_factor_first`). Enrol first, or you would lock
            yourself out.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: enable_your_own_two_factor_first
components:
  responses:
    ZodBadRequest:
      description: The body failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ZodValidationError'
    Unauthorized:
      description: No valid session or API key, or the key's creator is no longer a member.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Unauthorized
  schemas:
    ForbiddenError:
      type: object
      properties:
        error:
          type: string
          example: Forbidden
        required:
          type: string
          description: The permission the caller lacks.
          example: policies:write
    PlanError:
      type: object
      description: Plan limit or plan feature errors. See Limits and errors.
      properties:
        error:
          type: string
          example: PLAN_LIMIT_REACHED
        code:
          type: string
          example: PLAN_LIMIT_REACHED
        feature:
          type: string
        detector:
          type: string
          description: The detector your plan does not include.
        limit:
          type: string
        current:
          type: integer
        max:
          type: integer
        plan:
          type: string
        currentPlan:
          type: string
        upgradeTo:
          type: string
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
    ZodValidationError:
      type: object
      properties:
        success:
          type: boolean
          const: false
        error:
          type: object
          properties:
            name:
              type: string
              example: ZodError
            message:
              type: string
              description: JSON string of the validation issues.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: ig_...
      description: >-
        An Igris API key. It acts with the current role and permission overrides
        of the member who created it.

````

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