Skip to content

Send Message

Request

Send an SMS message. The bnum needs to be an AVANSER BNUM that the logged in user has access to send messages from. For more information about checking this, see the Mobile BNUMs section in the User Information documentation

Errors

Error CodeError TypeError Message
-1015MISSING-BNUMbnum field missing
-1016MISSING-EXTERNALexternal field missing
-1017MISSING-MESSAGEmessage field missing
-1023INVALID-BNUMUnable to parse BNUM number
-1022INVALID-EXTERNALUnable to parse EXTERNAL number
-1018SEND-MESSAGE-FAILEDUnable to send your message

SEND-MESSAGE-FAILED is a generic error returned if the message cannot be sent for an unspecified reason.

Security
accessToken
Query
bnumstringrequired

The AVANSER BNUM to send the message from, in AVANSER phone number format. The logged in user must have access to send messages from this BNUM.

Example:bnum=+61-0412345678
externalstringrequired

The phone number to send the message to, in AVANSER format, or local or international format.

Example:external=0498765432
messagestringrequired

The content to send in the message.

curl -i -X POST \
  'https://p3.avanser.com/app/sendmessage?bnum=%2B61-0412345678&external=0498765432&message=string&token=YOUR_API_KEY_HERE'

Responses

SMS submission result.

Bodyapplication/json
timestampintegerrequired

The time that the API response left the server, represented as the number of seconds since the UNIX epoch.

Example:1508903167
exectionnumber

The number of seconds that it took to process the API request.

Example:0.00041531896591187
errorbooleanrequired

Boolean indicating whether there was an error returned by the API request.

Example:false
datastringrequired

The data returned by the API. The format varies depending on the API function that was called.

Response
{ "timestamp": 1510101887, "exection": 0.00018191409111023, "error": false, "data": "+61-0412345678;+61-04987654321;12345" }