---
title: "Set Security Policy"
method: PUT
path: "/v1/orgs/{org_id}/security"
tags: ["organizations"]
---

# Set Security Policy

`PUT /v1/orgs/{org_id}/security`

## Request

- Base URL: `https://api.sonenta.dev`
- URL: `https://api.sonenta.dev/v1/orgs/{org_id}/security`
- Auth: none declared

Set the org 2FA requirement (admin/owner). Anti-lockout: an admin turning
it ON must already have 2FA on their OWN account, else they'd lock themselves
out on the very next request.

## Path parameters

- `org_id` string, required

## Request body

- SecurityPolicyIn
  - `require_2fa` boolean, required

## Response `200`

Successful Response

- SecurityPolicyOut
  - `require_2fa` boolean

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/sonenta/apis/sonenta-api.md) · [All operations](https://skmtc.dev/sonenta/apis/sonenta-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sonenta/apis/sonenta-api/revisions/f853ea49fb05?raw)
