# A2P 10DLC - UsAppToPerson (Usa2p) resource

> \[!WARNING]
>
> This API reference page supplements the [ISV API onboarding guides](/docs/messaging/compliance/a2p-10dlc/onboarding-isv). Don't use this API resource without following the appropriate guide, or you might experience **delays in registration and unintended fees**.

A UsAppToPerson (Usa2p) resource represents an A2P 10DLC Campaign within a Messaging Service. This resource contains information about the Campaign such as message contents, opt-in and opt-out behavior, and the purpose of the messages.

This resource is part of the A2P 10DLC registration process and is intended only for use by Independent Software Vendors (ISVs).

Not an ISV? Check out the [Standard and Low-Volume Brand Onboarding Guide](/docs/messaging/compliance/a2p-10dlc/direct-standard-onboarding) or the [Sole Proprietor Brand Onboarding Guide](/docs/messaging/compliance/a2p-10dlc/direct-sole-proprietor-registration-overview).

## Usa2p Properties

```json
{"oneOf":[{"type":"object","properties":{"sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^QE[0-9a-fA-F]{32}$","nullable":true,"description":"The unique string that identifies a US A2P Compliance resource `QE2c6890da8086d771620e9b13fadeba0b`."},"account_sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^AC[0-9a-fA-F]{32}$","nullable":true,"description":"The SID of the [Account](/docs/iam/api/account) that the Campaign belongs to."},"brand_registration_sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^BN[0-9a-fA-F]{32}$","nullable":true,"description":"The unique string to identify the A2P brand."},"messaging_service_sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^MG[0-9a-fA-F]{32}$","nullable":true,"description":"The SID of the [Messaging Service](/docs/messaging/api/service-resource) that the resource is associated with."},"description":{"type":"string","nullable":true,"description":"A short description of what this SMS campaign does. Min length: 40 characters. Max length: 4096 characters."},"message_samples":{"type":"array","nullable":true,"description":"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.","items":{"type":"string"}},"us_app_to_person_usecase":{"type":"string","nullable":true,"description":"A2P Campaign Use Case. Examples: [ 2FA, EMERGENCY, MARKETING, SOLE_PROPRIETOR...]. SOLE_PROPRIETOR campaign use cases can only be created by SOLE_PROPRIETOR Brands, and there can only be one SOLE_PROPRIETOR campaign created per SOLE_PROPRIETOR Brand."},"has_embedded_links":{"type":"boolean","nullable":true,"description":"Indicate that this SMS campaign will send messages that contain links."},"has_embedded_phone":{"type":"boolean","nullable":true,"description":"Indicates that this SMS campaign will send messages that contain phone numbers."},"subscriber_opt_in":{"type":"boolean","nullable":true,"description":"A boolean that specifies whether campaign has Subscriber Optin or not."},"age_gated":{"type":"boolean","nullable":true,"description":"A boolean that specifies whether campaign is age gated or not."},"direct_lending":{"type":"boolean","nullable":true,"description":"A boolean that specifies whether campaign allows direct lending or not."},"campaign_status":{"type":"string","nullable":true,"description":"Campaign status. Examples: IN_PROGRESS, VERIFIED, FAILED."},"campaign_id":{"type":"string","nullable":true,"description":"The Campaign Registry (TCR) Campaign ID."},"is_externally_registered":{"type":"boolean","nullable":true,"description":"Indicates whether the campaign was registered externally or not."},"rate_limits":{"nullable":true,"description":"Rate limit and/or classification set by each carrier, Ex. AT&T or T-Mobile."},"message_flow":{"type":"string","nullable":true,"description":"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."},"opt_in_message":{"type":"string","nullable":true,"description":"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."},"opt_out_message":{"type":"string","nullable":true,"description":"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."},"help_message":{"type":"string","nullable":true,"description":"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."},"opt_in_keywords":{"type":"array","nullable":true,"description":"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.","items":{"type":"string"}},"opt_out_keywords":{"type":"array","nullable":true,"description":"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.","items":{"type":"string"}},"help_keywords":{"type":"array","nullable":true,"description":"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.","items":{"type":"string"}},"date_created":{"type":"string","format":"date-time","nullable":true,"description":"The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"date_updated":{"type":"string","format":"date-time","nullable":true,"description":"The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"url":{"type":"string","format":"uri","nullable":true,"description":"The absolute URL of the US App to Person resource."},"mock":{"type":"boolean","nullable":true,"description":"A boolean that specifies whether campaign is a mock or not. Mock campaigns will be automatically created if using a mock brand. Mock campaigns should only be used for testing purposes."},"errors":{"type":"array","nullable":true,"description":"Details indicating why a campaign registration failed. These errors can indicate one or more fields that were incorrect or did not meet review requirements."}},"additionalProperties":false,"refName":"messaging.v1.service.us_app_to_person","modelName":"messaging_v1_service_us_app_to_person"},{"type":"object","required":["privacy_policy_url","terms_and_conditions_url"],"properties":{"sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^QE[0-9a-fA-F]{32}$","nullable":true,"description":"The unique string that identifies a US A2P Compliance resource `QE2c6890da8086d771620e9b13fadeba0b`."},"account_sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^AC[0-9a-fA-F]{32}$","nullable":true,"description":"The SID of the [Account](/docs/iam/api/account) that the Campaign belongs to."},"brand_registration_sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^BN[0-9a-fA-F]{32}$","nullable":true,"description":"The unique string to identify the A2P brand."},"messaging_service_sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^MG[0-9a-fA-F]{32}$","nullable":true,"description":"The SID of the [Messaging Service](/docs/messaging/api/service-resource) that the resource is associated with."},"description":{"type":"string","nullable":true,"description":"A short description of what this SMS campaign does. Min length: 40 characters. Max length: 4096 characters."},"message_samples":{"type":"array","nullable":true,"description":"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.","items":{"type":"string"}},"us_app_to_person_usecase":{"type":"string","nullable":true,"description":"A2P Campaign Use Case. Examples: [ 2FA, EMERGENCY, MARKETING, SOLE_PROPRIETOR...]. SOLE_PROPRIETOR campaign use cases can only be created by SOLE_PROPRIETOR Brands, and there can only be one SOLE_PROPRIETOR campaign created per SOLE_PROPRIETOR Brand."},"has_embedded_links":{"type":"boolean","nullable":true,"description":"Indicate that this SMS campaign will send messages that contain links."},"has_embedded_phone":{"type":"boolean","nullable":true,"description":"Indicates that this SMS campaign will send messages that contain phone numbers."},"subscriber_opt_in":{"type":"boolean","nullable":true,"description":"A boolean that specifies whether campaign has Subscriber Optin or not."},"age_gated":{"type":"boolean","nullable":true,"description":"A boolean that specifies whether campaign is age gated or not."},"direct_lending":{"type":"boolean","nullable":true,"description":"A boolean that specifies whether campaign allows direct lending or not."},"campaign_status":{"type":"string","nullable":true,"description":"Campaign status. Examples: IN_PROGRESS, VERIFIED, FAILED."},"campaign_id":{"type":"string","nullable":true,"description":"The Campaign Registry (TCR) Campaign ID."},"is_externally_registered":{"type":"boolean","nullable":true,"description":"Indicates whether the campaign was registered externally or not."},"rate_limits":{"nullable":true,"description":"Rate limit and/or classification set by each carrier, Ex. AT&T or T-Mobile."},"message_flow":{"type":"string","nullable":true,"description":"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."},"opt_in_message":{"type":"string","nullable":true,"description":"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."},"opt_out_message":{"type":"string","nullable":true,"description":"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."},"help_message":{"type":"string","nullable":true,"description":"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."},"opt_in_keywords":{"type":"array","nullable":true,"description":"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.","items":{"type":"string"}},"opt_out_keywords":{"type":"array","nullable":true,"description":"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.","items":{"type":"string"}},"help_keywords":{"type":"array","nullable":true,"description":"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.","items":{"type":"string"}},"date_created":{"type":"string","format":"date-time","nullable":true,"description":"The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"date_updated":{"type":"string","format":"date-time","nullable":true,"description":"The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"url":{"type":"string","format":"uri","nullable":true,"description":"The absolute URL of the US App to Person resource."},"mock":{"type":"boolean","nullable":true,"description":"A boolean that specifies whether campaign is a mock or not. Mock campaigns will be automatically created if using a mock brand. Mock campaigns should only be used for testing purposes."},"errors":{"type":"array","nullable":true,"description":"Details indicating why a campaign registration failed. These errors can indicate one or more fields that were incorrect or did not meet review requirements."},"privacy_policy_url":{"type":"string","format":"uri","nullable":true,"description":"The URL of the privacy policy for the campaign."},"terms_and_conditions_url":{"type":"string","format":"uri","nullable":true,"description":"The URL of the terms and conditions for the campaign."}},"refName":"messaging.v1.service.us_app_to_person_v2","modelName":"messaging_v1_service_us_app_to_person_v2"}],"refName":"messaging.v1.service.us_app_to_person_response","modelName":"messaging_v1_service_us_app_to_person_response","properties":{}}
```

