Skip to main content
POST
/
api
/
v1
/
channels
/
twilio
/
{channel_id}
/
numbers
Typescript (SDK)
import { SyllableSDK } from "syllable-sdk";

const syllableSDK = new SyllableSDK({
  apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
});

async function run() {
  const result = await syllableSDK.channels.twilio.numbers.add({
    channelId: 314558,
    twilioNumberAddRequest: {
      friendlyName: "Support Line",
      areaCode: "804",
    },
  });

  console.log(result);
}

run();
{
  "phone_number": "<string>"
}

Authorizations

Syllable-API-Key
string
header
required

Path Parameters

channel_id
integer
required

Body

application/json

Request model for purchasing a Twilio number and associating it with a channel.

friendly_name
string
required

Friendly name for the Twilio number

Example:

"Support Line"

area_code
string
required

Area code for the Twilio number

Example:

"804"

Response

Successful Response

Response model for purchasing a Twilio number and associating it with a channel.

phone_number
string
required

The purchased Twilio phone number

Example:

"+18042221111"