---
title: "Rotate the customer key"
method: POST
path: "/customers/{id}/keys/rotate"
---

# Rotate the customer key

`POST /customers/{id}/keys/rotate`

## Request

- Base URL: `https://api.instalent.io/api/v1`
- URL: `https://api.instalent.io/api/v1/customers/{id}/keys/rotate`
- Auth: HTTP bearer

Returns the new key once. The previous key keeps working for the grace period you pass (up to 72 hours).

## Path parameters

- `id` string, required

## Request body

- object
  - `graceHours` integer

## Response `200`

OK

- object
  - `customerKey` string
  - `previousKeyValidUntil` string, nullable

## Other responses

- `4XX`: Error

---

[API](https://skmtc.dev/instalent/apis/instalent-integrator-api.md) · [All operations](https://skmtc.dev/instalent/apis/instalent-integrator-api/llms.txt) · [OpenAPI document](https://skmtc.dev/instalent/apis/instalent-integrator-api/revisions/eda181144149?raw)
