Latest Legacy

Update a verified caller ID

This method lets you update a verified caller ID.

API Endpoint

POST https://api.plivo.com/v1/Account/{auth_id}/VerifiedCallerId/{phone_number}

Attributes

alias (optional)

The friendly name associated with the phone number.

subaccount (optional)

A valid sub-account Auth ID.

Response

{
  "alias": "US Mainland secondary",
  "api_id": "7f5328d3-7888-48ab-889b-9a60c0c3b9c9",
  "country": "US",
  "created_at": "2024-02-09T03:52:22.880098Z",
  "modified_at": "2024-02-09T04:07:09.954792017Z",
  "phone_number": "+12025551XXX",
  "subaccount": "",
  "verification_uuid": "f87836bd-f3c0-41bb-9498-125e6faaa4d4"
}

Example Request

1
2
3
4
5
6
7
import plivo

client = plivo.RestClient('<Auth>', '<Token>')

response = client.verify_callerids.update_verified_caller_id(phone_number= '+91XXXXXXXXXX', alias='Test update', subaccount= None)

print(response)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require 'rubygems'
require 'plivo'

include Plivo
include Plivo::Exceptions


api = RestClient.new("<auth>", "<token>")
begin
  response = api.verify_caller_id.update("<phone_number>", "<subaccount>", "<updated_alias>")
    puts response
rescue PlivoRESTError => e
  puts 'Exception: ' + e.message
  
end
1
2
3
4
5
6
7
8
9
10
11
12
13
var plivo = require('plivo');

(function main() {
    'use strict';
    
    var client = new plivo.Client("<auth_id>","<auth_token>");
        client.verify.updateVerifiedCallerId('+918681951370',{alias : "test"}).then(function(response) {
                console.log(response);
            }, function (err) {
                console.error(err);
            });

})();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php
/**
 * Example for update a verified caller id
 */
require 'vendor/autoload.php';
use Plivo\RestClient;
use Plivo\Exceptions\PlivoRestException;
$client = new RestClient("<auth>","<token>");

    try {

           $response = $client->verifyCallerId->updateVerifiedCallerId(
            '<phone_number>', ['alias' => '<alias>','subaccount' => null]
            );
        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
22
package com.plivo.examples;

import com.plivo.api.Plivo;
import com.plivo.api.exceptions.PlivoRestException;
import com.plivo.api.models.verify.InitiateVerifyResponse;
import com.plivo.api.models.verify.Verify;

import java.io.IOException;

public class verificationCallerID {

  public static void main(String[] args)  {
   Plivo.init("<auth>", "<token>");

    try {
      UpdateVerifiedCallerIdResponse response = Verify.updateVerifiedCallerID("+919768368745").alias("Test abhishek").subaccount("").update();
      System.out.println(response);
    }catch(PlivoRestException | IOException | PlivoValidationException e){
        e.printStackTrace();
    }
  }
}
1
2
3
4
curl -i --user AUTH_ID:AUTH_TOKEN \
    -H "Content-Type: application/json" \
    -d '{"alias":"US Mainland secondary"}' \
    https://api.plivo.com/v1/Account/{auth_id}/VerifiedCallerId/{phone_number}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package main
import (
	"fmt"
	"github.com/plivo/plivo-go/v7"
)

func main() {
	client, err := plivo.NewClient("<Auth>", "<Token>", &plivo.ClientOptions{})
	if err != nil {
		fmt.Print("Error", err.Error())
		return
	}
	response, err := client.VerifyCallerId.UpdateVerifiedCallerID("<phone_number>", plivo.UpdateVerifiedCallerIDParams{
		SubAccount: "<sub_account>", Alias: "<alias>"})

	if err != nil {
		fmt.Print("Error", err.Error())
		return
	}
	fmt.Printf("Response: %#v\n", response)