Sample - OpenAI API
POST/organization/data_retention

Update organization data retention

Updates the data retention controls configured for the organization. Supply the desired retention mode in retention_type to change the organization-level setting.

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

1 body field

The desired organization data retention setting.

retention_typestringrequired
The desired organization data retention type.
Allowed:zero_data_retentionmodified_abuse_monitoringenhanced_zero_data_retentionenhanced_modified_abuse_monitoring

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

Error handling

retention_type is required and must be one of zero_data_retention, modified_abuse_monitoring, enhanced_zero_data_retention, or enhanced_modified_abuse_monitoring. The submitted value determines the organization's configured data retention mode.