Phone

Struct Phone 

Source
pub struct Phone {
    pub client: Client,
}

Fields§

§client: Client

Implementations§

Source§

impl Phone

Source

pub async fn set_up_account( &self, account_id: &str, body: &SetUpAccountRequest, ) -> Result<Response<()>, ClientError>

Set up a Zoom Phone account.

This function performs a POST to the /accounts/{accountId}/phone/setup endpoint.

After assigning a Zoom phone license to an account, an admin or account owner can proceed with the initial Zoom phone set up using this API.

Scopes: phone:write:admin, phone:write
Rate Limit Label: Light

Prerequisites:

  • A Paid account
  • A Pro or a higher account plan
  • Master account option enabled

Parameters:

  • account_id: &str – Unique identifier of the account.
Source

pub async fn list_account_numbers( &self, next_page_token: &str, type_: ListAccountPhoneNumbersType, extension_type: ExtensionType, page_size: i64, number_type: Type, pending_numbers: bool, site_id: &str, ) -> Result<Response<Vec<ListAccountPhoneNumbersResponse>>, ClientError>

List phone numbers.

This function performs a GET to the /phone/numbers endpoint.

Use this API to list all Zoom Phone numbers in a Zoom account.

Scopes: phone:read:admin
Rate Limit Label: Medium

Prerequisites:

  • A Pro or higher account plan
  • A Zoom Phone license

Parameters:

  • next_page_token: &str – The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes.
  • type_: crate::types::ListAccountPhoneNumbersType – Query response by number assignment. The value can be one of the following:
    assigned: The number has been assigned to either a user, a call queue, an auto-receptionist or a common area phone in an account.
    unassigned: The number is not assigned to anyone.
    all: Include both assigned and unassigned numbers in the response.
    byoc: Include Bring Your Own Carrier (BYOC) numbers only in the response.
  • extension_type: crate::types::ExtensionType – The type of assignee to whom the number is assigned. The value can be one of the following:
    user
    callQueue
    autoReceptionist
    commonAreaPhone.
  • page_size: i64 – The number of records returned within a single API call.
  • number_type: crate::types::Type – The type of phone number. The value can be either toll or tollfree.
  • pending_numbers: bool – Enable/disable the option for a sub account to use shared Virtual Room Connector(s) that are set up by the master account. Virtual Room Connectors can only be used by On-prem users.
  • site_id: &str – Unique identifier of the site. Use this query parameter if you have enabled multiple sites and would like to filter the response of this API call by a specific phone site. See Managing multiple sites or Adding a site for details.
Source

pub async fn list_all_account_numbers( &self, type_: ListAccountPhoneNumbersType, extension_type: ExtensionType, number_type: Type, pending_numbers: bool, site_id: &str, ) -> Result<Response<Vec<ListAccountPhoneNumbersResponse>>, ClientError>

List phone numbers.

This function performs a GET to the /phone/numbers endpoint.

As opposed to list_account_numbers, this function returns all the pages of the request at once.

Use this API to list all Zoom Phone numbers in a Zoom account.

Scopes: phone:read:admin
Rate Limit Label: Medium

Prerequisites:

  • A Pro or higher account plan
  • A Zoom Phone license
Source

pub async fn user( &self, user_id: &str, ) -> Result<Response<PhoneUserResponse>, ClientError>

Get user’s profile.

This function performs a GET to the /phone/users/{userId} endpoint.

Use this API to return a user’s Zoom phone profile. For user-level apps, pass the me value instead of the userId parameter.

Scopes: phone:read, phone:read:admin
Rate Limit Label: Light

Prerequisites:

  • A Business or Enterprise account
  • A Zoom Phone license

Parameters:

  • user_id: &str – The user ID or email address of the user. For user-level apps, pass me as the value for userId.
Source

pub async fn update_user_profile( &self, user_id: &str, body: &UpdateUserProfileRequest, ) -> Result<Response<()>, ClientError>

Update user’s profile.

This function performs a PATCH to the /phone/users/{userId} endpoint.

Use this API to update a user’s Zoom Phone profile. For user-level apps, pass the me value instead of the userId parameter.

Scopes: phone:write, phone:write:admin
Rate Limit Label: Light

Prerequisites:

  • A Business or Enterprise account
  • A Zoom Phone license
Source

pub async fn setting( &self, account_id: &str, ) -> Result<Response<PhoneSettingResponse>, ClientError>

Get account’s setting.

This function performs a GET to the /phone/settings endpoint.

Use this API to return an account’s settings.

Scopes: phone:read, phone:read:admin
Rate Limit Label: Light

Prerequisites:

  • A Business or Enterprise account
  • A Zoom Phone license
Source

pub async fn update_settings( &self, account_id: &str, body: &UpdatePhoneSettingsRequest, ) -> Result<Response<()>, ClientError>

Update BYOC settings.

This function performs a PATCH to the /phone/settings endpoint.

Master account owners can use this API to enable the BYOC (Bring Your Own Carrier) option for a subaccount.

Scopes: phone:master

Prerequisites:

  • A Business or Enterprise account

