Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation
Theme

Retrieve organization data retention

admin.organization.data_retention.retrieve() -> OrganizationDataRetention
GET
/organization/data_retention

Retrieves organization data retention controls.

Returns
class OrganizationDataRetention: …

Represents the organization’s data retention control setting.

object: Literal["organization.data_retention"]

The object type, which is always organization.data_retention.

type: Literal["zero_data_retention", "modified_abuse_monitoring", "enhanced_zero_data_retention", "enhanced_modified_abuse_monitoring"]

The configured organization data retention type.

Retrieve organization data retention

import os
from openai import OpenAI

client = OpenAI(
    admin_api_key=os.environ.get("OPENAI_ADMIN_KEY"),  # This is the default and can be omitted
)
organization_data_retention = client.admin.organization.data_retention.retrieve()
print(organization_data_retention.object)
Response example
{
    "object": "organization.data_retention",
    "type": "modified_abuse_monitoring"
}
Returns Examples
Response example
{
    "object": "organization.data_retention",
    "type": "modified_abuse_monitoring"
}