Update Data Retention
Set a workspace’s data-retention window and erasure scope.
Both fields are optional and updated independently: a field you omit keeps its
current value, while sending it as null clears it. Setting
retention_period_days to null means “never delete” and always clears the
erasure scope; any concrete window requires an erasure_scope.
The window and the scope must both be included in the workspace’s plan — the GET
response lists what is available. If the plan can’t be verified at all, the request
fails with a 503 rather than a 402, except for clearing the policy
(retention_period_days: null), which is always accepted: turning deletion off only
ever stops erasure, so it must not depend on billing being reachable.
Expired calls are erased by a nightly job, so a change takes effect on its next run rather than immediately. Erasure is irreversible: an erased call cannot be restored, and lowering the window makes more history eligible on the very next run. Simulation calls are never erased.
Authorizations
Use Tuner API key (tr_api_...) or user session token. Find your API key in Workspace Settings > API Keys.
Path Parameters
Workspace ID. Find this in Workspace > General Settings.
Body
Request schema for updating a workspace's data-retention policy.
Both fields are optional and support partial updates: a field omitted from the body is
left unchanged, while a field sent as null clears that setting.
Days a call is kept before it is erased. null means never delete and always clears erasure_scope. Omit the field to leave the current window unchanged. Must be one of the plan's allowed_retention_periods.
30
What is destroyed when a call expires. transcript_recording removes the transcript, recording and log URLs; caller_data also removes the caller's identity and every free-text field derived from the conversation; full deletes the call record outright. Required whenever retention_period_days is set. Omit the field to leave the current scope unchanged.
transcript_recording, caller_data, full, null Response
Successful Response
Response schema for the data-retention settings endpoints.
Days a call is kept before it is erased. Null means never delete.
What is destroyed when a call expires. Null when nothing is ever deleted.
transcript_recording, caller_data, full, null Retention windows the workspace's plan allows, in days, ascending. Contains null when the plan permits never deleting. The update endpoint accepts only these values.
Erasure scopes the workspace's plan allows, shallowest to deepest. The update endpoint accepts only these values.
transcript_recording, caller_data, full The plan's default scope, useful to preselect when the workspace has none set yet. Null when the plan offers no scopes.
transcript_recording, caller_data, full, null