Methods

Objects

sms

Send and list SMS.

Method Description
sms.export_async Creates an export job to generate a CSV export based on search filters
sms.get Get informations on a sent or received SMS.
sms.get_count_for_body Returns the number of SMS that would be billed for a specific content....
sms.get_gsm_charset_mapping Returns the GSM 03.38 chars, and mapping used when forcing GSM encodin...
sms.get_list List your inbound or outbound SMS.
sms.get_quote Returns the cost of an SMS for a specific content and destination. Act...
sms.get_settings Get SMS settings. DEPRECATED. To manager push URLs, you should use web...
sms.search Search through SMS sent or received by your account within the last 6 ...
sms.send Send a text message.
sms.set_settings Set SMS settings. DEPRECATED. To set push URLs, you should use webhook...

Methods

sms.export_async

Description

Creates an export job to generate a CSV export based on search filters

Signature

method: sms.export_async

params: [object filters, object webhook]

Parameters

Parameter Type Description NULL
filters object Search filters
Object: SMS.SearchFilters
YES
webhook object Dynamic webhook for this export. Status updates (e.g. when the export is available) will be sent to this specific webhook. You only need to set 'endpoint' and optionally 'options'.
Object: Webhook
YES

Result

Type Description Format/Object
string Job ID Format: hid (Unique object identifier)

sms.get

Description

Get informations on a sent or received SMS.

Signature

method: sms.get

params: [string id]

Parameters

Parameter Type Description NULL
id string SMS ID
Format: hash (Unique object identifier)
NO

Result

Type Description Format/Object
object SMS Object Object: SMS

See Also

sms.get_count_for_body

Description

Returns the number of SMS that would be billed for a specific content. Actual sending may result in a different count, depending on the final carrier.

This method is DEPRECATED and may be removed in the future.
Relying on this method is highly discouraged.

Signature

method: sms.get_count_for_body

params: [string body]

Parameters

Parameter Type Description NULL
body string Text message NO

Result

Type Description Format/Object
object Number of SMS billed and encoding Object: SMS.Quote

sms.get_gsm_charset_mapping

Description

Returns the GSM 03.38 chars, and mapping used when forcing GSM encoding

Signature

method: sms.get_gsm_charset_mapping

params: []

Parameters

No parameters.

Result

Type Description Format/Object
array Charset mapping

sms.get_list

Description

List your inbound or outbound SMS.

This method is DEPRECATED and may be removed in the future.
Relying on this method is highly discouraged.

Signature

method: sms.get_list

params: [string type, string from, string to]

Parameters

Parameter Type Description NULL
type string Type of SMS.
Values: "IN", "OUT"
NO
from string Retrieve from date.
Format: datetime (YYYY-MM-DD HH:MM:SS in UTC timezone. Example: "2012-04-24 23:42:00")
NO
to string Retrieve to date.
Format: datetime (YYYY-MM-DD HH:MM:SS in UTC timezone. Example: "2012-04-24 23:42:00")
NO

Result

Type Description Format/Object
array SMS list Array of SMS objects.

See Also

sms.get_quote

Description

Returns the cost of an SMS for a specific content and destination. Actual sending may result in a different count, depending on the final carrier.

Signature

method: sms.get_quote

params: [string to, string text, object options]

Parameters

Parameter Type Description NULL
to string Destination number
Format: phone_number (International E.164 format "+CCNSN". Example: "+16467890800", "+447890123456", or "+33678912345")
NO
text string Text message NO
options object Options what you would use with sms.send
Object: SMS.Options
YES

Result

Type Description Format/Object
object Number of SMS billed, encoding, and cost Object: SMS.Quote

sms.get_settings

Description

Get SMS settings. DEPRECATED. To manager push URLs, you should use webhooks!

This method is DEPRECATED and may be removed in the future.
Relying on this method is highly discouraged.

Signature

method: sms.get_settings

params: []

Parameters

No parameters.

Result

Type Description Format/Object
object SMS settings Object: SMS.Settings

See Also

sms.search

Description

Search through SMS sent or received by your account within the last 6 months.

Signature

method: sms.search

params: [object filters, object options]

Parameters

Parameter Type Description NULL
filters object Search filters
Object: SMS.SearchFilters
NO
options object Search options
Object: Search.Options
NO

Result

Type Description Format/Object
object Search results Object: Search.Results

sms.send

Description

Send a text message.

Signature

method: sms.send

params: [string from, string to, string body, object options]

Parameters

Parameter Type Description NULL
from string The SMS sender. If empty, a shared shortcode will be automatically selected depending on the destination carrier. Otherwise, it must be either a dedicated shortcode, or alphanumeric (at least one character - cannot be digits only).
Max length = 11 characters.
Depending on your account configuration, you may have to ask our support team to authorize custom Sender IDs. "SMS" is always authorized.
Format: sms_sender (a-zA-Z0-9, space, dash, underscore - must contain at least one alpha character)
NO
to string The SMS recipient.
Format: phone_number (International E.164 format "+CCNSN". Example: "+16467890800", "+447890123456", or "+33678912345")
NO
body string Text message. We auto-detect the encoding needed (GSM 03.38 or UNICODE), or you can force the encoding with options.force_encoding (see the "options" parameter). You always send UTF-8 JSON strings - encoding is done at SMS interconnections level. Depending on the encoding, messages may be split into parts at 153 (GSM) or 67 (UNICODE) characters.

One SMS sent with this method may be billed as multiple SMS parts. You can check the number of parts sent with the method "sms.get".

If you are using a custom sender, you can use the special string %STOPNUM% -- it will be replaced by the STOP number.

Max length = 3200 characters.
NO
options object SMS Options. Send NULL to use default values.
Object: SMS.Options
YES

Result

Type Description Format/Object
string SMS ID Format: hash (Unique object identifier)

See Also

sms.set_settings

Description

Set SMS settings. DEPRECATED. To set push URLs, you should use webhooks!

This method is DEPRECATED and may be removed in the future.
Relying on this method is highly discouraged.

Signature

method: sms.set_settings

params: [object settings]

Parameters

Parameter Type Description NULL
settings object SMS settings . Partial object is allowed (send only what you want to change.).
Object: SMS.Settings
NO

Result

Type Description Format/Object
object Updated settings Object: SMS.Settings