Create 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 create the resources from.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^MG[0-9a-fA-F]{32}$
.
Body
-
A2P Brand Registration SID
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^BN[0-9a-fA-F]{32}$
. -
A short description of what this SMS campaign does. Min length: 40 characters. Max length: 4096 characters.
-
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.
-
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.
-
A2P Campaign Use Case. Examples: [ 2FA, EMERGENCY, MARKETING..]
-
Indicates that this SMS campaign will send messages that contain links.
-
Indicates that this SMS campaign will send messages that contain phone numbers.
-
If end users can text in a keyword to start receiving messages from this campaign, the auto-reply messages sent to the end users must be provided. The opt-in response should include the Brand name, confirmation of opt-in enrollment to a recurring message campaign, how to get help, and clear description of how to opt-out. This field is required if end users can text in a keyword to start receiving messages from this campaign. 20 character minimum. 320 character maximum.
-
Upon receiving the opt-out keywords from the end users, Twilio customers are expected to send back an auto-generated response, which must provide acknowledgment of the opt-out request and confirmation that no further messages will be sent. It is also recommended that these opt-out messages include the brand name. This field is required if managing opt out keywords yourself (i.e. not using Twilio's Default or Advanced Opt Out features). 20 character minimum. 320 character maximum.
-
When customers receive the help keywords from their end users, Twilio customers are expected to send back an auto-generated response; this may include the brand name and additional support contact information. This field is required if managing help keywords yourself (i.e. not using Twilio's Default or Advanced Opt Out features). 20 character minimum. 320 character maximum.
-
If end users can text in a keyword to start receiving messages from this campaign, those keywords must be provided. This field is required if end users can text in a keyword to start receiving messages from this campaign. Values must be alphanumeric. 255 character maximum.
-
End users should be able to text in a keyword to stop receiving messages from this campaign. Those keywords must be provided. This field is required if managing opt out keywords yourself (i.e. not using Twilio's Default or Advanced Opt Out features). Values must be alphanumeric. 255 character maximum.
-
End users should be able to text in a keyword to receive help. Those keywords must be provided as part of the campaign registration request. This field is required if managing help keywords yourself (i.e. not using Twilio's Default or Advanced Opt Out features). Values must be alphanumeric. 255 character maximum.
-
A boolean that specifies whether campaign has Subscriber Optin or not.
-
A boolean that specifies whether campaign is age gated or not.
-
A boolean that specifies whether campaign allows direct lending or not.
curl \
--request POST 'https://messaging.twilio.com/v1/Services/{MessagingServiceSid}/Compliance/Usa2p' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'AgeGated=false&Description=Send+marketing+messages+about+sales+to+opted+in+customers.&HelpMessage=Acme+Corporation%3A+Please+visit+www.example.com+to+get+support.+To+opt-out%2C+reply+STOP.&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.&HelpKeywords=HELP&OptInMessage=Acme+Corporation%3A+You+are+now+opted-in.+For+help%2C+reply+HELP.+To+opt-out%2C+reply+STOP&DirectLending=false&OptInKeywords=START&OptOutMessage=You+have+successfully+been+unsubscribed+from+Acme+Corporation.+You+will+not+receive+any+more+messages+from+this+number.&MessageSamples=EXPRESS%3A+Denim+Days+Event+is+ON&MessageSamples=LAST+CHANCE%3A+Book+your+next+flight+for+just+1+%28ONE%29+EUR&OptOutKeywords=STOP&SubscriberOptIn=false&HasEmbeddedLinks=true&HasEmbeddedPhone=false&BrandRegistrationSid=BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&UsAppToPersonUsecase=MARKETING'
{"AgeGated"=>false, "Description"=>"Send marketing messages about sales to opted in customers.", "HelpMessage"=>"Acme Corporation: Please visit www.example.com to get support. To opt-out, reply STOP.", "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.", "HelpKeywords"=>["HELP"], "OptInMessage"=>"Acme Corporation: You are now opted-in. For help, reply HELP. To opt-out, reply STOP", "DirectLending"=>false, "OptInKeywords"=>["START"], "OptOutMessage"=>"You have successfully been unsubscribed from Acme Corporation. You will not receive any more messages from this number.", "MessageSamples"=>["EXPRESS: Denim Days Event is ON", "LAST CHANCE: Book your next flight for just 1 (ONE) EUR"], "OptOutKeywords"=>["STOP"], "SubscriberOptIn"=>false, "HasEmbeddedLinks"=>true, "HasEmbeddedPhone"=>false, "BrandRegistrationSid"=>"BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "UsAppToPersonUsecase"=>"MARKETING"}
{"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.", "OptInMessage"=>"Acme Corporation: You are now opted-in. For help, reply HELP. To opt-out, reply STOP", "DirectLending"=>false, "OptInKeywords"=>["START"], "MessageSamples"=>["EXPRESS: Denim Days Event is ON", "LAST CHANCE: Book your next flight for just 1 (ONE) EUR"], "HasEmbeddedLinks"=>true, "HasEmbeddedPhone"=>false, "BrandRegistrationSid"=>"BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "UsAppToPersonUsecase"=>"MARKETING"}
{"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.", "OptInMessage"=>"Acme Corporation: You are now opted-in. For help, reply HELP. To opt-out, reply STOP", "DirectLending"=>false, "OptInKeywords"=>["START"], "MessageSamples"=>["EXPRESS: Denim Days Event is ON", "LAST CHANCE: Book your next flight for just 1 (ONE) EUR"], "HasEmbeddedLinks"=>true, "HasEmbeddedPhone"=>false, "BrandRegistrationSid"=>"BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "UsAppToPersonUsecase"=>"SOLE_PROPRIETOR"}
{
"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"
}
{
"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": "Reply STOP to unsubscribe. Msg&Data Rates May Apply.",
"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",
"INFO"
],
"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. You will not receive any more messages from this number. Reply START to resubscribe.",
"opt_out_keywords": [
"STOP",
"STOPALL",
"UNSUBSCRIBE",
"CANCEL",
"END",
"QUIT"
],
"subscriber_opt_in": true,
"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"
}
{
"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": 0.25,
"msg_class": "A"
},
"tmobile": {
"brand_tier": "LOW"
}
},
"date_created": "2021-02-18T14:48:52Z",
"date_updated": "2021-02-18T14:48:52Z",
"help_message": "Reply STOP to unsubscribe. Msg&Data Rates May Apply.",
"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",
"INFO"
],
"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. You will not receive any more messages from this number. Reply START to resubscribe.",
"opt_out_keywords": [
"STOP",
"STOPALL",
"UNSUBSCRIBE",
"CANCEL",
"END",
"QUIT"
],
"subscriber_opt_in": true,
"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": "SOLE_PROPRIETOR"
}