---
title: "Enable or disable an API key"
method: PATCH
path: "/api/v1/api-keys/{api_key_param}/status"
tags: ["API Keys"]
---

# Enable or disable an API key

`PATCH /api/v1/api-keys/{api_key_param}/status`

## Request

- Base URL: `https://dashboard.sealgate.ai`
- URL: `https://dashboard.sealgate.ai/api/v1/api-keys/{api_key_param}/status`
- Auth: HTTP bearer

Set an API key's active status. Requires the admin role.

## Request body

- UpdateApiKeyStatusRequest
  - `is_active` boolean, required: New active status for the API key

## Response `200`

Updated status (API key returned masked)

- UpdateApiKeyStatusResponse
  - `status` string, required
  - `api_key` string, required: Masked API key
  - `is_active` boolean, required

## Other responses

- `401`: Missing or invalid API key
- `403`: The caller's role is not permitted to perform this action
- `404`: The requested resource was not found
- `422`: Request validation failed

---

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