Campaign API

Campaign operations

List My Campaigns

Retrieve a list of campaigns associated with a supplied brandId.

SecuritybearerAuth
Request
query Parameters
brandId
required
string (Brandid)
status
string (Status)
usecase
string (Usecase)
vertical
string (Vertical)
resellerId
string (Resellerid)
autoRenewal
boolean (Autorenewal)
upstreamCnpId
string (Upstreamcnpid)
page
integer (Page)
Default: 1
recordsPerPage
integer (Recordsperpage)
Default: 10
Responses
200

Successful Response

Response Schema: application/json
page
integer (Page)
Array of objects (Records)
totalRecords
integer (Totalrecords)
get/campaign
Request samples
# install http://docs.python-requests.org/en/master/
import requests

url = 'https://api.telnyx.com/10dlc/campaign'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer API_TOKEN'
}
response = requests.request('get', url, headers=headers)
print(response.text)
Response samples
application/json
{
  • "page": 1,
  • "records": [
    • {
      • "affiliateMarketing": true,
      • "ageGated": true,
      • "autoRenewal": true,
      • "billedDate": "2019-08-24T14:15:22Z",
      • "brandId": "4b206179-f731-8ab7-f19c-34e19d22ide9",
      • "campaignId": "4b30017a-15eb-6a25-2e3f-59b6422cud79",
      • "createDate": "2019-08-24T14:15:22Z",
      • "description": "Campaign description goes here.",
      • "directLending": true,
      • "embeddedLink": false,
      • "embeddedPhone": false,
      • "helpMessage": "string",
      • "messageFlow": "string",
      • "numberPool": false,
      • "resellerId": "RPQFAOY",
      • "sample1": "This is a sample message associated with your campaign!",
      • "sample2": "string",
      • "sample3": "string",
      • "sample4": "string",
      • "sample5": "string",
      • "status": "ACTIVE",
      • "subUsecases": "MARKETING",
      • "subscriberHelp": false,
      • "subscriberOptin": false,
      • "subscriberOptout": false,
      • "usecase": "MARKETING",
      • "vertical": "TECHNOLOGY"
      }
    ],
  • "totalRecords": 1
}

Accept Shared Campaign

Manually accept a campaign shared with Telnyx

SecuritybearerAuth
Request
path Parameters
campaignId
required
string (Campaignid) ^C[A-Z0-9]{5,8}$

TCR's ID for the campaign to import

Responses
200

Successful Response

Response Schema: application/json
any
422

Validation Error

Response Schema: application/json
Array of objects (Detail)
Array
required
Array of strings or integers (Location)
msg
required
string (Message)
type
required
string (Error Type)
post/campaign/acceptSharing/{campaignId}
Request samples
Response samples
application/json
null

Get Campaign Cost

SecuritybearerAuth
Request
query Parameters
usecase
required
string (Usecase)
Responses
200

Successful Response

Response Schema: application/json
campaignUsecase
required
string (Campaignusecase)
description
required
string (Description)
monthlyCost
required
string (Monthlycost)
upFrontCost
required
string (Upfrontcost)
422

Validation Error

Response Schema: application/json
Array of objects (Detail)
Array
required
Array of strings or integers (Location)
msg
required
string (Message)
type
required
string (Error Type)
get/campaign/usecase/cost
Request samples
Response samples
application/json
{
  • "campaignUsecase": "string",
  • "description": "string",
  • "monthlyCost": "string",
  • "upFrontCost": "string"
}

Get My Campaign

Retrieve campaign details by campaignId.

SecuritybearerAuth
Request
path Parameters
campaignId
required
string (Campaign Id)
Responses
200

Successful Response

Response Schema: application/json
affiliateMarketing
boolean (Affiliatemarketing)

Does message content controlled by affiliate marketing other than the brand?

ageGated
boolean (Agegated)

Age gated content in campaign.

autoRenewal
boolean (Autorenewal)

Campaign subscription auto-renewal status.

billedDate
string <date-time> (Billeddate)

Campaign recent billed date.

brandId
required
string (Brandid) <= 8 characters

