Skip to content

client.users

Users in the organisation. These methods are on client.users, where client is a MoreVoice client (see the Python SDK). On AsyncMoreVoice the same methods are awaited. Each one returns the response object and raises an exception when the API answers with an error.

Create or update a managed user. Creates — or, for an external_id you sent before, updates — a managed user: an agent or supervisor your app signs in with agent sessions (POST /v1/agent_sessions). No invitation, password or email: they never sign in to the dashboard themselves. A new user takes a seat (402 plan_limit when none is free). An update changes the name, email, role, team, extension and language you send; it never reactivates a deactivated user (POST /v1/users/{id}/reactivate). Your organisation must have managed users enabled (403 feature_unavailable).

client.users
def create(self, body: _m.UserUpsertParamsInput | Mapping[str, Any], *, more_voice_version: str | Unset = UNSET, idempotency_key: str | Unset = UNSET) -> _m.User

client.users.create() · await async_client.users.create() · POST /users · API reference

Field Type Required Description
external_id string yes Your own id for this person: the upsert key. The same id updates the same user.
name string yes Their name, as colleagues and reports show it.
email string | null no Optional. Used when no account has it yet; otherwise the user gets a private address of ours (…@users.invalid, never emailed). Nothing is ever sent to it by this call.
extension string | null no Their extension (digits), or null / empty for none. Omitted on an update: unchanged.
locale "he" | "en" no Their language for the agent desk.
role "agent" | "supervisor" no Default agent. Managed users are agents or supervisors.
team_id string | null no Their team, or null for none. Omitted on an update: unchanged.

User:

Field Type Description
id string The user’s ID.
object "user" Always user.
livemode boolean true in live mode, false in test mode.
name string —
email string —
role "owner" | "admin" | "supervisor" | "agent" Their role in the organisation: what they can see and change.
billing boolean They may manage billing (granted by owners only).
team_id string | null team_… ID.
extension string | null Their internal extension, unique in the organisation.
status "active" | "deactivated" | "invited" active; deactivated (cannot sign in here, keeps no seat); invited (added, has not set a password yet).
takes_seat boolean Counts towards the plan’s seats.
email_verified boolean —
last_login string | null —
created string When they joined the organisation.
skills object[] Their skills, used by queues that route by skill. Empty unless skills routing is on for your organisation.
external_id string | null Your own id for this person (managed users, POST /v1/users); null for members who joined by invitation.
managed boolean Managed by your app through the API: no password or invitation of ours; they sign in through agent sessions (POST /v1/agent_sessions).
from morevoice import MoreVoice
client = MoreVoice() # MOREVOICE_API_KEY from the environment
user = client.users.create({
"email": "dana@example.com",
"extension": "204",
"external_id": "agent-1042",
"locale": "he",
"name": "Dana Levi",
"role": "agent",
"team_id": "team_7Hj2Kl4Mn6Pq8Rs0Tu2Vw",
})
print(user)

Deactivate a user. Deactivates the membership: they are signed out of this organisation, free their seat, and their open callbacks go back to their queue. They keep their account (and other organisations); POST /v1/users/{id}/reactivate undoes it.

client.users
def delete(self, id: str, *, more_voice_version: str | Unset = UNSET, idempotency_key: str | Unset = UNSET) -> _m.User

client.users.delete() · await async_client.users.delete() · DELETE /users/{id} · API reference

Name Type Required Description
id str yes A user ID (usr_…).

User:

Field Type Description
id string The user’s ID.
object "user" Always user.
livemode boolean true in live mode, false in test mode.
name string —
email string —
role "owner" | "admin" | "supervisor" | "agent" Their role in the organisation: what they can see and change.
billing boolean They may manage billing (granted by owners only).
team_id string | null team_… ID.
extension string | null Their internal extension, unique in the organisation.
status "active" | "deactivated" | "invited" active; deactivated (cannot sign in here, keeps no seat); invited (added, has not set a password yet).
takes_seat boolean Counts towards the plan’s seats.
email_verified boolean —
last_login string | null —
created string When they joined the organisation.
skills object[] Their skills, used by queues that route by skill. Empty unless skills routing is on for your organisation.
external_id string | null Your own id for this person (managed users, POST /v1/users); null for members who joined by invitation.
managed boolean Managed by your app through the API: no password or invitation of ours; they sign in through agent sessions (POST /v1/agent_sessions).
from morevoice import MoreVoice
client = MoreVoice() # MOREVOICE_API_KEY from the environment
user = client.users.delete("usr_7Hk2Lm9Qp")
print(user)

List users. Your organisation’s members (deactivated ones included), newest first.

client.users
def list(self, *, limit: int | Unset = 20, starting_after: str | Unset = UNSET, ending_before: str | Unset = UNSET, role: _m.UsersListRole | Unset = UNSET, status: _m.UsersListStatus | Unset = UNSET, team_id: str | Unset = UNSET, external_id: str | Unset = UNSET, more_voice_version: str | Unset = UNSET) -> AsyncPage[_m.User]

client.users.list() · await async_client.users.list() · GET /users · API reference

Name Type Required Description
limit integer no How many objects to return, 1–100 (default 20).
starting_after string no A cursor (next_cursor) or object ID: return the objects after it (older).
ending_before string no A cursor or object ID: return the objects before it (newer).
role "owner" | "admin" | "supervisor" | "agent" no Only members with this role.
status "active" | "deactivated" | "invited" no Only members in this status.
team_id string no Only members of this team.
external_id string no Only the managed user with this id of yours (at most one).