Parameters:

  • account_id: &str – Unique identifier of the sub account.
Source

pub async fn user_settings( &self, user_id: &str, ) -> Result<Response<PhoneUserSettingsResponse>, ClientError>

Get user’s settings.

This function performs a GET to the /phone/users/{userId}/settings endpoint.

Use this API to get a user’s Zoom Phone profile settings. For user-level apps, pass the me value instead of the userId parameter.

Scopes: phone:read, phone:read:admin
Rate Limit Label: Light

Prerequisites:

  • A Business or Enterprise account
  • A Zoom Phone license

Parameters:

  • user_id: &str – The user ID or email address of the user. For user-level apps, pass me as the value for userId.
Source

pub async fn list_setting_templates( &self, page_size: i64, next_page_token: &str, site_id: &str, ) -> Result<Response<Vec<Templates>>, ClientError>

List setting templates.

This function performs a GET to the /phone/setting_templates endpoint.

Use this API to get a list of all the created phone template settings.

Scopes: phone:read:admin or phone:read
Rate Limit Label: Light

Prerequisites:

  • A Business or Enterprise account
  • A Zoom Phone license

Parameters:

  • page_size: i64 – Number of records returns within a single API call.
  • next_page_token: &str – The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes.
  • site_id: &str – Unique identifier of the site. This field is required only if multiple sites have been enabled. of the site. Required only when multiple sites are enabled. See Managing multiple sites for details. If this is not provided, the response lists the account level setting templates.
Source

pub async fn list_all_setting_templates( &self, site_id: &str, ) -> Result<Response<Vec<Templates>>, ClientError>

List setting templates.

This function performs a GET to the /phone/setting_templates endpoint.

As opposed to list_setting_templates, this function returns all the pages of the request at once.

Use this API to get a list of all the created phone template settings.

Scopes: phone:read:admin or phone:read
Rate Limit Label: Light

Prerequisites:

  • A Business or Enterprise account
  • A Zoom Phone license
Source

pub async fn add_setting_template( &self, body: &AddSettingTemplateRequest, ) -> Result<Response<AddSettingTemplateResponse>, ClientError>

Add a setting template.

This function performs a POST to the /phone/setting_templates endpoint.

Use this API to create a Zoom Phone setting template for an account. After creating a phone template, the defined settings will become the default settings for an account.

Scopes: phone:write:admin, phone:write
Rate Limit Label: Light

Prerequisites:

  • A Business or enterprise Zoom account
  • A Zoom Phone license
Source

pub async fn batch_add_locations( &self, body: &BatchAddLocationsRequest, ) -> Result<Response<Vec<BatchAddLocationsResponse>>, ClientError>

Batch add emergency service locations.

This function performs a POST to the /phone/batch_locations endpoint.

Use this API to batch add emergency service locations.

Source

pub async fn list_locations( &self, next_page_token: &str, page_size: i64, ) -> Result<Response<Vec<ListLocationsResponse>>, ClientError>

List emergency service locations.

This function performs a GET to the /phone/locations endpoint.

Use this API to list emergency service locations.

Scopes: phone:read:admin
Rate Limit Label: Light

Prerequisites:

  • Pro or a higher account with Zoom Phone license
  • Account owner or admin permissions

Parameters:

  • next_page_token: &str – The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes.
  • page_size: i64 – The number of records returned within a single API call.
Source

pub async fn list_all_locations( &self, ) -> Result<Response<Vec<ListLocationsResponse>>, ClientError>

List emergency service locations.

This function performs a GET to the /phone/locations endpoint.

As opposed to list_locations, this function returns all the pages of the request at once.

Use this API to list emergency service locations.

Scopes: phone:read:admin
Rate Limit Label: Light

Prerequisites:

  • Pro or a higher account with Zoom Phone license
  • Account owner or admin permissions
Source

pub async fn add_location( &self, body: &AddLocationRequest, ) -> Result<Response<Vec<Site>>, ClientError>

Add emergency service location.

This function performs a POST to the /phone/locations endpoint.

Use this API to add an emergency service location.

Scopes: phone:write:adminRate
Rate Limit Label: Light

Prerequisites:

  • Pro or a higher account with Zoom Phone license
  • Account owner or admin permissions
Source

pub async fn get_location( &self, location_id: &str, ) -> Result<Response<GetLocationResponse>, ClientError>

Get emergency service location details.

This function performs a GET to the /phone/locations/{locationId} endpoint.

Use this API to return an emergency service location’s information.

Scopes: phone:write:admin
Rate Limit Label: Light

Prerequisites:

  • Pro or a higher account with Zoom Phone license
  • Account owner or admin permissions

Parameters:

  • location_id: &str – The emergency service location’s ID.
Source

pub async fn delete_location( &self, location_id: &str, ) -> Result<Response<()>, ClientError>

Delete an emergency location.

This function performs a DELETE to the /phone/locations/{locationId} endpoint.

Use this API to remove an emergency location.

Scopes: phone:write:admin
Rate Limit Label: Light

Prerequisites:

  • Pro or a higher account with Zoom Phone license
  • Account owner or admin permissions