Alphanumeric identifier of the brand associated with this campaign.

campaignId
string (Campaignid)

Alphanumeric identifier assigned by the registry for a campaign. This identifier is required by the NetNumber OSR SMS enabling process of 10DLC.

createDate
string <date-time> (Createdate)

Unix timestamp when campaign was created.

description
required
string (Description) <= 4096 characters

Summary description of this campaign.

directLending
boolean (Directlending)
embeddedLink
boolean (Embeddedlink)
Default: false

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

embeddedPhone
boolean (Embeddedphone)
Default: false

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

helpMessage
string (Helpmessage) <= 255 characters

Help message of the campaign.

messageFlow
string (Messageflow) <= 2048 characters

Message flow description.

numberPool
boolean (Numberpool)
Default: false

Does campaign utilize pool of phone nubers?

resellerId
string (Resellerid) <= 8 characters

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

sample1
string (Sample1) <= 255 characters

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

sample2
string (Sample2) <= 255 characters

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

sample3
string (Sample3) <= 255 characters

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

sample4
string (Sample4) <= 255 characters

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

sample5
string (Sample5) <= 255 characters

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

status
any (Status)

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

Enum: "ACTIVE" "EXPIRED"
subUsecases
any (Usecase)

Campaign usecase. Must be of defined valid types. For more details, send a GET request to https://api.telnyx.com/10dlc/enum/usecase

Enum: "2FA" "ACCOUNT_NOTIFICATION" "AGENTS_FRANCHISES" "CARRIER_EXEMPT" "CHARITY" "CONVERSATIONAL" "CUSTOMER_CARE" "DELIVERY_NOTIFICATION" "EMERGENCY" "FRAUD_ALERT" "HIGHER_EDUCATION" "LOW_VOLUME" "MARKETING" "MANUFACTURING" "MIXED" "POLITICAL" "POLLING_VOTING" "PUBLIC_SERVICE_ANNOUNCEMENT" "SECURITY_ALERT" "SOCIAL" "SWEEPSTAKE" "TRIAL"
subscriberHelp
boolean (Subscriberhelp)
Default: false

Does campaign responds to help keyword(s)?

subscriberOptin
boolean (Subscriberoptin)
Default: false

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

subscriberOptout
boolean (Subscriberoptout)
Default: false

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

usecase
required
any (Usecase)

Campaign usecase. Must be of defined valid types. For more details, send a GET request to https://api.telnyx.com/10dlc/enum/usecase

Enum: "2FA" "ACCOUNT_NOTIFICATION" "AGENTS_FRANCHISES" "CARRIER_EXEMPT" "CHARITY" "CONVERSATIONAL" "CUSTOMER_CARE" "DELIVERY_NOTIFICATION" "EMERGENCY" "FRAUD_ALERT" "HIGHER_EDUCATION" "LOW_VOLUME" "MARKETING" "MANUFACTURING" "MIXED" "POLITICAL" "POLLING_VOTING" "PUBLIC_SERVICE_ANNOUNCEMENT" "SECURITY_ALERT" "SOCIAL" "SWEEPSTAKE" "TRIAL"
vertical
required
any (Vertical)

Vertical or industry segment of the brand or campaign.

Enum: "REAL_ESTATE" "HEALTHCARE" "ENERGY" "ENTERTAINMENT" "RETAIL" "AGRICULTURE" "INSURANCE" "EDUCATION" "HOSPITALITY" "FINANCIAL" "GAMBLING" "CONSTRUCTION" "NGO" "MANUFACTURING" "GOVERNMENT" "TECHNOLOGY" "COMMUNICATION"
get/campaign/{campaignId}
Request samples
# install http://docs.python-requests.org/en/master/
import requests

