SMS API - Send an SMS

This page explains how to send an SMS using the TeleSign SMS API directly from our docs site, without writing any code.

Before You Begin

Ensure that you have the following:

Steps

  1. Open the reference page for the POST /v1/messaging endpoint.
  2. Under the AUTHENTICATION header in the right panel of the page, put your Customer ID in the username field and your API key in the password field.
  3. Go to the middle panel of the page, under FORM DATA. In the phone_number field enter the phone number you want to use to try out the Explorer.
  4. In the message field enter a test message, such as "hello world".
  5. In the message field enter a message type, such as "MKT" for a marketing message.
  6. Click Try It! in the right panel to see your transaction. You will be charged the standard rate for your transaction, and you are subject to all compliance rules as appropriate for your transaction.
  7. You can also click the copy icon to the left of Try It! to copy the code snippet displayed. To change the programming language of the snippet, select one of the options under the LANGUAGE header in the right sidebar.

Congratulations! You've sent your first SMS using the TeleSign SMS API and generated your first code snippet!

Examples

Request

POST /v1/messaging HTTP/1.1
Authorization: Basic 12345678-9ABC-DEF0-1234-56789ABCDEF0:Uak4fcLTTH/Tv8c/Q6QMwl5t4ck=
Content-Type: application/x-www-form-urlencoded
Host: rest-ww.telesign.com
phone_number=15551212&message=Your message here.&account_lifecycle_event=create&originating_ip=203.0.113.45&external_id=CustomExternalID7349

Response

HTTP/1.1 200 OK
Content-Type: application/json
{
  "external_id": "CustomExternalID7349",
  "reference_id": "0123456789ABCDEF0123456789ABCDEF",
  "phone_number_modified": "False",
  "status": {
    "code": 290,
    "updated_on": "2017-31-03T14:51:28.709526Z",
    "description": "Message in progress"
  }
}

What’s Next

This section offers some suggestions for next steps to take.

Did this page help you?