Update API Key Scopes
Update scopes for an API key. Only org admins can update key scopes.
PATCH
Update API Key Scopes
Each scope grants a role on a specific resource:
Valid Roles by Resource Type
| Resource Type | Valid Roles |
|---|---|
org | admin, member |
namespace | admin |
project | discoverer, viewer, editor, owner |
agent | discoverer, viewer, editor, owner, executor |
The
executor role is legacy and is normalized to viewer internally, but still grants run permission.Path Parameters
Body
application/json
Request model for updating API key scopes.
Updated list of resource scopes.
Minimum array length:
1Response
Successful Response
Response model for API key (excludes sensitive data).
member_id of the creator.
The unique identifier of the API key.
Display prefix (e.g., 'sk_tu_abc...').
Human-readable name for the API key.
WorkOS organization ID.
When the key was created.
Optional description.
When the key was last used.
When the key was revoked (soft delete).
List of resource scopes for this API key.
Groups that receive default admin grants on resources created by this key.
Update API Key Scopes