Prompts

Prompts are reusable elements that enable organisations setup default actions that should occur in special cases in order to prompt a subscriber to do something.

Language Selectors

Language selectors are a re-usable prompt that allows subscribers with unknown languages to choose their language on their first call/SMS interaction. You can create multiple language selectors with different combinations and orderings of languages to use with different calls.

Create A Language Selector

Method: POST

URL: https://go.votomobile.org/api/v1/prompts/languages/selectors

Parameters:

  • api_key
  • title: Title of the language selector
  • sms_content : The sms content for the language selector. Eg. For English Press 1, An wumdi Dagbani dihi mi ayi (2).
  • audio_file_id: The audio file ID of the language selector.
  • max_repeat_times: number of times the language selector should be repeated while waiting for input from user
  • language_ids: the language ids in a specified order.

Returns:

ID of the language

{
  "status": 200,
  "code": 5007,
  "data": null,
  "message": "Language Selector created successfully.",
  "more_info": "",
  "pagination": null,
  "url": "https://go.votomobile.org/api/v1/prompts/languages/selectors?api_key=52417bceed6733.97793746&title=&sms_content=skjab%20dkjasbd&audio_file_id=5&language_ids=4,2,1"
}

List Language Selectors

Method: GET

URL: https://go.votomobile.org/api/v1/prompts/languages/selectors

Parameters:

  • api_key

Returns:

{
  "status": 200,
  "code": 5000,
  "data": [
    {
      "id": "8",
      "name": "Hello There",
      "language_ids": "",
      "audio_file_id": "0",
      "max_repeat_times": "1",
      "sms_content": "Somkans dland labsd kasfval kfhbahl kfnaskfjba slkf",
      "created_at": "2015-09-28 21:55:45",
      "updated_at": "2015-09-28 21:55:45"
    },
    {
      "id": "9",
      "name": "adasnm,anf",
      "language_ids": "",
      "audio_file_id": "0",
      "max_repeat_times": "1",
      "sms_content": "",
      "created_at": "2015-10-10 19:08:49",
      "updated_at": "2015-10-10 19:08:49"
    },
    {
      "id": "10",
      "name": "dsg sdg",
      "language_ids": "",
      "audio_file_id": "0",
      "max_repeat_times": "1",
      "sms_content": "fdgsh dds d",
      "created_at": "2015-10-21 13:03:34",
      "updated_at": "2015-10-21 13:03:34"
    },
    {
      "id": "11",
      "name": "sa",
      "language_ids": "1",
      "audio_file_id": "0",
      "max_repeat_times": "1",
      "sms_content": "scd ds",
      "created_at": "2015-10-26 17:24:40",
      "updated_at": "2015-10-26 17:24:40"
    },
    {
      "id": "13",
      "name": "language-selector-2015-10-26-05:55:51pm",
      "language_ids": "4,2,1",
      "audio_file_id": "5",
      "max_repeat_times": "1",
      "sms_content": "skjab dkjasbd",
      "created_at": "2015-10-26 17:55:51",
      "updated_at": "2015-10-26 17:55:51"
    },
    {
      "id": "14",
      "name": "language-selector-2015-10-26-06:39:44pm",
      "language_ids": "4,2,1",
      "audio_file_id": "5",
      "max_repeat_times": "1",
      "sms_content": "skjab dkjasbd",
      "created_at": "2015-10-26 18:39:44",
      "updated_at": "2015-10-26 18:39:44"
    }
  ],
  "message": null,
  "more_info": "Language Selectors fetched successfully.",
  "pagination": null,
  "url": "https://go.votomobile.org/api/v1/prompts/languages/selectors?api_key=52417bceed6733.97793746"
}

List Language Selector Details

Method: GET

URL: https://go.votomobile.org/api/v1/prompts/languages/selectors/[language_selector_id]

Parameters:

  • api_key

Returns:

{
  "status": 200,
  "code": 5000,
  "data": [
    {
      "id": "8",
      "name": "Hello There",
      "language_ids": "",
      "audio_file_id": "0",
      "max_repeat_times": "1",
      "sms_content": "Somkans dland labsd kasfval kfhbahl kfnaskfjba slkf",
      "created_at": "2015-09-28 21:55:45",
      "updated_at": "2015-09-28 21:55:45"
    }
  ],
  "message": null,
  "more_info": "Language Selectors fetched successfully.",
  "pagination": null,
  "url": "https://go.votomobile.org/api/v1/prompts/languages/selectors?api_key=52417bceed6733.97793746"
}

Delete Language Selector

Method: DELETE

URL: https://go.votomobile.org/api/v1/prompts/languages/selectors

Parameters: Specify language selector id to delete

  • api_key

Returns:

{"status":200,"code":5009,data":null,"message":"language selector deleted succesfully"}