## Create a Usa2p resource

`POST https://messaging.twilio.com/v1/Services/{MessagingServiceSid}/Compliance/Usa2p`

This request creates a Usa2p resource, which represents an A2P 10DLC Campaign. Creating this resource submits the Campaign for review and incurs fees.

Learn more about the formats and contents of each parameter in the [Gather the Required Business Information doc](/docs/messaging/compliance/a2p-10dlc/collect-business-info).

### Headers

```json
[{"name":"X-Twilio-Api-Version","in":"header","description":"The version of the Messaging API to use for this request","required":false,"schema":{"type":"string"},"x-twilio":{"shortDescription":"The Messaging API version"},"refName":"#/components/parameters/XTwilioApiVersion","modelName":"__components_parameters_XTwilioApiVersion"}]
```

### Path parameters

```json
[{"name":"MessagingServiceSid","in":"path","description":"The SID of the [Messaging Service](/docs/messaging/api/service-resource) to create the resources from.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^MG[0-9a-fA-F]{32}$"},"required":true}]
```

### Request body parameters

```json
{"schema":{"type":"object","title":"CreateUsAppToPersonRequest","required":["BrandRegistrationSid","Description","MessageFlow","MessageSamples","UsAppToPersonUsecase","HasEmbeddedLinks","HasEmbeddedPhone"],"properties":{"BrandRegistrationSid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^BN[0-9a-fA-F]{32}$","description":"A2P Brand Registration SID"},"Description":{"type":"string","description":"A short description of what this SMS campaign does. Min length: 40 characters. Max length: 4096 characters."},"MessageFlow":{"type":"string","description":"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."},"MessageSamples":{"type":"array","description":"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.","items":{"type":"string"}},"UsAppToPersonUsecase":{"type":"string","description":"A2P Campaign Use Case. Examples: [ 2FA, EMERGENCY, MARKETING..]"},"HasEmbeddedLinks":{"type":"boolean","description":"Indicates that this SMS campaign will send messages that contain links."},"HasEmbeddedPhone":{"type":"boolean","description":"Indicates that this SMS campaign will send messages that contain phone numbers."},"OptInMessage":{"type":"string","description":"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."},"OptOutMessage":{"type":"string","description":"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."},"HelpMessage":{"type":"string","description":"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."},"OptInKeywords":{"type":"array","description":"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.","items":{"type":"string"}},"OptOutKeywords":{"type":"array","description":"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.","items":{"type":"string"}},"HelpKeywords":{"type":"array","description":"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.","items":{"type":"string"}},"SubscriberOptIn":{"type":"boolean","description":"A boolean that specifies whether campaign has Subscriber Optin or not."},"AgeGated":{"type":"boolean","description":"A boolean that specifies whether campaign is age gated or not."},"DirectLending":{"type":"boolean","description":"A boolean that specifies whether campaign allows direct lending or not."},"PrivacyPolicyUrl":{"type":"string","format":"uri","description":"The URL of the privacy policy for the campaign."},"TermsAndConditionsUrl":{"type":"string","format":"uri","description":"The URL of the terms and conditions for the campaign."}}},"examples":{"create":{"value":{"lang":"json","value":"{\n  \"BrandRegistrationSid\": \"BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\n  \"Description\": \"Send marketing messages about sales to opted in customers.\",\n  \"MessageSamples\": [\n    \"EXPRESS: Denim Days Event is ON\",\n    \"LAST CHANCE: Book your next flight for just 1 (ONE) EUR\"\n  ],\n  \"UsAppToPersonUsecase\": \"MARKETING\",\n  \"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.\",\n  \"OptInMessage\": \"Acme Corporation: You are now opted-in. For help, reply HELP. To opt-out, reply STOP\",\n  \"OptOutMessage\": \"You have successfully been unsubscribed from Acme Corporation. You will not receive any more messages from this number.\",\n  \"HelpMessage\": \"Acme Corporation: Please visit www.example.com to get support. To opt-out, reply STOP.\",\n  \"OptInKeywords\": [\n    \"START\"\n  ],\n  \"OptOutKeywords\": [\n    \"STOP\"\n  ],\n  \"HelpKeywords\": [\n    \"HELP\"\n  ],\n  \"HasEmbeddedLinks\": true,\n  \"HasEmbeddedPhone\": false,\n  \"SubscriberOptIn\": false,\n  \"AgeGated\": false,\n  \"DirectLending\": false\n}","meta":"","code":"{\n  \"BrandRegistrationSid\": \"BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\n  \"Description\": \"Send marketing messages about sales to opted in customers.\",\n  \"MessageSamples\": [\n    \"EXPRESS: Denim Days Event is ON\",\n    \"LAST CHANCE: Book your next flight for just 1 (ONE) EUR\"\n  ],\n  \"UsAppToPersonUsecase\": \"MARKETING\",\n  \"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.\",\n  \"OptInMessage\": \"Acme Corporation: You are now opted-in. For help, reply HELP. To opt-out, reply STOP\",\n  \"OptOutMessage\": \"You have successfully been unsubscribed from Acme Corporation. You will not receive any more messages from this number.\",\n  \"HelpMessage\": \"Acme Corporation: Please visit www.example.com to get support. To opt-out, reply STOP.\",\n  \"OptInKeywords\": [\n    \"START\"\n  ],\n  \"OptOutKeywords\": [\n    \"STOP\"\n  ],\n  \"HelpKeywords\": [\n    \"HELP\"\n  ],\n  \"HasEmbeddedLinks\": true,\n  \"HasEmbeddedPhone\": false,\n  \"SubscriberOptIn\": false,\n  \"AgeGated\": false,\n  \"DirectLending\": false\n}","tokens":[["{","#C9D1D9"],"\n  ",["\"BrandRegistrationSid\"","#7EE787"],[":","#C9D1D9"]," ",["\"BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"Description\"","#7EE787"],[":","#C9D1D9"]," ",["\"Send marketing messages about sales to opted in customers.\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"MessageSamples\"","#7EE787"],[": [","#C9D1D9"],"\n    ",["\"EXPRESS: Denim Days Event is ON\"","#A5D6FF"],[",","#C9D1D9"],"\n    ",["\"LAST CHANCE: Book your next flight for just 1 (ONE) EUR\"","#A5D6FF"],"\n  ",["],","#C9D1D9"],"\n  ",["\"UsAppToPersonUsecase\"","#7EE787"],[":","#C9D1D9"]," ",["\"MARKETING\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"MessageFlow\"","#7EE787"],[":","#C9D1D9"]," ",["\"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.\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"OptInMessage\"","#7EE787"],[":","#C9D1D9"]," ",["\"Acme Corporation: You are now opted-in. For help, reply HELP. To opt-out, reply STOP\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"OptOutMessage\"","#7EE787"],[":","#C9D1D9"]," ",["\"You have successfully been unsubscribed from Acme Corporation. You will not receive any more messages from this number.\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"HelpMessage\"","#7EE787"],[":","#C9D1D9"]," ",["\"Acme Corporation: Please visit www.example.com to get support. To opt-out, reply STOP.\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"OptInKeywords\"","#7EE787"],[": [","#C9D1D9"],"\n    ",["\"START\"","#A5D6FF"],"\n  ",["],","#C9D1D9"],"\n  ",["\"OptOutKeywords\"","#7EE787"],[": [","#C9D1D9"],"\n    ",["\"STOP\"","#A5D6FF"],"\n  ",["],","#C9D1D9"],"\n  ",["\"HelpKeywords\"","#7EE787"],[": [","#C9D1D9"],"\n    ",["\"HELP\"","#A5D6FF"],"\n  ",["],","#C9D1D9"],"\n  ",["\"HasEmbeddedLinks\"","#7EE787"],[":","#C9D1D9"]," ",["true","#79C0FF"],[",","#C9D1D9"],"\n  ",["\"HasEmbeddedPhone\"","#7EE787"],[":","#C9D1D9"]," ",["false","#79C0FF"],[",","#C9D1D9"],"\n  ",["\"SubscriberOptIn\"","#7EE787"],[":","#C9D1D9"]," ",["false","#79C0FF"],[",","#C9D1D9"],"\n  ",["\"AgeGated\"","#7EE787"],[":","#C9D1D9"]," ",["false","#79C0FF"],[",","#C9D1D9"],"\n  ",["\"DirectLending\"","#7EE787"],[":","#C9D1D9"]," ",["false","#79C0FF"],"\n",["}","#C9D1D9"]],"annotations":[],"themeName":"github-dark","style":{"color":"#c9d1d9","background":"#0d1117"}}},"createWithDefaults":{"value":{"lang":"json","value":"{\n  \"BrandRegistrationSid\": \"BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\n  \"Description\": \"Send marketing messages about sales to opted in customers.\",\n  \"MessageSamples\": [\n    \"EXPRESS: Denim Days Event is ON\",\n    \"LAST CHANCE: Book your next flight for just 1 (ONE) EUR\"\n  ],\n  \"UsAppToPersonUsecase\": \"MARKETING\",\n  \"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.\",\n  \"OptInMessage\": \"Acme Corporation: You are now opted-in. For help, reply HELP. To opt-out, reply STOP\",\n  \"OptInKeywords\": [\n    \"START\"\n  ],\n  \"HasEmbeddedLinks\": true,\n  \"HasEmbeddedPhone\": false,\n  \"AgeGated\": false,\n  \"DirectLending\": false\n}","meta":"","code":"{\n  \"BrandRegistrationSid\": \"BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\n  \"Description\": \"Send marketing messages about sales to opted in customers.\",\n  \"MessageSamples\": [\n    \"EXPRESS: Denim Days Event is ON\",\n    \"LAST CHANCE: Book your next flight for just 1 (ONE) EUR\"\n  ],\n  \"UsAppToPersonUsecase\": \"MARKETING\",\n  \"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.\",\n  \"OptInMessage\": \"Acme Corporation: You are now opted-in. For help, reply HELP. To opt-out, reply STOP\",\n  \"OptInKeywords\": [\n    \"START\"\n  ],\n  \"HasEmbeddedLinks\": true,\n  \"HasEmbeddedPhone\": false,\n  \"AgeGated\": false,\n  \"DirectLending\": false\n}","tokens":[["{","#C9D1D9"],"\n  ",["\"BrandRegistrationSid\"","#7EE787"],[":","#C9D1D9"]," ",["\"BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"Description\"","#7EE787"],[":","#C9D1D9"]," ",["\"Send marketing messages about sales to opted in customers.\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"MessageSamples\"","#7EE787"],[": [","#C9D1D9"],"\n    ",["\"EXPRESS: Denim Days Event is ON\"","#A5D6FF"],[",","#C9D1D9"],"\n    ",["\"LAST CHANCE: Book your next flight for just 1 (ONE) EUR\"","#A5D6FF"],"\n  ",["],","#C9D1D9"],"\n  ",["\"UsAppToPersonUsecase\"","#7EE787"],[":","#C9D1D9"]," ",["\"MARKETING\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"MessageFlow\"","#7EE787"],[":","#C9D1D9"]," ",["\"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.\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"OptInMessage\"","#7EE787"],[":","#C9D1D9"]," ",["\"Acme Corporation: You are now opted-in. For help, reply HELP. To opt-out, reply STOP\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"OptInKeywords\"","#7EE787"],[": [","#C9D1D9"],"\n    ",["\"START\"","#A5D6FF"],"\n  ",["],","#C9D1D9"],"\n  ",["\"HasEmbeddedLinks\"","#7EE787"],[":","#C9D1D9"]," ",["true","#79C0FF"],[",","#C9D1D9"],"\n  ",["\"HasEmbeddedPhone\"","#7EE787"],[":","#C9D1D9"]," ",["false","#79C0FF"],[",","#C9D1D9"],"\n  ",["\"AgeGated\"","#7EE787"],[":","#C9D1D9"]," ",["false","#79C0FF"],[",","#C9D1D9"],"\n  ",["\"DirectLending\"","#7EE787"],[":","#C9D1D9"]," ",["false","#79C0FF"],"\n",["}","#C9D1D9"]],"annotations":[],"themeName":"github-dark","style":{"color":"#c9d1d9","background":"#0d1117"}}},"createWithDefaultsSoleProprietor":{"value":{"lang":"json","value":"{\n  \"BrandRegistrationSid\": \"BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\n  \"Description\": \"Send marketing messages about sales to opted in customers.\",\n  \"MessageSamples\": [\n    \"EXPRESS: Denim Days Event is ON\",\n    \"LAST CHANCE: Book your next flight for just 1 (ONE) EUR\"\n  ],\n  \"UsAppToPersonUsecase\": \"SOLE_PROPRIETOR\",\n  \"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.\",\n  \"OptInMessage\": \"Acme Corporation: You are now opted-in. For help, reply HELP. To opt-out, reply STOP\",\n  \"OptInKeywords\": [\n    \"START\"\n  ],\n  \"HasEmbeddedLinks\": true,\n  \"HasEmbeddedPhone\": false,\n  \"AgeGated\": false,\n  \"DirectLending\": false\n}","meta":"","code":"{\n  \"BrandRegistrationSid\": \"BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\n  \"Description\": \"Send marketing messages about sales to opted in customers.\",\n  \"MessageSamples\": [\n    \"EXPRESS: Denim Days Event is ON\",\n    \"LAST CHANCE: Book your next flight for just 1 (ONE) EUR\"\n  ],\n  \"UsAppToPersonUsecase\": \"SOLE_PROPRIETOR\",\n  \"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.\",\n  \"OptInMessage\": \"Acme Corporation: You are now opted-in. For help, reply HELP. To opt-out, reply STOP\",\n  \"OptInKeywords\": [\n    \"START\"\n  ],\n  \"HasEmbeddedLinks\": true,\n  \"HasEmbeddedPhone\": false,\n  \"AgeGated\": false,\n  \"DirectLending\": false\n}","tokens":[["{","#C9D1D9"],"\n  ",["\"BrandRegistrationSid\"","#7EE787"],[":","#C9D1D9"]," ",["\"BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"Description\"","#7EE787"],[":","#C9D1D9"]," ",["\"Send marketing messages about sales to opted in customers.\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"MessageSamples\"","#7EE787"],[": [","#C9D1D9"],"\n    ",["\"EXPRESS: Denim Days Event is ON\"","#A5D6FF"],[",","#C9D1D9"],"\n    ",["\"LAST CHANCE: Book your next flight for just 1 (ONE) EUR\"","#A5D6FF"],"\n  ",["],","#C9D1D9"],"\n  ",["\"UsAppToPersonUsecase\"","#7EE787"],[":","#C9D1D9"]," ",["\"SOLE_PROPRIETOR\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"MessageFlow\"","#7EE787"],[":","#C9D1D9"]," ",["\"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.\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"OptInMessage\"","#7EE787"],[":","#C9D1D9"]," ",["\"Acme Corporation: You are now opted-in. For help, reply HELP. To opt-out, reply STOP\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"OptInKeywords\"","#7EE787"],[": [","#C9D1D9"],"\n    ",["\"START\"","#A5D6FF"],"\n  ",["],","#C9D1D9"],"\n  ",["\"HasEmbeddedLinks\"","#7EE787"],[":","#C9D1D9"]," ",["true","#79C0FF"],[",","#C9D1D9"],"\n  ",["\"HasEmbeddedPhone\"","#7EE787"],[":","#C9D1D9"]," ",["false","#79C0FF"],[",","#C9D1D9"],"\n  ",["\"AgeGated\"","#7EE787"],[":","#C9D1D9"]," ",["false","#79C0FF"],[",","#C9D1D9"],"\n  ",["\"DirectLending\"","#7EE787"],[":","#C9D1D9"]," ",["false","#79C0FF"],"\n",["}","#C9D1D9"]],"annotations":[],"themeName":"github-dark","style":{"color":"#c9d1d9","background":"#0d1117"}}},"createWithExtendedFieldsAndHeader":{"value":{"lang":"json","value":"{\n  \"BrandRegistrationSid\": \"BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\n  \"Description\": \"Send marketing messages about sales to opted in customers.\",\n  \"MessageSamples\": [\n    \"EXPRESS: Denim Days Event is ON\",\n    \"LAST CHANCE: Book your next flight for just 1 (ONE) EUR\"\n  ],\n  \"UsAppToPersonUsecase\": \"MARKETING\",\n  \"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.\",\n  \"OptInMessage\": \"Acme Corporation: You are now opted-in. For help, reply HELP. To opt-out, reply STOP\",\n  \"OptOutMessage\": \"You have successfully been unsubscribed from Acme Corporation. You will not receive any more messages from this number.\",\n  \"HelpMessage\": \"Acme Corporation: Please visit www.example.com to get support. To opt-out, reply STOP.\",\n  \"OptInKeywords\": [\n    \"START\"\n  ],\n  \"OptOutKeywords\": [\n    \"STOP\"\n  ],\n  \"HelpKeywords\": [\n    \"HELP\"\n  ],\n  \"PrivacyPolicyUrl\": \"https://example.com/privacy\",\n  \"TermsAndConditionsUrl\": \"https://example.com/terms\",\n  \"HasEmbeddedLinks\": true,\n  \"HasEmbeddedPhone\": false,\n  \"SubscriberOptIn\": false,\n  \"AgeGated\": false,\n  \"DirectLending\": false\n}","meta":"","code":"{\n  \"BrandRegistrationSid\": \"BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\n  \"Description\": \"Send marketing messages about sales to opted in customers.\",\n  \"MessageSamples\": [\n    \"EXPRESS: Denim Days Event is ON\",\n    \"LAST CHANCE: Book your next flight for just 1 (ONE) EUR\"\n  ],\n  \"UsAppToPersonUsecase\": \"MARKETING\",\n  \"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.\",\n  \"OptInMessage\": \"Acme Corporation: You are now opted-in. For help, reply HELP. To opt-out, reply STOP\",\n  \"OptOutMessage\": \"You have successfully been unsubscribed from Acme Corporation. You will not receive any more messages from this number.\",\n  \"HelpMessage\": \"Acme Corporation: Please visit www.example.com to get support. To opt-out, reply STOP.\",\n  \"OptInKeywords\": [\n    \"START\"\n  ],\n  \"OptOutKeywords\": [\n    \"STOP\"\n  ],\n  \"HelpKeywords\": [\n    \"HELP\"\n  ],\n  \"PrivacyPolicyUrl\": \"https://example.com/privacy\",\n  \"TermsAndConditionsUrl\": \"https://example.com/terms\",\n  \"HasEmbeddedLinks\": true,\n  \"HasEmbeddedPhone\": false,\n  \"SubscriberOptIn\": false,\n  \"AgeGated\": false,\n  \"DirectLending\": false\n}","tokens":[["{","#C9D1D9"],"\n  ",["\"BrandRegistrationSid\"","#7EE787"],[":","#C9D1D9"]," ",["\"BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"Description\"","#7EE787"],[":","#C9D1D9"]," ",["\"Send marketing messages about sales to opted in customers.\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"MessageSamples\"","#7EE787"],[": [","#C9D1D9"],"\n    ",["\"EXPRESS: Denim Days Event is ON\"","#A5D6FF"],[",","#C9D1D9"],"\n    ",["\"LAST CHANCE: Book your next flight for just 1 (ONE) EUR\"","#A5D6FF"],"\n  ",["],","#C9D1D9"],"\n  ",["\"UsAppToPersonUsecase\"","#7EE787"],[":","#C9D1D9"]," ",["\"MARKETING\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"MessageFlow\"","#7EE787"],[":","#C9D1D9"]," ",["\"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.\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"OptInMessage\"","#7EE787"],[":","#C9D1D9"]," ",["\"Acme Corporation: You are now opted-in. For help, reply HELP. To opt-out, reply STOP\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"OptOutMessage\"","#7EE787"],[":","#C9D1D9"]," ",["\"You have successfully been unsubscribed from Acme Corporation. You will not receive any more messages from this number.\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"HelpMessage\"","#7EE787"],[":","#C9D1D9"]," ",["\"Acme Corporation: Please visit www.example.com to get support. To opt-out, reply STOP.\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"OptInKeywords\"","#7EE787"],[": [","#C9D1D9"],"\n    ",["\"START\"","#A5D6FF"],"\n  ",["],","#C9D1D9"],"\n  ",["\"OptOutKeywords\"","#7EE787"],[": [","#C9D1D9"],"\n    ",["\"STOP\"","#A5D6FF"],"\n  ",["],","#C9D1D9"],"\n  ",["\"HelpKeywords\"","#7EE787"],[": [","#C9D1D9"],"\n    ",["\"HELP\"","#A5D6FF"],"\n  ",["],","#C9D1D9"],"\n  ",["\"PrivacyPolicyUrl\"","#7EE787"],[":","#C9D1D9"]," ",["\"https://example.com/privacy\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"TermsAndConditionsUrl\"","#7EE787"],[":","#C9D1D9"]," ",["\"https://example.com/terms\"","#A5D6FF"],[",","#C9D1D9"],"\n  ",["\"HasEmbeddedLinks\"","#7EE787"],[":","#C9D1D9"]," ",["true","#79C0FF"],[",","#C9D1D9"],"\n  ",["\"HasEmbeddedPhone\"","#7EE787"],[":","#C9D1D9"]," ",["false","#79C0FF"],[",","#C9D1D9"],"\n  ",["\"SubscriberOptIn\"","#7EE787"],[":","#C9D1D9"]," ",["false","#79C0FF"],[",","#C9D1D9"],"\n  ",["\"AgeGated\"","#7EE787"],[":","#C9D1D9"]," ",["false","#79C0FF"],[",","#C9D1D9"],"\n  ",["\"DirectLending\"","#7EE787"],[":","#C9D1D9"]," ",["false","#79C0FF"],"\n",["}","#C9D1D9"]],"annotations":[],"themeName":"github-dark","style":{"color":"#c9d1d9","background":"#0d1117"}}}},"encodingType":"application/x-www-form-urlencoded","conditionalParameterMap":{}}
```

