---
title: "API Key Rotation"
method: POST
path: "/apikey/rotate"
tags: ["Rotate Key"]
---

# API Key Rotation

`POST /apikey/rotate`

Rotate the API key provided in the x-apikey header

## Response `200`

API key rotation response

- ApiKeyResponse
  - `apiVersion` string — API version
  - `credentials` ApiKeyResponseData
    - `apikey` string — API key
    - `created_at` string, date-time — Date created
    - `email` string — E-mail address
    - `last_updated` string, date-time — Date updated
  - `status` string — Status message
  - `status_code` integer — Status code

## Other responses

- `401` — Unauthorized access

## Changes

> 24 revisions in range; 1 could not be searched.

- **2020-05-12** `a1ebd031433f` — 2 warning, 1 info
  - removed the optional property `data` from the response with the `200` status
  - removed the optional property `data` from the response with the `401` status
  - added the optional property `credentials` to the response with the `200` status
- **2020-01-10** `ac7f919a3345` — 1 warning
  - removed the optional property `errors/invalid-credentials` from the response with the `401` status
- **2019-12-23** `4e4e054b51b0` — 1 info
  - endpoint added
- **2019-07-28** `3d0b8e100bf8` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/operationcode/apis/operation-code-resources-api/changes/apikey/rotate/post.md)

---

[API](https://skmtc.dev/operationcode/apis/operation-code-resources-api.md) · [All operations](https://skmtc.dev/operationcode/apis/operation-code-resources-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/operationcode/operation-code-resources-api/revisions/6071d3157f6d/schema)
