Skip to content

putUserContentAccess

PUT
/api/v1/users/{id}/content-access
curl --request PUT \
--url https://example.com/api/v1/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/content-access \
--header 'Content-Type: application/json' \
--header 'X-CSRF-Token: example' \
--data '{ "libraryMode": "all", "tagMode": "all", "folderIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "tagIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ] }'

Replace an account’s content access. Requires the users.manage capability and the admin scope. Cookie-authenticated unsafe requests require X-CSRF-Token. An Owner cannot be restricted, nobody can change their own access, and nobody can grant folders or tags outside their own access.

id
required
string format: uuid
X-CSRF-Token
required
string
Media typeapplication/json
object
libraryMode
required
string
Allowed values: all restricted
tagMode
required
string
Allowed values: all restricted
folderIds

Granted folders; each covers its descendants.

Array<string>
<= 200 items
tagIds

Tags the account may apply and remove.

Array<string>
<= 200 items

Content access replaced

Media typeapplication/json
object
data
required
object
policy
required
object
libraryMode
required
string
Allowed values: all restricted
tagMode
required
string
Allowed values: all restricted
folders
required
Array<object>
object
id
required
string format: uuid
name
required
string
path

Folder ancestry joined with ’ / ’.

string
tags
required
Array<object>
object
id
required
string format: uuid
name
required
string
path

Folder ancestry joined with ’ / ’.

string
configured
required

False when the account has no stored policy, which means it reaches no content until one is saved.

boolean
ownerUnrestricted
required

The account is an Owner and always reaches everything.

boolean
Example
{
"data": {
"policy": {
"libraryMode": "all",
"tagMode": "all"
}
}
}

Invalid request body

Dashboard authentication required

Insufficient role, own account, or grant outside the caller’s access

User not found

Policy invalid or account not restrictable