Send message
Overview
This command allows you to send one or more SMS messages. The server will respond with a unique identifier for each message. You can also send to multiple handsets in one single HTTPS request (up to 200 messages). This is useful if you are sending the same message text to multiple handsets.
The base URL for all API call strings is: https://platform.clickatell.com/messages
JSON
Request
POST /messages Content-Type: application/json Accept: application/json Authorization: [Your Authorization Token] { "content" : "string" , "to" : [ "+380976543211" , "380976543212" ], "from" : "380671234567" , "binary" : false , "clientMessageId" : "uuid" , "scheduledDeliveryTime" : "2017-02-27T14:30:00+0200" , "userDataHeader" : "0605040B8423F0" , "validityPeriod" : 1 , "charset" : "UTF-8" } |
Response
202 Accepted Content-Type: application/json { "messages" : [ { "apiMessageId" : "af750c2dc53e4e4c88c39b3b48756d3a" , "accepted" : true , "to" : "1234567980" , "errorCode" : null , "error" : null , "errorDescription" : null }, { "apiMessageId" : "abcdec2dc53e4e4c88c39b3b48756d3a" , "accepted" : true , "to" : "09876543210" , "errorCode" : null , "error" : null , "errorDescription" : null } ], "errorCode" : null , "error" : null , "errorDescription" : null } |
XML
Request
POST /messages Content-Type: application/xml Accept: application/xml Authorization: [Your Authorization Token] <? xml version = "1.0" ?> < SendMessageRequest > < Content >string</ Content > < To >+380685555555</ To > < From >380671234567</ From > < Binary >false</ Binary > < ClientMessageId >id</ ClientMessageId > < ScheduledDeliveryTime >2017-02-27T14:30:00+0200</ ScheduledDeliveryTime > < UserDataHeader >0605040B8423F0</ UserDataHeader > < ValidityPeriod >1</ ValidityPeriod > < Charset >UTF-8</ Charset > </ SendMessageRequest > |
Response
202 Accepted Content-Type: application/xml <? xml version = "1.0" encoding = "UTF-8" standalone = "yes" ?> < SendMessagesResponse > < Messages > < Message > < ApiMessageId >174319bc027f45d989728093cc170107</ ApiMessageId > < Accepted >true</ Accepted > < To >380685555555</ To > </ Message > </ Messages > </ SendMessagesResponse > |
Did you find this information informative?
Submit a Comment
Other Resources
Ask the Community
Visit Stack Overflow to join our community of developers and find the answer you need
Contact Support
Contact our support team and one of our agents will be in touch with you to answer any questions you have