Skip to main content
PATCH
/
api
/
v1
/
api-keys
/
{api_key_id}
curl -X PATCH "https://api.fileguard.io/api/v1/api-keys/key_m1n2o3p4q5r6" \
  -H "Authorization: Bearer fg_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Production Key (Updated)",
    "scopes": ["upload", "download", "metadata", "delete"]
  }'
{
  "status": "SUCCESS",
  "message": "API key updated successfully",
  "data": {
    "api_key_id": "key_m1n2o3p4q5r6",
    "name": "Production Key (Updated)",
    "scopes": ["upload", "download", "metadata", "delete"],
    "status": "active",
    "updated_at": "2026-01-04T13:00:00Z"
  },
  "timestamp": "2026-01-04T13:00:00Z"
}

Documentation Index

Fetch the complete documentation index at: https://fileguard.dev/docs/llms.txt

Use this file to discover all available pages before exploring further.

Update an API key’s name, scopes, or metadata.

Path Parameters

api_key_id
string
required
API key identifier

Request Body

name
string
New name
scopes
array
New scopes
metadata
object
New metadata
curl -X PATCH "https://api.fileguard.io/api/v1/api-keys/key_m1n2o3p4q5r6" \
  -H "Authorization: Bearer fg_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Production Key (Updated)",
    "scopes": ["upload", "download", "metadata", "delete"]
  }'
{
  "status": "SUCCESS",
  "message": "API key updated successfully",
  "data": {
    "api_key_id": "key_m1n2o3p4q5r6",
    "name": "Production Key (Updated)",
    "scopes": ["upload", "download", "metadata", "delete"],
    "status": "active",
    "updated_at": "2026-01-04T13:00:00Z"
  },
  "timestamp": "2026-01-04T13:00:00Z"
}