A page of results (UserList): data, has_more and next_cursor.

from morevoice import MoreVoice
client = MoreVoice() # MOREVOICE_API_KEY from the environment
for user in client.users.list():
print(user)

Reactivate a user. Reactivates a deactivated member. They take a seat again (402 plan_limit when none is free).

client.users
def reactivate(self, id: str, *, more_voice_version: str | Unset = UNSET, idempotency_key: str | Unset = UNSET) -> _m.User

client.users.reactivate() · await async_client.users.reactivate() · POST /users/{id}/reactivate · API reference

Name Type Required Description
id str yes A user ID (usr_…).

User:

Field Type Description
id string The user’s ID.
object "user" Always user.
livemode boolean true in live mode, false in test mode.
name string —
email string —
role "owner" | "admin" | "supervisor" | "agent" Their role in the organisation: what they can see and change.
billing boolean They may manage billing (granted by owners only).
team_id string | null team_… ID.
extension string | null Their internal extension, unique in the organisation.
status "active" | "deactivated" | "invited" active; deactivated (cannot sign in here, keeps no seat); invited (added, has not set a password yet).
takes_seat boolean Counts towards the plan’s seats.
email_verified boolean —
last_login string | null —
created string When they joined the organisation.
skills object[] Their skills, used by queues that route by skill. Empty unless skills routing is on for your organisation.
external_id string | null Your own id for this person (managed users, POST /v1/users); null for members who joined by invitation.
managed boolean Managed by your app through the API: no password or invitation of ours; they sign in through agent sessions (POST /v1/agent_sessions).
from morevoice import MoreVoice
client = MoreVoice() # MOREVOICE_API_KEY from the environment
user = client.users.reactivate("usr_7Hk2Lm9Qp")
print(user)

Retrieve a user. Returns the User object. Answers 404 with the code resource_missing when nothing has this ID in this organisation and mode.

client.users
def retrieve(self, id: str, *, more_voice_version: str | Unset = UNSET) -> _m.User

client.users.retrieve() · await async_client.users.retrieve() · GET /users/{id} · API reference

Name Type Required Description
id str yes A user ID (usr_…).

User:

Field Type Description
id string The user’s ID.
object "user" Always user.
livemode boolean true in live mode, false in test mode.
name string —
email string —
role "owner" | "admin" | "supervisor" | "agent" Their role in the organisation: what they can see and change.
billing boolean They may manage billing (granted by owners only).
team_id string | null team_… ID.
extension string | null Their internal extension, unique in the organisation.
status "active" | "deactivated" | "invited" active; deactivated (cannot sign in here, keeps no seat); invited (added, has not set a password yet).
takes_seat boolean Counts towards the plan’s seats.
email_verified boolean —
last_login string | null —
created string When they joined the organisation.
skills object[] Their skills, used by queues that route by skill. Empty unless skills routing is on for your organisation.
external_id string | null Your own id for this person (managed users, POST /v1/users); null for members who joined by invitation.
managed boolean Managed by your app through the API: no password or invitation of ours; they sign in through agent sessions (POST /v1/agent_sessions).
from morevoice import MoreVoice
client = MoreVoice() # MOREVOICE_API_KEY from the environment
user = client.users.retrieve("usr_7Hk2Lm9Qp")
print(user)

Update a user. Changes a member’s role, team or extension. A role change signs them in again in this organisation. API keys manage agents and supervisors: granting owner or admin, or changing an owner or admin, answers 403 — an owner does that in the dashboard.

client.users
def update(self, id: str, body: _m.UserUpdateParamsInput | Mapping[str, Any] | Unset = UNSET, *, more_voice_version: str | Unset = UNSET) -> _m.User

client.users.update() · await async_client.users.update() · PATCH /users/{id} · API reference

Name Type Required Description
id str yes A user ID (usr_…).
Field Type Required Description
extension string | null no Their extension (digits), or null / empty for none.
role "owner" | "admin" | "supervisor" | "agent" no A new role. API keys manage agents and supervisors; owner and admin are granted by an owner, in the dashboard.
skills object[] no Their skills: replaces the list (an empty list removes them all). Needs skills routing on for your organisation.
team_id string | null no Their team, or null for none.

User:

Field Type Description
id string The user’s ID.
object "user" Always user.
livemode boolean true in live mode, false in test mode.
name string —
email string —
role "owner" | "admin" | "supervisor" | "agent" Their role in the organisation: what they can see and change.
billing boolean They may manage billing (granted by owners only).
team_id string | null team_… ID.
extension string | null Their internal extension, unique in the organisation.
status "active" | "deactivated" | "invited" active; deactivated (cannot sign in here, keeps no seat); invited (added, has not set a password yet).
takes_seat boolean Counts towards the plan’s seats.
email_verified boolean —
last_login string | null —
created string When they joined the organisation.
skills object[] Their skills, used by queues that route by skill. Empty unless skills routing is on for your organisation.
external_id string | null Your own id for this person (managed users, POST /v1/users); null for members who joined by invitation.
managed boolean Managed by your app through the API: no password or invitation of ours; they sign in through agent sessions (POST /v1/agent_sessions).
from morevoice import MoreVoice
client = MoreVoice() # MOREVOICE_API_KEY from the environment
user = client.users.update("usr_7Hk2Lm9Qp", {
"role": "supervisor",
"team_id": "team_7Hj2Kl4Mn6Pq8Rs0Tu2Vw",
})
print(user)