Check out our upcoming events and meetups! View events →
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const phoneNumberCampaign of client.messaging10dlc.phoneNumberCampaigns.list()) {
console.log(phoneNumberCampaign.campaignId);
}{
"records": [
{
"phoneNumber": "+18005550199",
"campaignId": "<string>",
"createdAt": "2021-03-08T17:57:48.801186",
"updatedAt": "2021-03-08T17:57:48.801186",
"brandId": "7ba705b7-22af-493f-addc-ac04b7ca071c",
"tcrBrandId": "BBRAND1",
"tcrCampaignId": "CCAMPA1",
"telnyxCampaignId": "3008dd9f-66d7-40e0-bf23-bf2d8d1a96ba",
"assignmentStatus": "ASSIGNED",
"failureReasons": "<string>"
}
],
"page": 123,
"totalRecords": 123
}Documentation Index
Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Consolidated filter parameter (deepObject style). Originally: filter[telnyx_campaign_id], filter[telnyx_brand_id], filter[tcr_campaign_id], filter[tcr_brand_id]
Show child attributes
Specifies the sort order for results. If not given, results are sorted by createdAt in descending order. Specifies the sort order for results. If not given, results are sorted by created_at in descending order.
assignmentStatus, -assignmentStatus, createdAt, -createdAt, phoneNumber, -phoneNumber Was this page helpful?
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const phoneNumberCampaign of client.messaging10dlc.phoneNumberCampaigns.list()) {
console.log(phoneNumberCampaign.campaignId);
}{
"records": [
{
"phoneNumber": "+18005550199",
"campaignId": "<string>",
"createdAt": "2021-03-08T17:57:48.801186",
"updatedAt": "2021-03-08T17:57:48.801186",
"brandId": "7ba705b7-22af-493f-addc-ac04b7ca071c",
"tcrBrandId": "BBRAND1",
"tcrCampaignId": "CCAMPA1",
"telnyxCampaignId": "3008dd9f-66d7-40e0-bf23-bf2d8d1a96ba",
"assignmentStatus": "ASSIGNED",
"failureReasons": "<string>"
}
],
"page": 123,
"totalRecords": 123
}