v68

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

Set GitHub Actions cache retention limit for an organization

Sets GitHub Actions cache retention limit for an organization. All repositories under this organization may not set a higher cache retention limit.

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

put/organizations/{org}/actions/cache/retention-limit

Path parameters

orgstring required

The organization name. The name is not case sensitive.

Request body

max_cache_retention_daysinteger

For repositories in this organization, the maximum duration, in days, for which caches in a repository may be retained.

Example request

{
  "max_cache_retention_days": 14
}

Response

Response