Latest Legacy

Delete a brand

Deletes a particular 10DLC brand from your account. This action is irreversible and is only allowed for brands with no associated active campaigns.

API Endpoint

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

Arguments

No arguments need to be passed.

Returns

api_id, brand_id and a confirmation (or error message). 

Response

HTTP Status Code: 200

{
"api_id": "785ed2dc-7493-11ed-97ac-0242ac110003",
"brand_id": "BCHVILW",
"message": "Brand Deactivated"
}

Example Request

1
2
3
4
5
6
7
import sys
sys.path.append("../plivo-python")
import plivo
client = plivo.RestClient("<auth_id>", "<auth_token>")

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

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

begin

puts('Delete Brand')
response = api.brand.delete("<Brand_id>")

puts response
rescue PlivoRESTError => e
puts 'Exception: ' + e.message
end
1
2
3
4
5
6
7
8
9
10
let plivo = require('plivo');
let fs = require('fs');

let client = new plivo.Client("<auth_id>", "<auth_token>");
client.brand.deleteBrand("<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 {
$res = $client->brand->delete("<Brand_ID>");
print_r( $res);
}
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
22
import java.io.IOException;
import com.plivo.api.Plivo;
import com.plivo.api.exceptions.*;
import com.plivo.api.models.brand.Brand;
import com.plivo.api.models.brand.BrandDeleteResponse;


public class GetCampaignTest {
public static void main(String[] args) {
Plivo.init("<auth_id>", "<auth_token>");
// Get Brand Details
try
{
BrandDeleteResponse response = Brand.deleter("<Brand_ID>").delete();
System.out.println(response);
}
catch (PlivoRestException | IOException| PlivoValidationException 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
using System;
using Plivo;
using Plivo.Exception;

namespace test
{
class Program
{
static void Main(string[] args)
{
var api = new PlivoApi("<auth_id>", "<auth_token>");
try
{
Console.WriteLine("Delete Brand");
var brand_delete_response = api.Brand.Delete("<Brand_ID>");
Console.WriteLine(brand_delete_response);
}
catch (PlivoRestException e)
{
Console.WriteLine("Exception: " + e.Message);
}
}

}
}
1
2
curl --location --request DELETE 'https://api.plivo.com/v1/Account/<auth_id>/10dlc/Brand/<Brand_ID>/' \
--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
22
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)
}
// Delete Brand
response, err := client.Brand.Delete("<Brand_ID>")
if err != nil {
fmt.Printf("Error occurred while deleting brand. error:%+v\n", err)
os.Exit(1)
} else {
fmt.Printf("%+v\n", response)
}
}