Add key permissions
Add permissions to a key without affecting existing permissions.
Use this for privilege upgrades, enabling new features, or plan changes that grant additional capabilities. Permissions granted through roles remain unchanged.
Important: Changes take effect immediately with up to 30-second edge propagation.
Required Permissions
Your root key must have one of the following permissions:
- api.*.update_key (to update keys in any API)
- api.<api_id>.update_key (to update keys in a specific API)
Side Effects
Invalidates the key cache for immediate effect, and makes permissions available for verification within 30 seconds across all regions.
Request body
Example request
{
"keyId": "key_2cGKbMxRyIzhCxo1Idjz8q"
}Response
Permissions added successfully. Returns all permissions currently assigned to the key.
Example response
{
"meta": {
"requestId": "req_123"
},
"data": [
{
"id": "perm_1234567890abcdef",
"name": "users.read",
"slug": "users-read",
"description": "Allows reading user profile information and account details"
}
]
}Changes
Changed in 5 of the 90 revisions of this API.16
- ●
the
permissions/items/request property's maxLength was set to128request-property-max-length-set
- ○
the
permissions/items/request property's minLength was decreased from3to1request-property-min-length-decreased
- ●
- ○
the endpoint scheme security
dashboardwas removed from the APIapi-security-removed
- ○
the endpoint scheme security
rootKeywas removed from the APIapi-security-removed
This revision also has 5 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
- ○
the endpoint scheme security
dashboardwas added to the APIapi-security-added
This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
- ○
added the non-success response with the status
429response-non-success-status-added
- ○
- ○
api operation id
addPermissionsremoved and replaced withkeys.addPermissionsapi-operation-id-removed
- ○