Latest Legacy

Supported use cases for a brand

Fetches details about what kind of campaigns are supported under a particular brand ID.

API Endpoint

GET https://api.plivo.com/v1/Account/{auth_id}/Brand/{brand_id}/usecases/

Arguments

No arguments need to be passed.

Returns

api_id, brand_id and a tuple containing all the types of campaign types allowed for the brand.

Response

HTTP Status Code: 200

{
"api_id": "0db62668-5f2d-11ed-bee0-0242ac110002",
"brand_id": "BJZN6KW",
"use_cases": [
{
"code": "2FA",
"details": "Any two-factor authentication with passcodes used to unlock accounts",
"name": "Two-Factor Authentication"
},
{
"code": "ACCOUNT_NOTIFICATION",
"details": "Notification sent to account holders about changes in accounts",
"name": "Account Notification"
},
{
"code": "CUSTOMER_CARE",
"details": "Customer care interactions by the support and other customer-facing teams",
"name": "Customer Care"
},
{
"code": "DELIVERY_NOTIFICATION",
"details": "Updates about the delivery of products and services",
"name": "Delivery Notification"
},
{
"code": "FRAUD_ALERT",
"details": "Notifications of suspicious behavior identified the business",
"name": "Fraud Alert"
},
{
"code": "HIGHER_EDUCATION",
"details": "Messages sent by colleges, universities, and other educational institutions",
"name": "Higher Education"
},
{
"code": "LOW_VOLUME",
"details": "A combination of two to five standard usage cases - for low throughput requirements",
"name": "Low Volume"
},
{
"code": "MARKETING",
"details": "Communications related to time-bound events and sales",
"name": "Marketing"
},
{
"code": "MIXED",
"details": "A combination of two to five standard usage cases",
"name": "Mixed"
},
{
"code": "POLLING_VOTING",
"details": "Surveys, polling, and voting campaigns used for non-political purposes",
"name": "Polling Voting"
},
{
"code": "PUBLIC_SERVICE_ANNOUNCEMENT",
"details": "Messages aimed at creating awareness about important topics",
"name": "Public Service Announcement"
},
{
"code": "SECURITY_ALERT",
"details": "Notifications that alert users about a potential breach of systems",
"name": "Security Alert"
}
]
}

Example Request

1
2
3
4
5
6
7
8
import sys
sys.path.append("../plivo-python")
import plivo

client = plivo.RestClient("<auth_id>", "<auth_token>") 

response = client.brand.get_usecases(brand_id='<Brand_ID>') 
print(response)
1
2
3
4
5
6
7
8
9
10
11
12
13
require "rubygems"
require "/etc/plivo-ruby/lib/plivo.rb"
include Plivo

api = RestClient.new("<auth_id>", "<auth_token>")

begin
puts('Get Brand Usecase')
response = api.brand.get_usecases("<Brand_ID>")
puts response
rescue PlivoRESTError => e
puts 'Exception: ' + e.message
end
1
2
3
4
5
6
7
8
9
10
11
let plivo = require('plivo');
let fs = require('fs');

let client = new plivo.Client("<Auth_ID>","<Auth_Token>");
client.brand.get_usecases("<Brand ID>")
.then(function (response) {
console.log(JSON.stringify(response));
}).catch(function (error) {
console.log("err");
console.log(error);
});
1
2
3
4
5
6
7
8
9
10
11
12
13
<?php
require '/etc/plivo-php/vendor/autoload.php';
use Plivo\RestClient;
$client = new RestClient("<auth_id>","<auth_token>");
$client->client->setTimeout(60);
try {
$response = $client->brand->get_brand_usecases("<Brand_ID>");
print_r($response);
}
catch (PlivoRestException $ex) {
print_r($ex);
}
?>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import com.plivo.api.Plivo;
import com.plivo.api.exceptions.*;
import com.plivo.api.models.brand.Brand;
import com.plivo.api.models.brand.BrandUsecase;


public class PlivoTest  {        
        public static void main(String[] args) {
                Plivo.init("<auth_id>", "<auth_token>");
               // List all Brand Usecases
                try
                {
                        BrandUsecase response = Brand.get_usecases("<brand_id>").get();
                        System.out.println(response);
                }
                catch (Exception e)
                {
                        e.printStackTrace();
                }
        }
} 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using System;
using System.Collections.Generic;
using Plivo;
using Plivo.Exception;

namespace dotnet_project
{
class Ten_dlc
{
static void Main(string[] args)
{

var api = new PlivoApi("<auth_id>", "<auth_token>");

// List Campaigns
Console.WriteLine("Get Brand Usecase");
try
{
var response = api.Brand.ListUsecases("<Brand ID>");
Console.WriteLine(response);
}
catch (PlivoRestException e)
{
Console.WriteLine("Exception: " + e.Message);
}
}
}
}
1
2
curl --location --request GET 'https://api.plivo.com/v1/Account/<auth_id>/10dlc/Brand/<Brand_ID>/usecases/' \
--header 'Authorization: Basic XXXX=='
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package main

import (
"fmt"
"os"
plivo "github.com/plivo/plivo-go/v7"
)
func main() {
client, err := plivo.NewClient("<auth_id>", "<auth_token>", &plivo.ClientOptions{})
if err != nil {
panic(err)
}
//Get Campaign Numbers
response, err := client.Brand.Usecases("<Brand_ID>")
if err != nil {
fmt.Printf("Error occurred while getting usecases. error:%+v\n", err)
os.Exit(1)
} else {
fmt.Printf("%+v\n", response)
}
}