Once your brand is verified, you can create one starter campaign. This API lets you register a starter campaign using a pre-existing brand.
POST
https://api.plivo.com/v1/Account/{auth_id}/10dlc/Campaign/
campaign_aliasstringrequired | A friendly name for your campaign. This name appears on the Plivo console. |
brand_idstringrequired | ID of the for which campaign creation request is being submitted. |
verticalstringrequired | Indicates the industry specific to the message use case. Allowed values: PROFESSIONAL, REAL_ESTATE, HEALTHCARE,HUMAN_RESOURCES, ENERGY, ENTERTAINMENT, RETAIL, TRANSPORTATION, AGRICULTURE, INSURANCE, POSTAL, EDUCATION, HOSPITALITY, FINANCIAL, POLITICAL, GAMBLING, LEGAL, CONSTRUCTION, NGO,MANUFACTURING, GOVERNMENT, TECHNOLOGY,COMMUNICATION |
descriptionstringrequired | A brief description of the campaign and how it’s relevant to your business — minimum of 40 characters. |
usecasestringrequired | Indicates your messaging use case. Allowed values: 2FA, ACCOUNT_NOTIFICATION, CUSTOMER_CARE, DELIVERY_NOTIFICATION, FRAUD_ALERT, HIGHER_EDUCATION, LOW_VOLUME, MARKETING, MIXED, POLLING_VOTING, PUBLIC_SERVICE_ANNOUNCEMENT, SECURITY_ALERT, STARTER. STARTER brands can only use STARTER as their use case.
|
sample1stringrequired | The content of a sample message that you will send through this campaign. You must provide at least two samples, each with a minimum of 20 characters. |
sample2stringrequired | The content of the second sample message. |
subscriber_optinbooleanrequired | A confirmation that you are collecting and processing customer opt-ins. Allowed value: true |
subscriber_optoutbooleanrequired | A confirmation that you are collecting and processing customer opt-outs. Allowed value: true |
subscriber_helpbooleanrequired | A confirmation that you have implemented a message reply that tells customers how they can contact the message sender when they reply with the “HELP” keyword. Allowed value: true |
direct_lendingbooleanrequired | Indicates whether this campaign includes content related to direct lending or other loan arrangements. Allowed values: true, false |
embedded_linkbooleanrequired | Indicates whether embedded links are being used. Operators do not accept public URL shorteners. Allowed values: true, false |
embedded_phonebooleanrequired | Indicates whether the campaign is using an embedded phone number other than the required HELP contact number. Allowed values: true, false |
age_gatedbooleanrequired | Indicates whether the campaign includes any age-gated content as defined by operator and CTIA guidelines. Allowed values: true, false |
affiliate_marketingbooleanrequired | Indicates whether affiliate marketing was used in the construction of this campaign. Allowed values: true, false |
sub_usecaseslist | Only applicable when use case is STARTER, MIXED, or LOW_VOLUME. Indicates two to five comma-separated use cases. Allowed values: 2FA, ACCOUNT_NOTIFICATION,CUSTOMER_CARE, DELIVERY_NOTIFICATION, FRAUD_ALERT, HIGHER_EDUCATION, MARKETING, POLLING_VOTING, PUBLIC_SERVICE_ANNOUNCEMENT, SECURITY_ALERT |
message_flow stringrequired | Describes how a customer opts in to a campaign, thereby giving consent to the sender to send messages. The message flow must be clear and inform customers about the nature of the campaign. If a campaign supports multiple opt-in mechanisms, you must mention all of them here. Check documentation for samples. |
help_message stringrequired | Indicates the response to the HELP keyword. It may include the brand name and support contact information. Check documentation for samples. |
optout_message stringrequired | Indicates the response to the STOP keyword. It must include acknowledgement of the opt-out request and confirmation that no further messages will be sent, and may include the brand name. Check documentation for samples. |
optin_messagestring | Message sent to subscribers to confirm their opt-in to the campaign. |
optin_keywordsstring | Opt-in keywords associated with the campaign. If more than one, provide a comma-separated list with no special characters or embedded spaces. |
help_keywordsstring | Help keywords associated with the campaign, in all capital letters. If more than one, provide a comma-separated list with no special characters or embedded spaces. |
urlstring | The fully qualified URL to which status update callbacks for the message should be sent. |
methodstring | The HTTP method to be used when calling the URL defined above. Allowed values: GET, POST |
{
"api_id": "d48b4cf2-64ad-11ed-bba6-0242ac110004",
"campaign_id": "CXXXXX",
"message": "Request to create campaign was received and is being processed."
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
let plivo = require('plivo');
let fs = require('fs');
let client = new plivo.Client("<auth_id>", "<auth_token>");
var callback = {"url":"<URL>", "method":"POST", "optout_keywords":"NO,STOP", "optin_keywords":"YES, SUBSCRIBE, TRUE", "help_keywords":"HELP,INFO,MORE", "optin_message":"<optin_message>"}
console.log('test');
client.campaign.create("<brand_id>","sample name","COMMUNICATION","STARTER",[
"CUSTOMER_CARE",
"2FA"
],"<description>", false,false,false,false,true,true,true,true, "<sample message 1>", "<sample message 2>","<message_flow>","<help_message>","<optout_message>", callback )
.then(function (response) {
console.log(JSON.stringify(response));
}).catch(function (error) {
console.log("err");
console.log(error);
});
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
curl -i --user auth_id:auth_token \
-H "Content-Type: application/json" \
-d '{
"brand_id": "BNZXXX",
"campaign_alias": "SP-campaign",
"vertical": "TECHNOLOGY",
"usecase": "STARTER",
"sub_usecases": ["2FA", "MARKETING"],
"description": "for creating campaign description should have minimum 40 characteristics to perform the request",
"direct_lending": true,
"affiliate_marketing": true,
"embedded_link": true,
"embedded_phone": true,
"age_gated": true,
"subscriber_optin": true,
"subscriber_optout": true,
"subscriber_help": true,
"sample1": "sample message 1 should have minimum 20 characters",
"sample2": "sample message 2 should have minimum 20 characters",
"url": "http://plivobin.non-prod.plivops.com/16xilyn1",
"method": "POST",
"Message_flow": "message flow is mandatory param and minimum 40 characters",
"Help_message": "send HELP to get more",
"optout_message": "send NO to unsubscribe",
"optin_Keywords" : "YES, SUBSCRIBE, TRUE",
"optout_Keywords" : "NO,STOP",
"optin_message" : "In case you want to use optin",
"help_keywords" : "HELP,INFO,MORE"
}'\
https://api.plivo.com/v1/Account/<Auth_id>/10dlc/Campaign/