Skip to main content
PATCH
http://localhost:3000
/
api-keys
/
{id}
curl -X PATCH 'https://api.example.com/api-keys/apk_001' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "CI Pipeline (Updated)",
    "expiresAt": "2026-01-15T10:30:00Z"
  }'
{
  "id": "apk_001",
  "name": "CI Pipeline (Updated)",
  "expiresAt": "2026-01-15T10:30:00Z",
  "status": "active",
  "updatedAt": "2024-01-16T10:30:00Z"
}

Path Parameters

id
string
required
The API key ID to update

Request Body

name
string
Display name
description
string
Description
expiresAt
string
New expiration date (ISO 8601)
intendedUse
string
Intended use case
metadata
object
Custom metadata

Response

Returns the updated API key object.
curl -X PATCH 'https://api.example.com/api-keys/apk_001' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "CI Pipeline (Updated)",
    "expiresAt": "2026-01-15T10:30:00Z"
  }'
{
  "id": "apk_001",
  "name": "CI Pipeline (Updated)",
  "expiresAt": "2026-01-15T10:30:00Z",
  "status": "active",
  "updatedAt": "2024-01-16T10:30:00Z"
}