wxc_sdk.telephony.location.numbers module

class wxc_sdk.telephony.location.numbers.LocationNumbersApi(*, session: RestSession, base: str | None = None)[source]

Bases: ApiChild

add(location_id: str, phone_numbers: list[str], state: NumberState = NumberState.inactive, org_id: str | None = None)[source]

Adds specified set of phone numbers to a location for an organization.

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

Adding a phone number to a location requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • location_id (str) – LocationId to which numbers should be added.

  • phone_numbers (list[str]) – List of phone numbers that need to be added.

  • state (wxc_sdk.common.NumberState) – State of the phone numbers.

  • org_id (str) – Organization to manage

activate(location_id: str, phone_numbers: list[str], org_id: str | None = None)[source]

Activate the specified set of phone numbers in a location for an organization.

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

Activating a phone number in a location requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • location_id (str) – LocationId in which numbers should be activated.

  • phone_numbers (list[str]) – List of phone numbers to be activated.

  • org_id (str) – Organization to manage

remove(location_id: str, phone_numbers: list[str], org_id: str | None = None)[source]

Remove the specified set of phone numbers from a location for an organization.

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

Removing a phone number from a location requires a full administrator auth token with a scope of spark-admin:telephony_config_write.

Parameters:
  • location_id (str) – LocationId from which numbers should be removed.

  • phone_numbers (list[str]) – List of phone numbers to be removed.

  • org_id (str) – Organization to manage

base = 'telephony/config/locations'
session: RestSession

REST session