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"
}
Update an API key
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"
}
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"
}
Was this page helpful?