Documentation Index Fetch the complete documentation index at: https://plivo.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
The Verified Caller ID API lets you authenticate phone numbers before using them as caller ID for outbound calls. This is required when using numbers you don’t own through Plivo.
API Endpoint
https://api.plivo.com/v1/Account/{auth_id}/VerifiedCallerId/
The Verified Caller ID Object
Attribute Type Description phone_numberstring Verified phone number in E.164 format aliasstring Friendly name for the caller ID countrystring Country code (e.g., US) verification_uuidstring Unique identifier for verification created_atstring When the verification was created
Example Response
{
"api_id" : "870e2ded-58b0-41bc-8c1c-ba00c6a90741" ,
"phone_number" : "+12025551234" ,
"alias" : "US Mainland" ,
"country" : "US" ,
"verification_uuid" : "f87836bd-f3c0-41bb-9498-125e6faaa4d4" ,
"created_at" : "2024-02-09T03:52:22.880097813Z"
}
Initiate Verification
Start the verification process for a phone number. An OTP will be sent via SMS or voice call.
POST https://api.plivo.com/v1/Account/{auth_id}/VerifiedCallerId/
Parameters
Parameter Type Required Description phone_numberstring Yes Phone number in E.164 format aliasstring No Friendly name for the caller ID channelstring No OTP delivery method: sms or call. Default: sms subaccountstring No Subaccount Auth ID to associate
Python
Node.js
Ruby
PHP
Java
.NET
Go
cURL
import plivo
client = plivo.RestClient( '<auth_id>' , '<auth_token>' )
response = client.verify_callerids.initiate_verify(
phone_number = '+12025551234' ,
alias = 'Main Office' ,
channel = 'sms'
)
print (response)
Response
{
"api_id" : "654a7ca7-b9cc-4285-86f7-cf581f50409f" ,
"message" : "Verification code is sent to number +12025551234 which is valid for 15 minutes" ,
"verification_uuid" : "f87836bd-f3c0-41bb-9498-125e6faaa4d4"
}
Complete Verification
Submit the OTP received to complete verification.
POST https://api.plivo.com/v1/Account/{auth_id}/VerifiedCallerId/Verification/{verification_uuid}/
Parameters
Parameter Type Required Description otpstring Yes The verification code received
response = client.verify_callerids.verify_caller_id(
verification_uuid = 'f87836bd-f3c0-41bb-9498-125e6faaa4d4' ,
otp = '123456'
)
Retrieve a Verified Caller ID
Get details of a specific verified caller ID.
GET https://api.plivo.com/v1/Account/{auth_id}/VerifiedCallerId/{phone_number}/
response = client.verify_callerids.get_verified_caller_id( '+12025551234' )
List All Verified Caller IDs
Get all verified caller IDs for your account.
GET https://api.plivo.com/v1/Account/{auth_id}/VerifiedCallerId/
Query Parameters
Parameter Type Description limitinteger Results per page (max 20) offsetinteger Pagination offset countrystring Filter by country code subaccountstring Filter by subaccount
response = client.verify_callerids.list_verified_caller_id(
limit = 10 ,
country = 'US'
)
Update a Verified Caller ID
Update the alias or subaccount of a verified caller ID.
POST https://api.plivo.com/v1/Account/{auth_id}/VerifiedCallerId/{phone_number}/
Parameters
Parameter Type Description aliasstring New alias name subaccountstring New subaccount Auth ID
response = client.verify_callerids.update_verified_caller_id(
'+12025551234' ,
alias = 'New Name'
)
Delete a Verified Caller ID
Remove a verified caller ID from your account.
DELETE https://api.plivo.com/v1/Account/{auth_id}/VerifiedCallerId/{phone_number}/
client.verify_callerids.delete_verified_caller_id( '+12025551234' )
Response: HTTP 204 No Content
Verification Flow
Initiate - Call the initiate endpoint with the phone number
Receive OTP - OTP is sent via SMS or voice call (valid for 15 minutes)
Verify - Submit the OTP to complete verification
Use - The number can now be used as caller ID
Use Cases
Scenario Description Personal Numbers Use your mobile number as caller ID Business Lines Verify existing business phone numbers International Use local numbers in different countries Subaccounts Assign verified IDs to specific subaccounts