Skip to main content

HighVolumeSmsService

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

MethodsDescription
aggregate_a2_psms_statusesRetrieves a set of message counts by message status and error codes filtered by dates, batchId and message direction.
list_a2_psmsReturns the list of outbound/inbound A2P messages sent from/to A2P phone numbers of the current account. The list can be filtered by message batch ID and/or phone number.
read_a2_psmsReturns the details of an A2P SMS message by ID.
read_a2_psms_opt_outsReturns the list of numbers opted out from the account. The list can be filtered by to/from phone number query parameters. Specifying text/csv in the Accept header lets download the data in the CSV format.
add_a2_psms_opt_outsAdds multiple opt-outs and/or opt-ins for the specified sender number and a set of recipient numbers.
list_a2_p_batchesReturns the list of A2P batches sent from the current account. The list can be filtered by message batch ID and/or from phone number.
create_a2_psmsAllows to send high volume of A2P (Application-to-Person) SMS messages (in message batches). Only phone number with the A2PSmsSender feature can be used as a sender.
read_a2_p_batchReturns information on a message batch.

aggregate_a2_psms_statuses

Retrieves a set of message counts by message status and error codes filtered by dates, batchId and message direction.

  • HTTP Method: GET
  • Endpoint: /restapi/v1.0/account/{accountId}/a2p-sms/statuses

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)
batch_idstrInternal identifier of a message batch to filter the response
directionSmsDirectionEnumDirection of a message to filter the message list result. By default, there is no filter applied - both Inbound and Outbound messages are returned
date_fromstrThe end of the time range to filter the results in ISO 8601 format including timezone. Default is the 'dateTo' minus 24 hours
date_tostrThe end of the time range to filter the results in ISO 8601 format including timezone. Default is the current time
phone_numberList[str]List of phone numbers (specified in 'to' or 'from' fields of a message) to filter the results. Maximum number of phone numbers allowed to be specified as filters is 15

Return Type

MessageStatusesResponse

Example Usage Code Snippet

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

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)
phone_number=[
"phoneNumber"
]

result = sdk.high_volume_sms.aggregate_a2_psms_statuses(
account_id="~",
batch_id="batchId",
direction="Inbound",
date_from="dateFrom",
date_to="dateTo",
phone_number=phone_number
)

print(result)

list_a2_psms

Returns the list of outbound/inbound A2P messages sent from/to A2P phone numbers of the current account. The list can be filtered by message batch ID and/or phone number.

  • HTTP Method: GET
  • Endpoint: /restapi/v1.0/account/{accountId}/a2p-sms/messages

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)
batch_idstrInternal identifier of a message batch to filter the response
directionSmsDirectionEnumDirection of a message to filter the message list result. By default, there is no filter applied - both Inbound and Outbound messages are returned
date_fromstrThe end of the time range to filter the results in ISO 8601 format including timezone. Default is the 'dateTo' minus 24 hours
date_tostrThe end of the time range to filter the results in ISO 8601 format including timezone. Default is the current time
viewListA2PsmsViewIndicates if the response has to be detailed, includes text in the response if detailed
phone_numberList[str]List of phone numbers (specified in 'to' or 'from' fields of a message) to filter the results. Maximum number of phone numbers allowed to be specified as filters is 15
page_tokenstrThe page token of the page to be retrieved.
per_pageintThe number of messages to be returned per request

Return Type

MessageListResponse

Example Usage Code Snippet

from ring_central import RingCentral, Environment
from ring_central.models import SmsDirectionEnum, ListA2PsmsView

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)
phone_number=[
"phoneNumber"
]

result = sdk.high_volume_sms.list_a2_psms(
account_id="~",
batch_id="batchId",
direction="Inbound",
date_from="dateFrom",
date_to="dateTo",
view="Simple",
phone_number=phone_number,
page_token="pageToken",
per_page=1000
)

print(result)

read_a2_psms

Returns the details of an A2P SMS message by ID.

  • HTTP Method: GET
  • Endpoint: /restapi/v1.0/account/{accountId}/a2p-sms/messages/{messageId}

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)
message_idstrInternal identifier of a message to be retrieved

Return Type

MessageDetailsResponse

Example Usage Code Snippet

from ring_central import RingCentral, Environment

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

