Send SMS description

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: Send SMS


Purpose

The Send SMS API enables agents to send SMS messages using either a custom message body or a predefined SMS template.

Prerequisites

  • SMS must be enabled for your contact center
  • The agent must have an extension configured
  • The Display SMS functionality in WebRTC feature must be enabled for the agent's security access group
  • You must have access to your contact center API key
  • A Sender ID must be configured and allowed in your contact center

Request Options

You can send an SMS in one of two ways:

1. Send a custom SMS

Use the body parameter to send a message with custom content.

2. Send a template-based SMS

Use the template object with id and params to populate placeholders in a predefined canned message.

Note: Only one of body or template must be present in a request.


Parameters

ParameterDescriptionTypeRequiredNotes
agentThe agent's contact center phone extensionstringYes
numberThe SMS recipient's phone number in E.164 format (no + sign)stringYes
bodyThe custom SMS message body (1–1600 chars)stringYes*Required if template is not used
sender_idThe originating phone number shown to the recipientstringNo
crmThe name of an external CRM or applicationstringNo
account_idContact's CRM identifierstringNoUsed in conjunction with crm
template.idID of the canned message templateintegerYes*Required if body is not used
template.paramsKey-value pairs to populate template placeholdersobjectYes*Keys must match template placeholders

Request Examples

Send a custom SMS

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

Send a template-based SMS

{
  "agent": "5151",
  "number": "18885658889",
  "template": {
    "id": 174,
    "params": {
      "contact_name": "Tony",
      "agent_name": "John"
    }
  }
}

Response

The following table describes the elements of the response.

ElementDescriptionTypeNotes
sms_idUUID of the interaction stored in the Call Detail RecordstringUse this ID to retrieve details using the List CDRs API
segmentsNumber of message segments (applies to free-text messages)numberAutomatically calculated based on body length

Response Sample

{
  "sms_id": "ab52fd83-770c-4069-aaee-x951139x9xf6",
  "segments": 1
}

Troubleshooting

Error MessageDescription
Invalid keyCheck your contact center API key
Invalid agent extensionMake sure the extension exists and is assigned to an agent
SenderID is not availableEnsure you have a configured Sender ID in your contact center
Invalid destination numberMust be in E.164 format (no + sign)
SMS body length must be 1-1600 charsApplies to free-text messages only
The request must include a valid template_id...When using a template, template.id is required
The provided template_params do not match placeholdersCheck that your params match the template's placeholders exactly
SMS is not allowed / disabled for agent / rate limit etc.General SMS restrictions or agent-level permissions