> ## Documentation Index
> Fetch the complete documentation index at: https://developers.fastdrop.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Rotate Key

> Rotate your API key

Generate a new API key and invalidate the old one immediately. Use this if your key is compromised.

If your account has an email on file, the new key is sent to your inbox and only the prefix is returned. Otherwise, the full key is returned in the response body (shown once).

### Response (200 OK)

<ResponseField name="key_prefix" type="string">
  First 8 characters of the new key.
</ResponseField>

<ResponseField name="api_key" type="string">
  Full new API key. Only present if no email is on file.
</ResponseField>

<ResponseField name="message" type="string">
  Instructions for the new key.
</ResponseField>

<ResponseField name="rotated_at" type="string">
  ISO 8601 timestamp of rotation.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.fastdrop.io/api/v1/keys/rotate \
    -H "X-API-Key: fd_live_your_current_key"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 (email on file) theme={null}
  {
    "key_prefix": "fd_live_aB",
    "message": "New API key generated. Check your email for the full key.",
    "rotated_at": "2026-03-05T12:00:00Z"
  }
  ```

  ```json 200 (no email) theme={null}
  {
    "api_key": "fd_live_aBcDeFgH1234567890abcdefghijklmn",
    "key_prefix": "fd_live_aB",
    "message": "Store this key securely. It will not be shown again.",
    "rotated_at": "2026-03-05T12:00:00Z"
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.