Endpoints represent SIP users that can register with Plivo and make/receive calls through Voice SDKs (Web, iOS, Android) or SIP softphones. Each endpoint has a unique username, password, and SIP URI.
The Endpoint Object
Attribute Type Description endpoint_idstringUnique identifier for the endpoint. Used in all endpoint API operations. usernamestringUsername for the endpoint. Alphanumeric only, 1-25 characters, must start with an alphabetic character. passwordstringPassword for the endpoint. Returned as MD5 hash in responses. aliasstringHuman-readable alias for the endpoint. Allows letters, numbers, hyphens, and underscores. sip_uristringSIP URI of the endpoint. External users can call this endpoint on this URI. sip_registeredstringtrue if the endpoint is registered on a SIP client. Default: false.applicationstringURI of the application attached to the endpoint. sub_accountstringSubaccount the endpoint is linked to. null if not linked. resource_uristringURI of the endpoint object.
Example Endpoint Object
{
"alias" : "callme" ,
"application" : "/v1/Account/MA2025RK4E639VJFZAGV/Application/33406267401237901/" ,
"endpoint_id" : "32866729519064" ,
"resource_uri" : "/v1/Account/MA2025RK4E639VJFZAGV/Endpoint/32866729519064/" ,
"sip_contact" : "sip:callme140703093224@122.172.71.207:57563;ob" ,
"sip_expires" : "2022-07-21 19:26:08" ,
"sip_registered" : "true" ,
"sip_uri" : "sip:callme140703093944@phone.plivo.com" ,
"sip_user_agent" : "Telephone 1.1.4" ,
"sub_account" : null ,
"username" : "callme140703093944"
}
Create an Endpoint
Create a new SIP endpoint.
POST https://api.plivo.com/v1/Account/{auth_id}/Endpoint/
Arguments
Parameter Required Description usernameYes Username for the endpoint. Alphanumeric only, 1-25 characters, must start with an alphabetic character. passwordYes Password for the endpoint. Must be at least 5 characters long. aliasYes Alias for the endpoint. Allows letters, numbers, hyphens, and underscores. app_idNo ID of the application to attach to the endpoint.
Returns
Returns the created endpoint with a 12-digit number appended to the username.
Python
Ruby
Node
PHP
Java
.NET
Go
cURL
import plivo
client = plivo.RestClient( '<auth_id>' , '<auth_token>' )
response = client.endpoints.create(
username = 'testusername' ,
password = 'testpassword' ,
alias = 'Test Account' )
print (response)
Response
{
"username" : "zumba131031145958" ,
"alias" : "zumba" ,
"message" : "created" ,
"endpoint_id" : "37371860103666" ,
"api_id" : "1c13de4c-423d-11e3-9899-22000abfa5d5"
}
Retrieve an Endpoint
Get details of a specific endpoint.
GET https://api.plivo.com/v1/Account/{auth_id}/Endpoint/{endpoint_id}/
Arguments
No arguments required.
The password returned is an MD5 hash of the actual password.
Python
Ruby
Node
PHP
Java
.NET
Go
cURL
import plivo
client = plivo.RestClient( '<auth_id>' , '<auth_token>' )
response = client.endpoints.get( endpoint_id = '1465909595140' )
print (response)
Response
{
"alias" : "callme" ,
"application" : "/v1/Account/MA2025RK4E639VJFZAGV/Application/33406267401237901/" ,
"endpoint_id" : "32866729519064" ,
"resource_uri" : "/v1/Account/MA2025RK4E639VJFZAGV/Endpoint/32866729519064/" ,
"sip_contact" : "sip:callme140703093224@122.172.71.207:57563;ob" ,
"sip_expires" : "2022-07-21 19:26:08" ,
"sip_registered" : "true" ,
"sip_uri" : "sip:callme140703093944@phone.plivo.com" ,
"sip_user_agent" : "Telephone 1.1.4" ,
"sub_account" : null ,
"username" : "callme140703093944"
}
List All Endpoints
Retrieve all endpoints in your account.
GET https://api.plivo.com/v1/Account/{auth_id}/Endpoint/
Arguments
No arguments required.
Python
Ruby
Node
PHP
Java
.NET
Go
cURL
import plivo
client = plivo.RestClient( '<auth_id>' , '<auth_token>' )
response = client.endpoints.list()
print (response)
Response
{
"api_id" : "30a0c8c2-110c-11e4-bd8a-12313f016a39" ,
"meta" : {
"limit" : 20 ,
"next" : null ,
"offset" : 0 ,
"previous" : null ,
"total_count" : 11
},
"objects" : [
{
"alias" : "callme" ,
"application" : "/v1/Account/MA2025RK4E639VJFZAGV/Application/33406267401237901/" ,
"endpoint_id" : "32866729519064" ,
"sip_registered" : "true" ,
"sip_uri" : "sip:callme140703093944@phone.plivo.com" ,
"username" : "callme140703093944"
}
]
}
Update an Endpoint
Update an endpoint’s password, alias, or attached application.
POST https://api.plivo.com/v1/Account/{auth_id}/Endpoint/{endpoint_id}/
Arguments
Parameter Description passwordNew password. Must be at least 5 characters. aliasNew alias. Allows letters, numbers, hyphens, and underscores. app_idID of the application to attach.
Python
Ruby
Node
PHP
Java
.NET
Go
cURL
import plivo
client = plivo.RestClient( '<auth_id>' , '<auth_token>' )
response = client.endpoints.update(
endpoint_id = '14659095951490' ,
alias = 'Double time.' )
print (response)
Response
{
"message" : "changed" ,
"api_id" : "d8f9ea6c-58cc-11e1-86da-adf28403fe48"
}
Delete an Endpoint
Permanently delete an endpoint.
DELETE https://api.plivo.com/v1/Account/{auth_id}/Endpoint/{endpoint_id}/
Arguments
No arguments required.
Python
Ruby
Node
PHP
Java
.NET
Go
cURL
import plivo
client = plivo.RestClient( '<auth_id>' , '<auth_token>' )
response = client.endpoints.delete( endpoint_id = '14659095951490' )
print (response)
Response
Generate a JWT Token
Generate a JWT (JSON Web Token) for client-side authentication with Voice SDKs.
POST https://api.plivo.com/v1/Account/{auth_id}/JWT/Token/
Arguments
Custom subject claim for the token.
“Not before” timestamp (Unix epoch). The token is not valid before this time.
Token expiry time (Unix epoch). Allowed range: 3 minutes to 24 hours from creation.
Response
Returns a JWT token string that you can use for client SDK authentication.