---
title: "Rotate platform API key"
method: POST
path: "/v1/platform/apps/{appId}/rotate-key"
tags: ["Platform"]
---

# Rotate platform API key

`POST /v1/platform/apps/{appId}/rotate-key`

## Request

- Base URL: `https://api.1claw.co`
- URL: `https://api.1claw.co/v1/platform/apps/{appId}/rotate-key`
- Auth: HTTP bearer

Generate a new API key for the platform app. The old key is immediately invalidated. Returns the new key (one-time).

## Path parameters

- `appId` string, uuid, required

## Request body

- object
  - `api_key_expires_at` string, date-time, nullable: Optional expiration for the new key.

## Response `200`

New key generated

- object
  - `api_key` string: The new API key (shown once)
  - `api_key_prefix` string
  - `api_key_expires_at` string, date-time, nullable

## Other responses

- `403`: Only human users can rotate platform keys

---

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