url = 'https://api.telnyx.com/10dlc/campaign/{campaignId}'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer API_TOKEN'
}
response = requests.request('get', url, headers=headers)
print(response.text)
Response samples
application/json
{
  • "affiliateMarketing": true,
  • "ageGated": true,
  • "autoRenewal": true,
  • "billedDate": "2019-08-24T14:15:22Z",
  • "brandId": "4b206179-f731-8ab7-f19c-34e19d22ide9",
  • "campaignId": "4b30017a-15eb-6a25-2e3f-59b6422cud79",
  • "createDate": "2019-08-24T14:15:22Z",
  • "description": "Campaign description goes here.",
  • "directLending": true,
  • "embeddedLink": false,
  • "embeddedPhone": false,
  • "helpMessage": "string",
  • "messageFlow": "string",
  • "numberPool": false,
  • "resellerId": "RPQFAOY",
  • "sample1": "This is a sample message associated with your campaign!",
  • "sample2": "string",
  • "sample3": "string",
  • "sample4": "string",
  • "sample5": "string",
  • "status": "ACTIVE",
  • "subUsecases": "MARKETING",
  • "subscriberHelp": false,
  • "subscriberOptin": false,
  • "subscriberOptout": false,
  • "usecase": "MARKETING",
  • "vertical": "TECHNOLOGY"
}

Update My Campaign

Update a campaign's properties by campaignId.

SecuritybearerAuth
Request
path Parameters
campaignId
required
string (Campaign Id)
Request Body schema: application/json
required
autoRenewal
boolean (Autorenewal)
Default: true

Help message of the campaign.

helpMessage
string (Helpmessage) <= 255 characters

Help message of the campaign.

messageFlow
string (Messageflow) <= 2048 characters

Message flow description.

resellerId
string (Resellerid) <= 8 characters

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

sample1
string (Sample1) <= 255 characters

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

sample2
string (Sample2) <= 255 characters

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

sample3
string (Sample3) <= 255 characters

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

sample4
string (Sample4) <= 255 characters

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

sample5
string (Sample5) <= 255 characters

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

Responses
200

Successful Response

Response Schema: application/json
affiliateMarketing
boolean (Affiliatemarketing)

Does message content controlled by affiliate marketing other than the brand?

ageGated
boolean (Agegated)

Age gated content in campaign.

autoRenewal
boolean (Autorenewal)

Campaign subscription auto-renewal status.

billedDate
string <date-time> (Billeddate)

Campaign recent billed date.

brandId
required
string (Brandid) <= 8 characters

Alphanumeric identifier of the brand associated with this campaign.

campaignId
string (Campaignid)

Alphanumeric identifier assigned by the registry for a campaign. This identifier is required by the NetNumber OSR SMS enabling process of 10DLC.

createDate
string <date-time> (Createdate)

Unix timestamp when campaign was created.

cspId
string (Cspid)

Alphanumeric identifier of the CSP associated with this campaign.

description
required
string (Description) <= 4096 characters

Summary description of this campaign.

directLending
boolean (Directlending)
embeddedLink
boolean (Embeddedlink)
Default: false

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

embeddedPhone
boolean (Embeddedphone)
Default: false

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

helpMessage
string (Helpmessage) <= 255 characters

Help message of the campaign.

messageFlow
string (Messageflow) <= 2048 characters

Message flow description.

numberPool
boolean (Numberpool)
Default: false

Does campaign utilize pool of phone nubers?

resellerId
string (Resellerid) <= 8 characters

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

sample1
string (Sample1) <= 255 characters

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

sample2
string (Sample2) <= 255 characters

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

sample3
string (Sample3) <= 255 characters

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

sample4
string (Sample4) <= 255 characters

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

sample5
string (Sample5) <= 255 characters

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

status
any (Status)

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

Enum: "ACTIVE" "EXPIRED"
subUsecases
any (Usecase)

Campaign usecase. Must be of defined valid types. For more details, send a GET request to https://api.telnyx.com/10dlc/enum/usecase

Enum: "2FA" "ACCOUNT_NOTIFICATION" "AGENTS_FRANCHISES" "CARRIER_EXEMPT" "CHARITY" "CONVERSATIONAL" "CUSTOMER_CARE" "DELIVERY_NOTIFICATION" "EMERGENCY" "FRAUD_ALERT" "HIGHER_EDUCATION" "LOW_VOLUME" "MARKETING" "MANUFACTURING" "MIXED" "POLITICAL" "POLLING_VOTING" "PUBLIC_SERVICE_ANNOUNCEMENT" "SECURITY_ALERT" "SOCIAL" "SWEEPSTAKE" "TRIAL"
subscriberHelp
boolean (Subscriberhelp)
Default: false

