Send a VMS campaign

Encoding : UTF-8

Authentication

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

Definition

Note: You must turn on VOICE SMS in Addition services to use this API

This sends a Voice SMS in modes:

  • simple (1 contact)
  • campaign (up to 500 contacts)
    You must indicate your phone numbers in the "recipients" parameter, which is an array containing objects of type "contact".

Special parameters

NameTypeDescription
textstringMessage text (from 1 to 1224 characters).
recipientsarray[{'phone_number': '+111222233334444'},...,{'phone_number': '+2222333334444555'}]
senderstringSender of the message (if the user allows it), 3-11 alphanumeric characters (a-zA-Z0-9).
send_atstringWhen you want to send the Voice Sms campaign. Format: DateTime ISO8601 (for ex: "2018-10-03T07:42:39-07:00").
purposestringCampaign purpose: (transactional/alert or marketing) : ['alert','wholesale'].
typestringType ['voice_sms']
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’].
auto_remove_blacklisted_numbersbooleanThis value is "true" when you want to send with ignore blacklisted numbers.
get_back_pressed_keysbooleanThis value is "true" when you want to get back pressed key.
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.

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)

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

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

Bad request

{
  "code": 400,
  "message": "Payload validation error.",
  "errors": {
    "voice_language": {
      "code": 442,
      "message": "Voice language not supported."
    }
  }
}
Language
Click Try It! to start a request and see the response here!