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

# Set Project Retention

> Set how long the project keeps its calls' recordings, transcripts and
events (#316, ADR-0024), replacing all three: a field left out or null
keeps that kind for good. Counted in days from each call's end, and
enforced by an hourly janitor, so data goes within the hour after it
expires. Applies to calls already stored too: shortening it deletes what
is now past it, lengthening it keeps what is not yet deleted. An agent's
`retention` overrides it for that agent's calls. The call row itself is
kept. Admin key; a project can only set its own.



## OpenAPI

````yaml /openapi.json put /v1/projects/{project_id}/retention
openapi: 3.1.0
info:
  title: TurnCall
  description: Production voice agent platform API
  version: 2.0.0
servers: []
security: []
paths:
  /v1/projects/{project_id}/retention:
    put:
      tags:
        - projects
      summary: Set Project Retention
      description: |-
        Set how long the project keeps its calls' recordings, transcripts and
        events (#316, ADR-0024), replacing all three: a field left out or null
        keeps that kind for good. Counted in days from each call's end, and
        enforced by an hourly janitor, so data goes within the hour after it
        expires. Applies to calls already stored too: shortening it deletes what
        is now past it, lengthening it keeps what is not yet deleted. An agent's
        `retention` overrides it for that agent's calls. The call row itself is
        kept. Admin key; a project can only set its own.
      operationId: set_project_retention_v1_projects__project_id__retention_put
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Project Id
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectRetention'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: >-
                  Response Set Project Retention V1 Projects  Project Id 
                  Retention Put
          headers:
            X-TurnCall-Audit-Id:
              description: >-
                The id of the audit log entry for this request's primary
                resource. Every entry the request wrote (a publish also archives
                versions and re-points numbers) carries it as `request_id`: `GET
                /v1/audit-log?request_id=<this id>` returns them all.
              schema:
                type: string
                format: uuid
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ProjectRetention:
      properties:
        recordings_days:
          anyOf:
            - type: integer
              maximum: 36500
              minimum: 1
            - type: 'null'
          title: Recordings Days
          description: >-
            Days a call keeps its recording (the audio file in object storage,
            and the carrier's copy if it kept one), counted from the call's end.
            Null on a project keeps it for good; null on an agent takes the
            project's
        transcripts_days:
          anyOf:
            - type: integer
              maximum: 36500
              minimum: 1
            - type: 'null'
          title: Transcripts Days
          description: >-
            Days a call keeps its transcript: what was said, the tool calls made
            from it, and the post-call analysis and takeaways, counted from the
            call's end. Null on a project keeps it for good; null on an agent
            takes the project's
        events_days:
          anyOf:
            - type: integer
              maximum: 36500
              minimum: 1
            - type: 'null'
          title: Events Days
          description: >-
            Days a call keeps its other events (the rest of the call's event
            log), counted from the call's end. Null on a project keeps it for
            good; null on an agent takes the project's
      additionalProperties: false
      type: object
      title: ProjectRetention
      description: |-
        How long the project keeps each kind of call data (#316, ADR-0024).
        Unset keeps everything, as before retention existed. An agent's
        `retention` overrides any of them for its calls. A `PUT` replaces all
        three, so a field left out goes back to keeping for good.
    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

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.