Skip to content
Home » Octopush Gateway SMS API » Two-ways SMS

Two-ways SMS

Encoding : UTF-8


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


When sending to mainland France (you may inquire regarding other destinations), you can activate the “SMS answer” option.
The sender is replaced by a short number, at no charge, to which which your recipients can reply.

Receiving replies

3 ways to get the replies:

  • On the interface: you have access to your replies either by country or by date.
  • Email: send us an email to which we will reply with the answers as soon as they arrive.
  • By Callback: send us a URL that we can use to send you the answers. > Read more

Special parameters

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 (marketing or transactional/alert) : [“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 \ 
'' \ 
-H 'Content-Type: application/json' \ 
-H 'api-key: ************' \ 
-H 'api-login: ******' \ 
-H 'cache-control: no-cache' \ 
-d '{
  "recipients": [
      "phone_number": "+336000123",
      "first_name": "Axelle",
      "last_name": "Durand",
      "param3": "Mrs."
  "text": "This is a Premium SMS with STOP mention. STOP to 30101",
  "purpose": "wholesale",
  "sender": "12345",
  "with_replies": true

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.