Konsole: users
Als Markdown kopierenDiese Routen liegen auf der Konsole, Port 3375. Sie nehmen ein API-Token als Authorization: Bearer ndt_...; siehe API-Tokens. Die Beschreibungen stehen auf Englisch, wie in der OpenAPI-Beschreibung.
Console accounts: create, change, disable, delete.
List console accounts with their role and status.
Needs user.view. neodesk users list calls it.
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
object | yes |
data.users |
array of ConsoleAccountRow | |
data.total |
integer |
| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
Create a console account with a role.
The password takes 8 to 128 characters; nothing else about it is checked. You can only give a role whose permissions you have yourself. A username that is taken answers 400.
Needs user.create. neodesk users create calls it.
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
username |
string | yes | The sign-in name: 3 to 64 letters, digits and _ . @ - |
password |
string | yes | The first password, 8 to 128 characters; at least 8 characters, at most 128 characters, write only |
role |
string | The role (default viewer) | |
email |
string | Email address | |
groupGuids |
array of string | User groups to put the account in; at most 100 items | |
folderIds |
array of integer or string | Folders whose devices it may see (restricted scope) | |
peerIds |
array of string | Devices it may see (restricted scope) | |
strategyGuid |
string | A strategy for the account |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
object | yes |
data.id |
integer | |
data.username |
string | |
data.role |
string | |
data.email |
string | |
data.user_groups |
array of string | |
data.folder_ids |
array of integer | |
data.peer_grants |
array of string |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
List which accounts have a profile picture.
Every signed-in account may read it.
neodesk users avatars calls it.
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
data |
object | yes | |
data.users |
array of object | The accounts that have a picture | |
data.users[].id |
integer | ||
data.users[].username |
string | ||
data.users[].avatar_version |
string | Changes when the picture changes; pass it as ?v= to GET /api/users/{id}/avatar |
| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 429 | Too many requests: wait for the seconds in Retry-After |
Delete several accounts. Their history stays in the audit log.
The answer says for each ID what happened: changed, unchanged, refused with the reason, or failed. Your own account is always refused. Nothing is handed over: their API tokens are revoked and their organization memberships go. To hand them over, delete one account at a time with handover_to. The last Super admin that can sign in stays.
Needs user.delete. neodesk users bulk-delete calls it. It cannot be undone.
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
ids |
array of integer or string | yes | The account IDs, as numbers or as text of digits; at most 500 items |
dry_run |
boolean | Only say what would happen to each account; nothing is written and no mail goes out |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
AccountBulkResults | yes |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
Disable several accounts.
The answer says for each ID what happened: changed, unchanged, refused with the reason, or failed. Your own account is always refused. Their sessions and access tokens end. The last Super admin that can sign in stays enabled.
Needs user.edit. neodesk users bulk-disable calls it. It cannot be undone.
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
ids |
array of integer or string | yes | The account IDs, as numbers or as text of digits; at most 500 items |
dry_run |
boolean | Only say what would happen to each account; nothing is written and no mail goes out |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
AccountBulkResults | yes |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
Enable several disabled accounts.
The answer says for each ID what happened: changed, unchanged, refused with the reason, or failed. Your own account is always refused.
Needs user.edit. neodesk users bulk-enable calls it.
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
ids |
array of integer or string | yes | The account IDs, as numbers or as text of digits; at most 500 items |
dry_run |
boolean | Only say what would happen to each account; nothing is written and no mail goes out |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
AccountBulkResults | yes |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
Add several accounts to an organization.
The answer says for each ID what happened: changed, unchanged, refused with the reason, or failed. Your own account is always refused.
Needs org.manage_users. neodesk users bulk-org-add calls it.
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
ids |
array of integer or string | yes | The account IDs, as numbers or as text of digits; at most 500 items |
org_id |
string | yes | The organization's ID (see organizations list) |
dry_run |
boolean | Only say what would happen to each account; nothing is written and no mail goes out |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
AccountBulkResults | yes |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such organization, or you do not see it |
| 502 | The account is not on the server API yet |
Remove several accounts from an organization.
The answer says for each ID what happened: changed, unchanged, refused with the reason, or failed. Your own account is always refused.
Needs org.manage_users. neodesk users bulk-org-remove calls it. It cannot be undone.
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
ids |
array of integer or string | yes | The account IDs, as numbers or as text of digits; at most 500 items |
org_id |
string | yes | The organization's ID (see organizations list) |
dry_run |
boolean | Only say what would happen to each account; nothing is written and no mail goes out |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
AccountBulkResults | yes |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such organization, or you do not see it |
| 502 | The account is not on the server API yet |
Mail several accounts a link to set a new password.
The answer says for each ID what happened: changed, unchanged, refused with the reason, or failed. Your own account is always refused. Each link works once, for 24 hours. Needs the email settings; LDAP and single sign-on accounts and accounts without an address are refused.
Needs user.edit. neodesk users bulk-send-reset-link calls it.
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
ids |
array of integer or string | yes | The account IDs, as numbers or as text of digits; at most 500 items |
dry_run |
boolean | Only say what would happen to each account; nothing is written and no mail goes out |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
AccountBulkResults | yes |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 409 | The console has no email settings |
Give several accounts a role.
The answer says for each ID what happened: changed, unchanged, refused with the reason, or failed. Your own account is always refused. The same rules as a role in PATCH /api/users/{id}: only roles you may give, LDAP accounts keep their directory's role, and the last Super admin keeps the role. Their sessions and access tokens end.
Needs user.edit. neodesk users bulk-role calls it.
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
ids |
array of integer or string | yes | The account IDs, as numbers or as text of digits; at most 500 items |
role |
string, one of super_admin, admin, global_admin, server_admin, operator, viewer, guest_issuer, pro |
yes | The role |
dry_run |
boolean | Only say what would happen to each account; nothing is written and no mail goes out |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
AccountBulkResults | yes |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
Require two-factor sign-in of several accounts, or take that back.
The answer says for each ID what happened: changed, unchanged, refused with the reason, or failed. Your own account is always refused. Only for local accounts.
Needs user.security. neodesk users bulk-require-two-factor calls it.
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
ids |
array of integer or string | yes | The account IDs, as numbers or as text of digits; at most 500 items |
required |
boolean | yes | true: they set it up at their next sign-in |
dry_run |
boolean | Only say what would happen to each account; nothing is written and no mail goes out |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
AccountBulkResults | yes |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
Make accounts from a CSV file.
The lines with problems (see users import-preview) are refused, the others become accounts with the role rules of users create. With --mode temporary the answer holds each password, shown this once; they choose a new one at their first sign-in.
Needs user.create. neodesk users import calls it.
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
csv |
string | yes | The file's content |
mode |
string, one of invite, temporary, none |
invite: mail each an invite (default); temporary: a temporary password each, in the answer once; none: no password yet | |
lines |
array of integer or null | Only these lines of the file, like [2, 5] |
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
data |
object | yes | |
data.results |
array of object | One per line of the file | |
data.results[].line |
integer | yes | |
data.results[].username |
string | yes | |
data.results[].outcome |
string, one of created, refused, skipped, failed |
yes | refused: the line has problems; skipped: not among lines |
data.results[].error |
string | ||
data.results[].id |
integer | The new account | |
data.results[].invite_sent |
boolean | ||
data.results[].password |
string | The temporary password, shown this once | |
data.results[].warning |
string | What did not work after the account was made |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 409 | mode invite and the console has no email settings |
| 502 | The account is not on the server API yet |
Check a CSV file of accounts before importing it. Nothing is written.
Columns: username (required), email (required for invites), first name, last name, role (default viewer), organization (name or ID), language. Commas or semicolons, up to 1000 accounts and 1 MB.
Needs user.create. neodesk users import-preview calls it.
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
csv |
string | yes | The file's content |
mode |
string, one of invite, temporary, none |
How the accounts get a password (default invite) |
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
data |
object | yes | |
data.rows |
array of object | ||
data.rows[].line |
integer | ||
data.rows[].username |
string | ||
data.rows[].email |
string | ||
data.rows[].first_name |
string | ||
data.rows[].last_name |
string | ||
data.rows[].role |
string | ||
data.rows[].organization |
string | ||
data.rows[].language |
string | ||
data.rows[].problems |
array of string | What is wrong with the line; empty for a line that can be imported | |
data.ready |
integer | Lines without problems | |
data.ignored_columns |
array of string | Columns the import does not know | |
data.mail_ready |
boolean | The console has email settings, which invites need | |
data.mode |
string, one of invite, temporary, none |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 502 | The account is not on the server API yet |
Create a console account and mail the person a link to choose their password.
The account gets a password nobody knows, and the address a link to choose one. The link works for 7 days. You can only give a role whose permissions you have yourself. A password in the body is refused.
Needs user.create. neodesk users invite calls it.
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
username |
string | The sign-in name; without it, the part of the email address before the @ | |
role |
string, one of super_admin, admin, global_admin, server_admin, operator, viewer, guest_issuer, pro |
The role (default viewer) | |
email |
string | yes | The address the invite goes to |
groupGuids |
array of string | User groups to put the account in; at most 100 items | |
folderIds |
array of integer or string | Folders whose devices it may see (restricted scope) | |
peerIds |
array of string | Devices it may see (restricted scope) | |
strategyGuid |
string | A strategy for the account |
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
data |
object | yes | |
data.id |
integer | ||
data.username |
string | ||
data.role |
string | ||
data.email |
string | ||
data.user_groups |
array of string | ||
data.folder_ids |
array of integer | ||
data.peer_grants |
array of string | ||
data.invite_sent |
boolean | The invite mail went out. The account stays either way; send it again with POST /api/users/{id}/invite |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 409 | The console has no email settings |
List invites that were not used yet, and whether the console can send mail.
An expired invite stays in the list for 30 days. Send a new one with POST /api/users/{id}/invite.
Needs user.view. neodesk users invites calls it.
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
data |
object | yes | |
data.invites |
array of object | Ordered by account ID | |
data.invites[].user_id |
integer | ||
data.invites[].expires_at |
string (date-time) | ||
data.invites[].expired |
boolean | ||
data.mail_ready |
boolean | The console has email settings |
| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
Make accounts choose a new password at their next sign-in.
The answer says for each ID what happened: changed, unchanged, or refused with the reason. Their sessions go on until then; the desktop client and the API refuse them until they chose the new password in the web console.
Needs user.security. neodesk users require-password-change calls it.
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
ids |
array of integer or string | yes | The account IDs, as numbers or as text of digits; at most 500 items |
required |
boolean | false takes the requirement back; default true |
|
dry_run |
boolean | Only say what would happen to each account |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
AccountBulkResults | yes |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
Show one account: profile, sign-in state, role and what it allows.
The same account the users list has, with its display name, language, time zone, the invite that waits, the permissions its role holds in effect and whether it can use Team chat.
Needs user.view. neodesk users show calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The account ID (see users list); at least 1 |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
ConsoleAccountPage | yes |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such item, or the account does not see it |
Change an account: name, role, email, groups, disabled. Give only what changes.
Only an account whose role you could give, or your own. A new name or role ends every session of the account and revokes its access tokens; a new password does too, but keeps your own session when you change your own. Disabling ends its sessions and access tokens; turning off two-factor sign-in deletes its secret and recovery codes. Your own groups, folders, devices and strategy you can change only when you could give your own role. A new email address waits for its confirmation; accounts from LDAP or single sign-on keep the address their provider gives. When the mail server refuses the confirmation mail, the other fields are saved all the same and the answer is the error.
Needs user.edit. neodesk users update calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The account ID (see users list); at least 1 |
Request body, application/json:
| Field | Type | What it is |
|---|---|---|
username |
string | New sign-in name: 3 to 64 letters, digits and _ . @ -. Not for LDAP or single sign-on accounts |
role |
string, one of super_admin, admin, global_admin, server_admin, operator, viewer, guest_issuer, pro |
New role: only one you may give. LDAP accounts keep their directory's role, and the last Super admin that can sign in keeps the role |
email |
string or null | New email address; it gets a confirmation link and changes once that is used (at once when the console has no email settings) |
password |
string | New password, 8 to 128 characters. Not for LDAP or single sign-on accounts; at least 8 characters, at most 128 characters, write only |
disabled |
boolean | true stops the account from signing in, false lets it again. Not for your own account |
totp_enabled |
false |
false turns off its two-factor sign-in (needs user.security). Not for your own account |
expires_at |
string or null (date-time) | End date (2026-12-31 or an RFC 3339 time, not in the past); the account is disabled then. null or "" removes it. Not for your own account |
inactive_exempt |
boolean | true keeps the account from the rule that disables accounts that don't sign in (for service accounts). Not for your own account |
groupGuids |
array of string | The user groups, replacing the old list; at most 100 items |
folderIds |
array of integer or string | Folders whose devices it may see, replacing the old list |
peerIds |
array of string | Devices it may see, replacing the old list |
strategyGuid |
string | Its strategy |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
ConsoleAccount | yes |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such item, or the account does not see it |
| 409 | Another account has the username, or the console has no email settings for a change of your own address |
| 502 | The mail server did not take the mail |
Delete an account. Its history stays in the audit log.
Not your own account, one whose role you could not give, or the last Super admin that can sign in. Without handover_to the account's API tokens are revoked and its organization memberships go; open tickets become unassigned. A handed-over API token keeps only the permissions its new owner has. GET /api/users/{id}/delete-preview shows what goes and what stays.
Needs user.delete. neodesk users delete calls it. It cannot be undone.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The account ID (see users list); at least 1 |
handover_to |
query | integer | An account ID that gets the account's API tokens, organization memberships, saved reports and open tickets first (one of the preview's candidates); at least 1 |
200: Done (application/json)
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such item, or the account does not see it |
List the audit log entries by an account and about it.
What the account did and what others did to it, newest first.
Needs user.view and audit.view. neodesk users activity calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The account ID (see users list); at least 1 |
limit |
query | integer | How many entries; more than 200 gives 200; default 50, at least 1, at most 200 |
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
data |
object | yes | |
data.entries |
array of object | ||
data.entries[].id |
integer | ||
data.entries[].action |
string | ||
data.entries[].at |
string or null (date-time) | ||
data.entries[].details |
string | ||
data.entries[].ip |
string | ||
data.entries[].actor |
AuditPerson or null | Who wrote the entry | |
data.entries[].target |
AuditPerson or null | The account it is about |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such item, or the account does not see it |
List the API tokens an account made.
Newest first. Names, hints, permissions and use; never the token itself.
Needs user.view. neodesk users api-tokens calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The account ID (see users list); at least 1 |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
object | yes |
data.tokens |
array of ApiToken |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such item, or the account does not see it |
Revoke an API token of an account.
What the token made that is still open ends with it. Only for an account whose role you could give, or your own. A token of another account answers 404.
Needs user.security. neodesk users revoke-api-token calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The account ID (see users list); at least 1 |
tokenId |
path | string | yes | The token's id, its hint or the whole token |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
ApiToken and object | yes |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such item, or the account does not see it |
Download an account's profile picture (use --output).
Every signed-in account may read any picture. The ETag is the picture's version: with ?v= set to the current version the answer may be kept for a day, and If-None-Match with the ETag answers 304.
neodesk users avatar calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The account ID; at least 1 |
v |
query | string | The picture version from GET /api/users/avatars; only changes caching |
200: The picture (image/*)
String (binary).
304: The picture has not changed
| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such item, or the account does not see it |
| 429 | Too many requests: wait for the seconds in Retry-After |
Show what deleting an account removes and what stays, as counts, and who it can hand over to.
Needs user.delete. neodesk users delete-preview calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The account ID (see users list); at least 1 |
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
data |
object | yes | |
data.id |
integer | ||
data.username |
string | ||
data.counts |
object | sessions to chat_messages: what the delete removes or hands over (sessions, client_sign_ins, api_tokens, organizations, user_groups, device_grants, saved_reports, open_tickets) and what stays (audit_entries, tickets_opened, ticket_comments, chat_messages) | |
data.counts.sessions |
integer | ||
data.counts.client_sign_ins |
integer | ||
data.counts.api_tokens |
integer | ||
data.counts.organizations |
integer | ||
data.counts.user_groups |
integer | ||
data.counts.device_grants |
integer | ||
data.counts.saved_reports |
integer | ||
data.counts.open_tickets |
integer | ||
data.counts.audit_entries |
integer | ||
data.counts.tickets_opened |
integer | ||
data.counts.ticket_comments |
integer | ||
data.counts.chat_messages |
integer | ||
data.candidates |
array of object | Accounts it can hand over to | |
data.candidates[].id |
integer | ||
data.candidates[].username |
string | ||
data.candidates[].role |
string | ||
data.organizations_move |
boolean | You may move organization memberships (org.manage_users), so a hand-over takes them |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such item, or the account does not see it |
Show which devices an account may see.
Needs user.view. neodesk users scope calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The account ID (see users list); at least 1 |
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
data |
object | yes | |
data.count |
integer | Devices the account may see | |
data.restricted |
boolean | false: it sees every device |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such item, or the account does not see it |
Cancel an account's email address change that waits for its confirmation.
The confirmation link stops working and the address stays as it is.
Needs user.edit. neodesk users cancel-email-change calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The account ID (see users list); at least 1 |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
AccountEmailState | yes |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such item, or the account does not see it |
Mail a new confirmation link for an account's pending email address.
The link sent before stops working. The link works once, for 24 hours. Change the address itself with users update --email.
Needs user.edit. neodesk users resend-email-change calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The account ID (see users list); at least 1 |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
AccountEmailState | yes |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such item, or the account does not see it |
| 502 | The mail server did not take the mail |
Erase an account and its personal data in the records that stay (needs the console).
Both the export and the erasure need a person in the console in a browser session who confirms with their own password (local accounts) and the two-factor code when two-factor sign-in is on, as Sign in as does. The server refuses API tokens and other sign-ins without a browser session with 403 and code personal_data_token. The erasure also refuses the caller's own account and the last super admin that can sign in, and recordings of the account's sessions under legal hold stop it (409 with the held recordings). It deletes or keeps without the name the recordings of the sessions the account ran, ends its sessions, revokes its API tokens, removes its organization memberships, unassigns its open tickets, takes the person out of the records that stay and deletes the account. One audit entry, user_erased, names the account by its ID only. An account of a directory or SCIM comes back at its next sign-in or sync unless it is removed there too.
Needs user.personal_data. neodesk users erase calls it. It cannot be undone.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The account ID (see users list); at least 1 |
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
password |
string | Your own password; needed when needs.password is true | |
code |
string | The code of your authenticator app, or the proof of your passkey; needed when needs.code is true | |
recordings |
string, one of delete, keep |
yes | delete: the recordings of the sessions it ran go; keep: they stay without the name |
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
data |
object | yes | What the erasure changed, as counts |
data.audit_entries |
integer | yes | |
data.tickets |
integer | yes | |
data.ticket_comments |
integer | yes | |
data.chat_messages |
integer | yes | |
data.direct_conversations |
integer | yes | |
data.sessions |
integer | yes | |
data.sign_in_methods |
integer | yes | |
data.other_records |
integer | yes | |
data.recordings_deleted |
integer | yes | |
data.recordings_kept |
integer | yes | Recordings kept without the name |
| Error | When |
|---|---|
| 400 | Not a valid account ID (Invalid user ID), or the confirmation failed: no password (personal_data_password_required), no code (personal_data_code_required), a wrong password (personal_data_wrong_password) or a wrong code (personal_data_wrong_code), recordings is not delete or keep (personal_data_recordings_choice), the account is the caller's own (personal_data_self) or the last super admin that can sign in (personal_data_last_admin) |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | An API token or another sign-in without a browser session (personal_data_token), the account is viewing NeoDesk as another account (personal_data_impersonating), the target has more rights than the account (personal_data_role_above_own), the account signs in through a directory or single sign-on without two-factor sign-in, so nothing can be checked (personal_data_needs_two_factor), or the account or the token lacks user.personal_data |
| 404 | There is no such item, or the account does not see it |
| 409 | Recordings of the account's sessions are under legal hold (personal_data_held); held lists them |
| 429 | Too many wrong confirmations: the account is locked for the seconds in Retry-After (code account_locked) |
| 500 | A server error |
Mail a new invite link to an account that has not signed in yet.
The link sent before stops working. The account needs an email address, and the console needs the email settings.
Needs user.edit. neodesk users resend-invite calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The account ID (see users list); at least 1 |
200: Done (application/json)
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such item, or the account does not see it |
| 409 | The account signed in already, or the console has no email settings |
| 502 | The mail server did not take the mail |
Withdraw the invite of an account that never signed in, and delete the account.
The invite link stops working. The account never signed in, so nothing of its own is lost. An account that signed in already is refused: delete it with users delete.
Needs user.create. neodesk users revoke-invite calls it. It cannot be undone.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The account ID (see users list); at least 1 |
200: Done (application/json)
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such item, or the account does not see it |
| 409 | The account signed in already, or has no invite |
List the organizations an account belongs to.
Needs user.view. neodesk users organizations calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The account ID (see users list); at least 1 |
200: The server API's answer (application/json)
| Field | Type |
|---|---|
organizations |
array of AccountOrganization |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such item, or the account does not see it |
| 502 | The account is not on the server API yet |
Add an account to an organization.
The server API makes the membership with the role user; a role in the body is not read. Unless you are a Super admin or Global admin you must be a member of the organization yourself. Errors of the server API come back as they are, in its shape {"error": "..."}.
Needs org.manage_users. neodesk users organization-add calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The account ID (see users list); at least 1 |
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
org_id |
string | yes | The organization's ID (see organizations list) |
201: The new membership (application/json)
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such item, or the account does not see it |
| 409 | The account is a member already |
| 502 | The account is not on the server API yet |
List an account's passkeys and security keys.
Names, when each was added and last used, and whether it is synced. users reset-two-factor removes them with the rest of the account's second factor.
Needs user.view. neodesk users passkeys calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The account ID (see users list); at least 1 |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
array of Passkey | yes |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such item, or the account does not see it |
| 500 | A server error |
Mail an account a link to set a new password.
The link works once, for 24 hours, and a link sent before stops working; the password stays as it is until the link is used. The mail is in the person's language. Only for local accounts with an email address, and the console needs the email settings.
Needs user.edit. neodesk users send-reset-link calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The account ID (see users list); at least 1 |
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
data |
object | yes | |
data.expires_at |
string (date-time) | Until when the link works |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such item, or the account does not see it |
| 409 | The console has no email settings |
| 502 | The mail server did not take the mail |
Make the reset link an account was mailed stop working.
404 when no link waits.
Needs user.edit. neodesk users cancel-reset-link calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The account ID (see users list); at least 1 |
200: Done (application/json)
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such item, or the account does not see it |
Show what exporting or erasing an account's personal data takes and what erasing removes.
Says whether the export and the erasure are allowed for the caller (and why not), what they ask of the caller (needs), what erasing changes as counts, and the recordings under legal hold that stop the erasure. With an API token both answer allowed false with code personal_data_token. Both the export and the erasure need a person in the console in a browser session who confirms with their own password (local accounts) and the two-factor code when two-factor sign-in is on, as Sign in as does. The server refuses API tokens and other sign-ins without a browser session with 403 and code personal_data_token.
Needs user.personal_data. neodesk users personal-data calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The account ID (see users list); at least 1 |
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
data |
object | yes | |
data.id |
integer | yes | |
data.username |
string | yes | |
data.needs |
object | yes | What both actions ask of the caller to confirm; all false for an API token |
data.needs.password |
boolean | yes | The caller's password (a local account) |
data.needs.code |
boolean | yes | A second factor: the caller has two-factor sign-in, with the authenticator app or a passkey |
data.needs.passkey |
boolean | yes | The caller has a passkey to confirm with |
data.needs.app |
boolean | yes | The authenticator app's code counts |
data.export |
PersonalDataAllowed | yes | |
data.erase |
PersonalDataAllowed | yes | |
data.provider |
string | yes | The directory or single sign-on the account comes from, empty for a local account. It makes the account again at its next sign-in or sync unless it is removed there too. |
data.counts |
object | yes | What an erasure would change |
data.counts.audit_entries |
integer | yes | |
data.counts.tickets |
integer | yes | Tickets it opened or handles |
data.counts.ticket_comments |
integer | yes | |
data.counts.chat_messages |
integer | yes | |
data.counts.direct_conversations |
integer | yes | |
data.counts.sessions |
integer | yes | Console sessions |
data.counts.connection_sessions |
integer | yes | Logged connections to devices |
data.counts.api_tokens |
integer | yes | |
data.counts.passkeys |
integer | yes | |
data.counts.client_sign_ins |
integer | yes | |
data.counts.other_records |
integer | yes | Other rows that name the account |
data.counts.recordings |
integer | yes | Recordings of the sessions it ran |
data.held |
array of PersonalDataHeldRecording | yes | The recordings under legal hold that stop the erasure, oldest first |
| Error | When |
|---|---|
| 400 | Not a valid account ID (Invalid user ID) |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such item, or the account does not see it |
| 500 | A server error |
Export everything the server stores about an account as a zip (needs the console).
Both the export and the erasure need a person in the console in a browser session who confirms with their own password (local accounts) and the two-factor code when two-factor sign-in is on, as Sign in as does. The server refuses API tokens and other sign-ins without a browser session with 403 and code personal_data_token. Answers the zip as the attachment neodesk-personal-data-<id>.zip. Logs personal_data_exported in the audit log before the answer, and answers no file when that entry can't be written.
Needs user.personal_data. neodesk users export-personal-data calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The account ID (see users list); at least 1 |
Request body, application/json:
| Field | Type | What it is |
|---|---|---|
password |
string | Your own password; needed when needs.password is true |
code |
string | The code of your authenticator app, or the proof of your passkey; needed when needs.code is true |
200: The zip (application/zip)
String (binary).
| Error | When |
|---|---|
| 400 | Not a valid account ID (Invalid user ID), or the confirmation failed: no password (personal_data_password_required), no code (personal_data_code_required), a wrong password (personal_data_wrong_password) or a wrong code (personal_data_wrong_code) |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | An API token or another sign-in without a browser session (personal_data_token), the account is viewing NeoDesk as another account (personal_data_impersonating), the target has more rights than the account (personal_data_role_above_own), the account signs in through a directory or single sign-on without two-factor sign-in, so nothing can be checked (personal_data_needs_two_factor), or the account or the token lacks user.personal_data |
| 404 | There is no such item, or the account does not see it |
| 429 | Too many wrong confirmations: the account is locked for the seconds in Retry-After (code account_locked) |
| 500 | A server error |
Set an account's first and last name, which make its display name, its time zone, Formats and Clock.
Give only what changes, at least one of the five. Names are cut to 200 characters. Only an account whose role you could give, or your own. For an LDAP or single sign-on account the directory or the identity provider sets the name again at its next sign-in.
Needs user.edit. neodesk users set-profile calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The account ID (see users list); at least 1 |
Request body, application/json:
| Field | Type | What it is |
|---|---|---|
first_name |
string | First name; "" takes it away |
last_name |
string | Last name; "" takes it away |
time_zone |
string | An IANA time zone such as Europe/Berlin, "" for none; the console and mails give the person times in it |
formats |
string | "auto", or a Formats locale with a region (BCP 47, such as en-GB or de-CH; the list is GET /api/console/bootstrap formats_locales): date order, month names, digits and separators |
clock |
string, one of auto, 12h, 24h |
"auto" (the Formats locale's own), 12-hour or 24-hour |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
ConsoleAccountPage | yes |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such item, or the account does not see it |
Make an account's recovery codes stop working.
The person makes new codes on Your account with their authenticator app. The account's sessions end and its access tokens are revoked.
Needs user.security. neodesk users invalidate-recovery-codes calls it. It cannot be undone.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The account ID (see users list); at least 1 |
200: Done (application/json)
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such item, or the account does not see it |
Set a new password for an account and end its sessions.
Only an account whose role you could give, or your own, and not an LDAP or single sign-on account. Its sessions end and its access tokens are revoked, but you keep your own session when you reset your own password. A reset link sent before stops working.
Needs user.edit. neodesk users reset-password calls it. It cannot be undone.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The account ID (see users list); at least 1 |
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
newPassword |
string | yes | The new password, 8 to 128 characters; at least 8 characters, at most 128 characters, write only |
200: Done (application/json)
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such item, or the account does not see it |
List an account's recent sign-ins and security events.
The same list the account sees on Your account: sign-ins, password and two-factor changes, and each time an admin viewed NeoDesk as the account.
Needs user.view. neodesk users security-events calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The account ID (see users list); at least 1 |
limit |
query | integer | How many events; more than 200 gives 200; default 50, at least 1, at most 200 |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
AccountSecurityEvents | yes |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such item, or the account does not see it |
Give an account a temporary password; it chooses a new one at its next sign-in.
The answer holds the password, shown this once. The account's sessions and access tokens end, and a reset link sent before stops working. Not for your own account, nor for LDAP or single sign-on accounts.
Needs user.security. neodesk users temporary-password calls it. It cannot be undone.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The account ID (see users list); at least 1 |
Request body, application/json:
| Field | Type | What it is |
|---|---|---|
password |
string | The temporary password, 8 to 128 characters; without it one is made up (four groups of four letters and digits); write only |
200: The password, shown this once (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
data |
object | yes | |
data.password |
string | The temporary password |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such item, or the account does not see it |
Require two-factor sign-in of one account, or take that back.
Only for local accounts. false leaves it to the server-wide switch under settings. Its sessions go on.
Needs user.security. neodesk users require-two-factor calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The account ID (see users list); at least 1 |
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
required |
boolean | yes | true: it sets it up at its next sign-in when it has none |
200: Done (application/json)
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such item, or the account does not see it |
Clear an account's two-factor sign-in; where it is required, the person sets it up again at the next sign-in.
The secret and the recovery codes go, the account's sessions end and its access tokens are revoked. Where nothing requires two-factor sign-in of the account, this turns it off.
Needs user.security. neodesk users reset-two-factor calls it. It cannot be undone.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The account ID (see users list); at least 1 |
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
data |
object | yes | |
data.set_up_again |
boolean | It sets two-factor sign-in up again at its next sign-in |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such item, or the account does not see it |
End the lock of an account after failed sign-ins.
Ends the lockouts at every address.
Needs user.security. neodesk users unlock calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
id |
path | integer | yes | The account ID (see users list); at least 1 |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
object | yes |
data.was_locked |
boolean |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such item, or the account does not see it |