Sample - OpenAI API
POST/organization/projects/{project_id}/data_retention

Update project data retention

Updates the data retention controls for a project. Provide the desired setting in retention_type, using one of the supported project retention modes. The response contains the updated project data retention configuration.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

1 parameter · 1 body field
project_idstringrequired
The ID of the project whose data retention controls you want to update.

The desired project data retention setting.

retention_typestringrequired
The desired project data retention type.
Allowed:organization_defaultnonezero_data_retentionmodified_abuse_monitoringenhanced_zero_data_retentionenhanced_modified_abuse_monitoring

1 status code
200Returns the updated project data retention object with its object type and configured retention `type`.
objectstringrequired
The object type, which is always `project.data_retention`.
Allowed:project.data_retention
typestringrequired
The configured project data retention type.
Allowed:organization_defaultnonezero_data_retentionmodified_abuse_monitoringenhanced_zero_data_retentionenhanced_modified_abuse_monitoring

Error handling

retention_type is required and must be one of organization_default, none, zero_data_retention, modified_abuse_monitoring, enhanced_zero_data_retention, or enhanced_modified_abuse_monitoring. project_id must identify the project whose data retention controls you want to update.