---
title: "Update API Key"
method: PUT
path: "/api-keys/{id}"
tags: ["Team Management"]
---

# Update API Key

`PUT /api-keys/{id}`

Updates an existing API key's name and/or rate limit. Only API keys belonging to the authenticated team can be updated.

## Path parameters

- `id` string, required

## Request body

- object
  - `name` string — Optional new name for the API key
  - `rateLimit` integer — Optional new rate limit for the API key (requests per second)
  - `budgetCents` integer, nullable — Optional new spending budget for the API key, in cents. Set to null to remove the budget.

## Response `200`

API key updated successfully

- object
  - `apiKey` object
    - `id` string, uuid
    - `name` string
    - `rateLimit` integer, nullable — Rate limit in requests per second
    - `budgetCents` integer, nullable — Spending budget for the API key, in cents
    - `isOverBudget` boolean — Whether the API key is currently over its budget
    - `teamId` string, uuid
    - `userId` string, uuid
    - `createdAt` string, date-time
    - `updatedAt` string, date-time

## Other responses

- `400` — Bad Request - Invalid parameters
- `401` — Unauthorized - Invalid or missing service key
- `403` — Forbidden - API key belongs to a different team
- `404` — Not Found - API key does not exist

---

[API](https://skmtc.net/exa/apis/team-management-api.md) · [All operations](https://skmtc.net/exa/apis/team-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/exa/team-management-api/versions/ac1778eaaf11/schema)
