Assign folder roles
Assigns or removes folder roles for a principal (user, group, or API key). Supports all system folder roles (see System roles reference). Enterprise customers can also assign custom roles by ID. Note: Assigning roles to users or groups via this endpoint requires their user or group IDs, which are available through the Provisioning API (Enterprise only). Free customers can use this endpoint to assign roles only to API keys, but can assign folder roles to users and groups through the UI.
Basic authentication using Cloudinary API Key and API Secret.
In: header
Path Parameters
The cloud name of your product environment.
The immutable identifier of the folder, returned by the Get root folders and Get subfolders endpoints.
Request Body
application/json
The folder role assignments.
The user, group, or API key whose role assignments are being modified.
The operation to perform on the principal’s role assignments. add grants the specified roles; remove revokes them.
Value in
- "add"
- "remove"
The role IDs to add or remove.
items <= 10Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1_1/my_cloud/folder_operations/invite/cd7e9d690a014c68ae8b58f08e090cb03a" \ -H "Content-Type: application/json" \ -d '{ "principal": { "type": "user", "id": "string" }, "operation": "add", "roles": [ "string" ] }'{ "success": true}