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.

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.
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, 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.

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.
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.
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.
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.
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)