---
title: "Update API key"
method: PATCH
path: "/api-keys/{apiKeyID}"
tags: ["API Keys"]
---

# Update API key

`PATCH /api-keys/{apiKeyID}`

## Request

- Base URL: `https://api.mailforge.ai/public`
- URL: `https://api.mailforge.ai/public/api-keys/{apiKeyID}`
- Auth: API key in header `Authorization`

Toggles the active state of an API key. Requires Firebase Bearer token.

## Path parameters

- `apiKeyID` string, required

## Request body

- ApiUpdateAPIKeyRequest
  - `isActive` boolean

## Response `200`

OK

- MailforgeExternalApiDeliveryApiAPIKeyResponse
  - `accountId` string
  - `createdAt` string
  - `id` string
  - `isActive` boolean
  - `lastUsedAt` string
  - `name` string
  - `updatedAt` string

## Other responses

- `400`: Invalid request
- `401`: Unauthorized

---

[API](https://skmtc.dev/mailforge/apis/mailforge-api.md) - [All operations](https://skmtc.dev/mailforge/apis/mailforge-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mailforge/apis/mailforge-api/revisions/7d2c137f9fc3?raw)
