---
title: "Set artifact and log retention settings for an enterprise"
method: PUT
path: "/enterprises/{enterprise}/actions/permissions/artifact-and-log-retention"
tags: ["enterprise-admin"]
---

# Set artifact and log retention settings for an enterprise

`PUT /enterprises/{enterprise}/actions/permissions/artifact-and-log-retention`

Sets artifact and log retention settings for an enterprise.

## Path parameters

- `enterprise` string, required

## Request body

- ActionsArtifactAndLogRetention
  - `days` integer, required — The number of days to retain artifacts and logs

## Response `204`

Successfully updated the artifact and log retention settings

## Other responses

- `404` — Resource not found
- `422` — Validation failed, or the endpoint has been spammed.

---

[API](https://skmtc.net/github/apis/github-v3-rest-api-2.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-2/versions/8ae6d0c8716e/schema)
