Skip to content
Home » Octopush Gateway SMS API » Transactional SMS

Transactional SMS

Definition

This option is for NON-COMMERCIAL messages.

Examples :

Registration confirmations, payment, shipping control, sending alerts, appointment reminders, etc …

With this option, you can send your messages 24/7.

WARNING : Any errors or fraud committed by sending advertising messages with the “transactional SMS” option will result in fines as described in the Terms and Conditions.
Please use this option with caution.

URL

POST
https://api.octopush.com/v1/public/sms-campaign/send

Encoding: UTF-8

Special parameters

NameTypeDescription
textstringText message (from 1 to 1224 non unicode characters).
recipientsarrayObject List Contacts (array object) :
[
  {
    "phone_number": "+111222233334444",
    "first_name": "Axelle",
    "last_name": "Durand",
    "param1": null,
    "param2": null,
    "param3": Mr.,
    "param4": null,
    "param5": null
  },
  ...,
  {
    "phone_number": "+2222333334444555",
    "first_name": "John",
    "last_name": "Smith",
    "param3": "M"
  }
]
senderstringMessage sender (if the operator allows it), 3-11 alphanumeric characters with spaces (a-zA-Z0-9 ).
send_atstring(optional) Date in which you want to send the campaign. Format: DateTime ISO8601 (par ex: “2018-10-03T07:42:39-07:00”).’
purposestring(optional) Campaign goal (transactionnel/alerte ou marketing) : [“wholesale” (default), “alert”,]
with_repliesboolean(optional) “True” to receive responses from the destinataries
simulation_modeboolean(optional) If this field is in “true”, your request will be simulated, an you will receive fake results. Only some validations will take place.
request_idstring(optional) To avoid sending the same request several times, setup a request ID. In case of a duplication being detected, a validation error will be sent.
auto_optimize_textboolean(optional) If this field is transmit and there is a false value, your text will be optimized by Octopush robot (your message might have unicode characters, or unused espaces that could raise the number of SMS needed for each of your contacts).

Curl example

curl -X POST \ 
'https://api.octopush.com/v1/public/sms-campaign/send' \ 
-H 'Content-Type: application/json' \ 
-H 'api-key: ************' \ 
-H 'api-login: ******@email.org' \ 
-H 'cache-control: no-cache' \ 
-d '{
  "recipients": [{"phone_number": "+336000123"}],
  "text": "This is a Premium SMS with STOP mention. STOP to 30101",
  "type": "sms_premium",
  "purpose": "alert",
  "sender": "Company X"
}'

JSon Back

Success : 201 CREATED

{
  "sms_ticket": "sms_5f3fbce61266e",
  "number_of_contacts": 1,
  "number_of_sms_needed": 1,
  "residual_credit": 94.995,
  "total_cost": 5.00502839 
}

Failure : 400 BAD REQUEST

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

* For some OVH users, using the curl_setopt($ch, CURLOPT_FRESH_CONNECT, true); in their delivery sequence in CURL may be useful.