---
title: "Toggle My Api Key Active"
method: PATCH
path: "/api/me/api-keys/{key_id}/active"
tags: ["user-settings"]
---

# Toggle My Api Key Active

`PATCH /api/me/api-keys/{key_id}/active`

Enable or disable one of the user's own API keys.

## Path parameters

- `key_id` string, required

## Request body

- UserApiKeyToggleRequest
  - `is_active` boolean, required

## Response `200`

Successful Response

- UserApiKeyInfo
  - `id` string, required
  - `name` string, required
  - `key_prefix` string, required
  - `scopes` string, nullable
  - `is_active` boolean, required
  - `expires_at` string, date-time, nullable
  - `last_used_at` string, date-time, nullable
  - `total_requests` integer
  - `created_at` string, required

## Other responses

- `422` — Validation Error

## Changes

- **2026-03-22** `6dc2d6f33d44` — 4 breaking, 13 info
  - response property `expires_at` list-of-types was widened by adding types `null` to media type `application/json` of response `200`
  - response property `last_used_at` list-of-types was widened by adding types `null` to media type `application/json` of response `200`
  - response property `scopes` list-of-types was widened by adding types `null` to media type `application/json` of response `200`
  - the `created_at` response's property type/format changed from `string`/`date-time` to `string`/`` for status `200`
  - …13 more

[Change history](https://skmtc.dev/fim-ai/apis/fim-one-api/changes/api/me/api-keys/:key_id/active/patch.md)

---

[API](https://skmtc.dev/fim-ai/apis/fim-one-api.md) · [All operations](https://skmtc.dev/fim-ai/apis/fim-one-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/fim-ai/fim-one-api/revisions/89738ff55831/schema)
