Skip to content
Primary navigation

Update organization data retention

OrganizationDataRetention admin().organization().dataRetention().update(DataRetentionUpdateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/organization/data_retention

Updates organization data retention controls.

ParametersExpand Collapse
DataRetentionUpdateParams params
RetentionType retentionType

The desired organization data retention type.

ZERO_DATA_RETENTION("zero_data_retention")
MODIFIED_ABUSE_MONITORING("modified_abuse_monitoring")
ENHANCED_ZERO_DATA_RETENTION("enhanced_zero_data_retention")
ENHANCED_MODIFIED_ABUSE_MONITORING("enhanced_modified_abuse_monitoring")
ReturnsExpand Collapse
class OrganizationDataRetention:

Represents the organization’s data retention control setting.

JsonValue; object_ "organization.data_retention"constant"organization.data_retention"constant

The object type, which is always organization.data_retention.

Type type

The configured organization data retention type.

One of the following:
ZERO_DATA_RETENTION("zero_data_retention")
MODIFIED_ABUSE_MONITORING("modified_abuse_monitoring")
ENHANCED_ZERO_DATA_RETENTION("enhanced_zero_data_retention")
ENHANCED_MODIFIED_ABUSE_MONITORING("enhanced_modified_abuse_monitoring")

Update organization data retention

package com.openai.example;

import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.admin.organization.dataretention.DataRetentionUpdateParams;
import com.openai.models.admin.organization.dataretention.OrganizationDataRetention;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        OpenAIClient client = OpenAIOkHttpClient.fromEnv();

        DataRetentionUpdateParams params = DataRetentionUpdateParams.builder()
            .retentionType(DataRetentionUpdateParams.RetentionType.ZERO_DATA_RETENTION)
            .build();
        OrganizationDataRetention organizationDataRetention = client.admin().organization().dataRetention().update(params);
    }
}
{
    "object": "organization.data_retention",
    "type": "modified_abuse_monitoring"
}
Returns Examples
{
    "object": "organization.data_retention",
    "type": "modified_abuse_monitoring"
}