wxc_sdk.workspace_settings.numbers package

Numbers API for Workspaces

class wxc_sdk.workspace_settings.numbers.WorkspaceNumbers(*, distinctiveRingEnabled: bool | None = None, phoneNumbers: list[UserNumber], workspace: IdOnly, location: IdAndName, organization: IdAndName)[source]

Bases: ApiModel

distinctive_ring_enabled: bool | None
phone_numbers: list[UserNumber]

Array of numbers (primary/alternate).

workspace: IdOnly

workspace object having a unique identifier for the Workspace.

location: IdAndName

location object having a unique identifier for the location and its name.

organization: IdAndName

organization object having a unique identifier for the organization and its name.

class wxc_sdk.workspace_settings.numbers.UpdateWorkspacePhoneNumber(*, primary: bool | None = None, action: PatternAction | None = None, directNumber: str | None = None, extension: str | None = None, ringPattern: RingPattern | None = None)[source]

Bases: ApiModel

primary: bool | None

If true marks the phone number as primary.

action: PatternAction | None

Either ‘ADD’ to add phone numbers or ‘DELETE’ to remove phone numbers.

direct_number: str | None

Phone numbers that are assigned.

extension: str | None

Extension that is assigned.

ring_pattern: RingPattern | None

Ring Pattern of this number.

class wxc_sdk.workspace_settings.numbers.WorkspaceNumbersApi(*, session: RestSession, base: str | None = None)[source]

Bases: ApiChild

read(workspace_id: str, org_id: str | None = None) WorkspaceNumbers[source]

List the PSTN phone numbers associated with a specific workspace, by ID, within the organization. Also shows the location and Organization associated with the workspace.

Retrieving this list requires a full or read-only administrator auth token with a scope of spark-admin:workspaces_read.

Parameters:
  • workspace_id (str) – List numbers for this workspace.

  • org_id (str) – List numbers for a workspace within this organization.

Returns:

Workspace numbers

Return type:

WorkspaceNumbers

update(workspace_id: str, phone_numbers: list[UpdateWorkspacePhoneNumber], distinctive_ring_enabled: bool | None = None, org_id: str | None = None)[source]

Assign or Unassign numbers associated with a specific workspace

Assign or unassign alternate phone numbers associated with a specific workspace.

Each location has a set of phone numbers that can be assigned to people, workspaces, or features. Phone numbers must follow the E.164 format for all countries, except for the United States, which can also follow the National format. Active phone numbers are in service.

This API requires a full, user or location administrator auth token with the spark-admin:workspaces_write to update workspace settings.

NOTE: This API is only available for professional licensed workspaces.

Parameters:
  • workspace_id (str) – Unique identifier for the workspace.

  • phone_numbers (list[UpdateWorkspacePhoneNumber]) – List of phone numbers that are assigned to a person.

  • distinctive_ring_enabled (bool) – Enables a distinctive ring pattern for the person.

  • org_id (str) – ID of the organization within which the workspace resides. Only admin users of another organization (such as partners) may use this parameter as the default is the same organization as the token used to access API.

Return type:

None

base = 'workspaces'