Parameters:

  • location_id: &str – The emergency service location’s ID.
Source

pub async fn update_location( &self, location_id: &str, body: &UpdateLocationRequest, ) -> Result<Response<()>, ClientError>

Update emergency service location.

This function performs a PATCH to the /phone/locations/{locationId} endpoint.

Use this API to update an emergency location’s information.

Scopes: phone:write:admin
Rate Limit Label: Light

Prerequisites:

  • Pro or a higher account with Zoom Phone license
  • Account owner or admin permissions
Source

pub async fn list_sip_groups( &self, next_page_token: &str, page_size: i64, ) -> Result<Response<Vec<SipGroups>>, ClientError>

List SIP groups.

This function performs a GET to the /phone/sip_groups endpoint.

Use this API to list SIP (Session Initiation Protocol) groups.

Scopes: phone:read:admin
Rate Limit Label: Light

Prerequisites:

  • Pro or a higher account with Zoom Phone license
  • Account owner or admin permissions

Parameters:

  • next_page_token: &str – The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes.
  • page_size: i64 – The number of records returned within a single API call.
Source

pub async fn list_all_sip_groups( &self, ) -> Result<Response<Vec<SipGroups>>, ClientError>

List SIP groups.

This function performs a GET to the /phone/sip_groups endpoint.

As opposed to list_sip_groups, this function returns all the pages of the request at once.

Use this API to list SIP (Session Initiation Protocol) groups.

Scopes: phone:read:admin
Rate Limit Label: Light

Prerequisites:

  • Pro or a higher account with Zoom Phone license
  • Account owner or admin permissions
Source

pub async fn get_setting_template( &self, template_id: &str, custom_query_fields: &str, ) -> Result<Response<GetSettingTemplateResponse>, ClientError>

Get setting template details.

This function performs a GET to the /phone/setting_templates/{templateId} endpoint.

Use this API to return information about an account’s phone template.

Scopes: phone:write:admin or phone:write
Rate Limit Label: Light

Prerequisites:

  • A Business or Enterprise account
  • A Zoom Phone license

Parameters:

  • template_id: &str – Unique identifier of the template.
  • custom_query_fields: &str – Provide the name of the field to use to filter the response. For example, if you provide “description” as the value of the field, you will get a response similar to the following: {“description”: “template description”}.
Source

pub async fn update_setting_template( &self, template_id: &str, body: &UpdateSettingTemplateRequest, ) -> Result<Response<()>, ClientError>

Update a setting template.

This function performs a PATCH to the /phone/setting_templates/{templateId} endpoint.

Use this API to update or modify a phone template’s settings.

Scopes: phone:write:admin or phone:write
Rate Limit Label: Light

Prerequisites:

  • A Business or Enterprise account
  • A Zoom Phone license

Parameters:

  • template_id: &str – User’s first name.
Source

pub async fn user_call_logs( &self, user_id: &str, page_size: i64, from: NaiveDate, to: NaiveDate, type_: PhoneUserCallLogsType, next_page_token: &str, phone_number: &str, time_type: TimeType, ) -> Result<Response<Vec<CallLogs>>, ClientError>

Get user’s call logs.

This function performs a GET to the /phone/users/{userId}/call_logs endpoint.

Use this API to get a user’s Zoom phone call logs. For user-level apps, pass the me value instead of the userId parameter.

Scopes: phone:read, phone:read:admin, phone_call_log:read, phone_call_log:read:admin
Rate Limit Label: Heavy

Prerequisites:

  • A Business or Enterprise account
  • A Zoom Phone license

Parameters:

  • user_id: &str – The user ID or email address of the user. For user-level apps, pass me as the value for userId.
  • page_size: i64 – The number of records returned within a single API call.
  • from: chrono::NaiveDate – Start date in ‘yyyy-mm-dd’ format. The date range defined by the “from” and “to” parameters should only be one month as the report includes only one month worth of data at once.
  • to: chrono::NaiveDate – Start Date.
  • type_: crate::types::PhoneUserCallLogsType
  • next_page_token: &str – The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes.
  • phone_number: &str – Filter API responses to include call logs of only the phone number defined in this field.
  • time_type: crate::types::TimeType – Enables you to sort call logs by start or end time. Choose the sort time value. Values include startTime or endTime.
Source

pub async fn get_all_user_call_logs( &self, user_id: &str, from: NaiveDate, to: NaiveDate, type_: PhoneUserCallLogsType, phone_number: &str, time_type: TimeType, ) -> Result<Response<Vec<CallLogs>>, ClientError>

Get user’s call logs.

This function performs a GET to the /phone/users/{userId}/call_logs endpoint.

As opposed to user_call_logs, this function returns all the pages of the request at once.

Use this API to get a user’s Zoom phone call logs. For user-level apps, pass the me value instead of the userId parameter.

Scopes: phone:read, phone:read:admin, phone_call_log:read, phone_call_log:read:admin
Rate Limit Label: Heavy

Prerequisites:

  • A Business or Enterprise account
  • A Zoom Phone license
Source

