API Examples

1. PHONE TERMINATED MESSAGES

1.1 Send a voice message

A complete URL for sending “Hello World” to the subscriber with number +46701234567 is given below. Pasting this URL into a web browser and pressing ‘Enter’ creates the correct GET-request and sends it to the specified host and port.

https://get.spirispeech.spirius.com:55550/sendtts?User=myuser&Pass=mypassword&To=+46701234567&From=+46701234567&Msg=Hello+world

If everything is correct the web browser will display a message similar to the one given below.

request=true&TransactionId=eda0ae82-98d7-40b3-bbaa-205b68b63c0b

The next example shows how to send ”åäö” URL encoded.

https://get.spirispeech.spirius.com:55550/sendtts?Pass=123456789&User=ABCDefgh&to=+4687654321&From=+46701234567&Msg=C3%A5%C3%A4%C3%B6

2. DELIVERY REPORTS

The message below is an example of a HTTP request sent from Spirius, containing the delivery report for transaction id bc757d8a-a0db-4e0d-a388-bf6d6eee0d87.

You will receive a delivery report each time the user listens to the message. If the user choose “listen to the message again” once, you will get two delivery reports. The last one have the Sequence parameter set to “end”.

GET /dlrReport HTTP/1.1
Result=1&StatusCode1&Sequence=end&TransactionId=bc757d8a-a0db-4e0d-a388-bf6d6eee0d87&ProgressTime=87&Digits=22255