---
title: "Rotate your API key"
method: POST
path: "/user/key/rotate"
tags: ["Account"]
---

# Rotate your API key

`POST /user/key/rotate`

## Request

- Base URL: `https://api.mymemory.dev/v1`
- URL: `https://api.mymemory.dev/v1/user/key/rotate`
- Auth: HTTP bearer

Issues a new API key and invalidates all previous keys for your account.

## Response `200`

Your new key

- object
  - `key` string: The new API key. Shown once; store it now.

## Other responses

- `401`: Missing or invalid API key
- `429`: Too many requests. For a rate limit (`error`: `rate_limited`), wait the seconds in the `Retry-After` header; for an AI budget error, until the budget renews.

---

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