Skip to main content
GET
/
campaign
/
{campaignId}
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const telnyxCampaignCsp = await client.campaign.retrieve('campaignId');

console.log(telnyxCampaignCsp.brandId);
{
  "brandId": "d2ca9d69-641b-4131-83fa-5d0744f4c8a9",
  "campaignId": "823d6b1a-6ed6-41a3-9c50-c8ff41b682ba",
  "cspId": "<string>",
  "description": "<string>",
  "mock": true,
  "subUsecases": [
    "<string>"
  ],
  "termsAndConditions": true,
  "usecase": "<string>",
  "ageGated": true,
  "autoRenewal": true,
  "billedDate": "<string>",
  "brandDisplayName": "ABC Mobile",
  "tcrBrandId": "BBRAND1",
  "tcrCampaignId": "CCAMP1",
  "createDate": "<string>",
  "directLending": true,
  "embeddedLink": true,
  "embeddedPhone": true,
  "helpKeywords": "<string>",
  "helpMessage": "<string>",
  "messageFlow": "<string>",
  "nextRenewalOrExpirationDate": "<string>",
  "numberPool": true,
  "optinKeywords": "<string>",
  "optinMessage": "<string>",
  "optoutKeywords": "<string>",
  "optoutMessage": "<string>",
  "referenceId": "<string>",
  "resellerId": "<string>",
  "sample1": "<string>",
  "sample2": "<string>",
  "sample3": "<string>",
  "sample4": "<string>",
  "sample5": "<string>",
  "status": "<string>",
  "subscriberHelp": true,
  "subscriberOptin": true,
  "subscriberOptout": true,
  "vertical": "<string>",
  "webhookURL": "https://example.com/webhook",
  "webhookFailoverURL": "https://example.com/failover-webhook",
  "isTMobileRegistered": true,
  "isTMobileSuspended": true,
  "isTMobileNumberPoolingEnabled": true,
  "failureReasons": "<string>",
  "submissionStatus": "CREATED",
  "campaignStatus": "TCR_ACCEPTED",
  "privacyPolicyLink": "<string>",
  "termsAndConditionsLink": "<string>",
  "embeddedLinkSample": "<string>"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

campaignId
string
required

Response

Successful Response

Campaign is generated by the 10DLC registry once the corresponding campaign request is approved. Each campaign is assigned a unique identifier - campaignId. Once a campaign is activated, limited information is published to the NetNumber OSR service for consumption by members of the ecosystem. When a campaign is suspended(reversible) or expired(non-reversible), campaign data is deleted from the OSR service. Most attributes of campaignare immutable, including usecase, vertical, brandId and cspId.

brandId
string
required

Unique identifier assigned to the brand.

Example:

"d2ca9d69-641b-4131-83fa-5d0744f4c8a9"

campaignId
string
required

Unique identifier for a campaign.

Example:

"823d6b1a-6ed6-41a3-9c50-c8ff41b682ba"

cspId
string
required

Alphanumeric identifier of the CSP associated with this campaign.

description
string
required

Summary description of this campaign.

mock
boolean
required

Campaign created from mock brand. Mocked campaign cannot be shared with an upstream CNP.

subUsecases
string[]
required

Campaign sub-usecases. Must be of defined valid sub-usecase types. Use /registry/enum/usecase operation to retrieve list of valid sub-usecases

termsAndConditions
boolean
required

Is terms & conditions accepted?

usecase
string
required

Campaign usecase. Must be of defined valid types. Use /registry/enum/usecase operation to retrieve usecases available for given brand.

ageGated
boolean

Age gated content in campaign.

autoRenewal
boolean

Campaign subscription auto-renewal status.

billedDate
string

Campaign recent billed date.

brandDisplayName
string

Display or marketing name of the brand.

Example:

"ABC Mobile"

tcrBrandId
string

Unique identifier assigned to the brand by the registry.

Example:

"BBRAND1"

tcrCampaignId
string

Unique identifier assigned to the campaign by the registry.

Example:

"CCAMP1"

createDate
string

Unix timestamp when campaign was created.

directLending
boolean

Does message generated by the campaign include URL link in SMS?

embeddedPhone
boolean

Does message generated by the campaign include phone number in SMS?

helpKeywords
string

Subscriber help keywords. Multiple keywords are comma separated without space.

helpMessage
string

Help message of the campaign.

messageFlow
string

Message flow description.

nextRenewalOrExpirationDate
string

When the campaign would be due for its next renew/bill date.

numberPool
boolean

Does campaign utilize pool of phone numbers?

optinKeywords
string

Subscriber opt-in keywords. Multiple keywords are comma separated without space.

optinMessage
string

Subscriber opt-in message.

optoutKeywords
string

Subscriber opt-out keywords. Multiple keywords are comma separated without space.

optoutMessage
string

Subscriber opt-out message.

referenceId
string

Caller supplied campaign reference ID. If supplied, the value must be unique across all submitted campaigns. Can be used to prevent duplicate campaign registrations.

resellerId
string

Alphanumeric identifier of the reseller that you want to associate with this campaign.

sample1
string

Message sample. Some campaign tiers require 1 or more message samples.

sample2
string

Message sample. Some campaign tiers require 2 or more message samples.

sample3
string

Message sample. Some campaign tiers require 3 or more message samples.

sample4
string

Message sample. Some campaign tiers require 4 or more message samples.

sample5
string

Message sample. Some campaign tiers require 5 or more message samples.

status
string

Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status.

subscriberHelp
boolean

Does campaign responds to help keyword(s)?

subscriberOptin
boolean

Does campaign require subscriber to opt-in before SMS is sent to subscriber?

subscriberOptout
boolean

Does campaign support subscriber opt-out keyword(s)?

vertical
string
deprecated

Business/industry segment of this campaign (Deprecated). Must be of defined valid types. Use /registry/enum/vertical operation to retrieve verticals available for given brand, vertical combination.

This field is deprecated.

webhookURL
string

Webhook to which campaign status updates are sent.

Example:

"https://example.com/webhook"

webhookFailoverURL
string

Failover webhook to which campaign status updates are sent.

Example:

"https://example.com/failover-webhook"

isTMobileRegistered
boolean

Indicates whether the campaign is registered with T-Mobile.

isTMobileSuspended
boolean

Indicates whether the campaign is suspended with T-Mobile.

isTMobileNumberPoolingEnabled
boolean

Indicates whether the campaign has a T-Mobile number pool ID associated with it.

failureReasons
string

Failure reasons if campaign submission failed

submissionStatus
enum<string>

Campaign submission status

Available options:
CREATED,
FAILED,
PENDING
campaignStatus
enum<string>

Campaign status

Available options:
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
Example:

"TCR_ACCEPTED"

Link to the campaign's privacy policy.

Link to the campaign's terms and conditions.

Sample of an embedded link that will be sent to subscribers.