import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const partnerCampaigns = await client.partnerCampaigns.list();
console.log(partnerCampaigns.page);{
"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
}Retrieve all partner campaigns you have shared to Telnyx in a paginated fashion.
This endpoint is currently limited to only returning shared campaigns that Telnyx has accepted. In other words, shared but pending campaigns are currently omitted from the response from this endpoint.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const partnerCampaigns = await client.partnerCampaigns.list();
console.log(partnerCampaigns.page);{
"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
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The 1-indexed page number to get. The default value is 1.
The 1-indexed page number to get. The default value is 1.
The amount of records per page, limited to between 1 and 500 inclusive. The default value is 10.
The amount of records per page, limited to between 1 and 500 inclusive. The default value is 10.
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.
assignedPhoneNumbersCount, -assignedPhoneNumbersCount, brandDisplayName, -brandDisplayName, tcrBrandId, -tcrBranId, tcrCampaignId, -tcrCampaignId, createdAt, -createdAt, campaignStatus, -campaignStatus Successful Response
Show child attributes
Unique identifier assigned to the brand by the registry.
"BBRAND1"
Unique identifier assigned to the campaign by the registry.
"CCAMP1"
Age gated content in campaign.
Number of phone numbers associated with the campaign
3
Display or marketing name of the brand.
"ABC Mobile"
Campaign status
TCR_PENDING, TCR_SUSPENDED, TCR_EXPIRED, TCR_ACCEPTED, TCR_FAILED, TELNYX_ACCEPTED, TELNYX_FAILED, MNO_PENDING, MNO_ACCEPTED, MNO_REJECTED, MNO_PROVISIONED, MNO_PROVISIONING_FAILED "TCR_ACCEPTED"
Summary description of this campaign.
Direct lending or loan arrangement.
Does message generated by the campaign include URL link in SMS?
Sample of an embedded link that will be sent to subscribers.
Does message generated by the campaign include phone number in SMS?
Failure reasons if campaign submission failed
Subscriber help keywords. Multiple keywords are comma separated without space.
Help message of the campaign.
Indicates whether the campaign has a T-Mobile number pool ID associated with it.
Message flow description.
Does campaign utilize pool of phone numbers?
Subscriber opt-in keywords. Multiple keywords are comma separated without space.
Subscriber opt-in message.
Subscriber opt-out keywords. Multiple keywords are comma separated without space.
Subscriber opt-out message.
Link to the campaign's privacy policy.
Campaign usecase. Must be of defined valid types. Use /registry/enum/usecase operation to retrieve usecases available for given brand.
Message sample. Some campaign tiers require 1 or more message samples.
Message sample. Some campaign tiers require 2 or more message samples.
Message sample. Some campaign tiers require 3 or more message samples.
Message sample. Some campaign tiers require 4 or more message samples.
Message sample. Some campaign tiers require 5 or more message samples.
Campaign sub-usecases. Must be of defined valid sub-usecase types. Use /registry/enum/usecase operation to retrieve list of valid sub-usecases
Does campaign require subscriber to opt-in before SMS is sent to subscriber?
Does campaign support subscriber opt-out keyword(s)?
Is terms & conditions accepted?
Link to the campaign's terms and conditions.
Webhook to which campaign status updates are sent.
"https://example.com/webhook"
Failover webhook to which campaign status updates are sent.
"https://example.com/failover-webhook"
Date and time that the brand was created at.
"2021-03-08T17:57:48.801186"
Date and time that the brand was last updated at.
"2021-03-08T17:57:48.801186"
Was this page helpful?