Users & structure
Users
A user is a person who signs in to the NUACOM portal and apps: a name, email, mobile number and timezone, plus one membership per account they belong to that carries the account-level settings — admin or regular user, portal access, mobile extension, call-recording access, status and permissions. This group holds the legacy pair GET /v2/users_list and GET /v2/user_info and the v3 family: the paginated list, one user, the update, and the caller's own profile. A user is linked to at most one extension per account (managed in Extensions) and belongs to any number of teams; creating, suspending and deleting users is done in the portal.
Workflow (what the portal does)
- Who is calling:
GET /v2/user_infoanswers the session context the apps load at start-up:user_id,user_name,account_id,account_name,user_country,time_zone,user_shared_accounts(the other accounts the user is active in),user_admin,recording_access,outbound_cli,user_extension(only when the user has an extension) andcall_events. With an API key this describes the user the key acts as (see Authentication). - My profile:
GET /v3/users/mereturns the caller's own user record:user_id,user_name,user_email,mobile,country_dial_code,time_zone,last_login,extension(the number, or""when none),user_activeandaccount(one membership row per account the user is active in). - List:
GET /v3/userswithpageandper_page(default 25, no maximum), newest first. Each row isuser_id,user_name,user_email,mobile,last_login,extension,user_activeanddepartments(the user's teams,idandname); the response is{"data": [...], "links": {...}, "meta": {...}}. Active, suspended and awaiting-activation members are listed; deleted ones are not.GET /v2/users_listis the same set as one flat, unpaginated array in the V1 shape: each row adds the membership flags (account_admin,web_access,call_recording,mobile_extension,user_active,active_in_account),country_iso_code,country_dial_code,is_auth_2fa_enabled,user_extensionandoutbound_cli. Two optional switches:checkAdmin=1makes a regular user receive only their own row, andenterprise_only=truekeeps only users whose extension has an Enterprise or Unlimited subscription. - One user:
GET /v3/users/{user}byuser_idanswers{"user": {...}}: the profile with itsdepartmentsand anaccountarray listing every membership the user has, each carrying the flags above. A user who is not a member of your account, or was deleted, answers404. - Edit (what the Users screen saves):
PUT /v3/users/{user}with the complete form:user.user_name(required, at most 64 characters),user.mobile(at most 30),user.country_dial_code(integer),user.time_zone(IANA name, at most 20 characters),user.is_auth_2fa_enabled(boolean);- the membership flags as
0/1:user.account_admin,user.web_access,user.mobile_extension,user.call_recording; user.departments: the teams as[{"value": <team id>}]— the list replaces the user's teams;pages: the ids of the portal pages the user may open — pages left out are revoked. Page ids are assigned in the portal (Settings → Users → Permissions); the API has no public catalogue of them. The answer is{"success": true}.user.extensionis accepted but ignored, and permissions are not part of the form: both are set in the portal.
- Teams: a user's
departmentsare the account's teams. Add or remove a member withPUT /v3/teams/{teamId}/users/{user}andDELETE /v3/teams/{teamId}/users/{user}, list a team's members withGET /v3/teams/{teamId}/usersand the teams themselves withGET /v3/teams. The v2GET /v2/departmentsendpoints work on the same objects under the older name.
Creating, suspending and deleting users is done in the portal (Settings → Users); there is no public endpoint for it. Deleting a user there offers to hand their private contacts to a colleague first.
Reading a user
- Admin or regular user:
account_adminon the membership (user_adminin/v2/user_info). An admin sees the whole account and may call the admin-only endpoints; a regular user sees their own extension plus what their permissions grant, and admin-only endpoints answer403. The flag is per account: the same person can be an admin in one account and a regular user in another. - Call recording access:
call_recordingis the portal's "Call Recording Access" toggle. Through the API every user, admins included, needs it on to play recordings, and the account's recording add-on or the extension's subscription must include recording;recording_accessin/v2/user_infois that combined answer. - Status:
user_activeis0suspended,1active or2awaiting activation (the user has not completed sign-up). Deleted users never appear. - Portal and mobile:
web_access— may sign in to the web portal;mobile_extension— may use a mobile extension. - Extension:
extension(v3) oruser_extension(v2) is the number of the user's extension in this account, andoutbound_clithe caller ID that extension presents. Linking is done by an admin in the portal's Users screen; the extension itself is managed in Extensions. - Timezone:
time_zoneis the user's IANA timezone. It is the default for every date the API formats for that user when you send noX-Timezoneheader. - last_login:
nullwhen the user has never signed in. With the account's ISO dates option the value is ISO 8601 in theX-Timezoneyou send, UTC by default (2024-08-28T09:15:00+01:00); without it,/v2/users_listgives wall-clockY-m-d H:i:sand the v3 endpoints keep only the day (midnight, serialised as a UTC timestamp). See Dates and timezones. - Several accounts: a user may belong to more than one account.
active_in_accountmarks the one they are currently working in,user_shared_accountslists the others, and theaccountarray of the v3 profile has one row per membership — pick yours byaccount_id. - API keys: a key acts as the user who created it; that user's admin flag, permissions and recording access decide what the key sees, and
GET /v2/user_infowith the key tells you who that is. See Authentication.
Roles and access
- Every endpoint in this group accepts any authenticated user; none is restricted to account admins. The lists are not filtered by the caller's permissions either: a regular user sees every member, except with
checkAdmin=1on/v2/users_list. - The ISO dates option (per account) changes the
last_loginformat as described above. - A user outside your account answers
404from/v3/users/{user}.
Pitfalls
- The pagination links of
GET /v3/usersuseusers=as the page parameter, but the endpoint readspage: followinglinks.nextreturns the first page again. Build the URL yourself frommeta.current_pageandmeta.last_page. /v2/users_listreturnsuser_id,user_activeandcountry_dial_codeas strings ("123","1","353"); the v3 endpoints return integers.PUT /v3/users/{user}is a full replacement with no partial update: send everyuser.*field,user.departmentsandpageseven when unchanged. A missing field fails the request with500, not422.user.time_zoneis limited to 20 characters, so longer IANA names (America/Argentina/Buenos_Aires) are rejected with422.- A suspended member is listed and readable, but a
PUTon them fails with500. departmentsis present only where the endpoint loads it: in the list and in/v3/users/{user}./v2/user_infoomitsuser_extensionandcall_eventsrather than returningnullwhen the user has no extension or has not enabled call events.