This API lets you update certain information in a profile.
POST
https://api.plivo.com/v1/Account/{auth_id}/Profile/{profile_uuid}/
You can update only these fields of a profile. You can pass one or more of the fields during the update.
entity_typestring | Filter by entity_type. Allowed values: PRIVATE, PUBLIC, NON_PROFIT, GOVERNMENT, INDIVIDUAL. |
company_namestring | Legal name of the company. |
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. |
address object | Postal address of the company. |
authorized_contact object | Details of the authorized contact person at the company. You must provide at least one contact. |
websitestring | Business website. |
plivo_subaccountstring | Subaccount mapped to the profile. |
api_id for the request, the respective profile_uuid, and success message
HTTP Status Code: 200
{
"api_id": "752e99d0-baf3-11ec-ac74-0242ac110002",
"profile": {
"address": {
"city": "New York",
"country": "US",
"postal_code": "10001",
"state": "NY",
"street": "123"
},
"alt_business_id": "ABC",
"alt_business_id_type": "DUNS",
"authorized_contact": {
"email": "edith@example.com",
"first_name": "edith",
"last_name": "sam",
"phone": "12125557778",
"seniority": "admin",
"title": "Sam"
},
"company_name": "ABC Inc.12345",
"customer_type": "RESELLER",
"ein": "12125552222",
"ein_issuing_country": "US",
"entity_type": "PUBLIC",
"plivo_subaccount": "SA2025RK4E639VJFZAMM",
"primary_profile": "c780f9d0-e3c9-4d13-87f7-b898654569b0",
"profile_alias": "edith_sam",
"profile_type": "SECONDARY",
"profile_uuid": "f19c4773-4ae6-4b75-92ea-9cf3ea4227d6",
"stock_exchange": "NYSE",
"stock_symbol": "HIBYE",
"vertical": "ENTERTAINMENT",
"website": "hibye.com"
}
}
1
2
3
4
5
6
7
8
import sys
sys.path.append("../plivo-python")
import plivo
client = plivo.RestClient("<auth_id>", "<auth_token>")
param = {"company_name": "google", "website": "www.example.com"}
response = client.profile.update("<profile_uuid>", param)
print(response)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require "rubygems"
require "/etc/plivo-ruby/lib/plivo.rb"
include Plivo
api = RestClient.new("<auth_id>", "<auth_token>")
begin
# Update Profile
puts('Update Profile')
response=api.profile.update("<profile_uuid>",
company_name: "Name of Company",
website: "www.plivo.com");
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');
var params = { "company_name": "twitter.com" }
var client = new plivo.Client("<auth_id>", "<auth_token>");
client.profile.update("<profile_uuid>", params)
.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
22
23
24
25
26
27
28
29
<?php
require '/etc/plivo-php/vendor/autoload.php';
use Plivo\RestClient;
$client = new RestClient("<auth_id>", "<auth_token>");
$address = array(
"street" => "123",
"city" => "Band",
"state" => "NY",
"postal_code" => "10008",
"country" => "US"
);
$client
->client
->setTimeout(60);
try
{
$res = $client
->profile
->update("<profile_uuid>", ['address' => $address, 'vertical' => "PROFESSIONAL"]);
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
package com.plivo.examples;
import com.plivo.api.Plivo;
import com.plivo.api.models.profile.Profile;
public class PlivoTest {
public static void main(String[] args) {
Plivo.init("<auth_id>", "<auth_token>");
// Update Profile
try {
Profile response = Profile.update("<Profile_UUID>")
.companyName("new company name")
.vertical("PROFESSIONAL")
.update();
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
31
32
33
34
35
36
// 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;
using Plivo.Resource.Profile;
namespace dotnet_project
{
class Ten_dlc
{
static void Main(string[] args)
{
var api = new PlivoApi("<auth_id>", "<auth_token>");
// Update a Profile
try
{
AuthorizedContact contact = new AuthorizedContact();
contact.Email = "test@gmail.com";
Address address = new Address();
address.PostalCode = "560099";
var response = api.Profile.Update("f8ca5a50-50b8-438d-8068-28427b1c0e90", "Update Name");
Console.WriteLine(response);
}
catch (PlivoRestException e)
{
Console.WriteLine("Exception: " + e.Message);
}
}
}
}
1
2
3
4
5
6
curl -i --user auth_id:auth_token \
-H 'Content-Type: application/json' \
-d '{
"vertical":"ENTERTAINMENT"
}' \
https://api.plivo.com/v1/Account/{auth_id}/Profile/{profile_uuid}/
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
31
32
33
34
35
36
37
38
39
40
41
42
package main
import (
"fmt"
"os"
plivo "github.com/plivo/plivo-go/v7"
)
var client *plivo.Client
func initClient(authID, authToken string) {
var er error
copts := &plivo.ClientOptions{}
client, er = plivo.NewClient(authID, authToken, copts)
if er != nil {
panic(er)
}
}
func main() {
initClient("<auth_id>", "<auth_token>")
//Update Profile
input := plivo.UpdateProfileRequestParams{
Website: "www.google1.com",
EntityType: "PRIVATE",
Address: &plivo.Address{
Street: "Street Name",
City: "City Name",
State: "NY",
PostalCode: "10001",
Country: "US",
},
}
response, err := client.Profile.Update("<profile_uuid>", input)
if err != nil {
fmt.Printf("Error occurred while updating profile. error:%+v\n", err)
os.Exit(1)
} else {
fmt.Printf("%+v\n", response)
}
}