Skip to main content
GET
/
10dlc
/
partner_campaigns
JavaScript
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 telnyxDownstreamCampaign of client.messaging10dlc.partnerCampaigns.list()) {
  console.log(telnyxDownstreamCampaign.tcrBrandId);
}
import os
from telnyx import Telnyx

client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
page = client.messaging_10dlc.partner_campaigns.list()
page = page.records[0]
print(page.tcr_brand_id)
package main

import (
"context"
"fmt"

"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)

func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.Messaging10dlc.PartnerCampaigns.List(context.TODO(), telnyx.Messaging10dlcPartnerCampaignListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
package com.telnyx.sdk.example;

import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.messaging10dlc.partnercampaigns.PartnerCampaignListPage;
import com.telnyx.sdk.models.messaging10dlc.partnercampaigns.PartnerCampaignListParams;

public final class Main {
private Main() {}

public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();

PartnerCampaignListPage page = client.messaging10dlc().partnerCampaigns().list();
}
}
require "telnyx"

telnyx = Telnyx::Client.new(api_key: "My API Key")

page = telnyx.messaging_10dlc.partner_campaigns.list

puts(page)
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;

$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');

try {
$page = $client->messaging10dlc->partnerCampaigns->list(
page: 0, recordsPerPage: 0, sort: 'assignedPhoneNumbersCount'
);

var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}
telnyx messaging-10dlc:partner-campaigns list \
--api-key 'My API Key'
curl --request GET \
--url https://api.telnyx.com/v2/10dlc/partner_campaigns \
--header 'Authorization: Bearer <token>'
{
  "records": [
    {
      "tcrBrandId": "BBRAND1",
      "tcrCampaignId": "CCAMP1",
      "ageGated": true,
      "assignedPhoneNumbersCount": 3,
      "brandDisplayName": "ABC Mobile",
      "campaignStatus": "TCR_ACCEPTED",
      "description": "<string>",
      "directLending": true,
      "embeddedLink": true,
      "embeddedLinkSample": "<string>",
      "embeddedPhone": true,
      "failureReasons": "<string>",
      "helpKeywords": "<string>",
      "helpMessage": "<string>",
      "isNumberPoolingEnabled": true,
      "messageFlow": "<string>",
      "numberPool": true,
      "optinKeywords": "<string>",
      "optinMessage": "<string>",
      "optoutKeywords": "<string>",
      "optoutMessage": "<string>",
      "privacyPolicyLink": "<string>",
      "usecase": "<string>",
      "sample1": "<string>",
      "sample2": "<string>",
      "sample3": "<string>",
      "sample4": "<string>",
      "sample5": "<string>",
      "subUsecases": [
        "<string>"
      ],
      "subscriberOptin": true,
      "subscriberOptout": true,
      "termsAndConditions": true,
      "termsAndConditionsLink": "<string>",
      "webhookURL": "https://example.com/webhook",
      "webhookFailoverURL": "https://example.com/failover-webhook",
      "createdAt": "2021-03-08T17:57:48.801186",
      "updatedAt": "2021-03-08T17:57:48.801186"
    }
  ],
  "page": 123,
  "totalRecords": 123
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}
{
"errors": [
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>",
"parameter": "<string>"
}
}
]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

page
integer
default:1

The 1-indexed page number to get. The default value is 1.

recordsPerPage
integer
default:10

The amount of records per page, limited to between 1 and 500 inclusive. The default value is 10.

sort
enum<string>
default:-createdAt

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.

Available options:
assignedPhoneNumbersCount,
-assignedPhoneNumbersCount,
brandDisplayName,
-brandDisplayName,
tcrBrandId,
-tcrBrandId,
tcrCampaignId,
-tcrCampaignId,
createdAt,
-createdAt,
campaignStatus,
-campaignStatus

Response

Successful Response

records
TelnyxDownstreamCampaign · object[]
page
integer
totalRecords
integer