Skip to main content
Wiretap Telecom

Send an SMS or MMS

posthttps://sms.wiretaptelecom.com/smsapis/SendSMS

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

Header

The Bearer Token from Company Settings → API Keys, sent as Authorization: Bearer <token>.

apikey

Query

The 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.

fromstringRequired

The number the message is sent from, in E.164 without the plus. It must be SMS-enabled on your account.

Example: 14055551234

tostring[]Required

The numbers receiving the message, in E.164 without the plus. Messages sent in any other format will not be delivered.

Example: ["13055551234","18135551234"]

textstringRequired

The body of the message.

Example: This is a test

mediaUrlsstring[]

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"]

referenceIdstring

Your 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

200

The gateway accepted the request. Read schema.resultResponses for the outcome of each recipient, since one bad number does not fail the whole batch.

successboolean

Whether the gateway accepted the request as a whole.

Example: true

reasonstring

Short result code for the request.

Example: SUCCESS

detailstring

Longer description of the reason.

Example: SUCCESS

schemaobject

The message as the gateway recorded it, with a result per recipient.

referenceIdstring

The id tracking the message. If you supplied one in the request it repeats here.

Example: h4Tk44ks21iR

fromstring

The number the message was sent from.

Example: 14055551234

textstring

The body that was sent.

Example: This is a test

resultResponsesobject[]

One entry per recipient.

tostring

A number that received the message.

Example: 13055551234

statusstring

The outcome for that number.

Example: SUCCESS

400

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.

successboolean

False on every rejected request.

Example: false

reasonstring

Short code for what went wrong, such as NOT_AUTHORIZED.

Example: NOT_AUTHORIZED

detailstring

Longer 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.

Required
Required
Required
cURL
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

Example
{
  "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.

Generated from the OpenAPI spec for Messaging API v1.0.0.