> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usetuner.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Data Retention

> Get a workspace's data-retention policy.

Returns the retention window currently in force and the erasure scope applied when
a call expires, alongside the windows and scopes the workspace's plan allows — use
those lists to build the options you offer before calling the update endpoint.



## OpenAPI

````yaml https://api.usetuner.ai/public/openapi.json get /api/v1/workspaces/{workspace_id}/data-retention
openapi: 3.1.0
info:
  title: My Public API
  version: 1.0.0
servers:
  - url: https://api.usetuner.ai
security: []
tags:
  - name: calls
    x-group: Calls
  - name: workspaces
    x-group: Workspaces
  - name: agent-settings
    x-group: Agent Settings
  - name: agents
    x-group: Agents
  - name: simulation
    x-group: Simulation
  - name: providers
    x-group: Providers
paths:
  /api/v1/workspaces/{workspace_id}/data-retention:
    get:
      tags:
        - workspaces
      summary: Get Data Retention
      description: >-
        Get a workspace's data-retention policy.


        Returns the retention window currently in force and the erasure scope
        applied when

        a call expires, alongside the windows and scopes the workspace's plan
        allows — use

        those lists to build the options you offer before calling the update
        endpoint.
      operationId: >-
        get_data_retention_settings_api_v1_workspaces__workspace_id__data_retention_get
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: integer
            description: Workspace ID. Find this in Workspace > General Settings.
            title: Workspace Id
          description: Workspace ID. Find this in Workspace > General Settings.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataRetentionResponse'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              example:
                detail: Not authenticated
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: You do not have access to this workspace.
          content:
            application/json:
              example:
                detail: User does not have access to workspace 42
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Workspace not found.
          content:
            application/json:
              example:
                detail: Workspace with ID 42 not found
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - Bearer: []
components:
  schemas:
    DataRetentionResponse:
      properties:
        retention_period_days:
          anyOf:
            - type: integer
            - type: 'null'
          title: Retention Period Days
          description: Days a call is kept before it is erased. Null means never delete.
        erasure_scope:
          anyOf:
            - type: string
            - type: 'null'
          enum:
            - transcript_recording
            - caller_data
            - full
            - null
          title: Erasure Scope
          description: >-
            What is destroyed when a call expires. Null when nothing is ever
            deleted.
        allowed_retention_periods:
          items:
            anyOf:
              - type: integer
              - type: 'null'
          type: array
          title: Allowed Retention Periods
          description: >-
            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:
          items:
            enum:
              - transcript_recording
              - caller_data
              - full
          type: array
          title: Allowed Erasure Scopes
          description: >-
            Erasure scopes the workspace's plan allows, shallowest to deepest.
            The update endpoint accepts only these values.
        default_erasure_scope:
          anyOf:
            - type: string
            - type: 'null'
          enum:
            - transcript_recording
            - caller_data
            - full
            - null
          title: Default Erasure Scope
          description: >-
            The plan's default scope, useful to preselect when the workspace has
            none set yet. Null when the plan offers no scopes.
      type: object
      required:
        - retention_period_days
        - erasure_scope
        - allowed_retention_periods
        - allowed_erasure_scopes
        - default_erasure_scope
      title: DataRetentionResponse
      description: Response schema for the data-retention settings endpoints.
    ErrorResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: Human-readable description of what went wrong.
      type: object
      required:
        - detail
      title: ErrorResponse
      description: Error body returned when a request fails.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    Bearer:
      type: http
      description: >-
        Use Tuner API key (tr_api_...) or user session token. Find your API key
        in Workspace Settings > API Keys.
      scheme: bearer

````