# A2P 10DLC - Usecases subresource

> \[!WARNING]
>
> This API reference 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**.

Usecases is a subresource of [UsAppToPerson (Usa2p)](/docs/messaging/api/usapptoperson-resource) and provides a list of possible A2P 10DLC use cases that a specific brand can use when creating an A2P 10DLC Campaign.

## Usecase Properties

```json
{}
```

## Retrieve a list of A2P 10DLC use cases

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

This request returns a list of possible A2P 10DLC use cases for a given Messaging Service and A2P 10DLC brand.

You need to provide one of the `code` values when creating a [Usa2p resource](/docs/messaging/api/usapptoperson-resource).

### 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":"BrandRegistrationSid","in":"query","description":"The unique string to identify the A2P brand.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^BN[0-9a-fA-F]{32}$"},"examples":{"fetchWithBrandRegistrationSid":{"value":"BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}}}]
```

Retrieve A2P 10DLC use cases for a brand

```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 fetchUsAppToPersonUsecase() {
  const usAppToPersonUsecase = await client.messaging.v1
    .services("MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    .usAppToPersonUsecases.fetch({
      brandRegistrationSid: "BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    });

  console.log(usAppToPersonUsecase.usAppToPersonUsecases);
}

fetchUsAppToPersonUsecase();
```

```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_usecase = client.messaging.v1.services(
    "MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
).us_app_to_person_usecases.fetch(
    brand_registration_sid="BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
)

print(us_app_to_person_usecase.us_app_to_person_usecases)
```

```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 usAppToPersonUsecase = await UsAppToPersonUsecaseResource.FetchAsync(
            pathMessagingServiceSid: "MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            brandRegistrationSid: "BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");

        Console.WriteLine(usAppToPersonUsecase.UsAppToPersonUsecases);
    }
}
```

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

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

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);
        UsAppToPersonUsecase usAppToPersonUsecase = UsAppToPersonUsecase.fetcher("MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                                        .setBrandRegistrationSid("BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                                        .fetch();

        System.out.println(usAppToPersonUsecase.getUsAppToPersonUsecases());
    }
}
```

```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.FetchUsAppToPersonUsecaseParams{}
	params.SetBrandRegistrationSid("BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")

	resp, err := client.MessagingV1.FetchUsAppToPersonUsecase("MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.UsAppToPersonUsecases != nil {
			for _, item := range *resp.UsAppToPersonUsecases {
				fmt.Println(item)
			}
		} else {
			fmt.Println(resp.UsAppToPersonUsecases)
		}
	}
}
```

```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_usecase = $twilio->messaging->v1
    ->services("MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    ->usAppToPersonUsecases->fetch([
        "brandRegistrationSid" => "BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    ]);

print $us_app_to_person_usecase->usAppToPersonUsecases;
```

```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_usecase = @client
                           .messaging
                           .v1
                           .services('MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
                           .us_app_to_person_usecases
                           .fetch(
                             brand_registration_sid: 'BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
                           )

puts us_app_to_person_usecase.us_app_to_person_usecases
```

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

twilio api:messaging:v1:services:compliance:usa2p:usecases:list \
   --messaging-service-sid MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \
   --brand-registration-sid BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
```

```bash
curl -X GET "https://messaging.twilio.com/v1/Services/MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Compliance/Usa2p/Usecases?BrandRegistrationSid=BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "us_app_to_person_usecases": [
    {
      "code": "2FA",
      "name": "Two-Factor authentication (2FA)",
      "description": "Two-Factor authentication, one-time use password, password reset",
      "post_approval_required": false
    },
    {
      "code": "ACCOUNT_NOTIFICATION",
      "name": "Account Notification",
      "description": "All reminders, alerts, and notifications. (Examples include: flight delayed, hotel booked, appointment reminders.)",
      "post_approval_required": false
    },
    {
      "code": "AGENTS_FRANCHISES",
      "name": "Agents and Franchises",
      "description": "For brands that have multiple agents, franchises or offices in the same brand vertical, but require individual localised numbers per agent/location/office.",
      "post_approval_required": true
    },
    {
      "code": "CHARITY",
      "name": "Charity",
      "description": "Includes:  5013C Charity\nDoes not include: Religious organizations",
      "post_approval_required": false
    },
    {
      "code": "PROXY",
      "name": "Proxy",
      "description": "Peer-to-peer app-based group messaging with proxy/pooled numbers (For example: GroupMe)\nSupporting personalized services and non-exposure of personal numbers for enterprise or A2P communications. (Examples include: Uber and AirBnb.)",
      "post_approval_required": true
    },
    {
      "code": "CUSTOMER_CARE",
      "name": "Customer Care",
      "description": "All customer care messaging, including account management and support",
      "post_approval_required": false
    },
    {
      "code": "DELIVERY_NOTIFICATION",
      "name": "Delivery Notification",
      "description": "Information about the status of the delivery of a product or service",
      "post_approval_required": false
    },
    {
      "code": "EMERGENCY",
      "name": "Emergency",
      "description": "Notification services designed to support public safety / health during natural disasters, armed conflicts, pandemics and other national or regional emergencies",
      "post_approval_required": true
    },
    {
      "code": "FRAUD_ALERT",
      "name": "Fraud Alert Messaging",
      "description": "Fraud alert notification",
      "post_approval_required": false
    },
    {
      "code": "HIGHER_EDUCATION",
      "name": "Higher Education",
      "description": "For campaigns created on behalf of Colleges or Universities and will also include School Districts etc that fall outside of any \"free to the consumer\" messaging model",
      "post_approval_required": false
    },
    {
      "code": "K12_EDUCATION",
      "name": "K-12 Education",
      "description": "Campaigns created for messaging platforms that support schools from grades K-12 and distance learning centers. This is not for Post-Secondary schools.",
      "post_approval_required": true
    },
    {
      "code": "LOW_VOLUME",
      "name": "Low Volume Mixed",
      "description": "Low throughput, any combination of use-cases. Examples include:  test, demo accounts",
      "post_approval_required": false
    },
    {
      "code": "MARKETING",
      "name": "Marketing",
      "description": "Any communication with marketing and/or promotional content",
      "post_approval_required": false
    },
    {
      "code": "MIXED",
      "name": "Mixed",
      "description": "Mixed messaging reserved for specific consumer service industry",
      "post_approval_required": false
    },
    {
      "code": "POLITICAL",
      "name": "Political",
      "description": "Part of organized effort to influence decision making of specific group. All campaigns to be verified",
      "post_approval_required": false
    },
    {
      "code": "POLLING_VOTING",
      "name": "Polling and voting",
      "description": "Polling and voting",
      "post_approval_required": false
    },
    {
      "code": "PUBLIC_SERVICE_ANNOUNCEMENT",
      "name": "Public Service Announcement",
      "description": "An informational message that is meant to raise the audience awareness about an important issue",
      "post_approval_required": false
    },
    {
      "code": "SECURITY_ALERT",
      "name": "Security Alert",
      "description": "A notification that the security of a system, either software or hardware, has been compromised in some way and there is an action you need to take",
      "post_approval_required": false
    },
    {
      "code": "SOCIAL",
      "name": "Social",
      "description": "Communication within or between closed communities (For example: influencers alerts)",
      "post_approval_required": true
    },
    {
      "code": "SWEEPSTAKE",
      "name": "Sweepstake",
      "description": "Sweepstake",
      "post_approval_required": true
    }
  ]
}
```
