Skip to content

Twilio - Routes API

by twilio.com

HTTP BasicHTTPSPhone
Open documentation ↗

Overview

This is the public Twilio REST API.

Twilio - Routes is a phone API from twilio.com. Requests are authenticated with HTTP Basic auth. It is served over HTTPS. Its OpenAPI description documents 6 endpoints.

At a glance

Authentication
HTTP Basic
HTTPS
Yes
CORS
Unknown
Category
Phone
Base URL
https://routes.twilio.com
Version
1.42.0
Endpoints
6
Spec updated
2023-04-20

Make a first request

Replace the placeholders; the documentation says exactly where credentials go.

cURL
curl -X GET "https://routes.twilio.com/v2/PhoneNumbers/PHONENUMBER" \
  -H "Accept: application/json" \
  -H "Authorization: Basic BASE64_USER_PASSWORD"
JavaScript
const response = await fetch("https://routes.twilio.com/v2/PhoneNumbers/PHONENUMBER", {
  method: "GET",
  headers: {
    "Accept": "application/json",
    "Authorization": "Basic BASE64_USER_PASSWORD",
  },
});
const data = await response.json();
console.log(data);
Python
import requests

response = requests.request(
    "GET",
    "https://routes.twilio.com/v2/PhoneNumbers/PHONENUMBER",
    headers={
    "Accept": "application/json",
    "Authorization": "Basic BASE64_USER_PASSWORD",
    },
    timeout=30,
)
print(response.json())

Endpoints

MethodPathWhat it does
GET/v2/PhoneNumbers/{PhoneNumber}Fetch the Inbound Processing Region assigned to a phone number.
POST/v2/PhoneNumbers/{PhoneNumber}Assign an Inbound Processing Region to a phone number.
GET/v2/SipDomains/{SipDomain}FetchSipDomain
POST/v2/SipDomains/{SipDomain}UpdateSipDomain
GET/v2/Trunks/{SipTrunkDomain}Fetch the Inbound Processing Region assigned to a SIP Trunk.
POST/v2/Trunks/{SipTrunkDomain}Assign an Inbound Processing Region to a SIP Trunk

Questions

Does the Twilio - Routes API need an API key?

Yes. The Twilio - Routes API uses HTTP Basic authentication; the documentation explains how to get credentials.

Does the Twilio - Routes API support HTTPS?

Yes, the Twilio - Routes API is served over HTTPS.

How many endpoints does the Twilio - Routes API have?

Its OpenAPI description lists 6 endpoints in version 1.42.0. All of them are shown on this page.

What are alternatives to the Twilio - Routes API?

Other Phone APIs include Twilio - Accounts, ETSI GS MEC 010-2 - Part 2: Application lifecycle, rules and requirements management, Twilio - Api, Mobility API, Telnyx API.

Compare alternatives →

Listed from APIs.guru (CC0).