Voice API

Dynamically control phone calls from web and mobile apps. Record, transcribe, and conference callers together using your existing web server and database.

Give it a try - enter your phone number and receive a call
Here's the code that makes it work.
PHP
Node.js
Ruby
Python
Java
.NET (C#)
<?php

require 'Services/Twilio.php';

$accountSid = 'ACXXXXXXXXXXXXXXXXX';
$authToken = 'YYYYYYYYYYYYYYYYYY';

$client = new Services_Twilio($sid, $token, $version);

$phonenumber = '+14154834499';

try {
  $call = $client->account->calls->create(
    $phonenumber,
    '(415) 555-5555',
    'http://ahoy.twilio.com/voice/api/demo'
  );
  echo 'Started call: ' . $call->sid;
} catch (Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
var client = require('twilio')('ACXXXXXXXXXXXXXXXXX', 'YYYYYYYYYYYYYYYYYY');

client.makeCall({
  from: '+14154834499',
  to: '(415) 555-5555',
  url: 'http://ahoy.twilio.com/voice/api/demo'
}, function (err, responseData) {
  console.log(responseData);
});
@using Twilio;

@{
  string accountSid = "ACXXXXXXXXXXXXXXXXX";
  string authToken = "YYYYYYYYYYYYYYYYYY";

  string phonenumber = "+14154834499";

  var client = new TwilioRestClient(accountSid, authToken);

  var call = client.InitiateOutboundCall(
    phonenumber,
    "(415) 555-5555",
    "http://ahoy.twilio.com/voice/api/demo"
  );

  if (call.RestException == null)
    Response.Write(string.Format("Started call: {0}", call.Sid));
  } else {
    Response.Write(string.Format("Error: {0}",
    	call.RestException.Message));
  }
}
from twilio.rest import TwilioRestClient

account_sid = "ACXXXXXXXXXXXXXXXXX"
auth_token = "YYYYYYYYYYYYYYYYYY"
client = TwilioRestClient(account_sid, auth_token)

call = client.calls.create(
  from_="+14154834499",
  to="(415) 555-5555",
  url="http://ahoy.twilio.com/voice/api/demo")
print call.sid
require 'rubygems'
require 'twilio-ruby'

account_sid = 'ACXXXXXXXXXXXXXXXXX'
auth_token = 'YYYYYYYYYYYYYYYYYY'

@client = Twilio::REST::Client.new account_sid, auth_token

@call = @client.account.calls.create(
  :from => '+14154834499',
  :to => '(415) 555-5555',
  :url => 'http://ahoy.twilio.com/voice/api/demo'
)
import java.util.Map;
import java.util.HashMap;

import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.Account;
import com.twilio.sdk.resource.instance.Call;
import com.twilio.sdk.resource.factory.CallFactory;

public class MakeCall {

  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "YYYYYYYYYYYYYYYYYY";

  public static void main(String[] args) throws TwilioRestException {

    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);
    Account mainAccount = client.getAccount();
    CallFactory callFactory = mainAccount.getCallFactory();
    Map<String, String> callParams = new HashMap<String, String>();
    callParams.put("From", "+14154834499");
    callParams.put("To", "(415) 555-5555");
    callParams.put("Url", "http://ahoy.twilio.com/voice/api/demo");
    Call call = callFactory.create(callParams);
    System.out.println(call.getSid());
  }
}

Features

Leading companies rely on Twilio

Scale on demand

Twilio automatically scales as your app scales. You pay only for what you use, and capacity elastically scales as you grow.

Always on

Zero maintenance windows and 99.95% uptime let you focus on building your app, not building data centers.

Global reach

Provision voice-enabled phone numbers in over 40 countries, and call to over 180.

Support built in

From free email support to premium 24x7 support with a 1-hour SLA, you choose what you want and when.

We can't wait to see what you build