---
title: "Refresh API Key"
method: POST
path: "/v2/api-keys/refresh"
tags: ["Api Keys"]
---

# Refresh API Key

`POST /v2/api-keys/refresh`

Generate a new API key and delete the current one. Provide API key to refresh as a Bearer token in the Authorization header (e.g. "Authorization: Bearer <apiKey>").

## Headers

- `Authorization` string, required

## Request body

- RefreshApiKeyInput
  - `apiKeyDaysValid` number — For how many days is managed organization api key valid. Defaults to 30 days.
  - `apiKeyNeverExpires` boolean — If true, organization api key never expires.

## Response `200`

- RefreshApiKeyOutput
  - `status` 'success' | 'error', required
  - `data` ApiKeyOutput, required
    - `apiKey` string, required

---

[API](https://skmtc.net/calcom/apis/cal-diy-api-v2.md) · [All operations](https://skmtc.net/calcom/apis/cal-diy-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/calcom/cal-diy-api-v2/revisions/16de9d3eb7b3/schema)