pub async fn user_recordings( &self, user_id: &str, page_size: i64, next_page_token: &str, from: NaiveDate, to: NaiveDate, ) -> Result<Response<Vec<Recordings>>, ClientError>

Get user’s recordings.

This function performs a GET to the /phone/users/{userId}/recordings endpoint.

Use this API to get a user’s Zoom Phone recordings. For user-level apps, pass the me value instead of the userId parameter.

Scopes: phone:read, phone:read:admin, phone_recording:read, phone_recording:read:admin
Rate Limit Label: Medium

Prerequisites:

  • A Business or Enterprise account
  • A Zoom Phone license

Parameters:

  • user_id: &str – The user ID or email address of the user. For user-level apps, pass me as the value for userId.
  • page_size: i64 – The number of records returned within a single API call.
  • next_page_token: &str – The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes.
  • from: chrono::NaiveDate – Start date for the query in ‘yyyy-mm-dd’ format. The date range defined by the “from” and “to” parameters should only be one month as the response includes only one month worth of recording data. The month defined should fall within the last six months.
  • to: chrono::NaiveDate – Start Date.
Source

pub async fn get_all_user_recordings( &self, user_id: &str, from: NaiveDate, to: NaiveDate, ) -> Result<Response<Vec<Recordings>>, ClientError>

Get user’s recordings.

This function performs a GET to the /phone/users/{userId}/recordings endpoint.

As opposed to user_recordings, this function returns all the pages of the request at once.

Use this API to get a user’s Zoom Phone recordings. For user-level apps, pass the me value instead of the userId parameter.

Scopes: phone:read, phone:read:admin, phone_recording:read, phone_recording:read:admin
Rate Limit Label: Medium

Prerequisites:

  • A Business or Enterprise account
  • A Zoom Phone license
Source

pub async fn user_voice_mails( &self, user_id: &str, page_size: i64, status: PhoneUserVoiceMailsStatus, next_page_token: &str, from: NaiveDate, to: NaiveDate, ) -> Result<Response<Vec<VoiceMails>>, ClientError>

Get user’s voicemails.

This function performs a GET to the /phone/users/{userId}/voice_mails endpoint.

Use this API to get a user’s Zoom Phone voicemails. For user-level apps, pass the me value instead of the userId parameter.

Scopes: phone:read, phone:read:admin, phone_voicemail:read, phone_voicemail:read:admin
Rate Limit Label: Medium

Prerequisites:

  • A Business or Enterprise account
  • A Zoom Phone license

Parameters:

  • user_id: &str – The user ID or email address of the user. For user-level apps, pass me as the value for userId.
  • page_size: i64 – The number of records returned within a single API call.
  • status: crate::types::PhoneUserVoiceMailsStatus – Status of the voice mail.
  • next_page_token: &str – The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes.
  • from: chrono::NaiveDate – Start date for the query in ‘yyyy-mm-dd’ format. The date range defined by the “from” and “to” parameters should only be one month as the response includes only one month worth of voicemail data. The month defined should fall within the last six months.
  • to: chrono::NaiveDate – Start Date.
Source

pub async fn get_all_user_voice_mails( &self, user_id: &str, status: PhoneUserVoiceMailsStatus, from: NaiveDate, to: NaiveDate, ) -> Result<Response<Vec<VoiceMails>>, ClientError>

Get user’s voicemails.

This function performs a GET to the /phone/users/{userId}/voice_mails endpoint.

As opposed to user_voice_mails, this function returns all the pages of the request at once.

Use this API to get a user’s Zoom Phone voicemails. For user-level apps, pass the me value instead of the userId parameter.

Scopes: phone:read, phone:read:admin, phone_voicemail:read, phone_voicemail:read:admin
Rate Limit Label: Medium

Prerequisites:

  • A Business or Enterprise account
  • A Zoom Phone license
Source

pub async fn add_user_setting( &self, user_id: &str, setting_type: &str, body: &AddUserSettingRequest, ) -> Result<Response<AddUserSettingResponse>, ClientError>

Set up shared access.

This function performs a POST to the /phone/users/{userId}/settings/{settingType} endpoint.

Use this API to define the voicemail access permissions of a user. For user-level apps, pass the me value instead of the userId parameter.

Phone users can access shared voicemail inboxes in the Zoom desktop client, web portal, or provisioned desk phone.

To view these settings in the Zoom web portal, navigate to the Admin >> Phone System Management >> Users & Rooms interface. Click the Users tab and select User Settings. Scroll down to Voicemail & Call Recordings.

Scopes: phone:write:admin
Rate Limit Label: Light

Prerequisites:

  • A Business or Enterprise account

Parameters:

  • user_id: &str – Unique identifier of the user.
  • setting_type: &str – Corresponds to the setting item you wish to modify. Allowed values: voice_mail.
Source

pub async fn delete_user_setting( &self, user_id: &str, setting_type: &str, shared_id: &str, ) -> Result<Response<()>, ClientError>

Remove shared access.

This function performs a DELETE to the /phone/users/{userId}/settings/{settingType} endpoint.

Use this API to remove a user’s shared voicemail access settings. For user-level apps, pass the me value instead of the userId parameter.

