v68

latestOpenAPI 3.0.3MITraw.githubusercontent.com2026-08-011,21696712.3 MB
actions

Set GitHub Actions cache retention limit for a repository

Sets GitHub Actions cache retention limit for a repository. This determines how long caches will be retained for, if not manually removed or evicted due to size constraints.

OAuth tokens and personal access tokens (classic) need the admin:repository scope to use this endpoint.

put/repos/{owner}/{repo}/actions/cache/retention-limit

Path parameters

ownerstring required

The account owner of the repository. The name is not case sensitive.

repostring required

The name of the repository without the .git extension. The name is not case sensitive.

Request body

max_cache_retention_daysinteger

The maximum number of days to keep caches in this repository.

Example request

{
  "max_cache_retention_days": 14
}

Response

Response