Deliveries

Send SMS

POST method to send an SMS through the API with your account.
Shipments will be sent instantly or scheduled according to the parameters added to the request. You have to provide your MASTER secret in the Authorization header

Parameters

Name Description
account_id required Your account unique identifier to access the API. This parameter is part of the authorization process
sender required MAX 11 characters. Parameter containing the name of who sent the message.
message_holder required Parameter containing the content of the message. this message can have interpolation's containers inserted as %{name_of_variable}. Example: "Hi, good morning %{name}"
deliveries required Parameter containing an array of hashes. those hashes contains key-value elements as phone number and replacements. Example: [{phone_number: "+447712345678", replacements: {"name": "Your name"}}]
deliveries[phone_number] required The phone number value has to be formated following the standart E164.
deliveries[replacements] required The replacements contains a hash with the values of the interpolation's containers
deliveries[multiple] if true send multiple sms items for unicode message or long messages.By default set to false.
start_now required Parameter to schedule the deliveries with the date provided with the parameter start_at.
start_at Parameter containing the date when the deliveries will be send. the date has to been formated following the ISO 8601. If the date introduced is before from now your deliveries will be send instantly.

Request

Route
POST 
/v2/account/:account_id/sms/deliveries
Headers
Accept: application/json 
Authorization: Token token={account.master_secret}
Content-Type: application/json
Body
{
  "sender": "CocaCola",
  "message_holder": "Hello %{name}, how are you?",
  "start_now": true,
  "deliveries": [
    {
      "phone_number": "+447712345678",
      "replacements": {
        "name": "John"
      }
    }
  ]
}

Response

Status
200
Body
{
  "deliveries": [
    {
      "valid": true,
      "delivery_id": "550ab6a1a096734ce5000002"
    }
  ]
}