Does campaign responds to help keyword(s)?

subscriberOptin
boolean (Subscriberoptin)
Default: false

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

subscriberOptout
boolean (Subscriberoptout)
Default: false

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

usecase
required
any (Usecase)

Campaign usecase. Must be of defined valid types. For more details, send a GET request to https://api.telnyx.com/10dlc/enum/usecase

Enum: "2FA" "ACCOUNT_NOTIFICATION" "AGENTS_FRANCHISES" "CARRIER_EXEMPT" "CHARITY" "CONVERSATIONAL" "CUSTOMER_CARE" "DELIVERY_NOTIFICATION" "EMERGENCY" "FRAUD_ALERT" "HIGHER_EDUCATION" "LOW_VOLUME" "MARKETING" "MANUFACTURING" "MIXED" "POLITICAL" "POLLING_VOTING" "PUBLIC_SERVICE_ANNOUNCEMENT" "SECURITY_ALERT" "SOCIAL" "SWEEPSTAKE" "TRIAL"
vertical
required
any (Vertical)

Vertical or industry segment of the brand or campaign.

Enum: "REAL_ESTATE" "HEALTHCARE" "ENERGY" "ENTERTAINMENT" "RETAIL" "AGRICULTURE" "INSURANCE" "EDUCATION" "HOSPITALITY" "FINANCIAL" "GAMBLING" "CONSTRUCTION" "NGO" "MANUFACTURING" "GOVERNMENT" "TECHNOLOGY" "COMMUNICATION"
put/campaign/{campaignId}
Request samples
application/json
{
  • "autoRenewal": true,
  • "helpMessage": "string",
  • "messageFlow": "string",
  • "resellerId": "string",
  • "sample1": "string",
  • "sample2": "string",
  • "sample3": "string",
  • "sample4": "string",
  • "sample5": "string"
}
Response samples
application/json
{
  • "affiliateMarketing": true,
  • "ageGated": true,
  • "autoRenewal": true,
  • "billedDate": "2019-08-24T14:15:22Z",
  • "brandId": "4b206179-f731-8ab7-f19c-34e19d22ide9",
  • "campaignId": "4b30017a-15eb-6a25-2e3f-59b6422cud79",
  • "createDate": "2019-08-24T14:15:22Z",
  • "cspId": "string",
  • "description": "Campaign description goes here.",
  • "directLending": true,
  • "embeddedLink": false,
  • "embeddedPhone": false,
  • "helpMessage": "string",
  • "messageFlow": "string",
  • "numberPool": false,
  • "resellerId": "RPQFAOY",
  • "sample1": "This is a an updated message!",
  • "sample2": "This is a newly created message!",
  • "sample3": "This is a newly created message!",
  • "sample4": "string",
  • "sample5": "string",
  • "status": "ACTIVE",
  • "subUsecases": "MARKETING",
  • "subscriberHelp": false,
  • "subscriberOptin": false,
  • "subscriberOptout": false,
  • "usecase": "MARKETING",
  • "vertical": "TECHNOLOGY"
}

Deactivate My Campaign

This endpoint is used to deactivate and delete a campaign.

SecuritybearerAuth
Request
path Parameters
campaignId
required
string (Campaign Id)
Responses
200

Successful Response

Response Schema: application/json
any
delete/campaign/{campaignId}
Request samples
# install http://docs.python-requests.org/en/master/
import requests

url = 'https://api.telnyx.com/10dlc/campaign/{campaignId}'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer API_TOKEN'
}
response = requests.request('delete', url, headers=headers)
print(response.text)
Response samples
application/json
"This endpoint is used to deactivate and delete a campaign."

Get Campaign MNO Metadata

Retrieve a campaign's Mobile Network Operator (MNO) metadata.

SecuritybearerAuth
Request
path Parameters
campaignId
required
string (Campaign Id)
Responses
200

