Prerequisites

In order to use the Phone Calls API, you need the following.

Basic request format

Making a Phone Call is done with a simple POST request to the API. There are three mandatory parameters: from, to, and voice-start.

There are a range of other options available to make during and automated phone call. This example is basic yet very useful for our customers.

import requests
requests.post(
    "https://api.46elks.com/a1/calls",
    auth = (API_USERNAME, API_PASSWORD),
    data = {
        "from": "+46766864341",
        "to": "+46766861004",
        "voice_start": 
        "{"play":"https://46elks.com/static/sound/testcall.mp3"}"
    }
)

The from parameter should be either a 46elks virtual number that you have purchased OR your personal number that your registered you account with.

Action: Play

Play a audio file from a URL on your server or a sound resource provided by 46elks (as in this example). URLs are fetched using HTTP GET and are always cached, so for unique resources be sure to provide unique URLs.

If a digit is pressed during “play” or if the audio playback has been completed, the call continues at “next”. You can force the full audio file to be played by setting the option “skippable” to false.

Information on all possible call actions can be found in the documentation.

Delivery reports

You can specify a webhook URL that we'll post to when the call ends. This is done by setting the whenhangup parameter in the API request.

import requests

requests.post(
    "https://api.46elks.com/a1/calls",
    auth = (API_USERNAME, API_PASSWORD),
    data = {
        "from": "+46766864341", #this is your 46elks number
        "to": "+46766861004",
        "voice_start": 
        "{"play":"https://46elks.com/static/sound/testcall.mp3"
        "whenhangup":"https://yourapp.io/elks/whenhangup"}"
    }
)

For full details on delivery reports, see the API reference.

That's it!

That's how easy it is. Run this script and now you have made an automated phone call.

Want some inspiration? See our customer stories for how others use automated phone calls.

Pricing

We bill you per minute once a call is started. You will not pay for calls that are not connected.

Up-to-date prices can be found on our pricing page.

Coverage

You can use 46elks to make phone calls to almost anywhere in the world. The flags below represent all 219 countries and provinces we currently have coverage in. Our numbers team is really good so don't hesitate to reach out to support if you have special needs — if there's a telco out there, they'll find a way to reach it.

🇦🇫 🇦🇱 🇩🇿 🇦🇩 🇦🇴 🇦🇮 🇦🇬 🇦🇷 🇦🇲 🇦🇼 🇦🇺 🇦🇹 🇦🇿 🇧🇸 🇧🇭 🇧🇩 🇧🇧 🇧🇾 🇧🇪 🇧🇿 🇧🇯 🇧🇲 🇧🇹 🇧🇴 🇧🇶 🇧🇦 🇧🇼 🇧🇻 🇧🇷 🇮🇴 🇧🇳 🇧🇬 🇧🇫 🇧🇮 🇰🇭 🇨🇲 🇨🇦 🇨🇻 🇰🇾 🇨🇫 🇹🇩 🇨🇱 🇨🇳 🇨🇽 🇨🇨 🇨🇴 🇰🇲 🇨🇩 🇨🇩 🇨🇰 🇨🇷 🇭🇷 🇨🇺 🇨🇾 🇨🇿 🇨🇮 🇩🇰 🇩🇯 🇩🇲 🇩🇴 🇪🇨 🇪🇬 🇸🇻 🇬🇶 🇪🇪 🇪🇹 🇫🇰 🇫🇴 🇫🇯 🇫🇮 🇫🇷 🇬🇫 🇹🇫 🇬🇦 🇬🇲 🇬🇪 🇩🇪 🇬🇭 🇬🇮 🇬🇷 🇬🇱 🇬🇩 🇬🇵 🇬🇺 🇬🇹 🇬🇬 🇬🇳 🇬🇼 🇬🇾 🇭🇹 🇭🇲 🇭🇳 🇭🇰 🇭🇺 🇮🇸 🇮🇳 🇮🇩 🇮🇷 🇮🇶 🇮🇪 🇮🇲 🇮🇱 🇮🇹 🇯🇲 🇯🇵 🇯🇪 🇯🇴 🇰🇿 🇰🇪 🇰🇼 🇰🇬 🇱🇦 🇱🇻 🇱🇧 🇱🇸 🇱🇷 🇱🇾 🇱🇮 🇱🇹 🇱🇺 🇲🇴 🇲🇰 🇲🇬 🇲🇼 🇲🇾 🇲🇻 🇲🇱 🇲🇹 🇲🇶 🇲🇷 🇲🇺 🇾🇹 🇲🇽 🇲🇩 🇲🇳 🇲🇪 🇲🇸 🇲🇦 🇲🇿 🇳🇦 🇳🇵 🇳🇱 🇳🇿 🇳🇮 🇳🇪 🇳🇬 🇳🇴 🇴🇲 🇵🇰 🇵🇸 🇵🇦 🇵🇬 🇵🇾 🇵🇭 🇵🇱 🇵🇹 🇵🇷 🇶🇦 🇷🇴 🇷🇺 🇷🇼 🇷🇪 🇧🇱 🇰🇳 🇱🇨 🇻🇨 🇼🇸 🇸🇲 🇸🇹 🇸🇦 🇸🇳 🇷🇸 🇸🇨 🇸🇱 🇸🇬 🇸🇰 🇸🇮 🇸🇧 🇸🇴 🇿🇦 🇬🇸 🇰🇷 🇸🇸 🇪🇸 🇱🇰 🇸🇩 🇸🇷 🇸🇯 🇸🇿 🇸🇪 🇨🇭 🇸🇾 🇹🇼 🇹🇯 🇹🇿 🇹🇭 🇹🇱 🇹🇬 🇹🇴 🇹🇹 🇹🇳 🇹🇷 🇹🇲 🇹🇨 🇺🇬 🇺🇦 🇦🇪 🇬🇧 🇺🇸 🇺🇾 🇺🇿 🇻🇪 🇻🇳 🇻🇬 🇻🇮 🇾🇪 🇿🇲 🇿🇼 🇦🇽

More info

Get in touch with our support and we'll help you out.

wave that adds styling to the bottom of the 46elks website