Send an SMS or MMS
Sends one message to one or more mobile numbers. Supplying mediaUrls turns the message into an MMS, which bills at the MMS rate. The sending number has to be SMS-enabled under Core-SMS → Manage Numbers and covered by a registered 10DLC campaign, or carriers will block the traffic.
Authorization
Every call carries both credentials. They come from the same screen in the portal and are not interchangeable.
Authorization
HeaderThe Bearer Token from Company Settings → API Keys, sent as Authorization: Bearer <token>.
apikey
QueryThe Auth Token from the same screen, sent as the apikey query parameter. It is a distinct value from the bearer token.
Request body
The message to send.
fromstringRequiredThe number the message is sent from, in E.164 without the plus. It must be SMS-enabled on your account.
Example:
14055551234tostring[]RequiredThe numbers receiving the message, in E.164 without the plus. Messages sent in any other format will not be delivered.
Example:
["13055551234","18135551234"]textstringRequiredThe body of the message.
Example:
This is a testmediaUrlsstring[]Publicly reachable URLs of the images to attach. Supplying this field converts the message to an MMS, and additional messaging rates apply.
Example:
["https://wiretaptelecom.com/assets/img/logo.png"]referenceIdstringYour own id for the message. If you send one it is echoed back in the response, which is how you tie a result to a record on your side.
Example:
iosd84ndi9
Responses
The gateway accepted the request. Read schema.resultResponses for the outcome of each recipient, since one bad number does not fail the whole batch.
successbooleanWhether the gateway accepted the request as a whole.
Example:
truereasonstringShort result code for the request.
Example:
SUCCESSdetailstringLonger description of the reason.
Example:
SUCCESSschemaobjectThe message as the gateway recorded it, with a result per recipient.
referenceIdstringThe id tracking the message. If you supplied one in the request it repeats here.
Example:
h4Tk44ks21iRfromstringThe number the message was sent from.
Example:
14055551234textstringThe body that was sent.
Example:
This is a testresultResponsesobject[]One entry per recipient.
tostringA number that received the message.
Example:
13055551234statusstringThe outcome for that number.
Example:
SUCCESS
Bad input parameter, or credentials the gateway would not take. The body is the same envelope as a success, with success false and a reason naming the problem.
successbooleanFalse on every rejected request.
Example:
falsereasonstringShort code for what went wrong, such as
NOT_AUTHORIZED.Example:
NOT_AUTHORIZEDdetailstringLonger description of the reason.
Example:
NOT_AUTHORIZED
Try it
Request builder
Edit the fields and the samples rewrite themselves. Turn on live mode to run the call against your own account.
curl -X POST 'https://sms.wiretaptelecom.com/smsapis/SendSMS?apikey=YOUR_AUTH_TOKEN' \
-H 'Authorization: Bearer YOUR_BEARER_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"from": "14055551234",
"to": [
"13055551234",
"18135551234"
],
"text": "This is a test",
"mediaUrls": [
"https://wiretaptelecom.com/assets/img/logo.png"
],
"referenceId": "iosd84ndi9"
}'Response
{
"success": true,
"reason": "SUCCESS",
"detail": "SUCCESS",
"schema": {
"referenceId": "h4Tk44ks21iR",
"from": "14055551234",
"text": "This is a test",
"resultResponses": [
{
"to": "13055551234",
"status": "SUCCESS"
}
]
}
}Doing this without code?
The same ground, covered from the portal and the PBX side.