Retrieve a specific campaign

    This API lets you fetch details about a specific campaign_id associated to your account.

    API Endpoint

    GET https://api.plivo.com/v1/Account/{auth_id}/10dlc/Campaign/{campaign_id}

    Arguments

    No arguments need to be passed.

    Returns

    api_id & the campaign object identified by the campaign_id specified in the request URL.

    Response

    HTTP Status Code: 200

    {
        "api_id": "10b24166-d121-11ec-b332-0242ac110002",
        "campaign": {
            "brand_id": "B4TE2AH",
            "campaign_id": "CXF0R3P",
            "mno_metadata": {
                "AT&T": {
                    "tpm": 4500
                },
                "T-Mobile": {
                    "brand_tier": "TOP"
                },
                "US Cellular": {
                    "tpm": 4500
                },
                "Verizon Wireless": {
                    "tpm": 4500
                }
            },
            "registration_status": "PROCESSING",
            "reseller_id": "",
            "sub_usecase": "CUSTOMER_CARE,2FA",
            "usecase": "MIXED"
        }
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    
    // Available in versions >= 4.30.0 (https://github.com/plivo/plivo-node/releases/tag/v4.30.0)
    
    let plivo = require('plivo');
    
    let client = new plivo.Client("<auth_id>", "<auth_token>");
    console.log('test');
    client.campaign.get("<campaign_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
    14
    15
    16
    17
    18
    19
    20
    21
    22
    
    <?php
    
    # Available in versions >= 4.29.0 (https://github.com/plivo/plivo-php/releases/tag/v4.29.0)
    
    require '/etc/plivo-php/vendor/autoload.php';
    use Plivo\RestClient;
    $client = new RestClient("<auth_id>", "<auth_token>");
    $client
        ->client
        ->setTimeout(60);
    try
    {
        $res = $client
            ->campaign
            ->get("<campaign_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
    23
    24
    25
    26
    27
    28
    29
    30
    
    // Available in versions >= 5.9.0 (https://github.com/plivo/plivo-dotnet/releases/tag/v5.9.0)
    
    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>");
    
                // Get Campaign
                Console.WriteLine("Get Campaign");
                try
                {
                    var response = api.Campaign.Get("<Campaign_ID>");
                    Console.WriteLine(response);
                }
                catch (PlivoRestException e)
                {
                    Console.WriteLine("Exception: " + e.Message);
                }
            }
        }
    }
    
    1
    2
    
    curl -i --user auth_id:auth_token \
        https://api.plivo.com/v1/Account/{auth_id}/10dlc/Campaign/{campaign_id}/