Retrieve a list of campaigns associated with a supplied brandId
.
# 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)
{- "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
}
Retrieve campaign details by campaignId
.
Successful Response
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. |
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 |
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 |
vertical required | any (Vertical) Vertical or industry segment of the brand or campaign. |
# 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)
{- "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 a campaign's properties by campaignId
.
Successful Response
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. |
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 |
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 |
vertical required | any (Vertical) Vertical or industry segment of the brand or campaign. |
{- "autoRenewal": true,
- "helpMessage": "string",
- "messageFlow": "string",
- "resellerId": "string",
- "sample1": "string",
- "sample2": "string",
- "sample3": "string",
- "sample4": "string",
- "sample5": "string"
}
{- "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"
}
This endpoint is used to deactivate and delete a campaign.
Successful Response
# 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)
"This endpoint is used to deactivate and delete a campaign."
Retrieve a campaign's Mobile Network Operator (MNO) metadata.
Successful Response
# 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)
{ }
Retrieve campaign's operation status at MNO level.
Successful Response
# 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)
{ }
Successful Response
{ }
Successful Response
object (CampaignSharingStatus) | |
object (CampaignSharingStatus) |
{- "sharedByMe": {
- "downstreamCnpId": "string",
- "sharedDate": "string",
- "sharingStatus": "string",
- "statusDate": "string",
- "upstreamCnpId": "string"
}, - "sharedWithMe": {
- "downstreamCnpId": "string",
- "sharedDate": "string",
- "sharingStatus": "string",
- "statusDate": "string",
- "upstreamCnpId": "string"
}
}
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).
Successful Response
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. |
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 |
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 |
vertical required | any (Vertical) Vertical or industry segment of the brand or campaign. |
{- "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"
}
{- "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"
}
This endpoint allows you to see whether or not the supplied brand is suitable for your desired campaign use case.
Successful Response
# 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)
{ }