Skip to content
Primary navigation

Update project data retention

POST/organization/projects/{project_id}/data_retention

Updates project data retention controls.

Path ParametersExpand Collapse
project_id: string
Body ParametersJSONExpand Collapse
retention_type: "organization_default" or "none" or "zero_data_retention" or 3 more

The desired project data retention type.

One of the following:
"organization_default"
"none"
"zero_data_retention"
"modified_abuse_monitoring"
"enhanced_zero_data_retention"
"enhanced_modified_abuse_monitoring"
ReturnsExpand Collapse
ProjectDataRetention object { object, type }

Represents a project’s data retention control setting.

object: "project.data_retention"

The object type, which is always project.data_retention.

type: "organization_default" or "none" or "zero_data_retention" or 3 more

The configured project data retention type.

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

Update project data retention

curl -X POST https://api.openai.com/v1/organization/projects/proj_abc/data_retention \
  -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{
      "retention_type": "modified_abuse_monitoring"
  }'
{
    "object": "project.data_retention",
    "type": "modified_abuse_monitoring"
}
Returns Examples
{
    "object": "project.data_retention",
    "type": "modified_abuse_monitoring"
}