To view these settings in your Zoom web portal, navigate to the Admin >> Phone System Management >> Users & Rooms interface. Click the Users tab and select User Settings. Scroll down to Voicemail & Call Recordings.

Scopes: phone:write:admin
Rate Limit Label: Light

Prerequisites:

  • A Business or Enterprise account

Parameters:

  • user_id: &str – Unique identifier of the user.
  • setting_type: &str – Corresponds to the setting item you wish to remove. Allowed values: voice_mail.
  • shared_id: &str – Required only for voicemail setting type.
Source

pub async fn update_user_setting( &self, setting_type: &str, user_id: &str, body: &UpdateUserSettingRequest, ) -> Result<Response<()>, ClientError>

Update shared access.

This function performs a PATCH to the /phone/users/{userId}/settings/{settingType} endpoint.

Use this API to update the voicemail access permissions of a user. For user-level apps, pass the me value instead of the userId parameter.

Phone users can access shared voicemail inboxes in the Zoom desktop client, web portal, or provisioned desk phone.

To view these settings in the Zoom web portal, navigate to the Admin >> Phone System Management >> Users & Rooms interface. Click the Users tab and select User Settings. Scroll down to Voicemail & Call Recordings.

Scopes: phone:write:admin
Rate Limit Label: Light

Prerequisites:

  • A Business or Enterprise account

Parameters:

  • setting_type: &str – Corresponds to the setting item you wish to modify. Allowed values: voice_mail.
  • user_id: &str – Unique identifier of the user.
Source

pub async fn account_call_logs( &self, page_size: i64, from: &str, to: &str, type_: &str, next_page_token: &str, path: &str, time_type: TimeType, site_id: &str, ) -> Result<Response<Vec<AccountCallLogsResponse>>, ClientError>

Get account’s call logs.

This function performs a GET to the /phone/call_logs endpoint.

Use this API to return an account’s call logs.

Scopes: phone:read:admin, phone_call_log:read:admin
Rate Limit Label: Heavy

Prerequisites:

  • A Business or Enterprise account
  • A Zoom Phone license
  • Account owner and a role with Zoom Phone management

Parameters:

  • page_size: i64 – The number of records returned within a single API call.

  • from: &str – Start date from which you would like to get the call logs. The start date should be within past six months.

    The API only returns data pertaining to a month. Thus, the date range(defined using “from” and “to” fields) for which the call logs are to be returned must not exceed a month.

  • to: &str – The end date upto which you would like to get the call logs for. The end date should be within past six months.

  • type_: &str – The type of the call logs. The value can be either “all” or “missed”.

  • next_page_token: &str – The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes.

  • path: &str – Filter the API response by path of the call. The value of this field can be one of the following: voiceMail, message, forward, extension, callQueue, ivrMenu, companyDirectory, autoReceptionist, contactCenter, disconnected, commonAreaPhone, pstn, transfer, sharedLines, sharedLineGroup, tollFreeBilling, meetingService, parkPickup, parkTimeout, monitor, takeover, sipGroup.

  • time_type: crate::types::TimeType – Enables you to sort call logs by start or end time. Choose the sort time value. Values include startTime or endTime.

  • site_id: &str – Unique identifier of the site. Use this query parameter if you have enabled multiple sites and would like to filter the response of this API call by call logs of a specific phone site.

Source

pub async fn get_all_account_call_logs( &self, from: &str, to: &str, type_: &str, path: &str, time_type: TimeType, site_id: &str, ) -> Result<Response<Vec<AccountCallLogsResponse>>, ClientError>

Get account’s call logs.

This function performs a GET to the /phone/call_logs endpoint.

As opposed to account_call_logs, this function returns all the pages of the request at once.

Use this API to return an account’s call logs.

Scopes: phone:read:admin, phone_call_log:read:admin
Rate Limit Label: Heavy

Prerequisites:

  • A Business or Enterprise account
  • A Zoom Phone license
  • Account owner and a role with Zoom Phone management
Source

pub async fn assign_number( &self, user_id: &str, body: &AddByocNumberResponse, ) -> Result<Response<AddByocNumberResponse>, ClientError>

Assign phone number to user.

This function performs a POST to the /phone/users/{userId}/phone_numbers endpoint.

Use this API to assign a phone number to a user who has already enabled Zoom Phone. For user-level apps, pass the me value instead of the userId parameter.

Scopes: phone:write, phone:write:admin
Rate Limit Label: Light

Prerequisites:

  • A Business or Enterprise account
  • A Zoom Phone license
Source

pub async fn unassign_number( &self, user_id: &str, phone_number_id: &str, ) -> Result<Response<()>, ClientError>

Unassign phone number.

This function performs a DELETE to the /phone/users/{userId}/phone_numbers/{phoneNumberId} endpoint.

Use this API to unassign Zoom Phone user’s phone number. For user-level apps, pass the me value instead of the userId parameter.

After assigning a phone number, you can remove it if you do not want it to be assigned to anyone.

Scopes: phone:write, phone:write:admin
Rate Limit Label: Light

