Skip to main content
PUT
Update Data Retention

Authorizations

Authorization
string
header
required

Use Tuner API key (tr_api_...) or user session token. Find your API key in Workspace Settings > API Keys.

Path Parameters

workspace_id
integer
required

Workspace ID. Find this in Workspace > General Settings.

Body

application/json

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.

retention_period_days
integer | null

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.

Example:

30

erasure_scope
enum<string> | null

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.

Available options:
transcript_recording,
caller_data,
full,
null

Response

Successful Response

Response schema for the data-retention settings endpoints.

retention_period_days
integer | null
required

Days a call is kept before it is erased. Null means never delete.

erasure_scope
enum<string> | null
required

What is destroyed when a call expires. Null when nothing is ever deleted.

Available options:
transcript_recording,
caller_data,
full,
null
allowed_retention_periods
(integer | null)[]
required

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.

allowed_erasure_scopes
enum<string>[]
required

Erasure scopes the workspace's plan allows, shallowest to deepest. The update endpoint accepts only these values.

Available options:
transcript_recording,
caller_data,
full
default_erasure_scope
enum<string> | null
required

The plan's default scope, useful to preselect when the workspace has none set yet. Null when the plan offers no scopes.

Available options:
transcript_recording,
caller_data,
full,
null