Skip to content

client.teams

Teams of users. These methods are on client.teams, 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 a team. Returns the new Team.

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

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

Field Type Required Description
name string yes —

Team:

Field Type Description
id string The team’s ID.
object "team" Always team.
livemode boolean true in live mode, false in test mode.
name string —
member_count integer Active members in the team.
created string An ISO-8601 timestamp in UTC.
from morevoice import MoreVoice
client = MoreVoice() # MOREVOICE_API_KEY from the environment
team = client.teams.create({
"name": "Sales",
})
print(team)

Delete a team. Deletes the team. Its members stay in the organisation, in no team; queues that list the team no longer reach them through it.

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

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

Name Type Required Description
id str yes A team ID (team_…).

DeletedTeam:

Field Type Description
id string A team ID (prefix team_).
object "team" Always team.
deleted true —
from morevoice import MoreVoice
client = MoreVoice() # MOREVOICE_API_KEY from the environment
deleted_team = client.teams.delete("team_7Hk2Lm9Qp")
print(deleted_team)

List teams. Returns a page of Team objects, newest first. Pass next_cursor as starting_after for the next page; the SDKs iterate every page for you.

client.teams
def list(self, *, limit: int | Unset = 20, starting_after: str | Unset = UNSET, ending_before: str | Unset = UNSET, more_voice_version: str | Unset = UNSET) -> AsyncPage[_m.Team]

client.teams.list() · await async_client.teams.list() · GET /teams · 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).

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

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

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

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

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

Name Type Required Description
id str yes A team ID (team_…).

Team:

Field Type Description
id string The team’s ID.
object "team" Always team.
livemode boolean true in live mode, false in test mode.
name string —
member_count integer Active members in the team.
created string An ISO-8601 timestamp in UTC.
from morevoice import MoreVoice
client = MoreVoice() # MOREVOICE_API_KEY from the environment
team = client.teams.retrieve("team_7Hk2Lm9Qp")
print(team)

Rename a team. Changes only the fields you send. Returns the updated Team. Answers 404 with the code resource_missing when nothing has this ID in this organisation and mode.

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

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

Name Type Required Description
id str yes A team ID (team_…).
Field Type Required Description
name string yes —

Team:

Field Type Description
id string The team’s ID.
object "team" Always team.
livemode boolean true in live mode, false in test mode.
name string —
member_count integer Active members in the team.
created string An ISO-8601 timestamp in UTC.
from morevoice import MoreVoice
client = MoreVoice() # MOREVOICE_API_KEY from the environment
team = client.teams.update("team_7Hk2Lm9Qp", {
"name": "Sales",
})
print(team)