Prerequisites:

  • A Business or Enterprise account
  • A Zoom Phone license
  • The user must have been previously assigned a Zoom Phone number

Parameters:

  • user_id: &str – Provide either userId or email address of the user.
  • phone_number_id: &str – Provide either phone number or phoneNumberId of the user. .
Source

pub async fn assign_calling_plan( &self, user_id: &str, body: &AssignCallingPlanRequest, ) -> Result<Response<()>, ClientError>

Assign calling plan to a user.

This function performs a POST to the /phone/users/{userId}/calling_plans endpoint.

Use this API to assign a calling plan to a Zoom Phone user. For user-level apps, pass the me value instead of the userId parameter.

Scopes: phone:write, phone:write:admin
Rate Limit Label: Light

Prerequisites:

  • A Business or Enterprise account
  • A Zoom Phone license
Source

pub async fn unassign_calling_plan( &self, user_id: &str, type_: &str, ) -> Result<Response<()>, ClientError>

Unassign user’s calling plan.

This function performs a DELETE to the /phone/users/{userId}/calling_plans/{type} endpoint.

Use this API to unassign a a Zoom Phone user’s calling plan. For user-level apps, pass the me value instead of the userId parameter.

Scopes: phone:write, phone:write:admin
Rate Limit Label: Light

Prerequisites:

  • A Business or Enterprise account
  • A Zoom Phone license

Parameters:

  • type_: &str – The type of the calling plan that was assigned to user. (e.g: The value of type would be “200” for Unlimited US/Canada calling plan.) .
Source

pub async fn get_recordings( &self, page_size: i64, next_page_token: &str, from: &str, to: &str, owner_type: &str, recording_type: &str, site_id: &str, query_date_type: QueryDateType, ) -> Result<Response<Vec<GetPhoneRecordingsResponse>>, ClientError>

Get call recordings.

This function performs a GET to the /phone/recordings endpoint.

Use this API to list an account’s call recordings

Scopes: phone:read:admin, phone:write:admin,phone_recording:read:admin

Prerequisties:

  • A Pro or higher account plan
  • A Zoom Phone license
  • Account owner or admin privileges

Parameters:

  • page_size: i64 – The number of records returned within a single API call. The default is 30, and the maximum is 100.

  • next_page_token: &str – The current page number of returned records.

  • from: &str – Start date and time in yyyy-mm-dd format or yyyy-MM-dd’T’HH:mm:ss’Z’ format. The date range defined by the from and to parameters should only be one month as the report includes only one month worth of data at once. .

  • to: &str – End date and time in yyyy-mm-dd format or yyyy-MM-dd’T’HH:mm:ss’Z’ format, the same formats supported by the from parameter.

    .

  • owner_type: &str – The owner type. The allowed values are null, user, or callQueue. The default is null. If null, returns all owner types. .

  • recording_type: &str – The recording type. The allowed values are null, OnDemand, or Automatic. The default is null. If null, returns all recording types. .

  • site_id: &str – The site ID. The default is All sites.

  • query_date_type: crate::types::QueryDateType – Date types:
    start_time - Query by call start time.
    end_time - Query by call end time.

Source

pub async fn get_all_recordings( &self, from: &str, to: &str, owner_type: &str, recording_type: &str, site_id: &str, query_date_type: QueryDateType, ) -> Result<Response<Vec<GetPhoneRecordingsResponse>>, ClientError>

Get call recordings.

This function performs a GET to the /phone/recordings endpoint.

As opposed to get_recordings, this function returns all the pages of the request at once.

Use this API to list an account’s call recordings

Scopes: phone:read:admin, phone:write:admin,phone_recording:read:admin

Prerequisties:

  • A Pro or higher account plan
  • A Zoom Phone license
  • Account owner or admin privileges
Source

pub async fn list_byocsip_trunk( &self, next_page_token: &str, page_size: i64, ) -> Result<Response<Vec<ByocSipTrunk>>, ClientError>

List BYOC SIP trunks.

This function performs a GET to the /phone/sip_trunk/trunks endpoint.

Use this API to return a list of an account’s assigned BYOC (Bring Your Own Carrier) SIP (Session Initiation Protocol) trunks.

Scopes: phone:write:admin or phone:master
Rate Limit Label: Light

Prerequisites:

  • A Business or Enterprise account

Parameters:

  • next_page_token: &str – The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes.
  • page_size: i64 – The number of records returned within a single API call.
Source

pub async fn list_all_byocsip_trunk( &self, ) -> Result<Response<Vec<ByocSipTrunk>>, ClientError>

List BYOC SIP trunks.

This function performs a GET to the /phone/sip_trunk/trunks endpoint.

As opposed to list_byocsip_trunk, this function returns all the pages of the request at once.

Use this API to return a list of an account’s assigned BYOC (Bring Your Own Carrier) SIP (Session Initiation Protocol) trunks.

Scopes: phone:write:admin or phone:master
Rate Limit Label: Light

Prerequisites:

  • A Business or Enterprise account
Source

pub async fn post_sip_trunk( &self, account_id: &str, body: &PostPhoneSipTrunkRequest, ) -> Result<Response<PostPhoneSipTrunkRequest>, ClientError>