result = sdk.high_volume_sms.read_a2_psms(
account_id="~",
message_id="messageId"
)

print(result)

read_a2_psms_opt_outs

Returns the list of numbers opted out from the account. The list can be filtered by to/from phone number query parameters. Specifying text/csv in the Accept header lets download the data in the CSV format.

  • HTTP Method: GET
  • Endpoint: /restapi/v1.0/account/{accountId}/a2p-sms/opt-outs

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)
from_strThe sender's phone number in E.164 format for filtering messages. The asterisk value "*" means any number in from field
tostrThe receiver's phone number (to field) in E.164 format for filtering messages
statusReadA2PsmsOptOutsStatusThe status (opted out, opted in, or both) to be used as the filter
page_tokenstrThe page token of the page to be retrieved
per_pageintThe number of records to be returned for the page

Return Type

OptOutListResponse

Example Usage Code Snippet

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

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

result = sdk.high_volume_sms.read_a2_psms_opt_outs(
account_id="~",
from_="from",
to="to",
status="optout",
page_token="pageToken",
per_page=1000
)

print(result)

add_a2_psms_opt_outs

Adds multiple opt-outs and/or opt-ins for the specified sender number and a set of recipient numbers.

  • HTTP Method: POST
  • Endpoint: /restapi/v1.0/account/{accountId}/a2p-sms/opt-outs/bulk-assign

Parameters

NameTypeRequiredDescription
request_bodyOptOutBulkAssignRequestThe 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

OptOutBulkAssignResponse

Example Usage Code Snippet

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

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

request_body = OptOutBulkAssignRequest(
from_="+15551234455",
opt_outs=[
"optOuts"
],
opt_ins=[
"optIns"
]
)

result = sdk.high_volume_sms.add_a2_psms_opt_outs(
request_body=request_body,
account_id="~"
)

print(result)

list_a2_p_batches

Returns the list of A2P batches sent from the current account. The list can be filtered by message batch ID and/or from phone number.

  • HTTP Method: GET
  • Endpoint: /restapi/v1.0/account/{accountId}/a2p-sms/batches

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)
date_fromstrThe end of the time range to filter the results in ISO 8601 format including timezone. Default is the 'dateTo' minus 24 hours
date_tostrThe end of the time range to filter the results in ISO 8601 format including timezone. Default is the current time
from_strPhone number in E.164 format from which the messages are going to be sent
statusList[ListA2PBatchesStatus]A list of batch statuses to filter the results
page_tokenstrThe page token of the page to be retrieved
per_pageintThe number of records to be returned per page

Return Type

BatchListResponse

Example Usage Code Snippet

from ring_central import RingCentral, Environment

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)
status=[
"Queued"
]

result = sdk.high_volume_sms.list_a2_p_batches(
account_id="~",
date_from="dateFrom",
date_to="dateTo",
from_="from",
status=status,
page_token="pageToken",
per_page=3
)

print(result)

create_a2_psms

Allows to send high volume of A2P (Application-to-Person) SMS messages (in message batches). Only phone number with the A2PSmsSender feature can be used as a sender.

  • HTTP Method: POST
  • Endpoint: /restapi/v1.0/account/{accountId}/a2p-sms/batches

Parameters

NameTypeRequiredDescription
request_bodyMessageBatchCreateRequestThe 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

MessageBatchResponse

Example Usage Code Snippet

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

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

request_body = MessageBatchCreateRequest(
from_="+15551234567",
text="Hello, World!",
messages=[
{
"to": [
"to"
],
"text": "Hello, World!"
}
]
)

result = sdk.high_volume_sms.create_a2_psms(
request_body=request_body,
account_id="~"
)

print(result)

read_a2_p_batch

Returns information on a message batch.

  • HTTP Method: GET
  • Endpoint: /restapi/v1.0/account/{accountId}/a2p-sms/batches/{batchId}

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)
batch_idstrInternal identifier of a message batch to be retrieved

Return Type

MessageBatchResponse

Example Usage Code Snippet

from ring_central import RingCentral, Environment

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

result = sdk.high_volume_sms.read_a2_p_batch(
account_id="~",
batch_id="batchId"
)

print(result)

Build Your Own SDKs with  liblab

Build developer friendly SDKs in minutes from your APIs

Start for Free →