Docs Home Return to Homepage
Get Started Login

Set Folder Access

Last updated Changelog

On this page
http
PUT /crates/{handle}/folders/{folder}/access

Sets which sub-users can use a folder, in one change: each one listed gets read, write or none, and the rest keep what they have. A sub-user whose access changes is disconnected and reconnects with the new access. One given its first folder can sign in from then on; one that loses its last can’t. A sub-user that started in this folder and loses it starts in its first folder by name. The master login always reads and writes every folder, so listing it is refused with 422.

Parameters

Field Type Required Description
logins object Yes Sub-user name to read, write or none
json
{ "logins": { "c7xk2m9p-admin": "write", "c7xk2m9p-office": "read", "c7xk2m9p-laptop": "none" } }

Response

json
{ "message": "Access saved." }

Errors

Besides the errors any endpoint can return:

Status Code When
400 operation_rejected The server behind the API (mail, database, storage) or the registrar refused the operation. error says why.
403 scope_denied This API key does not have Crates write access for this crate.
403 service_inactive This crate is not active.
404 not_found Crate not found. Folder not found.
502 upstream_unavailable This crate has no storage node.

Snagged on something?

Our sysadmins answer tickets around the clock.