---
title: "Changes to Rotate a service account API key"
method: POST
path: "/api/v0/service-accounts/{serviceAccountId}/api-keys/{keyId}/rotate"
---

# Changes to Rotate a service account API key

`POST /api/v0/service-accounts/{serviceAccountId}/api-keys/{keyId}/rotate`

> Every recorded change to this operation, newest first.

## Timeline

Changed in 2 of 62 revisions.

- **2026-11-12** `b6a46c415079`: 5 breaking, 1 warning, 26 info
- **2026-07-13** `09c8ece419bf`: 1 info

## Changes

- **2026-11-12** `b6a46c415079`: 5 breaking, 1 warning, 26 info
  - request body became required
  - the response's body type changed from `object` to no type for status `400`
  - removed the required property `detail` from the response with the `400` status
  - removed the required property `status` from the response with the `400` status
  - removed the required property `title` from the response with the `400` status
  - removed the optional property `metadata` from the response with the `400` status
  - added the new optional `header` request parameter `X-Factory-Org-Id`
  - added `subschema #1, subschema #2` to the response body `anyOf` list for the response status `400`
  - added the non-success response with the status `402`
  - added the non-success response with the status `413`
  - added the non-success response with the status `415`
  - added the non-success response with the status `451`
  - added the optional property `code` to the response with the `401` status
  - added the optional property `code` to the response with the `403` status
  - added the optional property `code` to the response with the `404` status
  - added the optional property `code` to the response with the `409` status
  - added the optional property `code` to the response with the `500` status
  - added the optional property `displayToUser` to the response with the `401` status
  - added the optional property `displayToUser` to the response with the `403` status
  - added the optional property `displayToUser` to the response with the `404` status
  - added the optional property `displayToUser` to the response with the `409` status
  - added the optional property `displayToUser` to the response with the `500` status
  - added the optional property `error` to the response with the `401` status
  - added the optional property `error` to the response with the `403` status
  - added the optional property `error` to the response with the `404` status
  - added the optional property `error` to the response with the `409` status
  - added the optional property `error` to the response with the `500` status
  - added the optional property `requestId` to the response with the `401` status
  - added the optional property `requestId` to the response with the `403` status
  - added the optional property `requestId` to the response with the `404` status
  - added the optional property `requestId` to the response with the `409` status
  - added the optional property `requestId` to the response with the `500` status
- **2026-07-13** `09c8ece419bf`: 1 info
  - endpoint added

---

[Operation](https://skmtc.dev/factory/apis/factory-public-api/docs/api/v0/service-accounts/:serviceAccountId/api-keys/:keyId/rotate/post.md) - [API](https://skmtc.dev/factory/apis/factory-public-api.md) - [Page](https://skmtc.dev/factory/apis/factory-public-api/changes/api/v0/service-accounts/:serviceAccountId/api-keys/:keyId/rotate/post)
