Skip to content
Primary navigation

Retrieve organization data retention

client.admin.organization.dataRetention.retrieve(RequestOptionsoptions?): OrganizationDataRetention { object, type }
GET/organization/data_retention

Retrieves organization data retention controls.

ReturnsExpand Collapse
OrganizationDataRetention { object, type }

Represents the organization’s data retention control setting.

object: "organization.data_retention"

The object type, which is always organization.data_retention.

type: "zero_data_retention" | "modified_abuse_monitoring" | "enhanced_zero_data_retention" | "enhanced_modified_abuse_monitoring"

The configured organization data retention type.

One of the following:
"zero_data_retention"
"modified_abuse_monitoring"
"enhanced_zero_data_retention"
"enhanced_modified_abuse_monitoring"

Retrieve organization data retention

import OpenAI from 'openai';

const client = new OpenAI({
  adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted
});

const organizationDataRetention = await client.admin.organization.dataRetention.retrieve();

console.log(organizationDataRetention.object);
{
    "object": "organization.data_retention",
    "type": "modified_abuse_monitoring"
}
Returns Examples
{
    "object": "organization.data_retention",
    "type": "modified_abuse_monitoring"
}