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>"
}Purchase a Twilio number and associate it with a channel.
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>"
}Successful Response
Response model for purchasing a Twilio number and associating it with a channel.
The purchased Twilio phone number
"+18042221111"