Successful Response

Response Schema: application/json
object (Response Get My Campaign Mno Metadata Campaign Campaign Id Mnometadata Get)
get/campaign/{campaignId}/mnoMetadata
Request samples
# install http://docs.python-requests.org/en/master/
import requests

url = 'https://api.telnyx.com/10dlc/campaign/{campaignId}/mnoMetadata'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer API_TOKEN'
}
response = requests.request('get', url, headers=headers)
print(response.text)
Response samples
application/json
{ }

Get Campaign's Operation Status

Retrieve campaign's operation status at MNO level.

SecuritybearerAuth
Request
path Parameters
campaignId
required
string (Campaign Id)
Responses
200

Successful Response

Response Schema: application/json
object (Response Get My Campaign Operation Status Campaign Campaign Id Operationstatus Get)
get/campaign/{campaignId}/operationStatus
Request samples
# install http://docs.python-requests.org/en/master/
import requests

url = 'https://api.telnyx.com/10dlc/campaign/{campaignId}/operationStatus'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer API_TOKEN'
}
response = requests.request('get', url, headers=headers)
print(response.text)
Response samples
application/json
{ }

Get My Osr Campaign Attributes

SecuritybearerAuth
Request
path Parameters
campaignId
required
string (Campaignid)
Responses
200

Successful Response

Response Schema: application/json
object (Response Get My Osr Campaign Attributes Public Campaign Campaignid Osr Attributes Get)
422

Validation Error

Response Schema: application/json
Array of objects (Detail)
Array
required
Array of strings or integers (Location)
msg
required
string (Message)
type
required
string (Error Type)
get/campaign/{campaignId}/osr/attributes
Request samples
Response samples
application/json
{ }

Get Sharing Status

SecuritybearerAuth
Request
path Parameters
campaignId
required
string (Campaignid)

ID of the campaign in question

Responses
200

Successful Response

Response Schema: application/json
object (CampaignSharingStatus)
object (CampaignSharingStatus)
422

Validation Error

Response Schema: application/json
Array of objects (Detail)
Array
required
Array of strings or integers (Location)
msg
required
string (Message)
type
required
string (Error Type)
get/campaign/{campaignId}/sharing
Request samples
Response samples
application/json
{
  • "sharedByMe": {
    • "downstreamCnpId": "string",
    • "sharedDate": "string",
    • "sharingStatus": "string",
    • "statusDate": "string",
    • "upstreamCnpId": "string"
    },
  • "sharedWithMe": {
    • "downstreamCnpId": "string",
    • "sharedDate": "string",
    • "sharingStatus": "string",
    • "statusDate": "string",
    • "upstreamCnpId": "string"
    }
}

Create Campaign

Before creating a campaign, use the Qualify By Usecase endpoint to ensure that the brand you want to assign a new campaign to is qualified for the desired use case of that campaign. Please note: After campaign creation, you'll only be able to edit the campaign's sample messages. Creating a campaign will entail an upfront, non-refundable three month's cost that will depend on the campaign's use case (see 10DLC Costs section for details).

SecuritybearerAuth
Request
Request Body schema: application/json
required
affiliateMarketing
boolean (Affiliatemarketing)

Does message content controlled by affiliate marketing other than the brand?

ageGated
boolean (Agegated)

Age gated message content in campaign.

autoRenewal
boolean (Autorenewal)

Campaign subscription auto-renewal option. If set to true, then campaign will automatically renewal at end of billing cycle.

brandId
required
string (Brandid)

Alphanumeric identifier of the brand associated with this campaign.

description
required
string (Description)

Summary description of this campaign.

directLending
boolean (Directlending)

Direct lending or loan arrangement

embeddedLink
boolean (Embeddedlink)

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

embeddedPhone
boolean (Embeddedphone)

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

helpKeywords
string (Helpkeywords)

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

helpMessage
string (Helpmessage)

Help message of the campaign.

messageFlow
string (Messageflow)

Message flow description.

mnoIds
Array of integers (Mnoids) unique

Submit campaign to given list of MNOs by MNO's network ID. Default is all MNOs if no value provided.

