Thank you for filling out the form. One of our mobile experts will be in touch shortly to discuss your inquiry.
If you have any other questions please feel free to email us directly at info@mitto.ch
Thank you for filling out the form. One of our mobile experts will be in touch shortly to discuss your inquiry.
If you have any other questions please feel free to email us directly at info@mitto.ch
Mitto’s Voice API is a feature of the 2FA API. You can use it to send text-to-speech messages. Features include the ability to:
We organize our documentation as follows:
Get started with Mitto’s Voice API. After reading this, you will know how to sign up with Mitto, what endpoints are available, and the request and response format for this API.
To get started with Mitto, do the following:
1. Sign up for a Mitto account at https://www.mitto.ch/contact/ or write to info@mitto.ch.
2. Submit the IPs you want to use for requests. They must be whitelisted on Mitto’s system.
3. For callbacks, provide your dedicated callback URL and method (both GET and POST methods are supported). Alternatively, you can use dynamic callbacks.
4. Mitto will respond with your API key and confirmation that your IP addresses and callback URL are configured.
To send a text-to-speech (TTS) message, make a POST request to this endpoint: https://cpaas.mittoapi.com/2fa/send
The rest of the message-related information goes in as body parameters. Include the Content-Type: application/json header in your request.
By default, Mitto returns JSON.
A sample request in cURL looks like:
curl -X POST https://cpaas.mittoapi.com/2fa/send.json \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d 'From=XXXXXXXX' \
-d 'To=XXXXXXXX' \
-d 'service=MitoAPI' \
-d 'channel=call' \
-d 'body=Your verification code is: {code}' \
-u 'YourAccountSid:YourAuthToken'
The response is returned in JSON. A successful response looks like:
{"code":200,"message":"OK","requestID":"OTPb6eb071d21124dbab20b095c25f1274f"}
For more details about response parameters, refer to the information in Voice API Reference. For more details about use cases with example request and responses, refer to Voice Use Cases.
Mitto’s Voice API requires authentication on every request. To authenticate, you use basic authentication. Basic authentication is a simple authentication method that’s built into the HTTP protocol. You send HTTP requests with an Authorization header formatted like so:
Authorization: Basic base64(accountID:API key)
In the example, you would replace base64(accountID:API key) with a base64-encoded string where the string consisted of “accountID:API key”.
For examples of requests using basic authentication, refer to Voice Use Cases.