Fetch us app to person

GET /v1/Services/{MessagingServiceSid}/Compliance/Usa2p/{Sid}

A service for (fetch/create/delete) A2P Campaign for a Messaging Service

Path parameters

  • MessagingServiceSid string Required

    The SID of the Messaging Service to fetch the resource from.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^MG[0-9a-fA-F]{32}$.

  • Sid string Required

    The SID of the US A2P Compliance resource to fetch QE2c6890da8086d771620e9b13fadeba0b.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^QE[0-9a-fA-F]{32}$.

Responses

  • 200 application/json

    OK

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • sid string | null

      The unique string that identifies a US A2P Compliance resource QE2c6890da8086d771620e9b13fadeba0b.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^QE[0-9a-fA-F]{32}$.

    • account_sid string | null

      The SID of the Account that the Campaign belongs to.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

    • brand_registration_sid string | null

      The unique string to identify the A2P brand.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^BN[0-9a-fA-F]{32}$.

    • messaging_service_sid string | null

      The SID of the Messaging Service that the resource is associated with.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^MG[0-9a-fA-F]{32}$.

    • description string | null

      A short description of what this SMS campaign does. Min length: 40 characters. Max length: 4096 characters.

    • message_samples array[string] | null

      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.

    • us_app_to_person_usecase string | null

      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_phone boolean | null

      Indicates that this SMS campaign will send messages that contain phone numbers.

    • subscriber_opt_in boolean | null

      A boolean that specifies whether campaign has Subscriber Optin or not.

    • age_gated boolean | null

      A boolean that specifies whether campaign is age gated or not.

    • direct_lending boolean | null

      A boolean that specifies whether campaign allows direct lending or not.

    • campaign_status string | null

      Campaign status. Examples: IN_PROGRESS, VERIFIED, FAILED.

    • campaign_id string | null

      The Campaign Registry (TCR) Campaign ID.

    • is_externally_registered boolean | null

      Indicates whether the campaign was registered externally or not.

    • rate_limits object | null

      Rate limit and/or classification set by each carrier, Ex. AT&T or T-Mobile.

    • message_flow string | null

      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 string | null

      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 string | null

      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 string | null

      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 array[string] | null

      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.

    • opt_out_keywords array[string] | null

      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.

    • help_keywords array[string] | null

      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.

    • date_created string(date-time) | null

      The date and time in GMT when the resource was created specified in ISO 8601 format.

    • date_updated string(date-time) | null

      The date and time in GMT when the resource was last updated specified in ISO 8601 format.

    • url string(uri) | null

      The absolute URL of the US App to Person resource.

    • mock boolean | null

      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 array | null

      Details indicating why a campaign registration failed. These errors can indicate one or more fields that were incorrect or did not meet review requirements.

GET /v1/Services/{MessagingServiceSid}/Compliance/Usa2p/{Sid}
curl \
 --request GET 'https://messaging.twilio.com/v1/Services/{MessagingServiceSid}/Compliance/Usa2p/{Sid}' \
 --user "username:password"
{
  "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": 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 confirmation messages about scheduled home repair services",
  "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": "John Doe's Home Repair: Please call (111)-222-3333 to get help. To opt-out, please reply STOP",
  "message_flow": "End users call (111)-222-3333 to schedule appointments, where they're also asked whether they would like to provide their phone numbers to receive appointment reminders ",
  "help_keywords": [
    "HELP"
  ],
  "direct_lending": false,
  "opt_in_message": "John Doe's Home Repair: 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 John Doe's Home Repair. You will not receive any more messages from this number.",
  "opt_out_keywords": [
    "STOP"
  ],
  "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"
}
{
  "sid": "QE2c6890da8086d771620e9b13fadeba0b",
  "url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p/QE2c6890da8086d771620e9b13fadeba0b",
  "mock": false,
  "errors": [
    {
      "url": "https://www.twilio.com/docs/api/errors/30897",
      "fields": [
        "MESSAGE_FLOW"
      ],
      "error_code": 30897,
      "description": "The campaign submission has been reviewed and it was rejected due to Disallowed Content."
    }
  ],
  "age_gated": false,
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "campaign_id": "CFOOBAR",
  "description": "Send confirmation messages about scheduled home repair services",
  "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": "John Doe's Home Repair: Please call (111)-222-3333 to get help. To opt-out, please reply STOP",
  "message_flow": "End users call (111)-222-3333 to schedule appointments, where they're also asked whether they would like to provide their phone numbers to receive appointment reminders ",
  "help_keywords": [
    "HELP"
  ],
  "direct_lending": false,
  "opt_in_message": "John Doe's Home Repair: 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 John Doe's Home Repair. You will not receive any more messages from this number.",
  "opt_out_keywords": [
    "STOP"
  ],
  "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"
}