---
title: "Update branch retention policy"
method: PUT
path: "/branches/{branch_id}/retention_policy"
tags: ["Management"]
---

# Update branch retention policy

`PUT /branches/{branch_id}/retention_policy`

Update branch retention policy

## Path parameters

- `branch_id` integer, required

## Request body

- RetentionPolicy
  - `ci_logs` integer
  - `dev_logs` integer
  - `ci_artifacts` integer
  - `dev_artifacts` integer

## Response `200`

Successfully created run

## Other responses

- `default` — unexpected error

## Changes

- **2023-02-19** `f5107ad99aec` — 1 breaking, 1 info
  - removed the success response with the status `201`
  - added the success response with the status `200`
- **2023-02-18** `7796ef19a4c9` — 1 info
  - endpoint added
- **2021-01-31** `6dffc3a4de00` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/kraken-ci/apis/server-api/changes/branches/:branch_id/retention_policy/put.md)

---

[API](https://skmtc.dev/kraken-ci/apis/server-api.md) · [All operations](https://skmtc.dev/kraken-ci/apis/server-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/kraken-ci/server-api/revisions/1f2ae877f985/schema)
