Skip to main content

CallForwardingService

A list of all methods in the CallForwardingService service. Click on the method name to view detailed information about that method.

MethodsDescription
list_forwarding_numbersReturns the list of extension phone numbers used for call forwarding and call flip. The returned list contains all the extension phone numbers used for call forwarding and call flip.
create_forwarding_numberAdds a new forwarding number to the forwarding number list.
delete_forwarding_numbersDeletes multiple forwarding numbers from the forwarding number list by IDs.
read_forwarding_numberReturns a specific forwarding number.
update_forwarding_numberUpdates the existing forwarding number from the forwarding number list.
delete_forwarding_numberDeletes a forwarding number from the forwarding number list by its ID.

list_forwarding_numbers

Returns the list of extension phone numbers used for call forwarding and call flip. The returned list contains all the extension phone numbers used for call forwarding and call flip.

  • HTTP Method: GET
  • Endpoint: /restapi/v1.0/account/{accountId}/extension/{extensionId}/forwarding-number

Parameters

NameTypeRequiredDescription
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
extension_idstrInternal identifier of the RingCentral extension/user (can be set to "~" to indicate that the extension associated with current authorization session should be used)
pageintThe result set page number (1-indexed) to return
per_pageintThe number of items per page. If provided value in the request is greater than a maximum, the maximum value is applied

Return Type

GetExtensionForwardingNumberListResponse

Example Usage Code Snippet

from ring_central import RingCentral, Environment

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

result = sdk.call_forwarding.list_forwarding_numbers(
account_id="~",
extension_id="~",
page=1,
per_page=100
)

print(result)

create_forwarding_number

Adds a new forwarding number to the forwarding number list.

  • HTTP Method: POST
  • Endpoint: /restapi/v1.0/account/{accountId}/extension/{extensionId}/forwarding-number

Parameters

NameTypeRequiredDescription
request_bodyCreateForwardingNumberRequestThe request body.
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
extension_idstrInternal identifier of the RingCentral extension/user (can be set to "~" to indicate that the extension associated with current authorization session should be used)

Return Type

ForwardingNumberInfo

Example Usage Code Snippet

from ring_central import RingCentral, Environment
from ring_central.models import CreateForwardingNumberRequest

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

request_body = CreateForwardingNumberRequest(
flip_number=2,
phone_number="phoneNumber",
label="label",
type_="PhoneLine",
device={
"id_": "id"
}
)

result = sdk.call_forwarding.create_forwarding_number(
request_body=request_body,
account_id="~",
extension_id="~"
)

print(result)

delete_forwarding_numbers

Deletes multiple forwarding numbers from the forwarding number list by IDs.

  • HTTP Method: DELETE
  • Endpoint: /restapi/v1.0/account/{accountId}/extension/{extensionId}/forwarding-number

Parameters

NameTypeRequiredDescription
request_bodyDeleteForwardingNumbersRequestThe request body.
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
extension_idstrInternal identifier of the RingCentral extension/user (can be set to "~" to indicate that the extension associated with current authorization session should be used)

Example Usage Code Snippet

from ring_central import RingCentral, Environment
from ring_central.models import DeleteForwardingNumbersRequest

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

request_body = DeleteForwardingNumbersRequest(
records=[
{
"forwarding_number_id": "forwardingNumberId"
}
]
)

result = sdk.call_forwarding.delete_forwarding_numbers(
request_body=request_body,
account_id="~",
extension_id="~"
)

print(result)

read_forwarding_number

Returns a specific forwarding number.

  • HTTP Method: GET
  • Endpoint: /restapi/v1.0/account/{accountId}/extension/{extensionId}/forwarding-number/{forwardingNumberId}

Parameters

NameTypeRequiredDescription
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
extension_idstrInternal identifier of the RingCentral extension/user (can be set to "~" to indicate that the extension associated with current authorization session should be used)
forwarding_number_idstrInternal identifier of a forwarding number (returned in response in the 'id' field)

Return Type

ForwardingNumberResource

Example Usage Code Snippet

from ring_central import RingCentral, Environment

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

result = sdk.call_forwarding.read_forwarding_number(
account_id="~",
extension_id="~",
forwarding_number_id="forwardingNumberId"
)

print(result)

update_forwarding_number

Updates the existing forwarding number from the forwarding number list.

  • HTTP Method: PUT
  • Endpoint: /restapi/v1.0/account/{accountId}/extension/{extensionId}/forwarding-number/{forwardingNumberId}

Parameters

NameTypeRequiredDescription
request_bodyUpdateForwardingNumberRequestThe request body.
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
extension_idstrInternal identifier of the RingCentral extension/user (can be set to "~" to indicate that the extension associated with current authorization session should be used)
forwarding_number_idstrInternal identifier of a forwarding number (returned in response in the 'id' field)

Return Type

ForwardingNumberInfo

Example Usage Code Snippet

from ring_central import RingCentral, Environment
from ring_central.models import UpdateForwardingNumberRequest

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

request_body = UpdateForwardingNumberRequest(
phone_number="phoneNumber",
label="label",
flip_number="flipNumber",
type_="Home"
)

result = sdk.call_forwarding.update_forwarding_number(
request_body=request_body,
account_id="~",
extension_id="~",
forwarding_number_id="forwardingNumberId"
)

print(result)

delete_forwarding_number

Deletes a forwarding number from the forwarding number list by its ID.

  • HTTP Method: DELETE
  • Endpoint: /restapi/v1.0/account/{accountId}/extension/{extensionId}/forwarding-number/{forwardingNumberId}

Parameters

NameTypeRequiredDescription
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
extension_idstrInternal identifier of the RingCentral extension/user (can be set to "~" to indicate that the extension associated with current authorization session should be used)
forwarding_number_idstrInternal identifier of a forwarding number (returned in response in the 'id' field)

Example Usage Code Snippet

from ring_central import RingCentral, Environment

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

result = sdk.call_forwarding.delete_forwarding_number(
account_id="~",
extension_id="~",
forwarding_number_id="forwardingNumberId"
)

print(result)

Build Your Own SDKs with  liblab

Build developer friendly SDKs in minutes from your APIs

Start for Free →