---
title: "Update organization data retention"
method: POST
path: "/organization/data_retention"
tags: ["Data retention"]
---

# Update organization data retention

`POST /organization/data_retention`

## Request

- Base URL: `https://api.openai.com/v1`
- URL: `https://api.openai.com/v1/organization/data_retention`
- Auth: HTTP bearer

Updates organization data retention controls.

## Request body

- UpdateOrganizationDataRetentionBody: Parameters for updating organization data retention controls.
  - `retention_type` 'zero_data_retention' | 'modified_abuse_monitoring' | 'enhanced_zero_data_retention' | 'enhanced_modified_abuse_monitoring', required: The desired organization data retention type.

## Response `200`

Organization data retention controls updated successfully.

- OrganizationDataRetention: Represents the organization's data retention control setting.
  - `object` 'organization.data_retention', required: The object type, which is always `organization.data_retention`.
  - `type` 'zero_data_retention' | 'modified_abuse_monitoring' | 'enhanced_zero_data_retention' | 'enhanced_modified_abuse_monitoring', required: The configured organization data retention type.

## Other responses

- `400`: The requested data retention setting or transition is invalid.
- `403`: The caller does not have permission to perform this operation.
- `404`: The organization was not found.

## Changes

- **2026-10-06** `487892d3954e`: 3 info
  - added the optional property `error/anyOf[#/components/schemas/Error]/misalignment/review_target` to the response with the `403` status
  - added the optional property `error/misalignment/review_target` to the response with the `400` status
  - added the optional property `error/misalignment/review_target` to the response with the `404` status
- **2026-10-05** `7f654af7f94f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/omnistack-sh/apis/openai-api/changes/organization/data_retention/post.md)

---

[API](https://skmtc.dev/omnistack-sh/apis/openai-api.md) - [All operations](https://skmtc.dev/omnistack-sh/apis/openai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/omnistack-sh/apis/openai-api/revisions/0a26f104d35f?raw)
