{"_id":"5a0426151534c4001a99d377","project":"54eb50e5615ffc1900305a16","version":{"_id":"54eb63b859b1172100334fae","project":"54eb50e5615ffc1900305a16","forked_from":"54eb63a1867e1917009b711d","__v":28,"createdAt":"2015-02-23T17:30:32.501Z","releaseDate":"2015-02-23T17:30:32.501Z","categories":["54eb63b959b1172100334faf","54eb63b959b1172100334fb0","54eb63b959b1172100334fb1","54eb63b959b1172100334fb2","54ed8dd4ab373e2300f50eae","54ed99b2ab373e2300f50ede","55153a6de68daa2f00cff838","551546edbc466623002afe72","5515472ac28d6125001b8884","55154749c28d6125001b8885","555d9b4106dfec0d00d38ea7","5613e06e433e5735007c7708","5624bbb785a31117001c5403","56669e857cc81e0d00253f8e","568b8d837a42220d00498311","56a632277ef6620d00e2f18a","56d8147c3eb4dd0b00201aac","57a9ce2fac6db30e000d7efd","57a9cf4e944ea60e00dc3f74","58172386715dce0f00da4aa0","582dc59ee1b8692300c0dd03","589b19b4fec2730f0082e040","58b04a023529383900a759b5","58b92d1598157a0f004869bf","592e7685c58275000f20174f","59392839e376d4002f8a0474","59393064e376d4002f8a05a1","5947ae0d4005e2000f3a4fec","594a74df1d1de5001ab3517a","5954bc387a147f001b918915","59b8eeeb707542001076d3b6"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1"},"category":{"_id":"56a632277ef6620d00e2f18a","pages":[],"project":"54eb50e5615ffc1900305a16","version":"54eb63b859b1172100334fae","__v":0,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-01-25T14:33:11.835Z","from_sync":false,"order":15,"slug":"text2speech-voice-messaging","title":"Voice Messaging"},"user":"583ee4a14828d50f00126d0f","__v":15,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-11-09T09:55:33.824Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"method":"post","examples":{"codes":[{"language":"json","code":"POST /tts/3/advanced HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nContent-Type: application/json\nAccept: application/json\n\n{\n   \"bulkId\": \"BULK-ID-123-xyz\",\n   \"messages\": [\n      {\n         \"from\": \"41793026700\",\n         \"destinations\": [\n            {\n               \"to\": \"41793026727\",\n               \"messageId\": \"MESSAGE-ID-123-xyz\"\n            },\n            {\n               \"to\": \"41793026731\"\n            }\n         ],\n         \"text\": \"Test Voice message.\",\n         \"language\": \"en\",\n         \"speechRate\": 1,\n         \"notifyUrl\": \"http://www.example.com/voice/advanced\",\n         \"notifyContentType\": \"application/json\",\n         \"callbackData\":\"DLR callback data\",\n         \"validityPeriod\": 720,\n         \"sendAt\": \"2016-07-07T17:00:00.000+01:00\",\n         \"record\": false,\n         \"repeatDtmf\": \"123#\",\n         \"maxDtmf\":1,\n         \"ringTimeout\": 45,\n         \"dtmfTimeout\": 10,\n         \"callTimeout\": 130,\n         \"machineDetection\": \"DISABLE\",\n         \"pause\": 3,\n         \"retry\": {\n            \"minPeriod\": 1,\n           \t\"maxPeriod\": 5,\n            \"maxCount\":5\n         },\n         \"sendingSpeed\": {\n         \t\t\"speed\": 10,\n            \"timeUnit\": \"hour\"\n         }\n      },\n      {\n         \"from\": \"41793026700\",\n         \"destinations\": [\n            {\n               \"to\": \"41793026785\"\n            }\n         ],\n         \"text\": \"A long time ago, in a galaxy far.\",\n         \"sendAt\": \"2016-07-07T18:00:00.000+01:00\"\n      }\n   ],\n   \"tracking\":{\n         \"track\": \"VOICE\",\n         \"type\": \"MY_CAMPAIGN\"\n   }\n}","name":""},{"language":"curl","code":"curl -X POST \\\n-H \"Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\" \\\n-H \"Content-Type: application/json\" \\\n-H \"Accept: application/json\" \\\n-d '{\n   \"bulkId\":\"BULK-ID-123-xyz\",\n   \"messages\":[\n      {\n         \"from\":\"41793026700\",\n         \"destinations\":[\n            {\n               \"to\":\"41793026727\",\n               \"messageId\":\"MESSAGE-ID-123-xyz\"\n            },\n            {\n               \"to\":\"41793026731\"\n            }\n         ],\n         \"text\": \"Test Voice message.\",\n         \"language\": \"en\",\n         \"speechRate\":1,\n         \"notifyUrl\":\"http://www.example.com/voice/advanced\",\n         \"notifyContentType\":\"application/json\",\n         \"validityPeriod\": 720,\n         \"sendAt\":\"2016-07-07T17:00:00.000+01:00\",\n         \"record\": false,\n         \"repeatDtmf\": \"123#\",\n         \"maxDtmf\": 1\n         \"ringTimeout\": 45,\n         \"dtmfTimeout\": 10,\n         \"callTimeout\": 130,\n         \"machineDetection\": \"DISABLE\",\n         \"pause\": 3,\n         \"retry\": {\n            \"minPeriod\":1,\n           \t\"maxPeriod\": 5,\n            \"maxCount\":5\n         },\n         \"sendingSpeed\": {\n         \t\t\"speed\": 10,\n            \"timeUnit\": \"hour\"\n         }\n      },\n      {\n         \"from\":\"41793026700\",\n         \"destinations\":[\n            {\n               \"to\":\"41793026785\"\n            }\n         ],\n         \"text\":\"A long time ago, in a galaxy far.\",\n         \"sendAt\":\"2016-07-07T18:00:00.000+01:00\"\n      }\n   ]\n}' \"http://api.infobip.com/tts/3/advanced\""},{"language":"php","code":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n  CURLOPT_URL => \"http://api.infobip.com/tts/3/advanced\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_POSTFIELDS => \"{ \n                          \\\"bulkId\\\": \\\"BULK-ID-123-xyz\\\",\n                          \\\"messages\\\": [\n                            {\n                              \\\"from\\\": \\\"41793026700\\\",\n                              \\\"destinations\\\": [\n                                {\n                                  \\\"to\\\": \\\"41793026727\\\",\n                                  \\\"messageId\\\": \\\"MESSAGE-ID-123-xyz\\\"\n                                },\n                                {\n                                  \\\"to\\\": \\\"41793026731\\\"\n                                }\n                              ],\n                              \\\"text\\\": \\\"Test Voice message.\\\",\n                              \\\"language\\\": \\\"en\\\",\n                              \\\"speechRate\\\": 1,\n                              \\\"notifyUrl\\\": \\\"http://www.example.com/voice/advanced\\\",\n                              \\\"notifyContentType\\\": \\\"application/json\\\",\n                              \\\"validityPeriod\\\": 720,\n                              \\\"sendAt\\\": \\\"2016-07-07T17:00:00.000+01:00\\\",\n                              \\\"record\\\": false,\n                              \\\"repeatDtmf\\\": \\\"123#\\\",\n                              \\\"maxDtmf\\\": 1,\n                              \\\"ringTimeout\\\": 45,\n                              \\\"dtmfTimeout\\\": 10,\n                              \\\"callTimeout\\\": 130,\n                              \\\"machineDetection\\\": \\\"DISABLE\\\",\n                              \\\"pause\\\": 3,\n                              \\\"retry\\\": {\n                                  \\\"minPeriod\\\": 1,\n           \t\t\t\t\t\t\t\t\t\t\t\t\\\"maxPeriod\\\": 5,\n            \t\t\t\t\t\t\t\t\t\t\t\\\"maxCount\\\": 5\n                                },\n                              \\\"sendingSpeed\\\": {\n         \t\t\t\t\t\t\t\t\t    \t\t\\\"speed\\\": 10,\n            \t\t\t\t\t\t\t\t\t\t\t\\\"timeUnit\\\": \\\"hour\\\"\n         \t\t\t\t\t\t\t\t\t\t\t }\n                            },\n                            {\n                              \\\"from\\\": \\\"41793026700\\\",\n                              \\\"destinations\\\": [\n                                {\n                                  \\\"to\\\": \\\"41793026785\\\"\n                                }\n                              ],\n                              \\\"text\\\": \\\"A long time ago, in a galaxy far.\\\",\n                              \\\"sendAt\\\": \\\"2016-07-07T18:00:00.000+01:00\\\"\n                            }\n                          ]\n                        }\",\n  CURLOPT_HTTPHEADER => array(\n    \"accept: application/json\",\n    \"authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\",\n    \"content-type: application/json\"\n  ),\n));\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"http://api.infobip.com/tts/3/advanced\")\n\nhttp = Net::HTTP.new(url.host, url.port)\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"authorization\"] = 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='\nrequest[\"content-type\"] = 'application/json'\nrequest[\"accept\"] = 'application/json'\nrequest.body = \"{ \n                \\\"bulkId\\\": \\\"BULK-ID-123-xyz\\\",\n                \\\"messages\\\": [\n                  {\n                    \\\"from\\\": \\\"41793026700\\\",\n                    \\\"destinations\\\": [\n                      {\n                        \\\"to\\\": \\\"41793026727\\\",\n                        \\\"messageId\\\": \\\"MESSAGE-ID-123-xyz\\\"\n                      },\n                      {\n                        \\\"to\\\": \\\"41793026731\\\"\n                      }\n                    ],\n                    \\\"text\\\": \\\"Test Voice message.\\\",\n                    \\\"language\\\": \\\"en\\\",\n                    \\\"speechRate\\\": 1,\n                    \\\"notifyUrl\\\": \\\"http://www.example.com/voice/advanced\\\",\n                    \\\"notifyContentType\\\": \\\"application/json\\\",\n                    \\\"validityPeriod\\\": 720,\n                    \\\"sendAt\\\": \\\"2016-07-07T17:00:00.000+01:00\\\",\n                    \\\"record\\\": false,\n                    \\\"repeatDtmf\\\": \\\"123#\\\",\n \t\t\t\t\t\t\t\t\t\t\\\"maxDtmf\\\": 1,\n                    \\\"ringTimeout\\\": 45,\n                    \\\"dtmfTimeout\\\": 10,\n                    \\\"callTimeout\\\": 130,\n                    \\\"machineDetection\\\": \\\"DISABLE\\\",\n\t\t\t\t\t\t\t\t\t\t\\\"pause\\\": 3,\n        \t\t\t\t\t\t\\\"retry\\\": {\n                      \\\"minPeriod\\\": 1,\n           \t\t\t\t\t\t\\\"maxPeriod\\\": 5,\n            \t\t\t\t\t\\\"maxCount\\\": 5\n                      },\n\t\t\t\t\t\t\t\t\t\t\\\"sendingSpeed\\\": {\n         \t\t\t\t\t\t\t\\\"speed\\\": 10,\n            \t\t\t\t\t\\\"timeUnit\\\": \\\"hour\\\"\n         \t\t\t\t\t\t}\n                  },\n                  {\n                    \\\"from\\\": \\\"41793026700\\\",\n                    \\\"destinations\\\": [\n                      {\n                        \\\"to\\\": \\\"41793026785\\\"\n                      }\n                    ],\n                    \\\"text\\\": \\\"A long time ago, in a galaxy far.\\\",\n                    \\\"sendAt\\\": \\\"2016-07-07T18:00:00.000+01:00\\\"\n                  }\n                ]\n              }\",\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"python","code":"import http.client\n\nconn = http.client.HTTPConnection(\"api.infobip.com\")\n\npayload = \"{ \n            \\\"bulkId\\\": \\\"BULK-ID-123-xyz\\\",\n            \\\"messages\\\": [\n              {\n                \\\"from\\\": \\\"41793026700\\\",\n                \\\"destinations\\\": [\n                  {\n                    \\\"to\\\": \\\"41793026727\\\",\n                    \\\"messageId\\\": \\\"MESSAGE-ID-123-xyz\\\"\n                  },\n                  {\n                    \\\"to\\\": \\\"41793026731\\\"\n                  }\n                ],\n                \\\"text\\\": \\\"Test Voice message.\\\",\n                \\\"language\\\": \\\"en\\\",\n                \\\"speechRate\\\": 1,\n                \\\"notifyUrl\\\": \\\"http://www.example.com/voice/advanced\\\",\n                \\\"notifyContentType\\\": \\\"application/json\\\",\n                \\\"validityPeriod\\\": 720,\n                \\\"sendAt\\\": \\\"2016-07-07T17:00:00.000+01:00\\\",\n                \\\"record\\\": false,\n                \\\"repeatDtmf\\\": \\\"123#\\\",\n             \t\t\\\"maxDtmf\\\": 1,\n                \\\"ringTimeout\\\": 45,\n                \\\"dtmfTimeout\\\": 10,\n                \\\"callTimeout\\\": 130,\n                \\\"machineDetection\\\": \\\"DISABLE\\\",\n            \t\t\\\"pause\\\": 3,\n            \t\t\\\"retry\\\": {\n                \t\t\\\"minPeriod\\\": 1,\n           \t\t\t\t\t\\\"maxPeriod\\\": 5,\n            \t\t\t\t\\\"maxCount\\\": 5\n                \t},\n          \t\t\t\\\"sendingSpeed\\\": {\n         \t\t\t\t\t\\\"speed\\\": 10,\n            \t\t\t\\\"timeUnit\\\": \\\"hour\\\"\n         \t\t\t\t}\n              },\n              {\n                \\\"from\\\": \\\"41793026700\\\",\n                \\\"destinations\\\": [\n                  {\n                    \\\"to\\\": \\\"41793026785\\\"\n                  }\n                ],\n                \\\"text\\\": \\\"A long time ago, in a galaxy far.\\\",\n                \\\"sendAt\\\": \\\"2016-07-07T18:00:00.000+01:00\\\"\n              }\n            ]\n          }\"\n\nheaders = {\n    'authorization': \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\",\n    'content-type': \"application/json\",\n    'accept': \"application/json\"\n    }\n\nconn.request(\"POST\", \"/tts/3/advanced\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"language":"java","code":"HttpResponse<String> response = Unirest.post(\"http://api.infobip.com/tts/3/advanced\")\n  .header(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\")\n  .header(\"content-type\", \"application/json\")\n  .header(\"accept\", \"application/json\")\n  .body(\"{ \n          \\\"bulkId\\\": \\\"BULK-ID-123-xyz\\\",\n          \\\"messages\\\": [\n            {\n              \\\"from\\\": \\\"41793026700\\\",\n              \\\"destinations\\\": [\n                {\n                  \\\"to\\\": \\\"41793026727\\\",\n                  \\\"messageId\\\": \\\"MESSAGE-ID-123-xyz\\\"\n                },\n                {\n                  \\\"to\\\": \\\"41793026731\\\"\n                }\n              ],\n              \\\"text\\\": \\\"Test Voice message.\\\",\n              \\\"language\\\": \\\"en\\\",\n              \\\"speechRate\\\": 1,\n              \\\"notifyUrl\\\": \\\"http://www.example.com/voice/advanced\\\",\n              \\\"notifyContentType\\\": \\\"application/json\\\",\n              \\\"validityPeriod\\\": 720,\n              \\\"sendAt\\\": \\\"2016-07-07T17:00:00.000+01:00\\\",\n              \\\"record\\\": false,\n              \\\"repeatDtmf\\\": \\\"123#\\\",\n              \\\"maxDtmf\\\": 1,\n              \\\"ringTimeout\\\": 45,\n              \\\"dtmfTimeout\\\": 10,\n              \\\"callTimeout\\\": 130,\n              \\\"machineDetection\\\": \\\"DISABLE\\\",\n              \\\"pause\\\": 3,\n              \\\"retry\\\": {\n              \t\t\\\"minPeriod\\\": 1,\n           \t\t\t\t\\\"maxPeriod\\\": 5,\n            \t\t\t\\\"maxCount\\\": 5\n                },\n        \t\t\t\\\"sendingSpeed\\\": {\n         \t\t\t\t\t\\\"speed\\\": 10,\n            \t\t\t\\\"timeUnit\\\": \\\"hour\\\"\n         \t\t\t}\n            },\n            {\n              \\\"from\\\": \\\"41793026700\\\",\n              \\\"destinations\\\": [\n                {\n                  \\\"to\\\": \\\"41793026785\\\"\n                }\n              ],\n              \\\"text\\\": \\\"A long time ago, in a galaxy far.\\\",\n              \\\"sendAt\\\": \\\"2016-07-07T18:00:00.000+01:00\\\"\n            }\n          ]\n        }\")\n  .asString();"},{"language":"csharp","code":"var client = new RestClient(\"http://api.infobip.com/tts/3/advanced\");\nvar request = new RestRequest(Method.POST);\nrequest.AddHeader(\"accept\", \"application/json\");\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\");\nrequest.AddParameter(\"application/json\", \n                     \"{ \n                       \\\"bulkId\\\": \\\"BULK-ID-123-xyz\\\",\n                       \\\"messages\\\": [\n                       {\n                         \\\"from\\\": \\\"41793026700\\\",\n                           \\\"destinations\\\": [\n                         {\n                           \\\"to\\\": \\\"41793026727\\\",\n                             \\\"messageId\\\": \\\"MESSAGE-ID-123-xyz\\\"\n                         },\n                         {\n                           \\\"to\\\": \\\"41793026731\\\"\n                         }\n                         ],\n                         \\\"text\\\": \\\"Test Voice message.\\\",\n                           \\\"language\\\": \\\"en\\\",\n                           \\\"speechRate\\\": 1,\n                           \\\"notifyUrl\\\": \\\"http://www.example.com/voice/advanced\\\",\n                           \\\"notifyContentType\\\": \\\"application/json\\\",\n                           \\\"validityPeriod\\\": 720,\n                           \\\"sendAt\\\": \\\"2016-07-07T17:00:00.000+01:00\\\",\n                           \\\"record\\\": false,\n                           \\\"repeatDtmf\\\": \\\"123#\\\",\n                           \\\"maxDtmf\\\": 1,\n                           \\\"ringTimeout\\\": 45,\n                           \\\"dtmfTimeout\\\": 10,\n                           \\\"callTimeout\\\": 130,\n                           \\\"machineDetection\\\": \\\"DISABLE\\\",\n                           \\\"pause\\\": 3,\n                           \\\"retry\\\": {\n              \t\t\t\t\t\t\t\t\t\\\"minPeriod\\\": 1,\n           \t\t\t\t\t\t\t\t\t\t\t\\\"maxPeriod\\\": 5,\n            \t\t\t\t\t\t\t\t\t\t\\\"maxCount\\\": 5\n                \t\t\t\t\t\t},\n                     \t\t\t\t\\\"sendingSpeed\\\": {\n         \t\t\t\t\t\t\t\t\t   \t\t\\\"speed\\\": 10,\n            \t\t\t\t\t\t\t\t\t\t\\\"timeUnit\\\": \\\"hour\\\"\n         \t\t\t\t\t\t\t\t\t\t}\n                       },\n                       {\n                         \\\"from\\\": \\\"41793026700\\\",\n                           \\\"destinations\\\": [\n                         {\n                           \\\"to\\\": \\\"41793026785\\\"\n                         }\n                         ],\n                         \\\"text\\\": \\\"A long time ago, in a galaxy far.\\\",\n                           \\\"sendAt\\\": \\\"2016-07-07T18:00:00.000+01:00\\\"\n                       }\n                       ]\n                       }\", \n                     ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"language":"javascript","code":"var data = JSON.stringify({\n  \"bulkId\": \"BULK-ID-123-xyz\",\n  \"messages\": [\n    {\n      \"from\": \"41793026700\",\n      \"destinations\": [\n        { \n          \"to\": \"41793026727\",\n          \"messageId\": \"MESSAGE-ID-123-xyz\"\n        },\n        {\n          \"to\": \"41793026731\"\n        }\n      ],\n      \"text\": \"Test Voice message.\",\n      \"language\": \"en\",\n      \"speechRate\": 1,\n      \"notifyUrl\": \"http://www.example.com/voice/advanced\",\n      \"notifyContentType\": \"application/json\",\n      \"validityPeriod\": 720,\n      \"sendAt\": \"2016-07-07T17:00:00.000+01:00\",\n      \"record\": false,\n      \"repeatDtmf\": \"123#\",\n      \"repeatDtmf\": 1,\n      \"ringTimeout\": 45,\n      \"dtmfTimeout\": 10,\n      \"callTimeout\": 130,\n      \"machineDetection\": \"DISABLE\",\n      \"pause\": 3,\n      \"retry\": {\n      \t\t\"minPeriod\":1,\n        \t\"maxPeriod\": 5,\n        \t\"maxCount\": 5\n      },\n      \"sendingSpeed\": {\n      \t\t\"speed\": 10,\n          \"timeUnit\": \"hour\"\n      }\n    },\n    {\n      \"from\": \"41793026700\",\n      \"destinations\": [\n        {\n          \"to\": \"41793026785\"\n        }\n      ],\n      \"text\": \"A long time ago, in a galaxy far.\",\n      \"sendAt\": \"2016-07-07T18:00:00.000+01:00\"\n    }\n  ]\n});\n\nvar xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === 4) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"http://api.infobip.com/tts/3/advanced\");\nxhr.setRequestHeader(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\nxhr.setRequestHeader(\"accept\", \"application/json\");\n\nxhr.send(data);\n"}]},"settings":"554860d6d2c8410d006c215e","results":{"codes":[{"name":"OK - JSON","code":"{\n  \"bulkId\": \"BULK-ID-123-xyz\",\n  \"messages\": [\n    {\n      \"to\": \"41793026727\",\n      \"status\": {\n        \"groupId\": 1,\n        \"groupName\": \"PENDING\",\n        \"id\": 26,\n        \"name\": \"PENDING_ACCEPTED\",\n        \"description\": \"Message accepted, pending for delivery.\"\n      },\n      \"messageId\": \"MESSAGE-ID-123-xyz\"\n    },\n    {\n      \"to\": \"41793026731\",\n      \"status\": {\n        \"groupId\": 1,\n        \"groupName\": \"PENDING\",\n        \"id\": 26,\n        \"name\": \"PENDING_ACCEPTED\",\n        \"description\": \"Message accepted, pending for delivery.\"\n      },\n      \"messageId\":\"9304a5a3ab19-1ca1-be74-76ad87651ed25f35\"\n    },\n    {\n      \"to\": \"41793026785\",\n      \"status\": {\n        \"groupId\": 1,\n        \"groupName\": \"PENDING\",\n        \"id\": 26,\n        \"name\": \"PENDING_ACCEPTED\",\n        \"description\": \"Message accepted, pending for delivery.\"\n      },\n      \"messageId\":\"5f35f87a2f19-a141-43a4-91cd81b85f8c689\"\n    }\n  ]\n}","language":"json","status":200}]},"auth":"required","params":[{"_id":"57c9fd0b35d18d0e00242a0d","ref":"","in":"body","required":false,"desc":"The ID which uniquely identifies the request.","default":"","type":"string","name":"bulkId"},{"_id":"566abc7b74d574170070b711","ref":"","in":"body","required":false,"desc":"Numeric sender ID in E.164 format","default":"","type":"string","name":"from"},{"_id":"566abc7b74d574170070b710","ref":"","in":"body","required":true,"desc":"Array of message destination addresses. Destination address must be in the international format (Example: 41793026727).","default":"","type":"array_string","name":"to"},{"_id":"57c9fd0b35d18d0e00242a0c","ref":"","in":"body","required":false,"desc":"The ID that uniquely identifies the message sent.","default":"","type":"string","name":"messageId"},{"_id":"566abc7b74d574170070b70f","ref":"","in":"body","required":false,"desc":"Text of the message that will be sent. [Pause](#section-pause-between-words) between words is possible.","default":"","type":"string","name":"text"},{"_id":"566abc7b74d574170070b70d","ref":"","in":"body","required":false,"desc":"If the message is in text format, languages in which the message is written must be defined for correct pronunciation. In the [Languages section](/docs/single-voice-message#section-languages)  you can find the list of languages that we support.","default":"en","type":"string","name":"language"},{"_id":"566abc7b74d574170070b70e","ref":"","in":"body","required":false,"desc":"Besides the text format of the message, audio recording (in waw or mp3 format) can also be delivered as a voice message to the recipient. Audio file must be uploaded online so the existing URL can be available for the file download. Size of the audio file must be below 4 MB.","default":"","type":"string","name":"audioFileUrl"},{"_id":"57da7ea713ca3b0e0015b005","ref":"","in":"body","required":false,"desc":"The reproduction speed of speech in the resulting message. Effective only when using text. Supported range is from 0.5 (slow down speech) to 2 (speed up speech). Values less than 0.5 will be replaced with 0.5, and values higher than 2 will be replaced with 2.","default":"1","type":"double","name":"speechRate"},{"_id":"57c9fd0b35d18d0e00242a0a","ref":"","in":"body","required":false,"desc":"The URL on your callback server on which the [Delivery report](http://dev.infobip.com/v1/docs/delivery-reports) will be sent.","default":"","type":"string","name":"notifyUrl"},{"_id":"57c9fd0b35d18d0e00242a09","ref":"","in":"body","required":false,"desc":"Preferred Delivery report content type. Can be `application/json` or `application/xml`.","default":"","type":"string","name":"notifyContentType"},{"_id":"566abc7b74d574170070b702","ref":"","in":"body","required":false,"desc":"The message validity period shown in minutes. When the period expires, it will not be allowed for the message to be sent. A validity period longer than 48h is not supported (in this case, it will be automatically set to 48h).","default":"","type":"int","name":"validityPeriod"},{"_id":"566abc7b74d574170070b704","ref":"","in":"body","required":false,"desc":"Used for scheduled Voice messages (message not to be sent immediately, but at scheduled time).","default":"","type":"datetime","name":"sendAt"},{"_id":"566abc7b74d574170070b70c","ref":"","in":"body","required":false,"desc":"Record the call and expose it to client as URL inside the delivery report. Can be `true` or `false`.","default":"false","type":"boolean","name":"record"},{"_id":"566abc7b74d574170070b70b","ref":"","in":"body","required":false,"desc":"Response (DTMF) code which enables repeating message if a subscriber enters it.","default":"","type":"string","name":"repeatDtmf"},{"_id":"597f1c03878132001ee249d8","ref":"","in":"body","required":false,"desc":"The maximum number of DTMF codes the system will attempt to receive. Reading user input stops once that number of codes is reached.","default":"int(0)","type":"int","name":"maxDtmf"},{"_id":"566abc7b74d574170070b708","ref":"","in":"body","required":false,"desc":"The duration of the call prior to answer shown in seconds, unless there are no [operator limitations](#section-ring-timeout-limitations).","default":"45","type":"int","name":"ringTimeout"},{"_id":"566abc7b74d574170070b707","ref":"","in":"body","required":false,"desc":"The waiting period for end user to enter dtmf digits.","default":"10","type":"int","name":"dtmfTimeout"},{"_id":"566abc7b74d574170070b706","ref":"","in":"body","required":false,"desc":"Total call period shown in seconds.","default":"","type":"int","name":"callTimeout"},{"_id":"566abc7b74d574170070b705","ref":"","in":"body","required":false,"desc":"This action attempts to detect answering machines at the beginning of the call. Possible values: ['disable'](#section-disable-default-value-),  ['hangup'](#section-hangup).","default":"disable","type":"string","name":"machineDetection"},{"_id":"56fbe35b0023171700b9610e","ref":"","in":"body","required":false,"desc":"Possible call transfer scenario defined as JSON object. See <a href=\"#call-transfers\">example below</a>","default":"","type":"array_object","name":"callTransfers"},{"_id":"589c1e8d29523b23003ba0c3","ref":"","in":"body","required":false,"desc":"Indicates if the message has to be tracked for Conversion rates. Possible values: `VOICE`.","default":"","type":"string","name":"track"},{"_id":"589c1e8d29523b23003ba0c2","ref":"","in":"body","required":false,"desc":"Key that uniquely identifies Conversion tracking process.","default":"","type":"string","name":"processKey"},{"_id":"589c1e8d29523b23003ba0c1","ref":"","in":"body","required":false,"desc":"User defined type of the Conversion tracking process or flow type or message type, etc. Example: `ONE_TIME_PIN` or `SOCIAL_INVITES`.","default":"","type":"string","name":"type"},{"_id":"58cfb4266868a21900dab908","ref":"","in":"body","required":false,"desc":"Additional client's data that will be sent on the notifyUrl. The maximum value is 200 characters.","default":"","type":"string","name":"callbackData"},{"_id":"59886e36d4f48a000f757831","ref":"","in":"body","required":false,"desc":"Indicating period of time in seconds between end user answering the call and message starting to be played. Minimal value is 0 and maximum value is 10 seconds. Pause is ignored if machine detection is used.","default":"0","type":"int","name":"pause"},{"_id":"59943dbc32aa4a00259931e2","ref":"","in":"body","required":false,"desc":"Used to define if the delivery of the Voice messages should be retried in case the first try doesn't succeed. Additional retries will be made according to the schedule defined by minPeriod and maxPeriod parameters and platform's internal retry logic. If the minPeriod differs maxPeriod, delivery will be retried in the following manner: after 1 min, 2 min, 5 min, 10 min, 20 min, 30 min, 1 hour, 2 hours, 4 hours, 8 hours, 16 hours, 24 hours or until maxPeriod is reached.  If the retry attempt for the MaxPeriod is reached, the MaxPeriod will be used for all subsequent retries. If the minPeriod and the maxPeriod are defined as equal values, the period of time between retries will be equal to this value. Message delivery will be retried until the successful delivery or message validity or maxCount value is reached.","default":"","type":"object","name":"retry"},{"_id":"59943dbc32aa4a00259931e1","ref":"","in":"body","required":false,"desc":"Defines the minimal waiting time (in minutes) after the previous failed attempt to try to deliver the message again.","default":"","type":"int","name":"minPeriod"},{"_id":"59943dbc32aa4a00259931e0","ref":"","in":"body","required":false,"desc":"Defines the maximum waiting time (in minutes) after the previous failed attempt to try to deliver the message again.","default":"","type":"int","name":"maxPeriod"},{"_id":"59943dbc32aa4a00259931df","ref":"","in":"body","required":false,"desc":"Specify the maximum number of retry attempts. Maximum value of the maxCount is 4. Higher value, if entered will be set to 4.","default":"","type":"int","name":"maxCount"},{"_id":"5a042939f65a7b0028e7e059","ref":"","in":"body","required":false,"desc":"Sending rate defined in number of messages sent per second, minute, hour or day. First message will be sent immediately (or at sendAt time if scheduling is used) and subsequent messages will be sent respecting defined speed. For example, if sendingSpeed is defined as 10 messages per hour, messages will be sent every 6 minutes. If this parameter is defined, validityPeriod is ignored.","default":"","type":"object","name":"sendingSpeed"},{"_id":"5a042939f65a7b0028e7e058","ref":"","in":"body","required":false,"desc":"Defines the number of messages that will be sent per specified time unit.","default":"","type":"int","name":"speed"},{"_id":"5a042939f65a7b0028e7e057","ref":"","in":"body","required":false,"desc":"Defines time unit used for calculating sending speed.  Possible values: second, minute, hour and day.","default":"","type":"string","name":"timeUnit"}],"url":"/tts/3/advanced"},"isReference":true,"order":12,"body":"# Response format \n\nIf successful, the response header HTTP status code will be `200 OK` and the message will be sent.\n\nIf you try to send the message without authorization, you will receive a `401 Unauthorized` error.\n\n## VoiceResponse\n\n|Parameter|Type|Description|\n|-|-|-|\n|*bulkId*|String|The ID that uniquely identifies the request. Bulk ID will be received when a message is sent to more than one destination address.|\n|*messages*|[VoiceResponseDetails](#section-voiceresponsedetails)|Array of sent message objects, one object per every message.|\n\n### VoiceResponseDetails\n\n|Parameter|Type|Description|\n|-|-|-|\n|*to*|String|The message destination address.|\n|*status*|[Status](#section-status)|Indicates whether the message has been sent successfully, not sent, delivered, not delivered, waiting for delivery or any other possible status.|\n|*messageId*|String|The ID that uniquely identifies the sent message.|\n\n#### Status\n\n|Parameter|Type|Description|\n|-|-|-|\n|*groupId*|int|Status [group ID](http://dev.infobip.com/v1/docs/response-codes#status-object-example).|\n|*groupName*|String|Status [group name](http://dev.infobip.com/v1/docs/response-codes#status-object-example).|\n|*id*|int|Status [ID](http://dev.infobip.com/v1/docs/response-codes#status-object-example).|\n|*name*|String|Status [name](http://dev.infobip.com/v1/docs/response-codes#status-object-example).|\n|*description*|String|Human readable [description](http://dev.infobip.com/v1/docs/response-codes#status-object-example) of the status.|\n\n## Pause between words\nAdding pauses between the words and extending the duration of the voice message is possible by using the comma character \",\".\n\nFor example, if you want to have a 3 second pause after each word, then the text parameter should look like this \"one,,,,,,two,,,,,,three,,,,,,\". Each coma creates a pause of 0,5 seconds.\n\n## Ring timeout limitations\nThere are no limitations on the Voice platform regarding this value, however, most of the operators have their own ring timeout limitations and it is advisable to keep the ringTimeout value up to 45s. \n\n## What is Answering Machine Detection (AMD)?\nThis is just an attempt (without guarantee) of answering machine detection based upon patterns in an audio stream after receiving an answer signal from the operator. Activities can be defined by setting one of two possible values: disable, hang up.\n\n## Disable (default value)\nThis is the default value in case the parameter machineDetection is not set in the API request. This value represents no usage of AMD option, and during the call there won't be any attempts in detecting an answering machine.\n\n## Hangup\nIf the parameter machineDetection is set to 'hangup', the Voice platform will try to detect an answering machine, and in case it detects one, the call will be hung up immediately.\n[block:api-header]\n{\n  \"title\": \"Call Transfers\"\n}\n[/block]\nUsing call transfer, you can send an interactive message to your subscribers, providing them the opportunity to respond by pressing their phone keys. When your subscriber chooses a number call transfer will redirect a call to the set number. The Field is JSON formatted.\n\nCall transfer for any DTMF\n```\n[\n  {\n  \t\"if\": \"anyDtmf\",\n  \t\"transferTo\": \"79029555525\"\n  }\n]\n```\n\nCall transfer for specific DTMF\n```JSON\n[\n\t{ \n\t\t\"if\": \"dtmf\",\n\t\t\"equals\": \"1\",\n\t\t\"transferTo\": \"79029555525\"\n\t},\n\t{ \n\t\t\"if\": \"dtmf\",\n\t\t\"equals\": \"2\",\n\t\t\"transferTo\": \"79029555551\"\n\t}\n]\n```\n\n###Request example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /tts/3/advanced HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nContent-Type: application/json\\nAccept: application/json\\n\\n{\\n   \\\"bulkId\\\":\\\"BULK-ID-123-xyz\\\",\\n   \\\"messages\\\":[\\n      {\\n         \\\"from\\\":\\\"41793026700\\\",\\n         \\\"destinations\\\":[\\n            {\\n               \\\"to\\\":\\\"41793026727\\\",\\n               \\\"messageId\\\":\\\"MESSAGE-ID-123-xyz\\\"\\n            },\\n            {\\n               \\\"to\\\":\\\"41793026731\\\"\\n            }\\n         ],\\n         \\\"text\\\": \\\"Test Voice message.\\\",\\n         \\\"language\\\": \\\"en\\\",\\n         \\\"speechRate\\\":1,\\n         \\\"notifyUrl\\\":\\\"http://www.example.com/voice/advanced\\\",\\n         \\\"notifyContentType\\\":\\\"application/json\\\",\\n         \\\"validityPeriod\\\": 720,\\n         \\\"sendAt\\\":\\\"2016-07-07T17:00:00.000+01:00\\\",\\n         \\\"record\\\": false,\\n         \\\"repeatDtmf\\\": \\\"123#\\\",\\n         \\\"maxDtmf\\\":1,\\n         \\\"ringTimeout\\\": 45,\\n         \\\"dtmfTimeout\\\": 10,\\n         \\\"callTimeout\\\": 130,\\n         \\\"machineDetection\\\": \\\"DISABLE\\\",\\n         \\\"pause\\\":3,\\n         \\\"retry\\\": {\\n            \\\"minPeriod\\\":1,\\n           \\t\\\"maxPeriod\\\": 5,\\n            \\\"maxCount\\\":5\\n         \\t\\t},\\n         \\\"callTransfers\\\": [\\n          {\\n            \\\"if\\\": \\\"dtmf\\\",\\n            \\\"equals\\\": \\\"1\\\",\\n            \\\"transferTo\\\": \\\"79029555525\\\"\\n          },\\n          {\\n            \\\"if\\\": \\\"dtmf\\\",\\n            \\\"equals\\\": \\\"2\\\",\\n            \\\"transferTo\\\": \\\"79029555551\\\"\\n          }\\n         ]\\n         \\n      },\\n      {\\n         \\\"from\\\":\\\"41793026700\\\",\\n         \\\"destinations\\\":[\\n            {\\n               \\\"to\\\":\\\"41793026785\\\"\\n            }\\n         ],\\n         \\\"text\\\":\\\"A long time ago, in a galaxy far.\\\",\\n         \\\"sendAt\\\":\\\"2016-07-07T18:00:00.000+01:00\\\"\\n      }\\n   ]\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"curl -X POST \\\\\\n-H \\\"Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\" \\\\\\n-H \\\"Content-Type: application/json\\\" \\\\\\n-H \\\"Accept: application/json\\\" \\\\\\n-d '{\\n   \\\"bulkId\\\":\\\"BULK-ID-123-xyz\\\",\\n   \\\"messages\\\":[\\n      {\\n         \\\"from\\\":\\\"41793026700\\\",\\n         \\\"destinations\\\":[\\n            {\\n               \\\"to\\\":\\\"41793026727\\\",\\n               \\\"messageId\\\":\\\"MESSAGE-ID-123-xyz\\\"\\n            },\\n            {\\n               \\\"to\\\":\\\"41793026731\\\"\\n            }\\n         ],\\n         \\\"text\\\": \\\"Test Voice message.\\\",\\n         \\\"language\\\": \\\"en\\\",\\n         \\\"speechRate\\\":1,\\n         \\\"notifyUrl\\\":\\\"http://www.example.com/voice/advanced\\\",\\n         \\\"notifyContentType\\\":\\\"application/json\\\",\\n         \\\"validityPeriod\\\": 720,\\n         \\\"sendAt\\\":\\\"2016-07-07T17:00:00.000+01:00\\\",\\n         \\\"record\\\": false,\\n         \\\"repeatDtmf\\\": \\\"123#\\\",\\n         \\\"maxDtmf\\\":1,\\n         \\\"ringTimeout\\\": 45,\\n         \\\"dtmfTimeout\\\": 10,\\n         \\\"callTimeout\\\": 130,\\n         \\\"machineDetection\\\": \\\"DISABLE\\\",\\n         \\\"pause\\\": 3,\\n         \\\"retry\\\": {\\n            \\\"minPeriod\\\":1,\\n           \\t\\\"maxPeriod\\\": 5,\\n            \\\"maxCount\\\":5\\n            },\\n         \\\"callTransfers\\\": [\\n            {\\n               \\\"if\\\": \\\"dtmf\\\",\\n               \\\"equals\\\": \\\"1\\\",\\n               \\\"transferTo\\\": \\\"79029555525\\\"\\n            },\\n            {\\n               \\\"if\\\": \\\"dtmf\\\",\\n               \\\"equals\\\": \\\"2\\\",\\n               \\\"transferTo\\\": \\\"79029555551\\\"\\n            }\\n         ]\\n      },\\n      {\\n         \\\"from\\\":\\\"41793026700\\\",\\n         \\\"destinations\\\":[\\n            {\\n               \\\"to\\\":\\\"41793026785\\\"\\n            }\\n         ],\\n         \\\"text\\\":\\\"A long time ago, in a galaxy far.\\\",\\n         \\\"sendAt\\\":\\\"2016-07-07T18:00:00.000+01:00\\\"\\n      }\\n   ]\\n}' \\\"http://api.infobip.com/tts/3/advanced\\\"\",\n      \"language\": \"curl\"\n    },\n    {\n      \"code\": \"<?php\\n\\n$curl = curl_init();\\n\\ncurl_setopt_array($curl, array(\\n  CURLOPT_URL => \\\"http://api.infobip.com/tts/3/advanced\\\",\\n  CURLOPT_RETURNTRANSFER => true,\\n  CURLOPT_ENCODING => \\\"\\\",\\n  CURLOPT_MAXREDIRS => 10,\\n  CURLOPT_TIMEOUT => 30,\\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\\n  CURLOPT_CUSTOMREQUEST => \\\"POST\\\",\\n   CURLOPT_POSTFIELDS => \\\"{ \\n                          \\\\\\\"bulkId\\\\\\\": \\\\\\\"BULK-ID-123-xyz\\\\\\\",\\n                          \\\\\\\"messages\\\\\\\": [\\n                            {\\n                              \\\\\\\"from\\\\\\\": \\\\\\\"41793026700\\\\\\\",\\n                              \\\\\\\"destinations\\\\\\\": [\\n                                {\\n                                  \\\\\\\"to\\\\\\\": \\\\\\\"41793026727\\\\\\\",\\n                                  \\\\\\\"messageId\\\\\\\": \\\\\\\"MESSAGE-ID-123-xyz\\\\\\\"\\n                                },\\n                                {\\n                                  \\\\\\\"to\\\\\\\": \\\\\\\"41793026731\\\\\\\"\\n                                }\\n                              ],\\n                              \\\\\\\"text\\\\\\\": \\\\\\\"Test Voice message.\\\\\\\",\\n                              \\\\\\\"language\\\\\\\": \\\\\\\"en\\\\\\\",\\n                              \\\\\\\"speechRate\\\\\\\": 1,\\n                              \\\\\\\"notifyUrl\\\\\\\": \\\\\\\"http://www.example.com/voice/advanced\\\\\\\",\\n                              \\\\\\\"notifyContentType\\\\\\\": \\\\\\\"application/json\\\\\\\",\\n                              \\\\\\\"validityPeriod\\\\\\\": 720,\\n                              \\\\\\\"sendAt\\\\\\\": \\\\\\\"2016-07-07T17:00:00.000+01:00\\\\\\\",\\n                              \\\\\\\"record\\\\\\\": false,\\n                              \\\\\\\"repeatDtmf\\\\\\\": \\\\\\\"123#\\\\\\\",\\n                              \\\\\\\"maxDtmf\\\\\\\": \\\\\\\"1\\\\\\\",\\n                              \\\\\\\"ringTimeout\\\\\\\": 45,\\n                              \\\\\\\"dtmfTimeout\\\\\\\": 10,\\n                              \\\\\\\"callTimeout\\\\\\\": 130,\\n                              \\\\\\\"machineDetection\\\\\\\": \\\\\\\"DISABLE\\\\\\\",\\n                              \\\\\\\"pause\\\\\\\": 3,\\n                              \\\\\\\"retry\\\\\\\": {\\n                                  \\\\\\\"minPeriod\\\\\\\": 1,\\n           \\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\\\\\"maxPeriod\\\\\\\": 5,\\n            \\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\\\\\"maxCount\\\\\\\": 5\\n                                },\\n                              \\\\\\\"callTransfers\\\\\\\": [\\n                                {\\n                                  \\\\\\\"if\\\\\\\": \\\\\\\"dtmf\\\\\\\",\\n                                  \\\\\\\"equals\\\\\\\": \\\\\\\"1\\\\\\\",\\n                                  \\\\\\\"transferTo\\\\\\\": \\\\\\\"79029555525\\\\\\\"\\n                                },\\n                                {\\n                                  \\\\\\\"if\\\\\\\": \\\\\\\"dtmf\\\\\\\",\\n                                  \\\\\\\"equals\\\\\\\": \\\\\\\"2\\\\\\\",\\n                                  \\\\\\\"transferTo\\\\\\\": \\\\\\\"79029555551\\\\\\\"\\n                                }\\n                              ]\\n                            },\\n                            {\\n                              \\\\\\\"from\\\\\\\": \\\\\\\"41793026700\\\\\\\",\\n                              \\\\\\\"destinations\\\\\\\": [\\n                                {\\n                                  \\\\\\\"to\\\\\\\": \\\\\\\"41793026785\\\\\\\"\\n                                }\\n                              ],\\n                              \\\\\\\"text\\\\\\\": \\\\\\\"A long time ago, in a galaxy far.\\\\\\\",\\n                              \\\\\\\"sendAt\\\\\\\": \\\\\\\"2016-07-07T18:00:00.000+01:00\\\\\\\"\\n                            }\\n                          ]\\n                        }\\\",\\n  CURLOPT_HTTPHEADER => array(\\n    \\\"accept: application/json\\\",\\n    \\\"authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\",\\n    \\\"content-type: application/json\\\"\\n  ),\\n));\\n\\n$response = curl_exec($curl);\\n$err = curl_error($curl);\\n\\ncurl_close($curl);\\n\\nif ($err) {\\n  echo \\\"cURL Error #:\\\" . $err;\\n} else {\\n  echo $response;\\n}\",\n      \"language\": \"php\"\n    },\n    {\n      \"code\": \"require 'uri'\\nrequire 'net/http'\\n\\nurl = URI(\\\"http://api.infobip.com/tts/3/advanced\\\")\\n\\nhttp = Net::HTTP.new(url.host, url.port)\\n\\nrequest = Net::HTTP::Post.new(url)\\nrequest[\\\"authorization\\\"] = 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='\\nrequest[\\\"content-type\\\"] = 'application/json'\\nrequest[\\\"accept\\\"] = 'application/json'\\nrequest.body = \\\"{ \\n                \\\\\\\"bulkId\\\\\\\": \\\\\\\"BULK-ID-123-xyz\\\\\\\",\\n                \\\\\\\"messages\\\\\\\": [\\n                  {\\n                    \\\\\\\"from\\\\\\\": \\\\\\\"41793026700\\\\\\\",\\n                    \\\\\\\"destinations\\\\\\\": [\\n                      {\\n                        \\\\\\\"to\\\\\\\": \\\\\\\"41793026727\\\\\\\",\\n                        \\\\\\\"messageId\\\\\\\": \\\\\\\"MESSAGE-ID-123-xyz\\\\\\\"\\n                      },\\n                      {\\n                        \\\\\\\"to\\\\\\\": \\\\\\\"41793026731\\\\\\\"\\n                      }\\n                    ],\\n                    \\\\\\\"text\\\\\\\": \\\\\\\"Test Voice message.\\\\\\\",\\n                    \\\\\\\"language\\\\\\\": \\\\\\\"en\\\\\\\",\\n                    \\\\\\\"speechRate\\\\\\\": 1,\\n                    \\\\\\\"notifyUrl\\\\\\\": \\\\\\\"http://www.example.com/voice/advanced\\\\\\\",\\n                    \\\\\\\"notifyContentType\\\\\\\": \\\\\\\"application/json\\\\\\\",\\n                    \\\\\\\"validityPeriod\\\\\\\": 720,\\n                    \\\\\\\"sendAt\\\\\\\": \\\\\\\"2016-07-07T17:00:00.000+01:00\\\\\\\",\\n                    \\\\\\\"record\\\\\\\": false,\\n                    \\\\\\\"repeatDtmf\\\\\\\": \\\\\\\"123#\\\\\\\",\\n                    \\\\\\\"maxDtmf\\\\\\\": \\\\\\\"1\\\\\\\",\\n                    \\\\\\\"ringTimeout\\\\\\\": 45,\\n                    \\\\\\\"dtmfTimeout\\\\\\\": 10,\\n                    \\\\\\\"callTimeout\\\\\\\": 130,\\n                    \\\\\\\"machineDetection\\\\\\\": \\\\\\\"DISABLE\\\\\\\",\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\\\\\"pause\\\\\\\": 3,\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\\\\\"retry\\\\\\\": {\\n                        \\\\\\\"minPeriod\\\\\\\": 1,\\n           \\t\\t\\t\\t\\t\\t\\t\\\\\\\"maxPeriod\\\\\\\": 5,\\n            \\t\\t\\t\\t\\t\\t\\\\\\\"maxCount\\\\\\\": 5\\n                    \\t},\\n                    \\\\\\\"callTransfers\\\\\\\": [\\n                                {\\n                                  \\\\\\\"if\\\\\\\": \\\\\\\"dtmf\\\\\\\",\\n                                  \\\\\\\"equals\\\\\\\": \\\\\\\"1\\\\\\\",\\n                                  \\\\\\\"transferTo\\\\\\\": \\\\\\\"79029555525\\\\\\\"\\n                                },\\n                                {\\n                                  \\\\\\\"if\\\\\\\": \\\\\\\"dtmf\\\\\\\",\\n                                  \\\\\\\"equals\\\\\\\": \\\\\\\"2\\\\\\\",\\n                                  \\\\\\\"transferTo\\\\\\\": \\\\\\\"79029555551\\\\\\\"\\n                                }\\n                              ]\\n                  },\\n                  {\\n                    \\\\\\\"from\\\\\\\": \\\\\\\"41793026700\\\\\\\",\\n                    \\\\\\\"destinations\\\\\\\": [\\n                      {\\n                        \\\\\\\"to\\\\\\\": \\\\\\\"41793026785\\\\\\\"\\n                      }\\n                    ],\\n                    \\\\\\\"text\\\\\\\": \\\\\\\"A long time ago, in a galaxy far.\\\\\\\",\\n                    \\\\\\\"sendAt\\\\\\\": \\\\\\\"2016-07-07T18:00:00.000+01:00\\\\\\\"\\n                  }\\n                ]\\n              }\\\"\\n\\nresponse = http.request(request)\\nputs response.read_body\",\n      \"language\": \"ruby\"\n    },\n    {\n      \"code\": \"import http.client\\n\\nconn = http.client.HTTPConnection(\\\"api.infobip.com\\\")\\n\\npayload = \\\"{ \\n            \\\\\\\"bulkId\\\\\\\": \\\\\\\"BULK-ID-123-xyz\\\\\\\",\\n            \\\\\\\"messages\\\\\\\": [\\n              {\\n                \\\\\\\"from\\\\\\\": \\\\\\\"41793026700\\\\\\\",\\n                \\\\\\\"destinations\\\\\\\": [\\n                  {\\n                    \\\\\\\"to\\\\\\\": \\\\\\\"41793026727\\\\\\\",\\n                    \\\\\\\"messageId\\\\\\\": \\\\\\\"MESSAGE-ID-123-xyz\\\\\\\"\\n                  },\\n                  {\\n                    \\\\\\\"to\\\\\\\": \\\\\\\"41793026731\\\\\\\"\\n                  }\\n                ],\\n                \\\\\\\"text\\\\\\\": \\\\\\\"Test Voice message.\\\\\\\",\\n                \\\\\\\"language\\\\\\\": \\\\\\\"en\\\\\\\",\\n                \\\\\\\"speechRate\\\\\\\": 1,\\n                \\\\\\\"notifyUrl\\\\\\\": \\\\\\\"http://www.example.com/voice/advanced\\\\\\\",\\n                \\\\\\\"notifyContentType\\\\\\\": \\\\\\\"application/json\\\\\\\",\\n                \\\\\\\"validityPeriod\\\\\\\": 720,\\n                \\\\\\\"sendAt\\\\\\\": \\\\\\\"2016-07-07T17:00:00.000+01:00\\\\\\\",\\n                \\\\\\\"record\\\\\\\": false,\\n                \\\\\\\"repeatDtmf\\\\\\\": \\\\\\\"123#\\\\\\\",\\n                \\\\\\\"maxDtmf\\\\\\\": \\\\\\\"1\\\\\\\",\\n                \\\\\\\"ringTimeout\\\\\\\": 45,\\n                \\\\\\\"dtmfTimeout\\\\\\\": 10,\\n                \\\\\\\"callTimeout\\\\\\\": 130,\\n                \\\\\\\"machineDetection\\\\\\\": \\\\\\\"DISABLE\\\\\\\",\\n            \\t\\t\\\\\\\"pause\\\\\\\": 3,\\n            \\t\\t\\\\\\\"retry\\\\\\\": {\\n                        \\\\\\\"minPeriod\\\\\\\": 1,\\n           \\t\\t\\t\\t\\t\\t\\t\\\\\\\"maxPeriod\\\\\\\": 5,\\n            \\t\\t\\t\\t\\t\\t\\\\\\\"maxCount\\\\\\\": 5\\n                    \\t},\\n                \\\\\\\"callTransfers\\\\\\\": [\\n                                {\\n                                  \\\\\\\"if\\\\\\\": \\\\\\\"dtmf\\\\\\\",\\n                                  \\\\\\\"equals\\\\\\\": \\\\\\\"1\\\\\\\",\\n                                  \\\\\\\"transferTo\\\\\\\": \\\\\\\"79029555525\\\\\\\"\\n                                },\\n                                {\\n                                  \\\\\\\"if\\\\\\\": \\\\\\\"dtmf\\\\\\\",\\n                                  \\\\\\\"equals\\\\\\\": \\\\\\\"2\\\\\\\",\\n                                  \\\\\\\"transferTo\\\\\\\": \\\\\\\"79029555551\\\\\\\"\\n                                }\\n                              ]\\n              },\\n              {\\n                \\\\\\\"from\\\\\\\": \\\\\\\"41793026700\\\\\\\",\\n                \\\\\\\"destinations\\\\\\\": [\\n                  {\\n                    \\\\\\\"to\\\\\\\": \\\\\\\"41793026785\\\\\\\"\\n                  }\\n                ],\\n                \\\\\\\"text\\\\\\\": \\\\\\\"A long time ago, in a galaxy far.\\\\\\\",\\n                \\\\\\\"sendAt\\\\\\\": \\\\\\\"2016-07-07T18:00:00.000+01:00\\\\\\\"\\n              }\\n            ]\\n          }\\\"\\n\\nheaders = {\\n    'authorization': \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\",\\n    'content-type': \\\"application/json\\\",\\n    'accept': \\\"application/json\\\"\\n    }\\n\\nconn.request(\\\"POST\\\", \\\"/tts/3/advanced\\\", payload, headers)\\n\\nres = conn.getresponse()\\ndata = res.read()\\n\\nprint(data.decode(\\\"utf-8\\\"))\",\n      \"language\": \"python\"\n    },\n    {\n      \"code\": \"HttpResponse<String> response = Unirest.post(\\\"http://api.infobip.com/tts/3/advanced\\\")\\n  .header(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\")\\n  .header(\\\"content-type\\\", \\\"application/json\\\")\\n  .header(\\\"accept\\\", \\\"application/json\\\")\\n  .body(\\\"{ \\n          \\\\\\\"bulkId\\\\\\\": \\\\\\\"BULK-ID-123-xyz\\\\\\\",\\n          \\\\\\\"messages\\\\\\\": [\\n            {\\n              \\\\\\\"from\\\\\\\": \\\\\\\"41793026700\\\\\\\",\\n              \\\\\\\"destinations\\\\\\\": [\\n                {\\n                  \\\\\\\"to\\\\\\\": \\\\\\\"41793026727\\\\\\\",\\n                  \\\\\\\"messageId\\\\\\\": \\\\\\\"MESSAGE-ID-123-xyz\\\\\\\"\\n                },\\n                {\\n                  \\\\\\\"to\\\\\\\": \\\\\\\"41793026731\\\\\\\"\\n                }\\n              ],\\n              \\\\\\\"text\\\\\\\": \\\\\\\"Test Voice message.\\\\\\\",\\n              \\\\\\\"language\\\\\\\": \\\\\\\"en\\\\\\\",\\n              \\\\\\\"speechRate\\\\\\\": 1,\\n              \\\\\\\"notifyUrl\\\\\\\": \\\\\\\"http://www.example.com/voice/advanced\\\\\\\",\\n              \\\\\\\"notifyContentType\\\\\\\": \\\\\\\"application/json\\\\\\\",\\n              \\\\\\\"validityPeriod\\\\\\\": 720,\\n              \\\\\\\"sendAt\\\\\\\": \\\\\\\"2016-07-07T17:00:00.000+01:00\\\\\\\",\\n              \\\\\\\"record\\\\\\\": false,\\n              \\\\\\\"repeatDtmf\\\\\\\": \\\\\\\"123#\\\\\\\",\\n              \\\\\\\"maxDtmf\\\\\\\": \\\\\\\"1\\\\\\\",\\n              \\\\\\\"ringTimeout\\\\\\\": 45,\\n              \\\\\\\"dtmfTimeout\\\\\\\": 10,\\n              \\\\\\\"callTimeout\\\\\\\": 130,\\n              \\\\\\\"machineDetection\\\\\\\": \\\\\\\"DISABLE\\\\\\\",\\n              \\\\\\\"pause\\\\\\\": 3,\\n              \\\\\\\"retry\\\\\\\": {\\n                        \\\\\\\"minPeriod\\\\\\\": 1,\\n           \\t\\t\\t\\t\\t\\t\\t\\\\\\\"maxPeriod\\\\\\\": 5,\\n            \\t\\t\\t\\t\\t\\t\\\\\\\"maxCount\\\\\\\": 5\\n                    \\t},\\n              \\\\\\\"callTransfers\\\\\\\": [\\n                                {\\n                                  \\\\\\\"if\\\\\\\": \\\\\\\"dtmf\\\\\\\",\\n                                  \\\\\\\"equals\\\\\\\": \\\\\\\"1\\\\\\\",\\n                                  \\\\\\\"transferTo\\\\\\\": \\\\\\\"79029555525\\\\\\\"\\n                                },\\n                                {\\n                                  \\\\\\\"if\\\\\\\": \\\\\\\"dtmf\\\\\\\",\\n                                  \\\\\\\"equals\\\\\\\": \\\\\\\"2\\\\\\\",\\n                                  \\\\\\\"transferTo\\\\\\\": \\\\\\\"79029555551\\\\\\\"\\n                                }\\n                              ]\\n            },\\n            {\\n              \\\\\\\"from\\\\\\\": \\\\\\\"41793026700\\\\\\\",\\n              \\\\\\\"destinations\\\\\\\": [\\n                {\\n                  \\\\\\\"to\\\\\\\": \\\\\\\"41793026785\\\\\\\"\\n                }\\n              ],\\n              \\\\\\\"text\\\\\\\": \\\\\\\"A long time ago, in a galaxy far.\\\\\\\",\\n              \\\\\\\"sendAt\\\\\\\": \\\\\\\"2016-07-07T18:00:00.000+01:00\\\\\\\"\\n            }\\n          ]\\n        }\\\")\\n  .asString();\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"var client = new RestClient(\\\"http://api.infobip.com/tts/3/advanced\\\");\\nvar request = new RestRequest(Method.POST);\\nrequest.AddHeader(\\\"accept\\\", \\\"application/json\\\");\\nrequest.AddHeader(\\\"content-type\\\", \\\"application/json\\\");\\nrequest.AddHeader(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\");\\nrequest.AddParameter(\\\"application/json\\\", \\n                    \\\"{ \\n                      \\\\\\\"bulkId\\\\\\\": \\\\\\\"BULK-ID-123-xyz\\\\\\\",\\n                      \\\\\\\"messages\\\\\\\": [\\n                        {\\n                          \\\\\\\"from\\\\\\\": \\\\\\\"41793026700\\\\\\\",\\n                          \\\\\\\"destinations\\\\\\\": [\\n                            {\\n                              \\\\\\\"to\\\\\\\": \\\\\\\"41793026727\\\\\\\",\\n                              \\\\\\\"messageId\\\\\\\": \\\\\\\"MESSAGE-ID-123-xyz\\\\\\\"\\n                            },\\n                            {\\n                              \\\\\\\"to\\\\\\\": \\\\\\\"41793026731\\\\\\\"\\n                            }\\n                          ],\\n                          \\\\\\\"text\\\\\\\": \\\\\\\"Test Voice message.\\\\\\\",\\n                          \\\\\\\"language\\\\\\\": \\\\\\\"en\\\\\\\",\\n                          \\\\\\\"speechRate\\\\\\\": 1,\\n                          \\\\\\\"notifyUrl\\\\\\\": \\\\\\\"http://www.example.com/voice/advanced\\\\\\\",\\n                          \\\\\\\"notifyContentType\\\\\\\": \\\\\\\"application/json\\\\\\\",\\n                          \\\\\\\"validityPeriod\\\\\\\": 720,\\n                          \\\\\\\"sendAt\\\\\\\": \\\\\\\"2016-07-07T17:00:00.000+01:00\\\\\\\",\\n                          \\\\\\\"record\\\\\\\": false,\\n                          \\\\\\\"repeatDtmf\\\\\\\": \\\\\\\"123#\\\\\\\",\\n                          \\\\\\\"maxDtmf\\\\\\\": \\\\\\\"1\\\\\\\",\\n                          \\\\\\\"ringTimeout\\\\\\\": 45,\\n                          \\\\\\\"dtmfTimeout\\\\\\\": 10,\\n                          \\\\\\\"callTimeout\\\\\\\": 130,\\n                          \\\\\\\"machineDetection\\\\\\\": \\\\\\\"DISABLE\\\\\\\",\\n                          \\\\\\\"pause\\\\\\\": 3,\\n                          \\\\\\\"retry\\\\\\\": {\\n                        \\t\\t\\t\\\\\\\"minPeriod\\\\\\\": 1,\\n           \\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\\\\\"maxPeriod\\\\\\\": 5,\\n            \\t\\t\\t\\t\\t\\t\\t\\t\\t\\\\\\\"maxCount\\\\\\\": 5\\n                    \\t\\t\\t\\t\\t},\\n                          \\\\\\\"callTransfers\\\\\\\": [\\n                                {\\n                                  \\\\\\\"if\\\\\\\": \\\\\\\"dtmf\\\\\\\",\\n                                  \\\\\\\"equals\\\\\\\": \\\\\\\"1\\\\\\\",\\n                                  \\\\\\\"transferTo\\\\\\\": \\\\\\\"79029555525\\\\\\\"\\n                                },\\n                                {\\n                                  \\\\\\\"if\\\\\\\": \\\\\\\"dtmf\\\\\\\",\\n                                  \\\\\\\"equals\\\\\\\": \\\\\\\"2\\\\\\\",\\n                                  \\\\\\\"transferTo\\\\\\\": \\\\\\\"79029555551\\\\\\\"\\n                                }\\n                              ]\\n                        },\\n                        {\\n                          \\\\\\\"from\\\\\\\": \\\\\\\"41793026700\\\\\\\",\\n                          \\\\\\\"destinations\\\\\\\": [\\n                            {\\n                              \\\\\\\"to\\\\\\\": \\\\\\\"41793026785\\\\\\\"\\n                            }\\n                          ],\\n                          \\\\\\\"text\\\\\\\": \\\\\\\"A long time ago, in a galaxy far.\\\\\\\",\\n                          \\\\\\\"sendAt\\\\\\\": \\\\\\\"2016-07-07T18:00:00.000+01:00\\\\\\\"\\n                        }\\n                      ]\\n                    }\\\", \\n                    ParameterType.RequestBody);\\nIRestResponse response = client.Execute(request);\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"var data = JSON.stringify({\\n  \\\"bulkId\\\": \\\"BULK-ID-123-xyz\\\",\\n  \\\"messages\\\": [\\n    {\\n      \\\"from\\\": \\\"41793026700\\\",\\n      \\\"destinations\\\": [\\n        { \\n          \\\"to\\\": \\\"41793026727\\\",\\n          \\\"messageId\\\": \\\"MESSAGE-ID-123-xyz\\\"\\n        },\\n        {\\n          \\\"to\\\": \\\"41793026731\\\"\\n        }\\n      ],\\n      \\\"text\\\": \\\"Test Voice message.\\\",\\n      \\\"language\\\": \\\"en\\\",\\n      \\\"speechRate\\\": 1,\\n      \\\"notifyUrl\\\": \\\"http://www.example.com/voice/advanced\\\",\\n      \\\"notifyContentType\\\": \\\"application/json\\\",\\n      \\\"validityPeriod\\\": 720,\\n      \\\"sendAt\\\": \\\"2016-07-07T17:00:00.000+01:00\\\",\\n      \\\"record\\\": false,\\n      \\\"repeatDtmf\\\": \\\"123#\\\",\\n      \\\"maxDtmf\\\": \\\"1\\\",\\n      \\\"ringTimeout\\\": 45,\\n      \\\"dtmfTimeout\\\": 10,\\n      \\\"callTimeout\\\": 130,\\n      \\\"machineDetection\\\": \\\"DISABLE\\\",\\n      \\\"pause\\\": 3,\\n      \\\"callTransfers\\\": [\\n          {\\n            \\\"if\\\": \\\"dtmf\\\",\\n            \\\"equals\\\": \\\"1\\\",\\n            \\\"transferTo\\\": \\\"79029555525\\\"\\n          },\\n          {\\n            \\\"if\\\": \\\"dtmf\\\",\\n            \\\"equals\\\": \\\"2\\\",\\n            \\\"transferTo\\\": \\\"79029555551\\\"\\n          }\\n         ]\\n      \\n    },\\n    {\\n      \\\"from\\\": \\\"41793026700\\\",\\n      \\\"destinations\\\": [\\n        {\\n          \\\"to\\\": \\\"41793026785\\\"\\n        }\\n      ],\\n      \\\"text\\\": \\\"A long time ago, in a galaxy far.\\\",\\n      \\\"sendAt\\\": \\\"2016-07-07T18:00:00.000+01:00\\\"\\n    }\\n  ]\\n});\\n\\nvar xhr = new XMLHttpRequest();\\nxhr.withCredentials = true;\\n\\nxhr.addEventListener(\\\"readystatechange\\\", function () {\\n  if (this.readyState === 4) {\\n    console.log(this.responseText);\\n  }\\n});\\n\\nxhr.open(\\\"POST\\\", \\\"http://api.infobip.com/tts/3/advanced\\\");\\nxhr.setRequestHeader(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\");\\nxhr.setRequestHeader(\\\"content-type\\\", \\\"application/json\\\");\\nxhr.setRequestHeader(\\\"accept\\\", \\\"application/json\\\");\\n\\nxhr.send(data);\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n## API response\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"bulkId\\\": \\\"BULK-ID-123-xyz\\\",\\n  \\\"messages\\\": [\\n    {\\n      \\\"to\\\": \\\"41793026727\\\",\\n      \\\"status\\\": {\\n        \\\"groupId\\\": 1,\\n        \\\"groupName\\\": \\\"PENDING\\\",\\n        \\\"id\\\": 26,\\n        \\\"name\\\": \\\"PENDING_ACCEPTED\\\",\\n        \\\"description\\\": \\\"Message accepted, pending for delivery.\\\"\\n      },\\n      \\\"messageId\\\": \\\"MESSAGE-ID-123-xyz\\\"\\n    },\\n    {\\n      \\\"to\\\": \\\"41793026731\\\",\\n      \\\"status\\\": {\\n        \\\"groupId\\\": 1,\\n        \\\"groupName\\\": \\\"PENDING\\\",\\n        \\\"id\\\": 26,\\n        \\\"name\\\": \\\"PENDING_ACCEPTED\\\",\\n        \\\"description\\\": \\\"Message accepted, pending for delivery.\\\"\\n      },\\n      \\\"messageId\\\":\\\"9304a5a3ab19-1ca1-be74-76ad87651ed25f35\\\"\\n    },\\n    {\\n      \\\"to\\\": \\\"79029555525\\\",\\n      \\\"status\\\": {\\n        \\\"groupId\\\": 1,\\n        \\\"groupName\\\": \\\"PENDING\\\",\\n        \\\"id\\\": 26,\\n        \\\"name\\\": \\\"PENDING_ACCEPTED\\\",\\n        \\\"description\\\": \\\"Message accepted, pending for delivery.\\\"\\n      },\\n      \\\"messageId\\\":\\\"f0401b7b-5c44-4a62-8a1b-61ec26101ff0\\\"\\n    }\\n  ]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"This method allows you to send advanced voice messages with all the available features and parameters","slug":"fully-featured-voice-messages","type":"endpoint","title":"Fully featured voice messages"}

postFully featured voice messages

This method allows you to send advanced voice messages with all the available features and parameters

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

bulkId:
string
The ID which uniquely identifies the request.
from:
string
Numeric sender ID in E.164 format
to:
required
array of strings
Array of message destination addresses. Destination address must be in the international format (Example: 41793026727).
messageId:
string
The ID that uniquely identifies the message sent.
text:
string
Text of the message that will be sent. [Pause](#section-pause-between-words) between words is possible.
language:
stringen
If the message is in text format, languages in which the message is written must be defined for correct pronunciation. In the [Languages section](/docs/single-voice-message#section-languages) you can find the list of languages that we support.
audioFileUrl:
string
Besides the text format of the message, audio recording (in waw or mp3 format) can also be delivered as a voice message to the recipient. Audio file must be uploaded online so the existing URL can be available for the file download. Size of the audio file must be below 4 MB.
speechRate:
double1
The reproduction speed of speech in the resulting message. Effective only when using text. Supported range is from 0.5 (slow down speech) to 2 (speed up speech). Values less than 0.5 will be replaced with 0.5, and values higher than 2 will be replaced with 2.
notifyUrl:
string
The URL on your callback server on which the [Delivery report](http://dev.infobip.com/v1/docs/delivery-reports) will be sent.
notifyContentType:
string
Preferred Delivery report content type. Can be `application/json` or `application/xml`.
validityPeriod:
integer
The message validity period shown in minutes. When the period expires, it will not be allowed for the message to be sent. A validity period longer than 48h is not supported (in this case, it will be automatically set to 48h).
sendAt:
datetime
Used for scheduled Voice messages (message not to be sent immediately, but at scheduled time).
record:
booleanfalse
Record the call and expose it to client as URL inside the delivery report. Can be `true` or `false`.
repeatDtmf:
string
Response (DTMF) code which enables repeating message if a subscriber enters it.
maxDtmf:
integerint(0)
The maximum number of DTMF codes the system will attempt to receive. Reading user input stops once that number of codes is reached.
ringTimeout:
integer45
The duration of the call prior to answer shown in seconds, unless there are no [operator limitations](#section-ring-timeout-limitations).
dtmfTimeout:
integer10
The waiting period for end user to enter dtmf digits.
callTimeout:
integer
Total call period shown in seconds.
machineDetection:
stringdisable
This action attempts to detect answering machines at the beginning of the call. Possible values: ['disable'](#section-disable-default-value-), ['hangup'](#section-hangup).
callTransfers:
array of objects
Possible call transfer scenario defined as JSON object. See <a href="#call-transfers">example below</a>
track:
string
Indicates if the message has to be tracked for Conversion rates. Possible values: `VOICE`.
processKey:
string
Key that uniquely identifies Conversion tracking process.
type:
string
User defined type of the Conversion tracking process or flow type or message type, etc. Example: `ONE_TIME_PIN` or `SOCIAL_INVITES`.
callbackData:
string
Additional client's data that will be sent on the notifyUrl. The maximum value is 200 characters.
pause:
integer0
Indicating period of time in seconds between end user answering the call and message starting to be played. Minimal value is 0 and maximum value is 10 seconds. Pause is ignored if machine detection is used.
retry:
object
Used to define if the delivery of the Voice messages should be retried in case the first try doesn't succeed. Additional retries will be made according to the schedule defined by minPeriod and maxPeriod parameters and platform's internal retry logic. If the minPeriod differs maxPeriod, delivery will be retried in the following manner: after 1 min, 2 min, 5 min, 10 min, 20 min, 30 min, 1 hour, 2 hours, 4 hours, 8 hours, 16 hours, 24 hours or until maxPeriod is reached. If the retry attempt for the MaxPeriod is reached, the MaxPeriod will be used for all subsequent retries. If the minPeriod and the maxPeriod are defined as equal values, the period of time between retries will be equal to this value. Message delivery will be retried until the successful delivery or message validity or maxCount value is reached.
minPeriod:
integer
Defines the minimal waiting time (in minutes) after the previous failed attempt to try to deliver the message again.
maxPeriod:
integer
Defines the maximum waiting time (in minutes) after the previous failed attempt to try to deliver the message again.
maxCount:
integer
Specify the maximum number of retry attempts. Maximum value of the maxCount is 4. Higher value, if entered will be set to 4.
sendingSpeed:
object
Sending rate defined in number of messages sent per second, minute, hour or day. First message will be sent immediately (or at sendAt time if scheduling is used) and subsequent messages will be sent respecting defined speed. For example, if sendingSpeed is defined as 10 messages per hour, messages will be sent every 6 minutes. If this parameter is defined, validityPeriod is ignored.
speed:
integer
Defines the number of messages that will be sent per specified time unit.
timeUnit:
string
Defines time unit used for calculating sending speed. Possible values: second, minute, hour and day.

Examples


Result Format


Documentation

# Response format If successful, the response header HTTP status code will be `200 OK` and the message will be sent. If you try to send the message without authorization, you will receive a `401 Unauthorized` error. ## VoiceResponse |Parameter|Type|Description| |-|-|-| |*bulkId*|String|The ID that uniquely identifies the request. Bulk ID will be received when a message is sent to more than one destination address.| |*messages*|[VoiceResponseDetails](#section-voiceresponsedetails)|Array of sent message objects, one object per every message.| ### VoiceResponseDetails |Parameter|Type|Description| |-|-|-| |*to*|String|The message destination address.| |*status*|[Status](#section-status)|Indicates whether the message has been sent successfully, not sent, delivered, not delivered, waiting for delivery or any other possible status.| |*messageId*|String|The ID that uniquely identifies the sent message.| #### Status |Parameter|Type|Description| |-|-|-| |*groupId*|int|Status [group ID](http://dev.infobip.com/v1/docs/response-codes#status-object-example).| |*groupName*|String|Status [group name](http://dev.infobip.com/v1/docs/response-codes#status-object-example).| |*id*|int|Status [ID](http://dev.infobip.com/v1/docs/response-codes#status-object-example).| |*name*|String|Status [name](http://dev.infobip.com/v1/docs/response-codes#status-object-example).| |*description*|String|Human readable [description](http://dev.infobip.com/v1/docs/response-codes#status-object-example) of the status.| ## Pause between words Adding pauses between the words and extending the duration of the voice message is possible by using the comma character ",". For example, if you want to have a 3 second pause after each word, then the text parameter should look like this "one,,,,,,two,,,,,,three,,,,,,". Each coma creates a pause of 0,5 seconds. ## Ring timeout limitations There are no limitations on the Voice platform regarding this value, however, most of the operators have their own ring timeout limitations and it is advisable to keep the ringTimeout value up to 45s. ## What is Answering Machine Detection (AMD)? This is just an attempt (without guarantee) of answering machine detection based upon patterns in an audio stream after receiving an answer signal from the operator. Activities can be defined by setting one of two possible values: disable, hang up. ## Disable (default value) This is the default value in case the parameter machineDetection is not set in the API request. This value represents no usage of AMD option, and during the call there won't be any attempts in detecting an answering machine. ## Hangup If the parameter machineDetection is set to 'hangup', the Voice platform will try to detect an answering machine, and in case it detects one, the call will be hung up immediately. [block:api-header] { "title": "Call Transfers" } [/block] Using call transfer, you can send an interactive message to your subscribers, providing them the opportunity to respond by pressing their phone keys. When your subscriber chooses a number call transfer will redirect a call to the set number. The Field is JSON formatted. Call transfer for any DTMF ``` [ { "if": "anyDtmf", "transferTo": "79029555525" } ] ``` Call transfer for specific DTMF ```JSON [ { "if": "dtmf", "equals": "1", "transferTo": "79029555525" }, { "if": "dtmf", "equals": "2", "transferTo": "79029555551" } ] ``` ###Request example [block:code] { "codes": [ { "code": "POST /tts/3/advanced HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nContent-Type: application/json\nAccept: application/json\n\n{\n \"bulkId\":\"BULK-ID-123-xyz\",\n \"messages\":[\n {\n \"from\":\"41793026700\",\n \"destinations\":[\n {\n \"to\":\"41793026727\",\n \"messageId\":\"MESSAGE-ID-123-xyz\"\n },\n {\n \"to\":\"41793026731\"\n }\n ],\n \"text\": \"Test Voice message.\",\n \"language\": \"en\",\n \"speechRate\":1,\n \"notifyUrl\":\"http://www.example.com/voice/advanced\",\n \"notifyContentType\":\"application/json\",\n \"validityPeriod\": 720,\n \"sendAt\":\"2016-07-07T17:00:00.000+01:00\",\n \"record\": false,\n \"repeatDtmf\": \"123#\",\n \"maxDtmf\":1,\n \"ringTimeout\": 45,\n \"dtmfTimeout\": 10,\n \"callTimeout\": 130,\n \"machineDetection\": \"DISABLE\",\n \"pause\":3,\n \"retry\": {\n \"minPeriod\":1,\n \t\"maxPeriod\": 5,\n \"maxCount\":5\n \t\t},\n \"callTransfers\": [\n {\n \"if\": \"dtmf\",\n \"equals\": \"1\",\n \"transferTo\": \"79029555525\"\n },\n {\n \"if\": \"dtmf\",\n \"equals\": \"2\",\n \"transferTo\": \"79029555551\"\n }\n ]\n \n },\n {\n \"from\":\"41793026700\",\n \"destinations\":[\n {\n \"to\":\"41793026785\"\n }\n ],\n \"text\":\"A long time ago, in a galaxy far.\",\n \"sendAt\":\"2016-07-07T18:00:00.000+01:00\"\n }\n ]\n}", "language": "json" }, { "code": "curl -X POST \\\n-H \"Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\" \\\n-H \"Content-Type: application/json\" \\\n-H \"Accept: application/json\" \\\n-d '{\n \"bulkId\":\"BULK-ID-123-xyz\",\n \"messages\":[\n {\n \"from\":\"41793026700\",\n \"destinations\":[\n {\n \"to\":\"41793026727\",\n \"messageId\":\"MESSAGE-ID-123-xyz\"\n },\n {\n \"to\":\"41793026731\"\n }\n ],\n \"text\": \"Test Voice message.\",\n \"language\": \"en\",\n \"speechRate\":1,\n \"notifyUrl\":\"http://www.example.com/voice/advanced\",\n \"notifyContentType\":\"application/json\",\n \"validityPeriod\": 720,\n \"sendAt\":\"2016-07-07T17:00:00.000+01:00\",\n \"record\": false,\n \"repeatDtmf\": \"123#\",\n \"maxDtmf\":1,\n \"ringTimeout\": 45,\n \"dtmfTimeout\": 10,\n \"callTimeout\": 130,\n \"machineDetection\": \"DISABLE\",\n \"pause\": 3,\n \"retry\": {\n \"minPeriod\":1,\n \t\"maxPeriod\": 5,\n \"maxCount\":5\n },\n \"callTransfers\": [\n {\n \"if\": \"dtmf\",\n \"equals\": \"1\",\n \"transferTo\": \"79029555525\"\n },\n {\n \"if\": \"dtmf\",\n \"equals\": \"2\",\n \"transferTo\": \"79029555551\"\n }\n ]\n },\n {\n \"from\":\"41793026700\",\n \"destinations\":[\n {\n \"to\":\"41793026785\"\n }\n ],\n \"text\":\"A long time ago, in a galaxy far.\",\n \"sendAt\":\"2016-07-07T18:00:00.000+01:00\"\n }\n ]\n}' \"http://api.infobip.com/tts/3/advanced\"", "language": "curl" }, { "code": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n CURLOPT_URL => \"http://api.infobip.com/tts/3/advanced\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_POSTFIELDS => \"{ \n \\\"bulkId\\\": \\\"BULK-ID-123-xyz\\\",\n \\\"messages\\\": [\n {\n \\\"from\\\": \\\"41793026700\\\",\n \\\"destinations\\\": [\n {\n \\\"to\\\": \\\"41793026727\\\",\n \\\"messageId\\\": \\\"MESSAGE-ID-123-xyz\\\"\n },\n {\n \\\"to\\\": \\\"41793026731\\\"\n }\n ],\n \\\"text\\\": \\\"Test Voice message.\\\",\n \\\"language\\\": \\\"en\\\",\n \\\"speechRate\\\": 1,\n \\\"notifyUrl\\\": \\\"http://www.example.com/voice/advanced\\\",\n \\\"notifyContentType\\\": \\\"application/json\\\",\n \\\"validityPeriod\\\": 720,\n \\\"sendAt\\\": \\\"2016-07-07T17:00:00.000+01:00\\\",\n \\\"record\\\": false,\n \\\"repeatDtmf\\\": \\\"123#\\\",\n \\\"maxDtmf\\\": \\\"1\\\",\n \\\"ringTimeout\\\": 45,\n \\\"dtmfTimeout\\\": 10,\n \\\"callTimeout\\\": 130,\n \\\"machineDetection\\\": \\\"DISABLE\\\",\n \\\"pause\\\": 3,\n \\\"retry\\\": {\n \\\"minPeriod\\\": 1,\n \t\t\t\t\t\t\t\t\t\t\t\t\\\"maxPeriod\\\": 5,\n \t\t\t\t\t\t\t\t\t\t\t\\\"maxCount\\\": 5\n },\n \\\"callTransfers\\\": [\n {\n \\\"if\\\": \\\"dtmf\\\",\n \\\"equals\\\": \\\"1\\\",\n \\\"transferTo\\\": \\\"79029555525\\\"\n },\n {\n \\\"if\\\": \\\"dtmf\\\",\n \\\"equals\\\": \\\"2\\\",\n \\\"transferTo\\\": \\\"79029555551\\\"\n }\n ]\n },\n {\n \\\"from\\\": \\\"41793026700\\\",\n \\\"destinations\\\": [\n {\n \\\"to\\\": \\\"41793026785\\\"\n }\n ],\n \\\"text\\\": \\\"A long time ago, in a galaxy far.\\\",\n \\\"sendAt\\\": \\\"2016-07-07T18:00:00.000+01:00\\\"\n }\n ]\n }\",\n CURLOPT_HTTPHEADER => array(\n \"accept: application/json\",\n \"authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\",\n \"content-type: application/json\"\n ),\n));\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}", "language": "php" }, { "code": "require 'uri'\nrequire 'net/http'\n\nurl = URI(\"http://api.infobip.com/tts/3/advanced\")\n\nhttp = Net::HTTP.new(url.host, url.port)\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"authorization\"] = 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='\nrequest[\"content-type\"] = 'application/json'\nrequest[\"accept\"] = 'application/json'\nrequest.body = \"{ \n \\\"bulkId\\\": \\\"BULK-ID-123-xyz\\\",\n \\\"messages\\\": [\n {\n \\\"from\\\": \\\"41793026700\\\",\n \\\"destinations\\\": [\n {\n \\\"to\\\": \\\"41793026727\\\",\n \\\"messageId\\\": \\\"MESSAGE-ID-123-xyz\\\"\n },\n {\n \\\"to\\\": \\\"41793026731\\\"\n }\n ],\n \\\"text\\\": \\\"Test Voice message.\\\",\n \\\"language\\\": \\\"en\\\",\n \\\"speechRate\\\": 1,\n \\\"notifyUrl\\\": \\\"http://www.example.com/voice/advanced\\\",\n \\\"notifyContentType\\\": \\\"application/json\\\",\n \\\"validityPeriod\\\": 720,\n \\\"sendAt\\\": \\\"2016-07-07T17:00:00.000+01:00\\\",\n \\\"record\\\": false,\n \\\"repeatDtmf\\\": \\\"123#\\\",\n \\\"maxDtmf\\\": \\\"1\\\",\n \\\"ringTimeout\\\": 45,\n \\\"dtmfTimeout\\\": 10,\n \\\"callTimeout\\\": 130,\n \\\"machineDetection\\\": \\\"DISABLE\\\",\n\t\t\t\t\t\t\t\t\t\t\\\"pause\\\": 3,\n\t\t\t\t\t\t\t\t\t\t\\\"retry\\\": {\n \\\"minPeriod\\\": 1,\n \t\t\t\t\t\t\t\\\"maxPeriod\\\": 5,\n \t\t\t\t\t\t\\\"maxCount\\\": 5\n \t},\n \\\"callTransfers\\\": [\n {\n \\\"if\\\": \\\"dtmf\\\",\n \\\"equals\\\": \\\"1\\\",\n \\\"transferTo\\\": \\\"79029555525\\\"\n },\n {\n \\\"if\\\": \\\"dtmf\\\",\n \\\"equals\\\": \\\"2\\\",\n \\\"transferTo\\\": \\\"79029555551\\\"\n }\n ]\n },\n {\n \\\"from\\\": \\\"41793026700\\\",\n \\\"destinations\\\": [\n {\n \\\"to\\\": \\\"41793026785\\\"\n }\n ],\n \\\"text\\\": \\\"A long time ago, in a galaxy far.\\\",\n \\\"sendAt\\\": \\\"2016-07-07T18:00:00.000+01:00\\\"\n }\n ]\n }\"\n\nresponse = http.request(request)\nputs response.read_body", "language": "ruby" }, { "code": "import http.client\n\nconn = http.client.HTTPConnection(\"api.infobip.com\")\n\npayload = \"{ \n \\\"bulkId\\\": \\\"BULK-ID-123-xyz\\\",\n \\\"messages\\\": [\n {\n \\\"from\\\": \\\"41793026700\\\",\n \\\"destinations\\\": [\n {\n \\\"to\\\": \\\"41793026727\\\",\n \\\"messageId\\\": \\\"MESSAGE-ID-123-xyz\\\"\n },\n {\n \\\"to\\\": \\\"41793026731\\\"\n }\n ],\n \\\"text\\\": \\\"Test Voice message.\\\",\n \\\"language\\\": \\\"en\\\",\n \\\"speechRate\\\": 1,\n \\\"notifyUrl\\\": \\\"http://www.example.com/voice/advanced\\\",\n \\\"notifyContentType\\\": \\\"application/json\\\",\n \\\"validityPeriod\\\": 720,\n \\\"sendAt\\\": \\\"2016-07-07T17:00:00.000+01:00\\\",\n \\\"record\\\": false,\n \\\"repeatDtmf\\\": \\\"123#\\\",\n \\\"maxDtmf\\\": \\\"1\\\",\n \\\"ringTimeout\\\": 45,\n \\\"dtmfTimeout\\\": 10,\n \\\"callTimeout\\\": 130,\n \\\"machineDetection\\\": \\\"DISABLE\\\",\n \t\t\\\"pause\\\": 3,\n \t\t\\\"retry\\\": {\n \\\"minPeriod\\\": 1,\n \t\t\t\t\t\t\t\\\"maxPeriod\\\": 5,\n \t\t\t\t\t\t\\\"maxCount\\\": 5\n \t},\n \\\"callTransfers\\\": [\n {\n \\\"if\\\": \\\"dtmf\\\",\n \\\"equals\\\": \\\"1\\\",\n \\\"transferTo\\\": \\\"79029555525\\\"\n },\n {\n \\\"if\\\": \\\"dtmf\\\",\n \\\"equals\\\": \\\"2\\\",\n \\\"transferTo\\\": \\\"79029555551\\\"\n }\n ]\n },\n {\n \\\"from\\\": \\\"41793026700\\\",\n \\\"destinations\\\": [\n {\n \\\"to\\\": \\\"41793026785\\\"\n }\n ],\n \\\"text\\\": \\\"A long time ago, in a galaxy far.\\\",\n \\\"sendAt\\\": \\\"2016-07-07T18:00:00.000+01:00\\\"\n }\n ]\n }\"\n\nheaders = {\n 'authorization': \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\",\n 'content-type': \"application/json\",\n 'accept': \"application/json\"\n }\n\nconn.request(\"POST\", \"/tts/3/advanced\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))", "language": "python" }, { "code": "HttpResponse<String> response = Unirest.post(\"http://api.infobip.com/tts/3/advanced\")\n .header(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\")\n .header(\"content-type\", \"application/json\")\n .header(\"accept\", \"application/json\")\n .body(\"{ \n \\\"bulkId\\\": \\\"BULK-ID-123-xyz\\\",\n \\\"messages\\\": [\n {\n \\\"from\\\": \\\"41793026700\\\",\n \\\"destinations\\\": [\n {\n \\\"to\\\": \\\"41793026727\\\",\n \\\"messageId\\\": \\\"MESSAGE-ID-123-xyz\\\"\n },\n {\n \\\"to\\\": \\\"41793026731\\\"\n }\n ],\n \\\"text\\\": \\\"Test Voice message.\\\",\n \\\"language\\\": \\\"en\\\",\n \\\"speechRate\\\": 1,\n \\\"notifyUrl\\\": \\\"http://www.example.com/voice/advanced\\\",\n \\\"notifyContentType\\\": \\\"application/json\\\",\n \\\"validityPeriod\\\": 720,\n \\\"sendAt\\\": \\\"2016-07-07T17:00:00.000+01:00\\\",\n \\\"record\\\": false,\n \\\"repeatDtmf\\\": \\\"123#\\\",\n \\\"maxDtmf\\\": \\\"1\\\",\n \\\"ringTimeout\\\": 45,\n \\\"dtmfTimeout\\\": 10,\n \\\"callTimeout\\\": 130,\n \\\"machineDetection\\\": \\\"DISABLE\\\",\n \\\"pause\\\": 3,\n \\\"retry\\\": {\n \\\"minPeriod\\\": 1,\n \t\t\t\t\t\t\t\\\"maxPeriod\\\": 5,\n \t\t\t\t\t\t\\\"maxCount\\\": 5\n \t},\n \\\"callTransfers\\\": [\n {\n \\\"if\\\": \\\"dtmf\\\",\n \\\"equals\\\": \\\"1\\\",\n \\\"transferTo\\\": \\\"79029555525\\\"\n },\n {\n \\\"if\\\": \\\"dtmf\\\",\n \\\"equals\\\": \\\"2\\\",\n \\\"transferTo\\\": \\\"79029555551\\\"\n }\n ]\n },\n {\n \\\"from\\\": \\\"41793026700\\\",\n \\\"destinations\\\": [\n {\n \\\"to\\\": \\\"41793026785\\\"\n }\n ],\n \\\"text\\\": \\\"A long time ago, in a galaxy far.\\\",\n \\\"sendAt\\\": \\\"2016-07-07T18:00:00.000+01:00\\\"\n }\n ]\n }\")\n .asString();", "language": "java" }, { "code": "var client = new RestClient(\"http://api.infobip.com/tts/3/advanced\");\nvar request = new RestRequest(Method.POST);\nrequest.AddHeader(\"accept\", \"application/json\");\nrequest.AddHeader(\"content-type\", \"application/json\");\nrequest.AddHeader(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\");\nrequest.AddParameter(\"application/json\", \n \"{ \n \\\"bulkId\\\": \\\"BULK-ID-123-xyz\\\",\n \\\"messages\\\": [\n {\n \\\"from\\\": \\\"41793026700\\\",\n \\\"destinations\\\": [\n {\n \\\"to\\\": \\\"41793026727\\\",\n \\\"messageId\\\": \\\"MESSAGE-ID-123-xyz\\\"\n },\n {\n \\\"to\\\": \\\"41793026731\\\"\n }\n ],\n \\\"text\\\": \\\"Test Voice message.\\\",\n \\\"language\\\": \\\"en\\\",\n \\\"speechRate\\\": 1,\n \\\"notifyUrl\\\": \\\"http://www.example.com/voice/advanced\\\",\n \\\"notifyContentType\\\": \\\"application/json\\\",\n \\\"validityPeriod\\\": 720,\n \\\"sendAt\\\": \\\"2016-07-07T17:00:00.000+01:00\\\",\n \\\"record\\\": false,\n \\\"repeatDtmf\\\": \\\"123#\\\",\n \\\"maxDtmf\\\": \\\"1\\\",\n \\\"ringTimeout\\\": 45,\n \\\"dtmfTimeout\\\": 10,\n \\\"callTimeout\\\": 130,\n \\\"machineDetection\\\": \\\"DISABLE\\\",\n \\\"pause\\\": 3,\n \\\"retry\\\": {\n \t\t\t\\\"minPeriod\\\": 1,\n \t\t\t\t\t\t\t\t\t\t\\\"maxPeriod\\\": 5,\n \t\t\t\t\t\t\t\t\t\\\"maxCount\\\": 5\n \t\t\t\t\t},\n \\\"callTransfers\\\": [\n {\n \\\"if\\\": \\\"dtmf\\\",\n \\\"equals\\\": \\\"1\\\",\n \\\"transferTo\\\": \\\"79029555525\\\"\n },\n {\n \\\"if\\\": \\\"dtmf\\\",\n \\\"equals\\\": \\\"2\\\",\n \\\"transferTo\\\": \\\"79029555551\\\"\n }\n ]\n },\n {\n \\\"from\\\": \\\"41793026700\\\",\n \\\"destinations\\\": [\n {\n \\\"to\\\": \\\"41793026785\\\"\n }\n ],\n \\\"text\\\": \\\"A long time ago, in a galaxy far.\\\",\n \\\"sendAt\\\": \\\"2016-07-07T18:00:00.000+01:00\\\"\n }\n ]\n }\", \n ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);", "language": "csharp" }, { "code": "var data = JSON.stringify({\n \"bulkId\": \"BULK-ID-123-xyz\",\n \"messages\": [\n {\n \"from\": \"41793026700\",\n \"destinations\": [\n { \n \"to\": \"41793026727\",\n \"messageId\": \"MESSAGE-ID-123-xyz\"\n },\n {\n \"to\": \"41793026731\"\n }\n ],\n \"text\": \"Test Voice message.\",\n \"language\": \"en\",\n \"speechRate\": 1,\n \"notifyUrl\": \"http://www.example.com/voice/advanced\",\n \"notifyContentType\": \"application/json\",\n \"validityPeriod\": 720,\n \"sendAt\": \"2016-07-07T17:00:00.000+01:00\",\n \"record\": false,\n \"repeatDtmf\": \"123#\",\n \"maxDtmf\": \"1\",\n \"ringTimeout\": 45,\n \"dtmfTimeout\": 10,\n \"callTimeout\": 130,\n \"machineDetection\": \"DISABLE\",\n \"pause\": 3,\n \"callTransfers\": [\n {\n \"if\": \"dtmf\",\n \"equals\": \"1\",\n \"transferTo\": \"79029555525\"\n },\n {\n \"if\": \"dtmf\",\n \"equals\": \"2\",\n \"transferTo\": \"79029555551\"\n }\n ]\n \n },\n {\n \"from\": \"41793026700\",\n \"destinations\": [\n {\n \"to\": \"41793026785\"\n }\n ],\n \"text\": \"A long time ago, in a galaxy far.\",\n \"sendAt\": \"2016-07-07T18:00:00.000+01:00\"\n }\n ]\n});\n\nvar xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n if (this.readyState === 4) {\n console.log(this.responseText);\n }\n});\n\nxhr.open(\"POST\", \"http://api.infobip.com/tts/3/advanced\");\nxhr.setRequestHeader(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\nxhr.setRequestHeader(\"accept\", \"application/json\");\n\nxhr.send(data);", "language": "javascript" } ] } [/block] ## API response [block:code] { "codes": [ { "code": "{\n \"bulkId\": \"BULK-ID-123-xyz\",\n \"messages\": [\n {\n \"to\": \"41793026727\",\n \"status\": {\n \"groupId\": 1,\n \"groupName\": \"PENDING\",\n \"id\": 26,\n \"name\": \"PENDING_ACCEPTED\",\n \"description\": \"Message accepted, pending for delivery.\"\n },\n \"messageId\": \"MESSAGE-ID-123-xyz\"\n },\n {\n \"to\": \"41793026731\",\n \"status\": {\n \"groupId\": 1,\n \"groupName\": \"PENDING\",\n \"id\": 26,\n \"name\": \"PENDING_ACCEPTED\",\n \"description\": \"Message accepted, pending for delivery.\"\n },\n \"messageId\":\"9304a5a3ab19-1ca1-be74-76ad87651ed25f35\"\n },\n {\n \"to\": \"79029555525\",\n \"status\": {\n \"groupId\": 1,\n \"groupName\": \"PENDING\",\n \"id\": 26,\n \"name\": \"PENDING_ACCEPTED\",\n \"description\": \"Message accepted, pending for delivery.\"\n },\n \"messageId\":\"f0401b7b-5c44-4a62-8a1b-61ec26101ff0\"\n }\n ]\n}", "language": "json" } ] } [/block]