Sign Up

Log In

Twilio

FREE
By serg.osipchuk
Updated 5 months ago
SMS
-/10
Popularity Score
-
Latency
-
Success Rate

Twilio API Documentation

Enable programmable SMS, voice, video and IP Messaging.

View API Details

Supercharge your App

Discover and connect to thousands of APIs in the world's largest API Hub

POSTmakeCall
POSTsendMms
POSTsendSms
POSTwebhookEvent
POSTmakeCall

This block allows you to make voice calls

Sign up to test this endpoint
Log in
Header Parameters
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
accountSidCREDENTIALS
REQUIREDA 34 character string that uniquely identifies this account.
fromSTRING
REQUIREDThe phone number or client identifier to use as the caller id. If using a phone number, it must be a Twilio number or a Verified outgoing caller id for your account.
urlSTRING
REQUIREDThe fully qualified URL that should be consulted when the call connects. Just like when you set a URL on a phone number for handling inbound calls. See the Url Parameter section below for more details.
accountTokenCREDENTIALS
REQUIREDThe authorization token for this account.
toSTRING
REQUIREDThe phone number, SIP address or client identifier to call.
Optional Parameters
methodSTRING
OPTIONALThe HTTP method Twilio should use when making its request to the above Url parameter's value. Defaults to POST. If an ApplicationSid parameter is present, this parameter is ignored.
fallbackMethodSTRING
OPTIONALThe HTTP method that Twilio should use to request the FallbackUrl. Must be either GET or POST. Defaults to POST. If an ApplicationSid parameter is present, this parameter is ignored.
recordBOOLEAN
OPTIONALSet this parameter to 'true' to record the entirety of a phone call.
sendDigitsSTRING
OPTIONALA string of keys to dial after connecting to the number, maximum of 32 digits.
recordingStatusCallbackSTRING
OPTIONALThe recordingStatusCallback attribute takes an absolute URL as an argument.
statusCallbackMethodSTRING
OPTIONALThe HTTP method Twilio should use when requesting the above URL. Defaults to POST. If an ApplicationSid parameter is present, this parameter is ignored.
statusCallbackEventSTRING
OPTIONALThe call progress events that Twilio will send webhooks on. Available values are initiated, ringing, answered, and completed.
fallbackUrlSTRING
OPTIONALA URL that Twilio will request if an error occurs requesting or executing the TwiML at Url. If an ApplicationSid parameter is present, this parameter is ignored.
applicationSidSTRING
OPTIONALRequired if url not provided. The 34 character sid of the application Twilio should use to handle this phone call. If this parameter is present, Twilio will ignore all of the voice URLs passed and use the URLs set on the application.
recordingChannelsSELECT
OPTIONALMono or dual. Set this parameter to specify the number of channels in the final recording. Defaults to 'mono'.
timeoutSTRING
OPTIONALThe integer number of seconds that Twilio should allow the phone to ring before assuming there is no answer.
statusCallbackSTRING
OPTIONALA URL that Twilio will send asynchronous webhook requests to on every call event specified in the StatusCallbackEvent parameter. If no event is present, Twilio will send completed by default. If an ApplicationSid parameter is present, this parameter is ignored. URLs must contain a valid hostname.
recordingStatusCallbackMethodSTRING
OPTIONALThe HTTP method Twilio should use when requesting the above URL. Defaults to POST
Request Snippet
unirest.post("https://Twilioserg.osipchukV1.p.rapidapi.com/makeCall")
.header("X-RapidAPI-Key", "undefined")
.header("Content-Type", "application/x-www-form-urlencoded")
.send("method=undefined")
.send("fallbackMethod=undefined")
.send("record=undefined")
.send("sendDigits=undefined")
.send("recordingStatusCallback=undefined")
.send("statusCallbackMethod=undefined")
.send("statusCallbackEvent=undefined")
.send("fallbackUrl=undefined")
.send("applicationSid=undefined")
.send("recordingChannels=undefined")
.send("timeout=undefined")
.send("statusCallback=undefined")
.send("recordingStatusCallbackMethod=undefined")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response

loading...

Log inSign up

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.post("https://Twilioserg.osipchukV1.p.rapidapi.com/makeCall")
.header("X-RapidAPI-Key", "undefined")
.header("Content-Type", "application/x-www-form-urlencoded")
.send("method=undefined")
.send("fallbackMethod=undefined")
.send("record=undefined")
.send("sendDigits=undefined")
.send("recordingStatusCallback=undefined")
.send("statusCallbackMethod=undefined")
.send("statusCallbackEvent=undefined")
.send("fallbackUrl=undefined")
.send("applicationSid=undefined")
.send("recordingChannels=undefined")
.send("timeout=undefined")
.send("statusCallback=undefined")
.send("recordingStatusCallbackMethod=undefined")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication
Sign up for freeto test this endpoint
Join the world’s largest API marketplace with over half a million developers and thousands of APIs.
DiscoverAPIs
Testfrom the browser
Connectusing code snippets
Managefrom one dashboard