Assign SIP trunks.

This function performs a POST to the /accounts/{accountId}/phone/sip_trunk/trunks endpoint.

A Master account owner can use this API to assign SIP (Session Initiation Protocol) trunks to a subaccount.

Scopes: phone:master
Rate Limit Label: Light

Prerequisites:

  • A Business or Enterprise account

Parameters:

  • account_id: &str – Unique identifier of the account.
Source

pub async fn update_sip_trunk( &self, sip_trunk_id: &str, account_id: &str, body: &UpdatePhoneSipTrunkRequest, ) -> Result<Response<()>, ClientError>

Update SIP trunk details.

This function performs a PATCH to the /accounts/{accountId}/phone/sip_trunk/trunks/{sipTrunkId} endpoint.

Use this API to update a subaccount’s assigned SIP (Session Initiation Protocol) trunk information.

Scopes: phone:master
Rate Limit Label: Light

Prerequisites:

  • A Business or Enterprise account

Parameters:

  • sip_trunk_id: &str – Unique identifier of the SIP trunk.
  • account_id: &str – Unique identifier of the sub account.
Source

pub async fn list_external_contacts( &self, next_page_token: &str, page_size: i64, ) -> Result<Response<Vec<ExternalContacts>>, ClientError>

List external contacts.

This function performs a GET to the /phone/external_contacts endpoint.

Use this API to list external contacts.

Scopes: phone:read:admin
Rate Limit Label: Light

Prerequisites:

  • Pro or a higher account with Zoom Phone license
  • Account owner or admin permissions

Parameters:

  • next_page_token: &str – The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes.
  • page_size: i64 – The number of records returned within a single API call.
Source

pub async fn list_all_external_contacts( &self, ) -> Result<Response<Vec<ExternalContacts>>, ClientError>

List external contacts.

This function performs a GET to the /phone/external_contacts endpoint.

As opposed to list_external_contacts, this function returns all the pages of the request at once.

Use this API to list external contacts.

Scopes: phone:read:admin
Rate Limit Label: Light

Prerequisites:

  • Pro or a higher account with Zoom Phone license
  • Account owner or admin permissions
Source

pub async fn add_external_contact( &self, body: &AddExternalContactRequest, ) -> Result<Response<()>, ClientError>

Add an external contact.

This function performs a POST to the /phone/external_contacts endpoint.

Use this API to add an external contact.

Scopes: phone:write:admin
Rate Limit Label: Light

Prerequisites:

  • Pro or a higher account with Zoom Phone license
  • Account owner or admin permissions
Source

pub async fn get_external_contact( &self, external_contact_id: &str, ) -> Result<Response<ExternalContacts>, ClientError>

Get external contact details.

This function performs a GET to the /phone/external_contacts/{externalContactId} endpoint.

Use this API to get an external contact’s information.

Scopes: phone:write:admin
Rate Limit Label: Light

Prerequisites:

  • Pro or a higher account with Zoom Phone license
  • Account owner or admin permissions

Parameters:

  • external_contact_id: &str – The external contact’s ID.
Source

pub async fn delete_external_contact( &self, external_contact_id: &str, ) -> Result<Response<()>, ClientError>

Delete an external contact.

This function performs a DELETE to the /phone/external_contacts/{externalContactId} endpoint.

Use this API to remove an external contact.

Scopes: phone:write:admin
Rate Limit Label: Light

Prerequisites:

  • Pro or a higher account with Zoom Phone license
  • Account owner or admin permissions

Parameters:

  • external_contact_id: &str – The external contact’s ID.
Source

pub async fn update_external_contact( &self, external_contact_id: &str, body: &UpdateExternalContactRequest, ) -> Result<Response<()>, ClientError>

Update external contact.

This function performs a PATCH to the /phone/external_contacts/{externalContactId} endpoint.

Use this API to update an external contact’s information.

Scopes: phone:write:admin
Rate Limit Label: Light

Prerequisites:

  • Pro or a higher account with Zoom Phone license
  • Account owner or admin permissions

Parameters:

  • external_contact_id: &str – User’s first name.
Source

pub async fn get_number_details( &self, number_id: &str, ) -> Result<Response<GetPhoneNumberDetailsResponse>, ClientError>

Get phone number details.

This function performs a GET to the /phone/numbers/{numberId} endpoint.

Use this API to get information about an account’s Zoom Phone number.

Scopes: phone:read:admin
Rate Limit Label: Light

Prerequisites:

  • A Pro or higher account plan
  • A Zoom phone license

Parameters:

  • number_id: &str – Unique Identifier of the Phone Number. This can be retrieved from the List Phone Numbers API.
Source

pub async fn update_number_details( &self, number_id: &str, body: &UpdatePhoneNumberDetailsRequest, ) -> Result<Response<()>, ClientError>

Update phone number details.

This function performs a PATCH to the /phone/numbers/{numberId} endpoint.

Use this API to update a Zoom Phone number’s information.

Scopes: phone:write, phone:write:admin, phone:master
Rate Limit Label: Light

