POST/organization/projects/{project_id}/data_retention

Update project data retention settings

Updates the data retention controls for a project. Set retention_type to one of the supported retention settings to configure the project.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 1 body field
project_idstringrequired
The unique identifier of the project whose data retention controls to update.

The desired data retention setting for the project.

retention_typestringrequired
The desired project data retention type.
Allowed:organization_defaultnonezero_data_retentionmodified_abuse_monitoringenhanced_zero_data_retentionenhanced_modified_abuse_monitoring

4 status codes
200Returns the project's updated data retention setting, including its configured `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
400Returned when the requested data retention setting or transition is invalid.
errorobjectrequired
403Returned when the authenticated user does not have permission to update the project's data retention controls.
errorobjectrequired
Details about the permission error.
404Returned when the organization or project is not found.
errorobjectrequired

Error handling

A 400 is returned when the requested retention setting or transition is invalid; a 403 is returned when the authenticated user lacks permission; and a 404 is returned when the organization or project is not found. The project_id path parameter must identify the project to update. 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.