Send_SMS
  • 16 Oct 2024
  • 1 Minute to read
  • Dark
    Light
  • PDF

Send_SMS

  • Dark
    Light
  • PDF

Article summary

Post
/api/v1/{api_key}/sendsms

Enables agents to send SMS messages via the API. Agents are identified by their extensions (agent parameter). The destination numbers are specified in the number parameter.

Header parameters
Content-Type
Required
Valid values[ "application/json" ]
Path parameters
api_key
stringRequired
Example{contact_center_api_key}
Body parameters
object
agent
integer (int32) Required

Agent extension

number
string Required

Destination phone number

body
string Required

SMS body. 1-1600 chars. Links are not supported in SMS

sender_id
string

Your call center SenderID. If this field is empty, a random SenderID from the 'Default' group is used. The request fails if you have no SenderIDs configured

crm
string

Name of sending application or CRM

account_id
string

The CRM Account ID for the contact at the destination number. This parameter may also be used when you specify the crm parameter.

Responses
200

All parameters are valid and the SMS sending is successful.

example1

Success

SMS successfully sent

{
  "sms_id": "cf283919-86f4-46a6-8b45-29bd7a752827",
  "segments": 1
}
Example{ "sms_id": "cf283919-86f4-46a6-8b45-29bd7a752827", "segments": 1 }
sms_id
string (uuid)
segments
integer (int32)
400

Incorrect body parameters

sms_error_types

One of the Error Messages from 'SMS Error Types'

One of the Error Messages from 'SMS Error Types'

{
  "error": "SMS is not allowed"
}
object
Example{ "error": "SMS is not allowed" }
403

Invalid api_key

example1

Error1

Invalid API key

{
  "error": "Invalid api_key"
}
Example{ "error": "Invalid api_key" }

Was this article helpful?

What's Next