> ## 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.

# Update PII Redaction

> Enable or disable PII redaction for a workspace and choose which categories
to redact.

Enabling requires a plan that includes PII redaction; disabling is always
allowed. Changes apply to calls ingested afterwards — calls already stored
aren't reprocessed.



## OpenAPI

````yaml https://api.usetuner.ai/public/openapi.json put /api/v1/workspaces/{workspace_id}/pii-redaction
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}/pii-redaction:
    put:
      tags:
        - workspaces
      summary: Update PII Redaction
      description: >-
        Enable or disable PII redaction for a workspace and choose which
        categories

        to redact.


        Enabling requires a plan that includes PII redaction; disabling is
        always

        allowed. Changes apply to calls ingested afterwards — calls already
        stored

        aren't reprocessed.
      operationId: >-
        update_pii_redaction_settings_api_v1_workspaces__workspace_id__pii_redaction_put
      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.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PIIRedactionUpdateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PIIRedactionResponse'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              example:
                detail: Not authenticated
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '402':
          description: PII redaction isn't included in the workspace's plan.
          content:
            application/json:
              example:
                detail: PII redaction is not included in your current plan.
              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:
    PIIRedactionUpdateRequest:
      properties:
        enabled:
          type: boolean
          title: Enabled
          description: Whether to redact PII from transcripts before storage.
        categories:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          items:
            enum:
              - address
              - credit_card
              - email
              - name
              - phone
              - pin_password
              - ssn
          title: Categories
          description: >-
            Categories to redact. Required when `enabled` is true; the list
            replaces the current selection.
          examples:
            - - email
              - phone
      type: object
      required:
        - enabled
      title: PIIRedactionUpdateRequest
      description: >-
        Request schema for enabling/disabling PII redaction and selecting
        categories.
    PIIRedactionResponse:
      properties:
        pii_redaction_enabled:
          type: boolean
          title: Pii Redaction Enabled
          description: Whether to redact PII from transcripts before storage.
        pii_redaction_categories:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Pii Redaction Categories
          description: >-
            Categories currently being redacted. Null when redaction is
            disabled.
      type: object
      required:
        - pii_redaction_enabled
        - pii_redaction_categories
      title: PIIRedactionResponse
      description: Response schema for the PII redaction 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

````