import sys
sys.path.append("../plivo-python")
import plivo
client = plivo.RestClient("<auth_id>", "<auth_token>")

response = client.campaign.update('<Campaign_id>, sample1='update sample1 on plivo and tcr', message_flow='message flow is mandatory param and minimum 40 characters', help_message='help message is mandatory param and minimum 20 character')
print(response)
{
"api_id": "6739b738-80ff-11ed-95f2-0242ac110003",
"campaign": {
"brand_id": "BSJXPJH",
"campaign_attributes": {
"affiliate_marketing": false,
"age_gated": false,
"direct_lending": false,
"embedded_link": false,
"embedded_phone": false,
"subscriber_help": true,
"subscriber_optin": true,
"subscriber_optout": true
},
"campaign_id": "CDB3KGW",
"description": "Campaign description is a mandatory parameter, minimum 40 characters",
"help_keywords": "HELP,INFO,MORE",
"help_message": "Help message is a mandatory parameter, minimum 20 characters",
"message_flow": "Message flow is a mandatory parameter, minimum 40 characters",
"mno_metadata": {
"AT&T": {
"tpm": 4500
},
"T-Mobile": {
"brand_tier": "TOP"
},
"US Cellular": {
"tpm": 4500
},
"Verizon Wireless": {
"tpm": 4500
}
},
"optin_keywords": "YES,SUBSCRIBE",
"optin_message": "Opt-in message should have a minimum of 20 characters",
"optout_keywords": "NO,STOP",
"optout_message": "Opt-out message should have a minimum of 20 characters",
"registration_status": "FAILED",
"reseller_id": "",
"sample1": "Sample message 1 should have a minimum of 20 characters",
"sample2": "Sample message 2 should have a minimum of 20 characters",
"usecase": "2FA"
}
}

Update a 10DLC campaign from your account. This action is only allowed for campaigns that failed to register previously — that is, current registration_status = failed.

Note that updating a campaign submits it for another vetting review with the carriers at a cost of $15. See our 10DLC support page for more details on vetting.

Please note that updates to campaigns will be allowed when the registration_status is set to processing. However, in some cases, when the registration_status is in the processing stage, updates to campaigns will not be allowed (via console) or may result in an error through the API, as the campaign may be undergoing carrier approval with the registry.

API Endpoint

POST
https://api.plivo.com/v1/Account/{auth_id}/10dlc/Campaign/{campaign_id}/

Arguments

You can update only these fields of a campaign. You can pass one or more of the fields during the update.

campaign_alias

string

A friendly name for your campaign. This name appears on the Plivo console.

description
string

A brief description of the campaign and how it’s relevant to your business — minimum of 40 characters. 

sample1 
string
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. 
sample2 
string
The content of the second sample message. 
message_flow
string
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
string

Indicates the response to the HELP keyword. It may include the brand name and support contact information. 

Check documentation for samples. 

optout_message
string
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. 
optout_keywords
string
Opt-out keywords associated with the campaign. If more than one, provide a comma-separated list with no special characters or embedded spaces.  
optin_message
string
Message sent to subscribers to confirm their opt-in to the campaign. 
optin_keywords
string
Opt-in keywords associated with the campaign. If more than one, provide a comma-separated list with no special characters or embedded spaces. 
help_keywords
string
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. 

Returns

api_id and the campaign object for the campaign in question.

import sys
sys.path.append("../plivo-python")
import plivo
client = plivo.RestClient("<auth_id>", "<auth_token>")

response = client.campaign.update('<Campaign_id>, sample1='update sample1 on plivo and tcr', message_flow='message flow is mandatory param and minimum 40 characters', help_message='help message is mandatory param and minimum 20 character')
print(response)
{
"api_id": "6739b738-80ff-11ed-95f2-0242ac110003",
"campaign": {
"brand_id": "BSJXPJH",
"campaign_attributes": {
"affiliate_marketing": false,
"age_gated": false,
"direct_lending": false,
"embedded_link": false,
"embedded_phone": false,
"subscriber_help": true,
"subscriber_optin": true,
"subscriber_optout": true
},
"campaign_id": "CDB3KGW",
"description": "Campaign description is a mandatory parameter, minimum 40 characters",
"help_keywords": "HELP,INFO,MORE",
"help_message": "Help message is a mandatory parameter, minimum 20 characters",
"message_flow": "Message flow is a mandatory parameter, minimum 40 characters",
"mno_metadata": {
"AT&T": {
"tpm": 4500
},
"T-Mobile": {
"brand_tier": "TOP"
},
"US Cellular": {
"tpm": 4500
},
"Verizon Wireless": {
"tpm": 4500
}
},
"optin_keywords": "YES,SUBSCRIBE",
"optin_message": "Opt-in message should have a minimum of 20 characters",
"optout_keywords": "NO,STOP",
"optout_message": "Opt-out message should have a minimum of 20 characters",
"registration_status": "FAILED",
"reseller_id": "",
"sample1": "Sample message 1 should have a minimum of 20 characters",
"sample2": "Sample message 2 should have a minimum of 20 characters",
"usecase": "2FA"
}
}