Schedule Voice SMS Sending

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

Encodage : UTF-8

Authentification

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

Definition

Allows you to send a deferred voice SMS indicating your sending date in ISO format.

Special parameters

NameTypeDescription
textstringMessage text (from 1 to 1224 characters non unicode).
recipientsarrayList of Contact objects array of objects:
[
  {
    "phone_number": "+111222233334444",
    "param1": "Alex",
    "param2": null,
    "param3": null,
    "param4": null,
    "param5": null,
  },
  ...,
  {
    "phone_number": "+2222333334444555",
    "param1": "John",
  }
]
senderstringSender of the message (if the user allows it), 3-11 alphanumeric characters (a-zA-Z0-9).
send_atstring‘When you want to send the sms campaign. Format: DateTime ISO8601 (for ex: “2018-10-03T07:42:39-07:00”).’
purposestringCampaign purpose: (transactional/alert or marketing) : [“alert”,”wholesale”]
voice_genderstringVoice gender [‘male’, ‘female’]
voice_languagestringVoice Language [‘en-US’, ‘en-GB’, ‘el-GR’, ‘pl-PL’, ‘hu-HU’, ‘sv-SE’, ‘de-DE’, ‘es-ES’, ‘es-LA’, ‘fr-FR’, ‘it-IT’, ‘pt-BR’, ‘ru-RU’]
simulation_modeboolean(optional) If this value is “true”, your request will be simulated, and you will receive a fake result. Only some minimal validations will be executed.
request_idstring(optional) To avoid sending same request multiple times, setup an request ID. In case the duplication will be detected, a validation error will be returned. A request_id will expire after 24 hours.

Curl Example

curl -X POST \ 
'https://api.octopush.com/v1/public/voice-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",
         "param1": "Alex"
      }
   ],
   "text": "You have one VoiceSMS.",
   "purpose": "alert",
   "sender": "12345",
   "send_at": "2018-10-03T07:42:39-07:00",
   "voice_gender": "female",
   "voice_language": "en-GB"
}'

JSON Server Response

Success : 201 CREATED

{
  "ticket_number": "voice_5f44ebf9e47b7",
  "number_of_contacts": 1,
  "total_cost": 0.05,
  "estimated_duration": 30,
  "residual_credit": 149.95
}

Failure : 400 Bad Request

{
   "code": 400,
   "message": "Payload validation error.",
   "errors":
   {
      "voice_language":
      {
         "code": 442,
         "message": "Voice language not supported."
      }
   }
}