Make a phone call



Request parameters

Parameters Example Description
from +46766861004 A valid phone number in E.164 format. Can be one of your voice enabled 46elks numbers, the phone number you signed up with, or an unlocked number.
to +46766861004 The phone number of the recipient, in E.164 format.
voice_start http://yourapp.example/call A webhook URL that returns the first action to execute. See Call actions for details. It is also possible to add a JSON struct for direct call actions without any logic, like: {"connect":"+46766861004"}.

Optional Request parameters

Parameters Example Description
whenhangup https://yourapp.example/callend URL to send call data to when call ends.
timeout 60 Seconds to wait for the to-number to pickup before stopping call.

The voice_start is not loaded until the call connects (when someone answers the phone call). Include the 'whenhangup' parameter as a parameter in the initial request if you want to get a webhook when the call ends including if the calls fails to connect in the first instance.

Sample code

curl \
  -u <Username>:<API Password> \
  -d from=+46766861020 \
  -d to=+46766861004 \
  -d voice_start='{"play":"https://yourserver.example/files/hello.mp3"}'
import HTTPotion.base
authdata = [basic_auth: {'<API_USERNAME>',

request = %{
            "from"    => "+46766861020",
            "to"      => "+46766861004",
            "voice_start" => "{"play":"https://yourserver.example/files/hello.mp3"}"

request_data = URI.encode_query(request)

  [body: request_data , ibrowse: authdata]
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

public class UnirestSendcalls {
  public static void main(String[] args) {
    try {
      System.out.println("Sending calls");

      HttpResponse response ="")
        .field("to", "+46766861004")
        .field("from", "+46766861020")
        .field("voice_start", "{"play":"https://yourserver.example/files/hello.mp3"}")


    catch (Exception e){
function sendcalls ($calls) {
  $username = "API_USERNAME";
  $password = "API_PASSWORD";
  $context = stream_context_create(array(
    'http' => array(
      'method' => 'POST',
      'header'  => 'Authorization: Basic '.
                   base64_encode($username.':'.$password). "\r\n".
                   "Content-type: application/x-www-form-urlencoded\r\n",
      'content' => http_build_query($calls),
      'timeout' => 10
  $response = file_get_contents("",
    false, $context);

  if (!strstr($http_response_header[0],"200 OK"))
    return $http_response_header[0];
  return $response;
$calls = array(
  "from" => "+46766861020",
  "to" => "+46766861004",
  "voice_start" => '{"play":"https://yourserver.example/files/hello.mp3"}',
echo sendcalls($calls);
import requests

auth = (

fields = {
    'from': '+46766861020',
    'to': '+46766861004',
    'voice_start': '{"play":"https://yourserver.example/files/hello.mp3"}'

response =

require 'net/http'

uri = URI('')
req =
req.basic_auth 'API_USERNAME', 'API_PASSWORD'
  :from => '+46766861020',
  :to => '+46704508449',
  :voice_start => '{"play":"https://yourserver.example/files/hello.mp3"}'

res = Net::HTTP.start(,
    :use_ssl => uri.scheme == 'https') do |http|
  http.request req

puts res.body

More examples
C - C# - Go - Google App Script - Haskell - Node.js - Postman


Example JSON response
  "direction": "outgoing",
  "from": "+46766861004",
  "created": "2016-11-03T15:08:14.609873",
  "to": "+46766861004",
  "state": "ongoing",
  "id": "c719b1eefbf65b1f89c013e6433dbf537"
Attribute Type Description
id string Unique id of the call. Used to track the call during its lifetime and in history.
created string Time in UTC when the call was created.
state string Current state of the call.
Possible values are "success", "busy", "failed".
from string Caller id of the call.
to string The phone number the call is made to.
direction string The direction of the call.
Always "outgoing" when an call is initated by an API request.