---
title: "Set access keys lifetime policy."
method: PUT
path: "/v1/policies/accessKeysLifetime"
tags: ["policiesManagement"]
---

# Set access keys lifetime policy.

`PUT /v1/policies/accessKeysLifetime`

Sets the access keys lifetime policy. By setting this policy, the time  an access key has to live before it is expired or must be rotated is defined based on the period (default = never) configured for the organization. Setting the value to 0 would represent that the access keys never expire.

## Request body

- AccessKeysLifetimePolicy — Access Keys Lifetime policy.
  - `accessKeysLifetimeInDays` string, required — The number of days it will take for an access key to expire without being rotated/copied. Setting it to 0 (never) means that access keys will never expire. Valid values are: `0`, `30`, `45`, `60`, `90`, `180`, or `365`

## Response `200`

Access Keys Lifetime policy was set successfully.

- AccessKeysLifetimePolicy — Access Keys Lifetime policy.
  - `accessKeysLifetimeInDays` string, required — The number of days it will take for an access key to expire without being rotated/copied. Setting it to 0 (never) means that access keys will never expire. Valid values are: `0`, `30`, `45`, `60`, `90`, `180`, or `365`

## Other responses

- `default` — Operation failed with an error.

---

[API](https://skmtc.net/sumologic/apis/sumo-logic-api.md) · [All operations](https://skmtc.net/sumologic/apis/sumo-logic-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sumologic/sumo-logic-api/revisions/e4e4c7554890/schema)
