Update Login
Last updated Changelog
On this page
PUT /crates/{handle}/logins/{login}
Changes only the fields given; the rest keep their current values. Takes the fields of Add Sub-user except name (a login can’t be renamed), plus enabled: false pauses the login and drops its connections, true lets it log in again. folders, when sent, replaces the login’s access (none or leaving a folder out takes it away). Switching a protocol off, changing its folders or home, or changing allowed_ips drops its open connections; it can reconnect as the new settings allow.
The master login always reads and writes every folder, so folders is refused for it with 422; its home can be any folder. ssh_password only stays on with ssh, and ftp_plain only with ftp on a plan that allows it.
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| enabled | boolean | No | Pause (false) or resume (true) the login |
| folders | object | No | Sub-users only: replaces its access, folder name to read, write or none |
| home | string or null | No | The folder its sessions start in, null for its first |
| ssh, ssh_password, file_keys, ftp, ftp_plain, webdav | boolean | No | As in Add Sub-user |
| allowed_ips | array | No | Replaces the allow list; [] allows any address |
Response
{ "message": "Login updated." }
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. Login not found. |
| 502 | upstream_unavailable |
This crate has no storage node. |