---
title: "Set a project's trace retention policy"
method: PATCH
path: "/v1/projects/{project_identifier}/retention"
tags: ["projects"]
---

# Set a project's trace retention policy

`PATCH /v1/projects/{project_identifier}/retention`

Assign an existing trace retention policy to a project, or reset the project to the default policy with a null `policy_id`. Retention policies are standalone, reusable entities: this endpoint only changes which policy the project points at, and never creates, edits, or deletes a policy.

## Path parameters

- `project_identifier` string, required — The project identifier: either project ID or project name.

## Request body

- SetProjectRetentionPolicyRequestBody
  - `policy_id` string, nullable, required — The ID (GlobalID) of an existing trace retention policy to assign, or null to reset the project to the default policy.

## Response `200`

The project's retention policy assignment

- SetProjectRetentionPolicyResponseBody
  - `data` ProjectRetentionPolicyData, required
    - `project_id` string, required
    - `policy_id` string, nullable, required — The retention policy the project now uses, or null when the project falls back to the default policy.

## Other responses

- `403` — Forbidden
- `404` — Not Found
- `422` — Unprocessable Entity

## Changes

- **2026-08-25** `ce773df0ee27` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/arize-ai/apis/arize-phoenix-rest-api/changes/v1/projects/:project_identifier/retention/patch.md)

---

[API](https://skmtc.dev/arize-ai/apis/arize-phoenix-rest-api.md) · [All operations](https://skmtc.dev/arize-ai/apis/arize-phoenix-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/arize-ai/arize-phoenix-rest-api/revisions/f440cb6427a5/schema)
