Send an SMS campaign

Encoding : UTF-8

Authentication

Your "api-key" and "api-login" identifiers must be added in the headers.

Definition

This is the service to send an SMS campaign and you can specify a sending date in ISO format.
As soon as the date you have specified has passed, we will send your SMS campaign.

Special parameters

NameTypeDescription
senderstringSender of the message (if the user allows it), 3-11 alphanumeric characters (a-zA-Z0-9).
send_atstringWhen you want to send the sms campaign. Format: DateTime ISO8601 (for ex: "2018-10-03T07:42:39-07:00").
textstringMessage text (from 1 to 1224 characters).
recipientsarrayList of Contact objects array of objects: [{'phone_number': '+111222233334444', 'first_name': 'Axelle', 'last_name':'Durand, 'param1': null, 'param2': null, 'param3': null, 'param4': null, 'param5': null},...,{'phone_number':'+2222333334444555', 'first_name': 'John', 'last_name': 'Smith', 'param3': 'M'}]
purposestringCampaign purpose: (transactional/alert or marketing) : ["alert","wholesale"]
auto_delete_optout_contactsbooleanThis value is "true" when you want to send with ignore optout contacts.
typestringCampaign Type: ["sms_premium","sms_low_cost"]
list_namestringThis is the value representing to list name you want to create for those contacts
with_repliesboolean"True" for getting back recipient replies
simulation_modebooleanIf this value is "true", your request will be simulated, and you will receive a fake result. Only some minimal validations will be executed.
recipient_trackingboolean"True" for getting back recipient tracking.
auto_optimize_textbooleanBy transmitting this field with "false" value, your text will not be optimized by Octopush robot (your message could contain unicode characters, or useless spaces that could increase the number of needed SMS for each contact).

How Our API Deals With Incorrect Data

The API we provide will try to interpret your request as best it can. If a parameter has the wrong value, we will try to understand it anyway. If the parameter has the wrong type, we will try to format it as best we can. Thus, we have determined default values, which are indicated in our documentation. If a parameter could not be recognized or "fixed", we will ignore it, but your request will be sent.
If one of your parameters does not have the right value, or does not have the right type, we will try to:

  • "cast" (convert) it so that it can be understood.
  • format it (delete prohibited characters for example)
  • replace it with the default value (if you do not specify the type of SMS correctly, we will use for example, Premium SMS)

Important Considerations

Be careful with the number of contacts per request. For campaigns, a good use is to transmit several frames of 200 to 500 numbers at a time.

  • < 200: you multiply calls and waste connection time.
  • 500: the frame becomes heavy and the risk of data loss increases.

Server Response Example in JSON

Success

{
  "sms_ticket": "sms_5f3fbce61266e",
  "number_of_contacts": 5,
  "total_cost": 5.00502839,
  "number_of_sms_needed": 5,
  "residual_credit": 50.75,
  "message": "******"
}

Bad request

{
  "code": 121,
  "message": "Mention STOP is missing."
}
Body Params

Payload to send sms campaign.

string | null
date-time
string
required
recipients
array of objects
length ≤ 100001
Defaults to
recipients
string
enum
Allowed:
string
boolean
Defaults to false
string
enum
Allowed:
boolean
boolean
boolean
Defaults to false
boolean
Headers
string
required

Your api login from your account

string
required

Your api key from your account

Responses

400

Bad request.

401

Unauthorized.

403

Forbidden to view.

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json