Update us app to person
A service for (fetch/create/delete) A2P Campaign for a Messaging Service
Path parameters
-
The SID of the Messaging Service to update the resource from.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^MG[0-9a-fA-F]{32}$
. -
The SID of the US A2P Compliance resource to update
QE2c6890da8086d771620e9b13fadeba0b
.Minimum length is
34
, maximum length is34
. Format should match the following pattern:^QE[0-9a-fA-F]{32}$
.
Body
-
Indicates that this SMS campaign will send messages that contain links.
-
Indicates that this SMS campaign will send messages that contain phone numbers.
-
An array of sample message strings, min two and max five. Min length for each sample: 20 chars. Max length for each sample: 1024 chars.
-
Required for all Campaigns. Details around how a consumer opts-in to their campaign, therefore giving consent to receive their messages. If multiple opt-in methods can be used for the same campaign, they must all be listed. 40 character minimum. 2048 character maximum.
-
A short description of what this SMS campaign does. Min length: 40 characters. Max length: 4096 characters.
-
A boolean that specifies whether campaign requires age gate for federally legal content.
-
A boolean that specifies whether campaign allows direct lending or not.
curl \
--request POST 'https://messaging.twilio.com/v1/Services/{MessagingServiceSid}/Compliance/Usa2p/{Sid}' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'AgeGated=false&Description=Send+marketing+messages+about+sales+to+opted+in+customers.&MessageFlow=End+users+opt-in+by+visiting+www.example.com+and+adding+their+phone+number.+They+then+check+a+box+agreeing+to+receive+text+messages+from+Example+Brand.+Additionally%2C+end+users+can+also+opt-in+by+texting+START+to+%28111%29+222-3333+to+opt+in.&DirectLending=false&MessageSamples=EXPRESS%3A+Denim+Days+Event+is+ON&MessageSamples=LAST+CHANCE%3A+Book+your+next+flight+for+just+1+%28ONE%29+EUR&HasEmbeddedLinks=true&HasEmbeddedPhone=false'
{"AgeGated"=>false, "Description"=>"Send marketing messages about sales to opted in customers.", "MessageFlow"=>"End users opt-in by visiting www.example.com and adding their phone number. They then check a box agreeing to receive text messages from Example Brand. Additionally, end users can also opt-in by texting START to (111) 222-3333 to opt in.", "DirectLending"=>false, "MessageSamples"=>["EXPRESS: Denim Days Event is ON", "LAST CHANCE: Book your next flight for just 1 (ONE) EUR"], "HasEmbeddedLinks"=>true, "HasEmbeddedPhone"=>false}
{
"sid": "QE2c6890da8086d771620e9b13fadeba0b",
"url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p/QE2c6890da8086d771620e9b13fadeba0b",
"mock": false,
"errors": [],
"age_gated": false,
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"campaign_id": "CFOOBAR",
"description": "Send marketing messages about sales to opted in customers.",
"rate_limits": {
"att": {
"mps": 600,
"msg_class": "A"
},
"tmobile": {
"brand_tier": "TOP"
}
},
"date_created": "2021-02-18T14:48:52Z",
"date_updated": "2021-02-18T14:48:52Z",
"help_message": "Acme Corporation: Please visit www.example.com to get support. To opt-out, reply STOP.",
"message_flow": "End users opt-in by visiting www.example.com and adding their phone number. They then check a box agreeing to receive text messages from Example Brand. Additionally, end users can also opt-in by texting START to (111) 222-3333 to opt in.",
"help_keywords": [
"HELP"
],
"direct_lending": false,
"opt_in_message": "Acme Corporation: You are now opted-in. For help, reply HELP. To opt-out, reply STOP",
"campaign_status": "PENDING",
"message_samples": [
"EXPRESS: Denim Days Event is ON",
"LAST CHANCE: Book your next flight for just 1 (ONE) EUR"
],
"opt_in_keywords": [
"START"
],
"opt_out_message": "You have successfully been unsubscribed from Acme Corporation. You will not receive any more messages from this number.",
"opt_out_keywords": [
"STOP"
],
"subscriber_opt_in": false,
"has_embedded_links": true,
"has_embedded_phone": false,
"messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"brand_registration_sid": "BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"is_externally_registered": false,
"us_app_to_person_usecase": "MARKETING"
}