> \[!NOTE]
>
> If you use Twilio's [default opt-out or advanced opt-out](https://help.twilio.com/hc/en-us/articles/223134027-Twilio-support-for-opt-out-keywords-SMS-STOP-filtering-), you do not need to submit opt-out and help keywords and messages when creating a Campaign. Twilio will automatically complete those fields for you with the default or your advanced opt-out and help messaging.
>
> If you manage opt-out and help yourself, you must pass the opt-out and help parameters when creating a Campaign.

Create a Usa2p resource

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function createUsAppToPerson() {
  const usAppToPerson = await client.messaging.v1
    .services("MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .usAppToPerson.create({
      brandRegistrationSid: "BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      description: "Description",
      hasEmbeddedLinks: false,
      hasEmbeddedPhone: false,
      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. Term and Conditions at www.example.com/tc. Privacy Policy at www.example.com/privacy",
      messageSamples: [
        "EXPRESS: Denim Days Event is ON. Reply STOP to unsubscribe.",
        "LAST CHANCE: Book your next flight for just 1 (ONE) EUR",
      ],
      usAppToPersonUsecase: "UsAppToPersonUsecase",
    });

  console.log(usAppToPerson.brandRegistrationSid);
}

createUsAppToPerson();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

us_app_to_person = client.messaging.v1.services(
    "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
).us_app_to_person.create(
    message_samples=[
        "EXPRESS: Denim Days Event is ON. Reply STOP to unsubscribe.",
        "LAST CHANCE: Book your next flight for just 1 (ONE) EUR",
    ],
    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. Term and Conditions at www.example.com/tc. Privacy Policy at www.example.com/privacy",
    brand_registration_sid="BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    description="Description",
    us_app_to_person_usecase="UsAppToPersonUsecase",
    has_embedded_links=False,
    has_embedded_phone=False,
)

