v5
latestOpenAPI 3.1.02026-08-025631,1012.8 MBOrganization API Keys
Update Api Key
Update an API key's metadata or permissions.
🔒 The "admin-key" is protected and cannot be modified.
patch/v1/organizations/users/{user_email}/api-keys/{key_name}
Path parameters
user_emailstring required
key_namestring required
Request body
Example request
{
"scopes": [
{
"description": "Full namespace access (data + infrastructure)",
"resource_id": "ns_production",
"resource_type": "namespace"
}
],
"allowed_origins": [
"https://docs.example.com",
"https://*.example.com"
]
}Response
Successful Response
Example response
{
"created_at": "2025-01-01T00:00:00Z",
"created_by": "usr_admin",
"description": "Service account for ingestion",
"internal_id": "int_x1y2z3",
"key_hash": "2c26b46b68ffc68ff99b453c1d304134",
"key_id": "key_a1b2c3d4e5f6g7h",
"key_prefix": "sk_abc123...",
"name": "backend-service",
"organization_id": "org_demo123",
"permissions": [
"read",
"write"
],
"scopes": [],
"status": "active",
"user_id": "usr_a1b2c3d4e5f6g7h"
}