SMS/SEND command
The "sms/send" command is used to send a SMS message to a destination. It can be used for implementing click2sms type features inside any external application (for example, an CRM).
After the sending process has been finished Accolades can notify an external server, using a http(s) request, with the transmission status (message sent or an error has occurred).
Command structure
To start the request, a http request must be sent to the url:
https://client.voipit.ro/<accountNumber>/sms/send
The following parameters will be sent, using the POST method:
- password
- The API password for this account.
- phoneNumber
- The phone number where the SMS will be sent (destination number).
- message
- The SMS message that will be send to the destination.
- sendResultTo
- (optional) A URL where Accolades will send a status notification with the SMS result (sent or error), after the sending process has been finished.
- messageId
- (optional) An id (as a text) that will be included in the notification described above.
Server response
If the request was processed successfully then a JSON package will be sent back:
{ "type" : "ok" }
Status notification
If the parameter "sendResultTo" is defined and has a value then, after the sending process has been finished, Accolades will start a http(s) request to the URL defined in the sendResultTo parameter. The following parameters will be send:
- apiName
- ("sms") The name of this API (the parameter can be used to distinguish between the various API systems of the Accolades platform when the destination server uses the same script to process multiple APIs).
- type
- ("deliveryReport") The type of this package, relative to this API
- status
- ("sent" or "error") the result of the transmission process: sent (the message was delivered to the carrier) or error (a transmission error has occurred)
- id
- (text) The id of the SMS message, as it was defined in the original request
- errorMessage
- (text) (available only if the status parameter is error) The description of the error thrown by the sending process.