numberPool
boolean (Numberpool)

Does campaign utilize pool of phone numbers?

optinKeywords
string (Optinkeywords)

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

optinMessage
string (Optinmessage)

Subscriber opt-in message.

optoutKeywords
string (Optoutkeywords)

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

optoutMessage
string (Optoutmessage)

Subscriber opt-out message.

referenceId
string (Referenceid)

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 (Resellerid)

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

sample1
string (Sample1)

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

sample2
string (Sample2)

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

sample3
string (Sample3)

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

sample4
string (Sample4)

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

sample5
string (Sample5)

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

subUsecases
Array of strings (Subusecases) unique

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

subscriberHelp
boolean (Subscriberhelp)

Does campaign responds to help keyword(s)?

subscriberOptin
boolean (Subscriberoptin)

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

subscriberOptout
boolean (Subscriberoptout)

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

tag
Array of strings (Tag) unique

Tags to be set on the Campaign.

termsAndConditions
boolean (Termsandconditions)

Is terms and conditions accepted?

usecase
required
string (Usecase)

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

Responses
200

Successful Response

Response Schema: application/json
affiliateMarketing
boolean (Affiliatemarketing)

Does message content controlled by affiliate marketing other than the brand?

ageGated
boolean (Agegated)

Age gated content in campaign.

autoRenewal
boolean (Autorenewal)

Campaign subscription auto-renewal status.

billedDate
string <date-time> (Billeddate)

Campaign recent billed date.

brandId
required
string (Brandid) <= 8 characters

Alphanumeric identifier of the brand associated with this campaign.

campaignId
string (Campaignid)

Alphanumeric identifier assigned by the registry for a campaign. This identifier is required by the NetNumber OSR SMS enabling process of 10DLC.

createDate
string <date-time> (Createdate)

Unix timestamp when campaign was created.

description
required
string (Description) <= 4096 characters

Summary description of this campaign.

directLending
boolean (Directlending)
embeddedLink
boolean (Embeddedlink)
Default: false

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

embeddedPhone
boolean (Embeddedphone)
Default: false

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

helpMessage
string (Helpmessage) <= 255 characters

Help message of the campaign.

messageFlow
string (Messageflow) <= 2048 characters

Message flow description.

numberPool
boolean (Numberpool)
Default: false

Does campaign utilize pool of phone nubers?

resellerId
string (Resellerid) <= 8 characters

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

sample1
string (Sample1) <= 255 characters

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

sample2
string (Sample2) <= 255 characters

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

sample3
string (Sample3) <= 255 characters

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

sample4
string (Sample4) <= 255 characters

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

sample5
string (Sample5) <= 255 characters

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

status
any (Status)

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

Enum: "ACTIVE" "EXPIRED"
subUsecases
any (Usecase)

Campaign usecase. Must be of defined valid types. For more details, send a GET request to https://api.telnyx.com/10dlc/enum/usecase

Enum: "2FA" "ACCOUNT_NOTIFICATION" "AGENTS_FRANCHISES" "CARRIER_EXEMPT" "CHARITY" "CONVERSATIONAL" "CUSTOMER_CARE" "DELIVERY_NOTIFICATION" "EMERGENCY" "FRAUD_ALERT" "HIGHER_EDUCATION" "LOW_VOLUME" "MARKETING" "MANUFACTURING" "MIXED" "POLITICAL" "POLLING_VOTING" "PUBLIC_SERVICE_ANNOUNCEMENT" "SECURITY_ALERT" "SOCIAL" "SWEEPSTAKE" "TRIAL"
subscriberHelp
boolean (Subscriberhelp)
Default: false

Does campaign responds to help keyword(s)?

subscriberOptin
boolean (Subscriberoptin)
Default: false

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

subscriberOptout
boolean (Subscriberoptout)
Default: false

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

usecase
required
any (Usecase)

Campaign usecase. Must be of defined valid types. For more details, send a GET request to https://api.telnyx.com/10dlc/enum/usecase

