---
title: "Update Team API Key"
description: "Update an existing team API key by applying only the values included in the request payload."
api: "PATCH /api/v1/team-api-keys/{api_key_id}"
---
## Request
The secret server key for authentication.
The project ID.
The unique identifier of the team API key to update.
A new description for the API key.
Set to `true` to revoke the API key.
## Response
The unique identifier of the API key.
The description of the API key.
The identifier of the team this API key belongs to.
ISO 8601 timestamp of when the API key expires, or `null` if it does not expire.
ISO 8601 timestamp of when the API key was manually revoked, or `null` if it has not been revoked.
ISO 8601 timestamp of when the API key was created.
```bash cURL
curl -X PATCH 'https://api.stack-auth.com/api/v1/team-api-keys/tak_1234567890' \
-H 'Content-Type: application/json' \
-H 'x-stack-secret-server-key: YOUR_SECRET_SERVER_KEY' \
-H 'x-stack-project-id: YOUR_PROJECT_ID' \
-d '{
"description": "Updated API key description",
"revoked": false
}'
```
```json 200 Response
{
"id": "tak_1234567890",
"description": "Updated API key description",
"team_id": "team_1234567890",
"expires_at": "2025-12-31T23:59:59Z",
"manually_revoked_at": null,
"created_at": "2024-01-01T00:00:00Z"
}
```