Update Api Key
Authentication
Update Api Key
Update an API key’s name or scopes.
This endpoint allows partial updates - only the fields provided in the request will be modified. The key_hash is never exposed in the response.
Args: key_id: API key ID to update request: Partial update payload with optional name and/or scopes db: Async database session tenant_id: Active tenant ID current_user: Authenticated user (must be tenant_admin or tenant_owner)
Returns: APIKeyResponse: Updated API key metadata (without key_hash)
Raises: HTTPException 404: If API key not found or doesn’t belong to tenant HTTPException 403: If user doesn’t have permission
PATCH
Update Api Key
Path Parameters
Cookies
Body
application/json