Enum: "2FA" "ACCOUNT_NOTIFICATION" "AGENTS_FRANCHISES" "CARRIER_EXEMPT" "CHARITY" "CONVERSATIONAL" "CUSTOMER_CARE" "DELIVERY_NOTIFICATION" "EMERGENCY" "FRAUD_ALERT" "HIGHER_EDUCATION" "LOW_VOLUME" "MARKETING" "MANUFACTURING" "MIXED" "POLITICAL" "POLLING_VOTING" "PUBLIC_SERVICE_ANNOUNCEMENT" "SECURITY_ALERT" "SOCIAL" "SWEEPSTAKE" "TRIAL"
vertical
required
any (Vertical)

Vertical or industry segment of the brand or campaign.

Enum: "REAL_ESTATE" "HEALTHCARE" "ENERGY" "ENTERTAINMENT" "RETAIL" "AGRICULTURE" "INSURANCE" "EDUCATION" "HOSPITALITY" "FINANCIAL" "GAMBLING" "CONSTRUCTION" "NGO" "MANUFACTURING" "GOVERNMENT" "TECHNOLOGY" "COMMUNICATION"
post/campaignBuilder
Request samples
application/json
{
  • "affiliateMarketing": true,
  • "ageGated": true,
  • "autoRenewal": true,
  • "brandId": "string",
  • "description": "string",
  • "directLending": true,
  • "embeddedLink": true,
  • "embeddedPhone": true,
  • "helpKeywords": "string",
  • "helpMessage": "string",
  • "messageFlow": "string",
  • "mnoIds": [
    • 0
    ],
  • "numberPool": true,
  • "optinKeywords": "string",
  • "optinMessage": "string",
  • "optoutKeywords": "string",
  • "optoutMessage": "string",
  • "referenceId": "string",
  • "resellerId": "string",
  • "sample1": "string",
  • "sample2": "string",
  • "sample3": "string",
  • "sample4": "string",
  • "sample5": "string",
  • "subUsecases": [
    • "string"
    ],
  • "subscriberHelp": true,
  • "subscriberOptin": true,
  • "subscriberOptout": true,
  • "tag": [
    • "string"
    ],
  • "termsAndConditions": true,
  • "usecase": "string"
}
Response samples
application/json
{
  • "affiliateMarketing": true,
  • "ageGated": true,
  • "autoRenewal": true,
  • "billedDate": "2019-08-24T14:15:22Z",
  • "brandId": "4b206179-f731-8ab7-f19c-34e19d22ide9",
  • "campaignId": "4b30017a-15eb-6a25-2e3f-59b6422cud79",
  • "createDate": "2019-08-24T14:15:22Z",
  • "description": "Campaign description goes here.",
  • "directLending": true,
  • "embeddedLink": false,
  • "embeddedPhone": false,
  • "helpMessage": "string",
  • "messageFlow": "string",
  • "numberPool": false,
  • "resellerId": "RPQFAOY",
  • "sample1": "This is a sample message associated with your campaign!",
  • "sample2": "string",
  • "sample3": "string",
  • "sample4": "string",
  • "sample5": "string",
  • "status": "ACTIVE",
  • "subUsecases": "MARKETING",
  • "subscriberHelp": false,
  • "subscriberOptin": false,
  • "subscriberOptout": false,
  • "usecase": "MARKETING",
  • "vertical": "TECHNOLOGY"
}

Qualify By Usecase

This endpoint allows you to see whether or not the supplied brand is suitable for your desired campaign use case.

SecuritybearerAuth
Request
path Parameters
usecase
required
string (Usecase)
brandId
required
string (Brand Id)
Responses
200

Successful Response

Response Schema: application/json
object (Response Qualify By Usecase Campaignbuilder Brand Brand Id Usecase Usecase Get)
get/campaignBuilder/brand/{brandId}/usecase/{usecase}
Request samples
# install http://docs.python-requests.org/en/master/
import requests

url = 'https://api.telnyx.com/10dlc/campaignBuilder/brand/{brandId}/usecase/{usecase}'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer API_TOKEN'
}
response = requests.request('get', url, headers=headers)
print(response.text)
Response samples
application/json
{ }