print(us_app_to_person.brand_registration_sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Messaging.V1.Service;
using System.Threading.Tasks;
using System.Collections.Generic;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var usAppToPerson = await UsAppToPersonResource.CreateAsync(
            messageSamples: new List<
                string> { "EXPRESS: Denim Days Event is ON. Reply STOP to unsubscribe.", "LAST CHANCE: Book your next flight for just 1 (ONE) EUR" },
            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. Term and Conditions at www.example.com/tc. Privacy Policy at www.example.com/privacy",
            brandRegistrationSid: "BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            description: "Description",
            usAppToPersonUsecase: "UsAppToPersonUsecase",
            hasEmbeddedLinks: false,
            hasEmbeddedPhone: false,
            pathMessagingServiceSid: "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");

        Console.WriteLine(usAppToPerson.BrandRegistrationSid);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import java.util.Arrays;
import com.twilio.Twilio;
import com.twilio.rest.messaging.v1.service.UsAppToPerson;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        UsAppToPerson usAppToPerson =
            UsAppToPerson
                .creator("MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "Description",
                    "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. Term and Conditions at www.example.com/tc. "
                    + "Privacy Policy at www.example.com/privacy",
                    Arrays.asList("EXPRESS: Denim Days Event is ON. Reply STOP to unsubscribe.",
                        "LAST CHANCE: Book your next flight for just 1 (ONE) EUR"),
                    "UsAppToPersonUsecase",
                    false,
                    false)
                .create();

        System.out.println(usAppToPerson.getBrandRegistrationSid());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	messaging "github.com/twilio/twilio-go/rest/messaging/v1"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &messaging.CreateUsAppToPersonParams{}
	params.SetMessageSamples([]string{
		"EXPRESS: Denim Days Event is ON. Reply STOP to unsubscribe.",
		"LAST CHANCE: Book your next flight for just 1 (ONE) EUR",
	})
	params.SetMessageFlow("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. Term and Conditions at www.example.com/tc. Privacy Policy at www.example.com/privacy")
	params.SetBrandRegistrationSid("BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
	params.SetDescription("Description")
	params.SetUsAppToPersonUsecase("UsAppToPersonUsecase")
	params.SetHasEmbeddedLinks(false)
	params.SetHasEmbeddedPhone(false)

	resp, err := client.MessagingV1.CreateUsAppToPerson("MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.BrandRegistrationSid != nil {
			fmt.Println(resp.BrandRegistrationSid)
		} else {
			fmt.Println(resp.BrandRegistrationSid)
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$us_app_to_person = $twilio->messaging->v1
    ->services("MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->usAppToPerson->create(
        "BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", // BrandRegistrationSid
        "Description", // Description
        "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. Term and Conditions at www.example.com/tc. Privacy Policy at www.example.com/privacy", // MessageFlow
        [
            "EXPRESS: Denim Days Event is ON. Reply STOP to unsubscribe.",
            "LAST CHANCE: Book your next flight for just 1 (ONE) EUR",
        ], // MessageSamples
        "UsAppToPersonUsecase", // UsAppToPersonUsecase
        false, // HasEmbeddedLinks
        false // HasEmbeddedPhone
    );

print $us_app_to_person->brandRegistrationSid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

us_app_to_person = @client
                   .messaging
                   .v1
                   .services('MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                   .us_app_to_person
                   .create(
                     message_samples: [
                       'EXPRESS: Denim Days Event is ON. Reply STOP to unsubscribe.',
                       'LAST CHANCE: Book your next flight for just 1 (ONE) EUR'
                     ],
                     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. Term and Conditions at www.example.com/tc. Privacy Policy at www.example.com/privacy',
                     brand_registration_sid: 'BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
                     description: 'Description',
                     us_app_to_person_usecase: 'UsAppToPersonUsecase',
                     has_embedded_links: false,
                     has_embedded_phone: false
                   )

puts us_app_to_person.brand_registration_sid
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:messaging:v1:services:compliance:usa2p:create \
   --messaging-service-sid MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
   --message-samples "EXPRESS: Denim Days Event is ON. Reply STOP to unsubscribe." "LAST CHANCE: Book your next flight for just 1 (ONE) EUR" \
   --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. Term and Conditions at www.example.com/tc. Privacy Policy at www.example.com/privacy" \
   --brand-registration-sid BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
   --description Description \
   --us-app-to-person-usecase UsAppToPersonUsecase \
   --has-embedded-links \
   --has-embedded-phone
```

```bash
curl -X POST "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p" \
--data-urlencode "MessageSamples=EXPRESS: Denim Days Event is ON. Reply STOP to unsubscribe." \
--data-urlencode "MessageSamples=LAST CHANCE: Book your next flight for just 1 (ONE) EUR" \
--data-urlencode "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. Term and Conditions at www.example.com/tc. Privacy Policy at www.example.com/privacy" \
--data-urlencode "BrandRegistrationSid=BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
--data-urlencode "Description=Description" \
--data-urlencode "UsAppToPersonUsecase=UsAppToPersonUsecase" \
--data-urlencode "HasEmbeddedLinks=false" \
--data-urlencode "HasEmbeddedPhone=false" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

## Retrieve a Usa2p resource

`GET https://messaging.twilio.com/v1/Services/{MessagingServiceSid}/Compliance/Usa2p/{Sid}`

This request returns a Usa2p resource. The Usa2p resource represents an A2P 10DLC Campaign.

The value of `Sid` is always the US A2P Compliance resource identifier: `QE2c6890da8086d771620e9b13fadeba0b`.

### Headers

```json
[{"name":"X-Twilio-Api-Version","in":"header","description":"The version of the Messaging API to use for this request","required":false,"schema":{"type":"string"},"x-twilio":{"shortDescription":"The Messaging API version"},"refName":"#/components/parameters/XTwilioApiVersion","modelName":"__components_parameters_XTwilioApiVersion"}]
```

### Path parameters

```json
[{"name":"MessagingServiceSid","in":"path","description":"The SID of the [Messaging Service](/docs/messaging/api/service-resource) to fetch the resource from.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^MG[0-9a-fA-F]{32}$"},"required":true},{"name":"Sid","in":"path","description":"The SID of the US A2P Compliance resource to fetch `QE2c6890da8086d771620e9b13fadeba0b`.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^QE[0-9a-fA-F]{32}$"},"required":true}]
```

Retrieve a US A2P Campaign

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function fetchUsAppToPerson() {
  const usAppToPerson = await client.messaging.v1
    .services("MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .usAppToPerson("QEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .fetch();

  console.log(usAppToPerson.brandRegistrationSid);
}

fetchUsAppToPerson();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

us_app_to_person = (
    client.messaging.v1.services("MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .us_app_to_person("QEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .fetch()
)

print(us_app_to_person.brand_registration_sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Messaging.V1.Service;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var usAppToPerson = await UsAppToPersonResource.FetchAsync(
            pathMessagingServiceSid: "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            pathSid: "QEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");

        Console.WriteLine(usAppToPerson.BrandRegistrationSid);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.messaging.v1.service.UsAppToPerson;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        UsAppToPerson usAppToPerson =
            UsAppToPerson.fetcher("MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "QEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch();

        System.out.println(usAppToPerson.getBrandRegistrationSid());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	messaging "github.com/twilio/twilio-go/rest/messaging/v1"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &messaging.FetchUsAppToPersonParams{}

	resp, err := client.MessagingV1.FetchUsAppToPerson("MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		"QEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.BrandRegistrationSid != nil {
			fmt.Println(resp.BrandRegistrationSid)
		} else {
			fmt.Println(resp.BrandRegistrationSid)
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$us_app_to_person = $twilio->messaging->v1
    ->services("MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->usAppToPerson("QEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->fetch();

print $us_app_to_person->brandRegistrationSid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

us_app_to_person = @client
                   .messaging
                   .v1
                   .services('MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                   .us_app_to_person('QEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                   .fetch

puts us_app_to_person.brand_registration_sid
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:messaging:v1:services:compliance:usa2p:fetch \
   --messaging-service-sid MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
   --sid QEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
```

```bash
curl -X GET "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p/QEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

You can use this request to check the `campaign_status` of the Campaign represented by this Usa2p resource. Possible statuses are listed below:

* `PENDING` - The Campaign has not yet been viewed by TCR.
* `IN_PROGRESS` - TCR has begun the review process for the Campaign.
* `FAILED` - The Campaign has failed the verification process.
* `VERIFIED` - TCR has approved the Campaign.

If `campaign_status` is `FAILED`, the `errors` property of the Usa2p resource is populated with a list of reasons why the Campaign was not approved. See the [Troubleshooting Campaigns guide](/docs/messaging/compliance/a2p-10dlc/troubleshooting-a2p-brands/troubleshooting-and-rectifying-a2p-campaigns-1) for more information.

## Retrieve a list of Usa2p resources

`GET https://messaging.twilio.com/v1/Services/{MessagingServiceSid}/Compliance/Usa2p`

This request retrieves all Usa2p resources associated with a specific Messaging Service.

### Headers

```json
[{"name":"X-Twilio-Api-Version","in":"header","description":"The version of the Messaging API to use for this request","required":false,"schema":{"type":"string"},"x-twilio":{"shortDescription":"The Messaging API version"},"refName":"#/components/parameters/XTwilioApiVersion","modelName":"__components_parameters_XTwilioApiVersion"}]
```

### Path parameters

```json
[{"name":"MessagingServiceSid","in":"path","description":"The SID of the [Messaging Service](/docs/messaging/api/service-resource) to fetch the resource from.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^MG[0-9a-fA-F]{32}$"},"required":true}]
```

### Query parameters

```json
[{"name":"PageSize","in":"query","description":"How many resources to return in each list page. The default is 50, and the maximum is 1000.","schema":{"type":"integer","format":"int64","minimum":1,"maximum":1000}},{"name":"Page","in":"query","description":"The page index. This value is simply for client state.","schema":{"type":"integer","minimum":0}},{"name":"PageToken","in":"query","description":"The page token. This is provided by the API.","schema":{"type":"string"}}]
```

Retrieve a list of Usa2p resources for a Messaging Service

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function listUsAppToPerson() {
  const usAppToPeople = await client.messaging.v1
    .services("MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .usAppToPerson.list({ limit: 20 });

  usAppToPeople.forEach((u) => console.log(u.brandRegistrationSid));
}

listUsAppToPerson();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

us_app_to_people = client.messaging.v1.services(
    "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
).us_app_to_person.list(limit=20)

for record in us_app_to_people:
    print(record.brand_registration_sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Messaging.V1.Service;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var usAppToPeople = await UsAppToPersonResource.ReadAsync(
            pathMessagingServiceSid: "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", limit: 20);

        foreach (var record in usAppToPeople) {
            Console.WriteLine(record.BrandRegistrationSid);
        }
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.messaging.v1.service.UsAppToPerson;
import com.twilio.base.ResourceSet;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        ResourceSet<UsAppToPerson> usAppToPeople =
            UsAppToPerson.reader("MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").limit(20).read();

        for (UsAppToPerson record : usAppToPeople) {
            System.out.println(record.getBrandRegistrationSid());
        }
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	messaging "github.com/twilio/twilio-go/rest/messaging/v1"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &messaging.ListUsAppToPersonParams{}
	params.SetLimit(20)

	resp, err := client.MessagingV1.ListUsAppToPerson("MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		for record := range resp {
			if resp[record].BrandRegistrationSid != nil {
				fmt.Println(*resp[record].BrandRegistrationSid)
			} else {
				fmt.Println(resp[record].BrandRegistrationSid)
			}
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$usAppToPeople = $twilio->messaging->v1
    ->services("MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->usAppToPerson->read(20);

foreach ($usAppToPeople as $record) {
    print $record->brandRegistrationSid;
}
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

us_app_to_people = @client
                   .messaging
                   .v1
                   .services('MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                   .us_app_to_person
                   .list(limit: 20)

us_app_to_people.each do |record|
   puts record.brand_registration_sid
end
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:messaging:v1:services:compliance:usa2p:list \
   --messaging-service-sid MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
```

```bash
curl -X GET "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p?PageSize=20" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "compliance": [
    {
      "sid": "QE2c6890da8086d771620e9b13fadeba0b",
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "brand_registration_sid": "BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "description": "Send marketing messages about sales to opted in customers.",
      "message_samples": [
        "EXPRESS: Denim Days Event is ON",
        "LAST CHANCE: Book your next flight for just 1 (ONE) EUR"
      ],
      "us_app_to_person_usecase": "MARKETING",
      "has_embedded_links": true,
      "has_embedded_phone": false,
      "subscriber_opt_in": true,
      "age_gated": false,
      "direct_lending": false,
      "campaign_status": "PENDING",
      "campaign_id": "CFOOBAR",
      "is_externally_registered": false,
      "rate_limits": {
        "att": {
          "mps": 600,
          "msg_class": "A"
        },
        "tmobile": {
          "brand_tier": "TOP"
        }
      },
      "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.",
      "opt_in_message": "Acme Corporation: You are now opted-in. For help, reply HELP. To opt-out, reply STOP",
      "opt_out_message": "You have successfully been unsubscribed from Acme Corporation. You will not receive any more messages from this number.",
      "help_message": "Acme Corporation: Please visit www.example.com to get support. To opt-out, reply STOP.",
      "opt_in_keywords": [
        "START"
      ],
      "opt_out_keywords": [
        "STOP"
      ],
      "help_keywords": [
        "HELP"
      ],
      "date_created": "2021-02-18T14:48:52Z",
      "date_updated": "2021-02-18T14:48:52Z",
      "url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p/QE2c6890da8086d771620e9b13fadeba0b",
      "mock": false,
      "errors": []
    }
  ],
  "meta": {
    "page": 0,
    "page_size": 20,
    "first_page_url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p?PageSize=20&Page=0",
    "previous_page_url": null,
    "next_page_url": null,
    "url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p?PageSize=20&Page=0",
    "key": "compliance"
  }
}
```

## Delete a Usa2p resource

`DELETE https://messaging.twilio.com/v1/Services/{MessagingServiceSid}/Compliance/Usa2p/{Sid}`

This request deletes a Usa2p resource.

> \[!CAUTION]
>
> Deleting an approved Usa2p resource blocks all A2P 10DLC messaging from the Messaging Service.
>
> You must create a new Usa2p resource and wait for the associated Campaign to be approved by TCR in order to send A2P 10DLC messages from the Messaging Service again. This can take several days.

### Path parameters

```json
[{"name":"MessagingServiceSid","in":"path","description":"The SID of the [Messaging Service](/docs/messaging/api/service-resource) to delete the resource from.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^MG[0-9a-fA-F]{32}$"},"required":true},{"name":"Sid","in":"path","description":"The SID of the US A2P Compliance resource to delete `QE2c6890da8086d771620e9b13fadeba0b`.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^QE[0-9a-fA-F]{32}$"},"required":true}]
```

The value of `Sid` is always the US A2P Compliance resource identifier: `QE2c6890da8086d771620e9b13fadeba0b`.

Delete a Usa2p resource

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function deleteUsAppToPerson() {
  await client.messaging.v1
    .services("MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .usAppToPerson("QEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .remove();
}

deleteUsAppToPerson();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

client.messaging.v1.services(
    "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
).us_app_to_person("QEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Messaging.V1.Service;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        await UsAppToPersonResource.DeleteAsync(
            pathMessagingServiceSid: "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            pathSid: "QEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.messaging.v1.service.UsAppToPerson;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        UsAppToPerson.deleter("MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "QEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete();
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	err := client.MessagingV1.DeleteUsAppToPerson("MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		"QEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$twilio->messaging->v1
    ->services("MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->usAppToPerson("QEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->delete();
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

@client
  .messaging
  .v1
  .services('MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
  .us_app_to_person('QEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
  .delete
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:messaging:v1:services:compliance:usa2p:remove \
   --messaging-service-sid MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
   --sid QEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
```

```bash
curl -X DELETE "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p/QEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```
