Skip to main content

IvrService

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

MethodsDescription
read_ivr_prompt_contentReturns media content of an IVR prompt by ID.
list_ivr_promptsReturns the list of IVR prompts.
create_ivr_promptCreates an IVR prompt.
read_ivr_promptReturns an IVR prompt by ID.
update_ivr_promptUpdates an IVR prompt by ID
delete_ivr_promptDeletes an IVR prompt by ID.
read_ivr_menu_listReturns a company IVR menus.
create_ivr_menuCreates a company IVR menu.
read_ivr_menuReturns a company IVR menu by ID.
update_ivr_menuUpdates a company IVR menu by ID.

read_ivr_prompt_content

Returns media content of an IVR prompt by ID.

  • HTTP Method: GET
  • Endpoint: /restapi/v1.0/account/{accountId}/ivr-prompts/{promptId}/content

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)
prompt_idstrInternal identifier of an IVR prompt
content_dispositionContentDispositionWhether the content is expected to be displayed in the browser, or downloaded and saved locally
content_disposition_filenamestrThe default filename of the file to be downloaded

Return Type

any

Example Usage Code Snippet

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

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

result = sdk.ivr.read_ivr_prompt_content(
account_id="~",
prompt_id="promptId",
content_disposition="Inline",
content_disposition_filename="contentDispositionFilename"
)

print(result)

list_ivr_prompts

Returns the list of IVR prompts.

  • HTTP Method: GET
  • Endpoint: /restapi/v1.0/account/{accountId}/ivr-prompts

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)

Return Type

IvrPrompts

Example Usage Code Snippet

from ring_central import RingCentral, Environment

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

result = sdk.ivr.list_ivr_prompts(account_id="~")

print(result)

create_ivr_prompt

Creates an IVR prompt.

  • HTTP Method: POST
  • Endpoint: /restapi/v1.0/account/{accountId}/ivr-prompts

Parameters

NameTypeRequiredDescription
request_bodydictThe 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)

Return Type

PromptInfo

Example Usage Code Snippet

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

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

request_body = {
"attachment": "attachment",
"name": "name"
}

result = sdk.ivr.create_ivr_prompt(
request_body=request_body,
account_id="~"
)

print(result)

read_ivr_prompt

Returns an IVR prompt by ID.

  • HTTP Method: GET
  • Endpoint: /restapi/v1.0/account/{accountId}/ivr-prompts/{promptId}

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)
prompt_idstrInternal identifier of an IVR prompt

Return Type

PromptInfo

Example Usage Code Snippet

from ring_central import RingCentral, Environment

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

result = sdk.ivr.read_ivr_prompt(
account_id="~",
prompt_id="promptId"
)

print(result)

update_ivr_prompt

Updates an IVR prompt by ID

  • HTTP Method: PUT
  • Endpoint: /restapi/v1.0/account/{accountId}/ivr-prompts/{promptId}

Parameters

NameTypeRequiredDescription
request_bodyUpdateIvrPromptRequestThe 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)
prompt_idstrInternal identifier of an IVR prompt

Return Type

PromptInfo

Example Usage Code Snippet

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

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

request_body = UpdateIvrPromptRequest(
filename="filename"
)

result = sdk.ivr.update_ivr_prompt(
request_body=request_body,
account_id="~",
prompt_id="promptId"
)

print(result)

delete_ivr_prompt

Deletes an IVR prompt by ID.

  • HTTP Method: DELETE
  • Endpoint: /restapi/v1.0/account/{accountId}/ivr-prompts/{promptId}

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)
prompt_idstrInternal identifier of an IVR prompt

Example Usage Code Snippet

from ring_central import RingCentral, Environment

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

result = sdk.ivr.delete_ivr_prompt(
account_id="~",
prompt_id="promptId"
)

print(result)

read_ivr_menu_list

Returns a company IVR menus.

  • HTTP Method: GET
  • Endpoint: /restapi/v1.0/account/{accountId}/ivr-menus

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)

Return Type

IvrMenuList

Example Usage Code Snippet

from ring_central import RingCentral, Environment

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

result = sdk.ivr.read_ivr_menu_list(account_id="~")

print(result)

create_ivr_menu

Creates a company IVR menu.

  • HTTP Method: POST
  • Endpoint: /restapi/v1.0/account/{accountId}/ivr-menus

Parameters

NameTypeRequiredDescription
request_bodyIvrMenuInfoThe 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)

Return Type

IvrMenuInfo

Example Usage Code Snippet

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

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

request_body = IvrMenuInfo(
id_="id",
uri="uri",
name="name",
extension_number="extensionNumber",
site={
"id_": "id",
"name": "name"
},
prompt={
"mode": "Audio",
"audio": {
"uri": "uri",
"id_": "id"
},
"text": "text",
"language": {
"uri": "uri",
"id_": "id",
"name": "name",
"locale_code": "localeCode"
}
},
actions=[
{
"input": "input",
"action": "Connect",
"extension": {
"uri": "uri",
"id_": "id",
"name": "name"
},
"phone_number": "phoneNumber"
}
]
)

result = sdk.ivr.create_ivr_menu(
request_body=request_body,
account_id="~"
)

print(result)

read_ivr_menu

Returns a company IVR menu by ID.

  • HTTP Method: GET
  • Endpoint: /restapi/v1.0/account/{accountId}/ivr-menus/{ivrMenuId}

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)
ivr_menu_idstrInternal identifier of an IVR menu

Return Type

IvrMenuInfo

Example Usage Code Snippet

from ring_central import RingCentral, Environment

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

result = sdk.ivr.read_ivr_menu(
account_id="~",
ivr_menu_id="ivrMenuId"
)

print(result)

update_ivr_menu

Updates a company IVR menu by ID.

  • HTTP Method: PUT
  • Endpoint: /restapi/v1.0/account/{accountId}/ivr-menus/{ivrMenuId}

Parameters

NameTypeRequiredDescription
request_bodyIvrMenuInfoThe 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)
ivr_menu_idstrInternal identifier of an IVR menu

Return Type

IvrMenuInfo

Example Usage Code Snippet

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

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

request_body = IvrMenuInfo(
id_="id",
uri="uri",
name="name",
extension_number="extensionNumber",
site={
"id_": "id",
"name": "name"
},
prompt={
"mode": "Audio",
"audio": {
"uri": "uri",
"id_": "id"
},
"text": "text",
"language": {
"uri": "uri",
"id_": "id",
"name": "name",
"locale_code": "localeCode"
}
},
actions=[
{
"input": "input",
"action": "Connect",
"extension": {
"uri": "uri",
"id_": "id",
"name": "name"
},
"phone_number": "phoneNumber"
}
]
)

result = sdk.ivr.update_ivr_menu(
request_body=request_body,
account_id="~",
ivr_menu_id="ivrMenuId"
)

print(result)

Build Your Own SDKs with  liblab

Build developer friendly SDKs in minutes from your APIs

Start for Free →