Skip to content

Twilio - Accounts API

by twilio.com

HTTP BasicHTTPSPhone
Open documentation ↗

Overview

This is the public Twilio REST API.

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

At a glance

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

Make a first request

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

cURL
curl -X GET "https://accounts.twilio.com/v1/Credentials/AWS" \
  -H "Accept: application/json" \
  -H "Authorization: Basic BASE64_USER_PASSWORD"
JavaScript
const response = await fetch("https://accounts.twilio.com/v1/Credentials/AWS", {
  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://accounts.twilio.com/v1/Credentials/AWS",
    headers={
    "Accept": "application/json",
    "Authorization": "Basic BASE64_USER_PASSWORD",
    },
    timeout=30,
)
print(response.json())

Endpoints

MethodPathWhat it does
POST/v1/AuthTokens/PromotePromote the secondary Auth Token to primary. After promoting the new token, all requests to Twilio using your old primary Auth Token will result in an error.
POST/v1/AuthTokens/SecondaryCreate a new secondary Auth Token
DELETE/v1/AuthTokens/SecondaryDelete the secondary Auth Token from your account
GET/v1/Credentials/AWSRetrieves a collection of AWS Credentials belonging to the account used to make the request
POST/v1/Credentials/AWSCreate a new AWS Credential
GET/v1/Credentials/AWS/{Sid}Fetch the AWS credentials specified by the provided Credential Sid
POST/v1/Credentials/AWS/{Sid}Modify the properties of a given Account
DELETE/v1/Credentials/AWS/{Sid}Delete a Credential from your account
GET/v1/Credentials/PublicKeysRetrieves a collection of Public Key Credentials belonging to the account used to make the request
POST/v1/Credentials/PublicKeysCreate a new Public Key Credential
GET/v1/Credentials/PublicKeys/{Sid}Fetch the public key specified by the provided Credential Sid
POST/v1/Credentials/PublicKeys/{Sid}Modify the properties of a given Account
DELETE/v1/Credentials/PublicKeys/{Sid}Delete a Credential from your account

Questions

Does the Twilio - Accounts API need an API key?

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

Does the Twilio - Accounts API support HTTPS?

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

How many endpoints does the Twilio - Accounts API have?

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

What are alternatives to the Twilio - Accounts API?

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

Compare alternatives →

Listed from APIs.guru (CC0).