Folders

Assign folder roles

POST
/v1_1/{cloud_name}/folder_operations/invite/{folder_id}

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.

Authorization

AuthorizationBasic <token>

Basic authentication using Cloudinary API Key and API Secret.

In: header

Path Parameters

cloud_name*string

The cloud name of your product environment.

folder_id*string

The immutable identifier of the folder, returned by the Get root folders and Get subfolders endpoints.

Request Body

application/json

The folder role assignments.

principal*

The user, group, or API key whose role assignments are being modified.

operation*string

The operation to perform on the principal’s role assignments. add grants the specified roles; remove revokes them.

Value in

  • "add"
  • "remove"
roles*array<string>

The role IDs to add or remove.

Itemsitems <= 10

Response 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}