Prerequisites:

  • A Paid account

Parameters:

  • number_id: &str – User’s first name.
Source

pub async fn change_main_company_number( &self, body: &ChangeMainCompanyNumberRequest, ) -> Result<Response<()>, ClientError>

Change main company number.

This function performs a PUT to the /phone/company_number endpoint.

Use this API to change an account’s main company number.

External users can use the main company number to reach your Zoom Phone users by dialing the main company number and the user’s extension. It can also be used by your account’s Zoom Phone users as their caller ID when making calls.

Scopes: phone:write:admin
Rate Limit Label: Light

Prerequisites:

  • A Pro or higher account plan
  • Account owner or admin permissions
Source

pub async fn list_calling_plan( &self, ) -> Result<Response<ListCallingPlansResponseData>, ClientError>

List calling plans.

This function performs a GET to the /phone/calling_plans endpoint.

Use this API to return all of an account’s Zoom Phone calling plans.

Scopes: phone:read:admin
Rate Limit Label: Medium

Prerequisites:

  • A Pro or a higher account
  • A Zoom Phone license
Source

pub async fn list_users( &self, page_size: i64, next_page_token: &str, site_id: &str, ) -> Result<Response<Vec<ListPhoneUsersResponse>>, ClientError>

List phone users.

This function performs a GET to the /phone/users endpoint.

Use this API to return a list of all of an account’s users who are assigned a Zoom Phone license.

Scopes: phone:read:admin
Rate Limit Label: Light

Prerequisites:

  • A Pro or higher account plan
  • A Zoom Phone license

Parameters:

  • page_size: i64 – The number of records returned from a single API call.
  • next_page_token: &str – The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes.
  • site_id: &str – Unique Identifier of the site. This can be retrieved from the List Phone Sites API.
Source

pub async fn list_all_users( &self, site_id: &str, ) -> Result<Response<Vec<ListPhoneUsersResponse>>, ClientError>

List phone users.

This function performs a GET to the /phone/users endpoint.

As opposed to list_users, this function returns all the pages of the request at once.

Use this API to return a list of all of an account’s users who are assigned a Zoom Phone license.

Scopes: phone:read:admin
Rate Limit Label: Light

Prerequisites:

  • A Pro or higher account plan
  • A Zoom Phone license
Source

pub async fn get_call_log_details( &self, call_log_id: &str, ) -> Result<Response<GetCallLogDetailsResponse>, ClientError>

Get call log details.

This function performs a GET to the /phone/call_logs/{callLogId} endpoint.

Use this API to return information about a call log.

Scopes: phone:read, phone:read:admin, phone_call_log:read, phone_call_log:read:admin
Rate Limit Label: Heavy

Prerequisites:

  • A Business or Enterprise account
  • A Zoom Phone license

Parameters:

  • call_log_id: &str – Unique identifier of the call log. Both callLogId and callId can be used as path parameters. The value for this field can be retrieved from account’s call logs or the user’s call logs.
Source

pub async fn delete_call_log( &self, user_id: &str, call_log_id: &str, ) -> Result<Response<()>, ClientError>

Delete a user’s call log.

This function performs a DELETE to the /phone/users/{userId}/call_logs/{callLogId} endpoint.

Use this API to delete a user’s call log. For user-level apps, pass the me value instead of the userId parameter.

Scopes: phone:write, phone:write:admin, phone_call_log:write, phone_call_log:write:admin
Rate Limit Label: Light

Prerequisites:

  • User must belong to a Business or Enterprise account
  • User must have a Zoom Phone license

Parameters:

  • user_id: &str – The user ID or email address of the user.
  • call_log_id: &str – Unique identifier of the call log. The value for this field can be retrieved from account’s call logs or user’s call logs.
Source

pub async fn add_byoc_number( &self, body: &AddByocNumberRequest, ) -> Result<Response<AddByocNumberResponse>, ClientError>

Add BYOC phone numbers.

This function performs a POST to the /phone/byoc_numbers endpoint.

Use this API to add BYOC (Bring Your Own Carrier) phone numbers to Zoom Phone.

Scopes: phone:write:admin, phone:write, or phone:master
Rate Limit Label: Light

Prerequisites:

  • A Business or Enterprise plan
  • A Zoom Phone license
Source

pub async fn delete_voicemail( &self, voicemail_id: &str, ) -> Result<Response<()>, ClientError>

Delete a voicemail.

This function performs a DELETE to the /phone/voice_mails/{voicemailId} endpoint.

Use this API to delete an account’s voicemail message.

Scopes: phone:write:admin, phone:write, phone_voicemail:write, phone_voicemail:write:admin
Rate Limit Label: Light

Prerequisites:

  • A Zoom Phone license

Parameters:

  • voicemail_id: &str – Unique identifier of the voicemail. Retrieve the value for this field by calling the Get voicemails API.

Auto Trait Implementations§

§

impl Freeze for Phone

§

impl !RefUnwindSafe for Phone

§

impl Send for Phone

§

impl Sync for Phone

§

impl Unpin for Phone

§

impl !UnwindSafe for Phone

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,