Latest Legacy

Retrieve all profiles

This API lets you fetch all profiles created by your account.

API Endpoint

GET https://api.plivo.com/v1/Account/{auth_id}/Profile/

Arguments

limitinteger

Denotes the number of results per page. The maximum number of results that can be fetched is 20.

Defaults to 20.

offset integer

Denotes the number of value items by which the results should be offset. Defaults to 0. Read more about offset-based pagination.

entity_typestring

Filter by entity_type.

Allowed values: PRIVATE, PUBLIC, NON_PROFIT, GOVERNMENT, INDIVIDUAL.

typestring

Filter by profile_type.

Allowed values: PRIMARY, SECONDARY.

verticalstring

Filter by vertical.

Allowed values: PROFESSIONAL,REAL_ESTATE, HEALTHCARE, HUMAN_RESOURCES, ENERGY, ENTERTAINMENT, RETAIL, TRANSPORTATION,AGRICULTURE, INSURANCE, POSTAL, EDUCATION, HOSPITALITY, FINANCIAL, POLITICAL, GAMBLING, LEGAL, CONSTRUCTION, NGO, MANUFACTURING, GOVERNMENT, TECHNOLOGY, COMMUNICATION.

Returns

api_id for the request and a dictionary with an objects property that contains a list of up to 20 profiles. Each tuple in the list is a separate profile object.

Response

HTTP Status Code: 200

{
   "api_id":"837b1e38-68a1-4fd6-a532-ea4jj888uuhh",
   "meta":{
      "limit":1,
      "offset":0,
      "next":"/v1/Account/<AUTH_ID>/Profile/?limit=1&offset=1",
      "previous":null
   },
   "profiles":[
      {
         "profile_uuid":"7a799f1a-5f44-43fb-ac82-999uujnnhhy",
         "profile_alias":"sample name",
         "profile_type":"SECONDARY",
         "primary_profile":"a7fe9aa3-dbca-401e-80a2-f88dudhdbhd",
         "customer_type":"DIRECT",
         "entity_type":"PRIVATE_PROFIT",
         "company_name":"Name of Company",
         "ein":"111111111",
         "ein_issuing_country":"US",
         "address":{
            "street":"5d807cf24ada0f",
            "city":"New York",
            "state":"NY",
            "postal_code":"10001",
            "country":"US"
         },
         "website":"www.example.com",
         "vertical":"COMMUNICATION",
         "plivo_subaccount": "SAXXXXX",
         "stock_symbol": "NSQ",
         "stock_exchange": "NASDAQ",
         "alt_business_id": "ABC",
         "alt_business_id_type": "DUNS",
         "authorized_contact":{
            "first_name":"First Name",
            "last_name":"Last Name",
            "phone":"919033998877",
            "email":"xxxxxxxx@plivo.com",
            "title":"Manager",
            "seniority":"Mr."
         },
         "created_at":"2023-10-17T20:57:54.164054Z"
      }
   ]
}

Example Request

1
2
3
4
5
import plivo

client = plivo.RestClient("<auth_id>", "<auth_token>")
response = client.profile.list(limit=1, offset=0)
print(response)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require "rubygems"
require "/etc/plivo-ruby/lib/plivo.rb"
include Plivo

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

begin
	# List all Profiles
	response = api.profile.list(limit: 10, offset: 0)

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

var client = new plivo.Client("<auth_id>", "<auth_token>");
client.profile.list({
    limit: 5,
    offset: 0,
})
    .then(function (response) {
        console.log(response);
    })
    .catch(function (error) {
        console.log(error);
    });
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?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->profile->list();
     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
package com.plivo.examples;

import com.plivo.api.Plivo;
import com.plivo.api.models.profile.Profile;
import com.plivo.api.models.base.ListResponse;

public class PlivoTest {

    public static void main(String[] args) {

        Plivo.init("<auth_id>", "<auth_token>");

        // List all Profiles
        try {
            ListResponse < Profile > response = Profile.lister().limit(1).offset(0).list();
            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
29
30
using System;
using System.Collections.Generic;
using Plivo;
using Plivo.Exception;
using Plivo.Resource.Profile;

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

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

            // List Profiles
            try
            {
                var response = api.Profile.List();
                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}/Profile/
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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)
	}
	//List Profiles
	response, err := client.Profile.List(plivo.ProfileListParams{Limit: 2, Offset: 0})
	if err != nil {
		fmt.Printf("Error occurred while getting profiles error:%+v\n", err)
		os.Exit(1)
	} else {
		fmt.Printf("%+v\n", response)
	}
}