Send SMS

API Docs by APIMATIC
API OverviewSms

Send SMS
#

Send SMS
#

Use the send SMS API to enable external applications to send SMS through Voiso. For example, you can use it to allow agents to send an SMS from your CRM. Please refer to the detailed API endpoint specification here.

Limitations:

  • The 'send SMS' API does not currently allow you to send bulk SMS.
  • You can send up to 20 SMS messages to a specific number per day.

Prerequisites
#

Making requests
#

Note: The 'send SMS' API uses a POST request. Request and response payloads are formatted as JSON, using UTF-8 encoding and URL-encoded values.

Authentication
#

The send SMS API requires the base URL (cluster_id) and the contact center API key.

Request parameters
#

The send SMS API uses the following parameters.

The agent parameter is the agent's extension. It tells Voiso who should get the interaction assigned.

The body parameter is the SMS message. It must be between 1 and 1600 characters in length. 160 characters is the limit of a single SMS. Voiso divides longer messages into segments and delivers them as multiple messages.

The sender_id parameter is the phone number displayed to the recipient when they receive the SMS. You must have at least one Sender ID configured for your contact center to send SMS.

The number parameter is the destination number to send the message to.

The number must be specified in E.164 format without the preceding '+'. For example: 447414992548

With these basic parameters, you can make a simple request:

POST  https://cluster1.voiso.com/api/v1/cc7c96b89...fb89b00ab6c3/sendsms

Request body:    
{    
    "agent": "2003",
    "number": "155555564242",
    "body": "Check out our latest offer!",
    "sender_id": "15554009188"
}

To make more advanced requests, you can include optional parameters.

The crm parameter is the name of the external sending application, such as a CRM, helpdesk, or another service. Once you specify the crm parameter, the corresponding interactions will be flagged with this parameter in the logs (CDR). This can be useful for reporting and debugging purposes.

The account_id parameter represents the CRM account ID for the contact. You should provide this parameter only when the crm parameter is in place.

Here is an example of a complete request:

POST  https://cluster1.voiso.com/api/v1/cc7c96b89...fb89b00ab6c3/sendsms

Request body:    
{    
    "agent": "2003",
    "number": "155555564242",
    "body": "Check out our latest offer!",
    "sender_id": "15554009188",
    "CRM": "Salesforce",
    "account_id": "3MVG9fe4g9fhX0E7U2AC"
}

Troubleshooting
#

The following issues are sometimes encountered:

Invalid key
#

The send SMS API requires the contact center API key to validate the request. If you see this error, "error": "Invalid key", check that you use the correct contact center API key. For more information about API keys, refer to Authentication.

Invalid agent extension
#

If you see this error,"error": "Invalid agent extension", the extension specified is either in the wrong format or is not assigned to any agent. Ensure the agent's extension is correctly formatted.

SenderID is not available
#

If you see this error,"error": "SenderID is not available", the Sender ID specified is either in the wrong format or does not exist. Ensure you have a valid Sender ID configured for your contact center and it is specified correctly.

Invalid destination number
#

If you see this error, "error": "Invalid destination number", it means that the outbound phone number is not in E.164 format or the number does not exist. Verify the phone number is correct and in the correct format without the preceding '+'. For example: 4407414992548

SMS body length must be 1-1600 chars
#

If you see this error, "error": "SMS body length must be 1-1600 chars", it means that the message is either blank or is more than 1600 characters in length. Either add a message body or edit it to fit the character limit.