The Plivo Zentrunk API uses HTTP verbs and standard HTTP status codes to make it easier for you to integrate communications into your code. To secure your requests to our servers, we serve our API calls over HTTPS.
Note: The current version of the API is v1.
GET
https://api.plivo.com/{version}/
1
2
curl -i --user AUTH_ID:AUTH_TOKEN \
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Call/{call_uuid}/
Was this code helpful
Plivo exposes a list of REST APIs to perform various actions.
GET
https://api.plivo.com/v1/
1
2
curl -i --user AUTH_ID:AUTH_TOKEN \
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Call/{call_uuid}/
Was this code helpful
All requests to Plivo API are authenticated with BasicAuth using the values of the Auth ID and Auth Token that appear on the Overview page of the console.
1
2
curl -i --user AUTH_ID:AUTH_TOKEN \
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Call/{call_uuid}/
Was this code helpful
Plivo only accepts input of the type application/json.
All POST request arguments must be passed as text in JSON format with the Content-Type set as application/json.
All GET and DELETE request arguments must be passed in the query string.
Plivo uses offset-based pagination to list resources.
For instance, if your search request has a result of 100 objects with limit = 10 and offset = 5, then objects with indices 51 through 60 are returned.
limitinteger |
A limit on the number of results to be returned. limit can range between 1 and 20, and the default is 20. |
offsetinteger |
A pagination cursor to denote the number of objects by which the results should be offset. |
Plivo API endpoints return responses in JSON format. Plivo sets an api_id
in each response to uniquely identify your request. Each API call returns one of these HTTP status codes depending on whether the call succeeds or fails.
200 |
Request has been executed |
201 |
Resource created |
202 |
Resource changed |
204 |
Resource deleted |
400 |
A parameter is missing or is invalid |
401 |
Authentication failed |
404 |
Resource cannot be found |
405 |
HTTP method not allowed |
429 |
Too many requests, rate limited |
500 |
Server error |
api_idstring | Identifies the request. |
errorstring | Indicates an error and provides information regarding the error. |
messagestring | Provides information regarding the request. |
{
"call_uuid": "90b6eb07-796c-4d86-a4fd-44ed11667ddb",
"from_number": "+912235328936",
"to_number": "+919943720205",
"call_direction": "outbound",
"call_duration": 4,
"bill_duration": 4,
"end_time": "2022-12-06 07:02:00",
"hangup_cause_name": "normal_hangup",
"hangup_source": "carrier",
"total_rate": "0.03000",
"total_amount": "0.00200",
"initiation_time": "2022-12-06 07:01:48",
"answer_time": "2022-12-06 07:01:56",
"trunk_domain": "93667062664669661.ap-south-1.zt.plivo.com",
"from_country": "IN",
"to_country": "IN",
"transport_protocol": "udp",
"srtp": false,
"hangup_cause_code": 3000,
"secure_trunking": false,
"secure_trunking_rate": "0.00000",
"stir_verification": "not applicable",
"attestation_indicator": "null"
}
{
"app_id": "73bbb0ff-01b9-4fc5-b978-9404da41297d",
"status": "error",
"error": "filtering not allowed on srtp"
}
A Call object is created when an outbound call is initiated or when an inbound call is received. You can use a Call object to interact with completed calls.
BaseURI
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Call/
A Call object is created when an outbound call is initiated or when an inbound call is received. You can use a Call object to interact with completed calls.
call_uuidstring |
The unique identifier used to identify the call |
from_numberstring |
The caller ID using which the call was initiated. |
to_numberstring |
The number to which the call was initiated. |
call_direction string |
The direction of the call, if you want to filter results by call direction. |
call_duration integer |
The duration of the call in seconds. This might be different from the bill_duration based on the billing interval of the prefix called. |
bill_durationinteger |
The duration for which the call was billed in seconds. |
end_time string |
The timestamp when the call ended. |
hangup_cause_namestring |
The reason for the call hangup. Refer to our list of hangup causes and sources. |
hangup_sourcestring |
The entity that triggered the call hangup. Possible hangup sources are customer, carrier, zentrunk |
total_ratestring |
The per-minute rate charged based on the destination number. |
total_amountstring |
The total amount charged for the call. |
initiation_timestring |
The timestamp when the call was initiated. |
answer_timestring |
The timestamp when the call was answered. |
trunk_domainstring |
Unique domain address used to identify the Outbound trunk |
from_countrystring |
The ISO2 code of the caller ID from which the call was initiated. |
to_countrystring |
The ISO2 code of the to number to which the call was initiated. |
transport_protocolstring |
Transport protocol used on call to send/receive packets |
srtpboolean |
Indicates if the secure transport real time protocol was enabled for the call. |
hangup_cause_codeinteger |
The integer code for the hangup cause. Refer to our list of hangup causes and sources. |
secure_trunkingboolean |
Indicates if the secure trunking was enabled for the call. |
secure_trunking_ratestring |
The per-minute secure trunking rate charged for the call. |
stir_verificationstring |
For outbound calls: Gives details about the attestation assigned to the call by Plivo For inbound calls: Gives details about the attestation received on the inbound call to your Plivo phone number. Possible values:
|
attestation_indicatorstring |
Indicates the attestation label assigned to the call |
billed_durationinteger |
The duration for which the call was billed in seconds. This might be different from the bill_duration based on the billing interval of the prefix called. |
{
"call_uuid": "90b6eb07-796c-4d86-a4fd-44ed11667ddb",
"from_number": "+912235328936",
"to_number": "+919943720205",
"call_direction": "outbound",
"call_duration": 4,
"bill_duration": 4,
"end_time": "2022-12-06 07:02:00",
"hangup_cause_name": "normal_hangup",
"hangup_source": "carrier",
"total_rate": "0.03000",
"total_amount": "0.00200",
"initiation_time": "2022-12-06 07:01:48",
"answer_time": "2022-12-06 07:01:56",
"trunk_domain": "93667062664669661.ap-south-1.zt.plivo.com",
"from_country": "IN",
"to_country": "IN",
"transport_protocol": "udp",
"srtp": false,
"hangup_cause_code": 3000,
"secure_trunking": false,
"secure_trunking_rate": "0.00000",
"stir_verification": "not applicable",
"attestation_indicator": "null"
}
This method lets you retrieve the call detail record (CDR) of a call using a call_uuid.
GET
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Call/{call_uuid}/
Returns the call detail record of the call identified using the given call UUID as the Call object.
1
Was this code helpful
1
Was this code helpful
1
Was this code helpful
1
Was this code helpful
1
Was this code helpful
1
Was this code helpful
1
2
curl -i --user AUTH_ID:AUTH_TOKEN \
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Call/{call_uuid}/
Was this code helpful
1
Was this code helpful
{
"call_uuid": "90b6eb07-796c-4d86-a4fd-44ed11667ddb",
"from_number": "+912235328936",
"to_number": "+919943720205",
"call_direction": "outbound",
"call_duration": 4,
"bill_duration": 4,
"end_time": "2022-12-06 07:02:00",
"hangup_cause_name": "normal_hangup",
"hangup_source": "carrier",
"total_rate": "0.03000",
"total_amount": "0.00200",
"initiation_time": "2022-12-06 07:01:48",
"answer_time": "2022-12-06 07:01:56",
"trunk_domain": "93667062664669661.ap-south-1.zt.plivo.com",
"from_country": "IN",
"to_country": "IN",
"transport_protocol": "udp",
"srtp": false,
"hangup_cause_code": 3000,
"secure_trunking": false,
"secure_trunking_rate": "0.00000",
"stir_verification": "not applicable",
"attestation_indicator": "null"
}
This method lets you retrieve details of all completed calls. The maximum number of results that you can fetch with a single API call is 20.
GET
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Call/
All of these optional arguments let you filter which calls you retrieve details for.
from_number | The number from which the calls were made. You can filter the details by using the exact number or the prefix. |
to_number | The destination number to which the calls were made. You can filter the details by using the exact number or the prefix. |
call_direction | The direction of the call. Allowed values: inbound, outbound |
bill_duration | Filters calls by billed duration in seconds. The filter can be used in five forms:
|
end_time | Filters calls by completion time. The time format expected is YYYY-MM-DD HH:MM[:ss[.uuuuuu]]. The filter can be used in five forms:
You can combine these filters to get call detail records that were added during a particular time range. |
Note: You can retrieve only calls made in the last 90 days via APIs. Timestamps need to be UTC timestamps. |
|
hangup_cause_code | Retrieves calls that were hung up with a specific hangup cause code. Refer to our list of hangup causes and sources |
hangup_source | Retrieves calls that were hung up by a specific hangup source. Refer to our list of hangup causes and sources. Allowed values: customer, carrier, zentrunk |
limit | Limits the number of results retrieved. The maximum it can be set to is 20. Defaults to 20. |
offset | Denotes the number of value items by which the results should be offset. For example, if the results contains 1,000 values and limit is set to 10 and offset is set to 705, then values 706 through 715 are displayed in the results. This parameter is also used for pagination of the results. |
stir_verification | For outbound calls: Gives details about the STIR/SHAKEN attestation assigned to the call by Plivo. For inbound calls: Gives details about the attestation received on the call. Allowed values:
|
Returns the call objects that match the filters specified in the request.
{
"api_id": "a04ad809-3b78-4bbe-9baf-acfc7800b10f",
"meta": {
"limit": 20,
"offset": 0,
"total_count": 2,
"previous": null,
"next": null
},
"objects": [
{
"call_uuid": "90b6eb07-796c-4d86-a4fd-44ed11667ddb",
"from_number": "+12025551111",
"to_number": "+13128574907",
"call_direction": "outbound",
"call_duration": 4,
"bill_duration": 60,
"end_time": "2022-12-06 07:02:00",
"hangup_cause_name": "normal_hangup",
"hangup_source": "carrier",
"total_rate": "0.03000",
"total_amount": "0.00200",
“billed_duration”: 60,
"initiation_time": "2022-12-06 07:01:48",
"answer_time": "2022-12-06 07:01:56",
"trunk_domain": "93667062664669661.ap-south-1.zt.plivo.com",
"from_country": "IN",
"to_country": "IN",
"transport_protocol": "udp",
"srtp": false,
"hangup_cause_code": 3000,
"secure_trunking": false,
"secure_trunking_rate": "0.00000",
"stir_verification": "Verified",
"attestation_indicator": "A"
},
{
"call_uuid": "0b6eb07-796c-4d86-a4fd-44ed11667ddbe",
"from_number": "+912235328936",
"to_number": "+919943720205",
"call_direction": "outbound",
"trunk_id": "0b6eb07-796c-4d86-a4fd-44ed11667ddb",
"call_duration": 4,
"bill_duration": 4,
"end_time": "2022-12-06 07:02:00",
"hangup_cause_name": "normal_hangup",
"hangup_source": "carrier",
"total_rate": "0.03000",
"total_amount": "0.00200",
“billed_duration”: 60,
"initiation_time": "2022-12-06 07:01:48",
"answer_time": "2022-12-06 07:01:56",
"trunk_domain": "93667062664669661.ap-south-1.zt.plivo.com",
"from_country": "IN",
"to_country": "IN",
"transport_protocol": "udp",
"srtp": false,
"hangup_cause_code": 3000,
"secure_trunking": false,
"secure_trunking_rate": "0.00000",
"stir_verification": "Not Applicable",
"attestation_indicator": "null"
}
]
}
This method lets you retrieve call insights for a call.
URL
https://api.plivo.com/v1/Account/{Auth id}/Zentrunk/Call/{call ID}/Insights
Name | Description | Example value |
api_id | Unique api request identifier |
<UUID> |
call_uuid | Unique call Identifier |
<UUID> |
rtt | Round trip time is the time taken for data to travel to a target destination and back, in milliseconds. A high RTT indicates poor network quality and can result in audio lag. |
7 |
packet_loss | Loss of voice packets over transmission, as a percentage of overall packet count in the stream. Packet loss can cause broken audio. |
2 |
jitter | The variance in delay of voice packet transmissions, measured in milliseconds. Jitter can impact voice quality, causing robotic-sounding audio. |
7 |
post_dial_delay | Length of the interval between when the call was initiated and ringing began, in milliseconds. |
12 |
hungup_source | who hung up the call. caller/callee |
plivo |
hungup_cause | cause of hung up |
end of xml instructions |
from.number | The caller ID using which the call was initiated. |
12025551111 |
from.carrier | The caller carrier using which the call was initiated. |
Airtel |
from.region | The caller region where the call was initiated. |
IN |
to.number | The number to which the call was initiated. |
11025551111 |
to.carrier | The carrier to which the call was initiated. |
jio |
to.region | The region to which the call was initiated. |
IN |
plivo_quality_score | Each call is rated between 1 to 5 based on the audio quality stats recorded for the call. A higher score indicates better call quality. |
4 |
{
"api_id": "a63df7e3-9f24-4aae-2152-dc8f92548290",
"call_uuid": "c9d6be3d-94c3-4b38-a2eb-8063ca404d77",
"from": {
"carrier": "Mahanagar Telephone Nigam Ltd (MTNL), Fixedline Number",
"number": "+918035735470",
"region": "IN"
},
"hangup_cause": "normal_hangup",
"hangup_source": "customer",
"jitter": "3",
"packet_loss": "0",
"plivo_quality_score": "4.2",
"post_dial_delay": 1000.0,
"rtt": "24508",
"to": {
"carrier": "Mahanagar Telephone Nigam Ltd (MTNL), Fixedline Number",
"number": "+912269947000",
"region": "IN"
}
}
Plivo SIP trunks can initiate and accept calls via the UDP network. Customers can interact with the Trunk object to create, retrieve, modify, and remove trunks. Trunks can be linked to a credentials list, an IP access control list, and an origination URI.
BaseURI
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Trunk/
1
2
curl -i --user AUTH_ID:AUTH_TOKEN \
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Trunk/{trunk_id}/
Was this code helpful
trunk_id string |
Unique identifier used to identify the inbound or outbound trunk. |
trunk_domain string |
Unique address you reserve on Plivo to which you route your SIP traffic. |
name string |
Friendly name you assign to the trunk. |
trunk_status string |
Status of the trunk. |
secure boolean |
Indicates whether the trunk is secured with SRTP to encrypt the media of the call and TLS to encrypt SIP signaling. |
trunk_directionstring |
Direction of the trunk. |
ipacl_uuid string |
Unique identifier of IP access control list. |
credential_uuidstring |
Unique identifier of credentials list. |
primary_uri_uuidstring |
Unique identifier of origination URI used as a primary URI. |
fallback_uri_uuidstring |
Unique identifier of origination URI used as a fallback URI. |
{
"name": "trunk_name_1",
"trunk_id": "21784177241578",
"trunk_domain": "21784177241578.zt.plivo.com"
"trunk_status": "enabled",
"secure": true,
"trunk_direction": "outbound",
"ipacl_uuid": "90b6eb07-796c-4d86-a4fd-44ed11667ddb",
"credential_uuid": "eb07-796c-4d86-a4fd-44ed11667ddb",
"primary_uri_uuid": null,
"fallback_uri_uuid": null
}
Creates a new trunk.
POST
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Trunk/
name string |
Name of the trunk. |
trunk_status string |
Status of the trunk. |
secureboolean |
Indicates whether the trunk is secured. Plivo uses SRTP to encrypt the call media and TLS to encrypt the SIP signaling. |
trunk_direction string |
Indicates the direction of the trunk. |
ipacl_uuid stringconditional |
Unique identifier of an IP access control list. Specified for outbound trunk creation |
credential_uuidstringconditional |
Unique identifier of a credentials list. Specified for outbound trunk creation. |
primary_uri_uuid stringconditional |
Unique identifier of the origination URI used as a primary URI. Specified for inbound trunk creation. |
fallback_uri_uuidstring |
Unique identifier of the origination URI used as a fallback URI. |
If successful, returns “Trunk created successfully.” in the message field along with a unique trunk_id.
1
2
3
4
curl -i --user AUTH_ID:AUTH_TOKEN \
-H "Content-Type: application/json" \
-d '{"name": "testuser", "trunk_status": "enabled", "trunk_direction": "outbound", "ipacl_uuid": "1c13de4c-423d-11e3-9899-22000abfa5d5"}' \
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Trunk/
Was this code helpful
{
"api_id": "4e1f954c-baf3-11ec-bafe-0242ac110003",
"message": "Trunk created successfully.",
"trunk_id": "986908123123411213"
}
Retrieves the details of an existing trunk.
GET
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Trunk/{trunk_id}/
No arguments need to be passed.
Returns a Trunk object if a valid trunk_id is provided. Returns an error otherwise.
1
2
curl -i --user AUTH_ID:AUTH_TOKEN \
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Trunk/21784177241578/
Was this code helpful
{
"name": "trunk_name_1",
"trunk_id": "21784177241578",
"trunk_domain": "21784177241578.zt.plivo.com"
"trunk_status": "enabled",
"secure": true,
"trunk_direction": "outbound",
"ipacl_uuid": "90b6eb07-796c-4d86-a4fd-44ed11667ddb",
"credential_uuid": "eb07-796c-4d86-a4fd-44ed11667ddb",
"primary_uri_uuid": null,
"fallback_uri_uuid": null
}
Retrieves the details of all trunks.
GET
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Trunk/
trunk_status string |
Filters trunks based on trunk status. |
secure boolean |
Filters trunks based on whether they’re secure. |
trunk_directionstring |
Filters trunks based on trunk direction. |
ipacl_uuidstring |
Filters trunks based on IP access control list. |
credential_uuidstring |
Filters trunks based on credentials. |
primary_uri_uuidstring |
Filters trunks based on primary URI. |
fallback_uri_uuidstring |
Filters trunks based on fallback URI. |
limitinteger |
A limit on the number of results per page. limit can range between 1 and 20, and the default is 20. |
offsetinteger |
A pagination cursor to denote the number of objects by which the results should be offset. Defaults to 0. |
A dictionary with an objects property that contains an array of trunk objects.
1
2
curl -i --user AUTH_ID:AUTH_TOKEN \
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Trunk/
Was this code helpful
{
"api_id": "a04ad809-3b78-4bbe-9baf-acfc7800b10f",
"meta": {
"limit": 2,
"offset": 0,
"total_count": 10,
"previous": null,
"next": "v1/Account/{auth_id}/Zentrunk/Trunk/?limit=2&offset=2"
},
"objects": [
{
"name": "trunk_name_1",
"trunk_id":"21784177241578",
"trunk_domain":"21784177241578.zt.plivo.com"
"trunk_status": "enabled",
"secure": true,
"trunk_direction": "outbound",
"ipacl_uuid": "90b6eb07-796c-4d86-a4fd-44ed11667ddb",
"credential_uuid": "eb07-796c-4d86-a4fd-44ed11667ddb",
"primary_uri_uuid": null,
"fallback_uri_uuid": null
},
{
"name": "trunk_name_2",
"trunk_id":"31784177241575",
"trunk_domain":"31784177241575.zt.plivo.com"
"trunk_status": "enabled",
"secure": false,
"trunk_direction": "inbound",
"ipacl_uuid": null,
"credential_uuid": null,
"primary_uri_uuid": "90b6eb07-796c-4d86-a4fd-44ed11667ddb",
"fallback_uri_uuid": "796c-4d86-a4fd-44ed11667ddb-eb07"
}
]
}
Updates a trunk’s name, status, direction, and other related properties.
POST
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Trunk/{trunk_id}/
namestring |
Name of the trunk. |
trunk_status string |
Status of the trunk. |
secureboolean |
Indicates whether the trunk is secured. Plivo uses SRTP to encrypt the call media and TLS to encrypt SIP signaling. |
trunk_directionstring |
Indicates the direction of the trunk. |
ipacl_uuidstring |
Unique identifier of IP access control list. |
credential_uuidstring |
Unique identifier of a credentials list. |
primary_uri_uuidstring |
Unique identifier of the origination URI used as a primary URI. |
fallback_uri_uuidstring |
Unique identifier of the origination URI used as a fallback URI. |
Returns a confirmation that the trunk is updated.
1
2
3
4
curl -i --user AUTH_ID:AUTH_TOKEN \
-H "Content-Type: application/json" \
-d '{"name": "testuser"}' \
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Trunk/{trunk_id}/
Was this code helpful
{
"api_id": "4e1f954c-baf3-11ec-bafe-0242ac110003",
"message": "Trunk updated successfully.",
"trunk_id": "986908123123411213"
}
Permanently deletes a trunk.
DELETE
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Trunk/{trunk_id}/
No arguments need to be passed.
1
2
curl -X DELETE -i --user AUTH_ID:AUTH_TOKEN \
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Trunk/f19c4773-4ae6-4b75-92ea-9cf3ea4227d6/
Was this code helpful
The Credentials list is a subresource connected to the Trunks. When Plivo receives a SIP INVITE command for a Trunk domain that has an associated credentials list, we prompt for authentication. In response, your system must provide a valid username and password to authenticate.
BaseURI
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Credential/
1
2
curl -i --user AUTH_ID:AUTH_TOKEN \
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Credential/{credential_uuid}/
Was this code helpful
credential_uuidstring |
Unique identifier for the credentials list created. |
namestring |
Friendly name for the credentials list. |
username string |
Username to be sent in response to an auth challenge of the SIP INVITE. |
passwordstring |
Password to authenticate the SIP request. |
{
"credential_uuid": "f19c4773-4ae6-4b75-92ea-9cf3ea4227d6",
"name": "dummy1",
"username": "dummy1_username"
}
Create a new credentials list.
POST
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Credential/
namestring |
Friendly name for the credentials list. |
usernamestring |
Username to be sent in response to an auth challenge of the SIP INVITE. |
passwordstring |
Password to authenticate the SIP request. |
If successful, returns “credential created successfully.” in the message field along with a credential_uuid.
1
2
3
4
curl -i --user AUTH_ID:AUTH_TOKEN \
-H "Content-Type: application/json" \
-d '{"name": "testuser", "username": "testcredential", "Password": "test12332434!"}' \
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Credential/
Was this code helpful
{
"api_id": "4e1f954c-baf3-11ec-bafe-0242ac110003",
"message": "credential created successfully.",
"credential_uuid": "f19c4773-4ae6-4b75-92ea-9cf3ea4227d6"
}
Retrieves the details of an existing credential.
GET
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Credential/{credential_uuid}/
No arguments need to be passed.
Returns a Credential object if a valid credential_uuid is provided. Returns an error otherwise.
1
2
curl -i --user AUTH_ID:AUTH_TOKEN \
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Credential/f19c4773-4ae6-4b75-92ea-9cf3ea4227d6/
Was this code helpful
{
"credential_uuid": "f19c4773-4ae6-4b75-92ea-9cf3ea4227d6",
"name": "dummy1",
"username": "dummy1_username"
}
Retrieves the details of all credentials in the account.
GET
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Credential/
No arguments need to be passed.
A dictionary with an objects property that contains an array of Credentials objects.
1
2
curl -i --user AUTH_ID:AUTH_TOKEN \
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Credential/
Was this code helpful
{
"api_id": "a04ad809-3b78-4bbe-9baf-acfc7800b10f",
"meta": {
"limit": 2,
"offset": 0,
"total_count": 109,
"previous": null,
"next": "v1/Account/{auth_id}/Zentrunk/Credential/?limit=2&offset=2"
},
"objects": [
{
"credential_uuid": "f19c4773-4ae6-4b75-92ea-9cf3ea4227d6",
"name": "dummy1",
"username": "dummy1_username"
},
{
"credential_uuid": "c4773-4ae6-4b75-92ea-9cf3ea4227d6",
"name": "dummy1",
"username": "dummy2_username"
}
]
}
Updates a credential name, username, or password.
POST
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Credential/{credential_uuid}/
namestring |
Friendly name for the credentials list. |
usernamestring |
Username to be sent in response to an auth challenge of the SIP INVITE. |
Passwordstring |
Password to authenticate the SIP request. |
Returns a confirmation that the credential was updated.
1
2
3
4
curl -i --user AUTH_ID:AUTH_TOKEN \
-H "Content-Type: application/json" \
-d '{"username": "testcredential", "Password": "test12332434!"}' \
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Credential/f19c4773-4ae6-4b75-92ea-9cf3ea4227d6/
Was this code helpful
{
"api_id": "4e1f954c-baf3-11ec-bafe-0242ac110003",
"message": "Credential updated successfully.",
"credential_uuid": "f19c4773-4ae6-4b75-92ea-9cf3ea4227d6"
}
Permanently deletes a credential.
DELETE
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Credential/{credential_uuid}/
No arguments need to be passed.
1
2
curl -X DELETE -i --user AUTH_ID:AUTH_TOKEN \
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Credential/{credential_uuid}/
Was this code helpful
The origination URI is a subresource linked to inbound trunks. It denotes an entry point into your communication infrastructure, such as an IP PBX or SBC, by identifying the network element involved.
BaseURI
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/URI/
1
2
curl -i --user AUTH_ID:AUTH_TOKEN \
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/URI/f19c4773-4ae6-4b75-92ea-9cf3ea4227d6/
Was this code helpful
uri_uuidstring |
Unique identifier for the origination URI. |
namestring |
Friendly name for the origination URI. |
uristring |
FQDN or IP address of the VoIP infrastructure. |
authentication_neededboolean |
Indicates whether authentication is required to access the VoIP infrastructure. |
usernamestring |
Username to authenticate inbound traffic. |
passwordstring |
Password to authenticate inbound traffic. |
{
"uri_uuid": "f19c4773-4ae6-4b75-92ea-9cf3ea4227d6",
"name": "testuri123",
"uri": "test@plivo.com",
"authentication_needed": true,
"username": "dummy1_username"
}
Creates a new origination URI.
POST
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/URI/
namestring |
Friendly name for the origination URI. |
uristring |
FQDN or IP address of the VoIP infrastructure. |
authentication_neededboolean |
Indicates whether authentication is required to access the VoIP infrastructure. |
usernamestring |
Username to authenticate inbound traffic. Required if authentication_needed is set to true. |
passwordstring |
Password to authenticate inbound traffic. Required if authentication_needed is set to true. |
If successful, returns “Origination URI created successfully.” in the message field along with a uri_uuid.
1
2
3
4
curl -i --user AUTH_ID:AUTH_TOKEN \
-H "Content-Type: application/json" \
-d '{"name": "testuri", "uri": "test@plivo.com", "authentication_needed": true, "username": "testuser", "password": "testpass12324!"}' \
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/URI/
Was this code helpful
{
"api_id": "4e1f954c-baf3-11ec-bafe-0242ac110003",
"message": "Origination URI created successfully.",
"uri_uuid": "f19c4773-4ae6-4b75-92ea-9cf3ea4227d6"
}
Retrieves the details of an existing trunk.
GET
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/URI/{URI_uuid}/
No arguments need to be passed.
Returns an origination URI object if a valid uri_uuid is provided. Returns an error otherwise.
1
2
curl -i --user AUTH_ID:AUTH_TOKEN \
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/URI/f19c4773-4ae6-4b75-92ea-9cf3ea4227d6/
Was this code helpful
{
"uri_uuid": "f19c4773-4ae6-4b75-92ea-9cf3ea4227d6",
"name": "testuri123",
"uri": "test@plivo.com",
"authentication_needed": true,
"username": "dummy1_username"
}
Retrieves the details of all origination URIs in the account.
GET
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/URI/
No arguments need to be passed.
A dictionary with an objects property that contains an array of origination URI objects.
{
"api_id": "a04ad809-3b78-4bbe-9baf-acfc7800b10f",
"meta": {
"limit": 2,
"offset": 0,
"total_count": 109,
"previous": null,
"next": "v1/Account/{auth_id}/Zentrunk/URI/?limit=2&offset=2"
},
"objects": [
{
"uri_uuid": "f19c4773-4ae6-4b75-92ea-9cf3ea4227d6",
"name": "uritest1",
"uri": "test@plivo.com",
"authentication_needed": true,
"username": "dummy1_username"
},
{
"uri_uuid": "aec4773-4ae6-4b75-92ea-9cf3ea4227d6",
"name": "uritest12",
"uri": "test2@plivo.com",
"authentication_needed": false,
"username": null
}
]
}
Updates a credential name, username, or password.
POST
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/URI/{URI_uuid}/
namestring |
Friendly name for the origination URI. |
uristring |
FQDN or IP address of the VoIP infrastructure. |
authentication_neededboolean |
Indicates whether authentication is required to access the VoIP infrastructure. |
usernamestring |
Username to authenticate inbound traffic. Required if authentication_needed is set to true. |
passwordstring |
Password to authenticate inbound traffic. Required if authentication_needed is set to true. |
Returns a confirmation that the origination URI is updated.
1
2
3
4
curl -i --user AUTH_ID:AUTH_TOKEN \
-H "Content-Type: application/json" \
-d '{"authentication_needed": true, "username": "testcredential", "Password": "test12332434!"}' \
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/URI/f19c4773-4ae6-4b75-92ea-9cf3ea4227d6/
Was this code helpful
{
"api_id": "4e1f954c-baf3-11ec-bafe-0242ac110003",
"message": "origination uri updated successfully.",
"uri_uuid": "f19c4773-4ae6-4b75-92ea-9cf3ea4227d6"
}
Permanently deletes an origination URI.
DELETE
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/URI/{URI_uuid}/
No arguments need to be passed.
1
2
curl -X DELETE -i --user AUTH_ID:AUTH_TOKEN \
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Credential/{credential_uuid}/
Was this code helpful
The IP access control list serves as a subresource comprising instances of IP access control lists linked to the outbound trunk. When an outbound trunk associated with an IP access control list receives a SIP INVITE, the INVITE is accepted only if the source IP address is included in one of the associated lists.
BaseURI
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/IPAccessControlList/
1
2
curl -i --user AUTH_ID:AUTH_TOKEN \
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/IPAccessControlList/f19c4773-4ae6-4b75-92ea-9cf3ea4227d6/
Was this code helpful
ipacl_uuidstring |
Unique identifier for an IP access control list. |
namestring |
Friendly name for the IP access control list. |
associated_ipsarray |
Comma-separated list of IP addresses. |
If successful, returns “IP access control list created successfully.” in the message field along with an ipacl_uuid.
{
"ipacl_uuid": "f19c4773-4ae6-4b75-92ea-9cf3ea4227d6",
"name": "sample_ipacl",
"ip_addresses": [
"192.168.1.1,127.0.1.1"
]
}
BaseURI
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/IPAccessControlList/
namestring |
Friendly name for the IP access control list. |
ip_addressesstring |
Comma-separated list of IP addresses. |
1
2
3
4
curl -i --user AUTH_ID:AUTH_TOKEN \
-H "Content-Type: application/json" \
-d '{"name": "testname", "ip_addresses": ["92.168.0.1","92.168.0.2"]}' \
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/IPAccessControlList/
Was this code helpful
Retrieves the details of an IP access control list.
GET
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/IPAccessControlList/{ipacl_uuid}/
No arguments need to be passed.
Returns an IP access control list object if a valid ipacl_uuid is provided. Returns an error otherwise.
1
2
curl -i --user AUTH_ID:AUTH_TOKEN \
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/IPAccessControlList/f19c4773-4ae6-4b75-92ea-9cf3ea4227d6/
Was this code helpful
{
"ipacl_uuid": "f19c4773-4ae6-4b75-92ea-9cf3ea4227d6",
"name": "sample_ipacl",
"ip_addresses": [
"192.168.1.1,127.0.1.1"
]
}
Retrieves the details of all IP access control lists in the account.
GET
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/IPAccessControlList/
No arguments need to be passed.
A dictionary with an objects property that contains an array of IP access control lists objects.
1
2
curl -i --user AUTH_ID:AUTH_TOKEN \
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/IPAccessControlList/
Was this code helpful
{
"api_id": "a04ad809-3b78-4bbe-9baf-acfc7800b10f",
"meta": {
"limit": 2,
"offset": 0,
"total_count": 109,
"previous": null,
"next": "v1/Account/{auth_id}/Zentrunk/IPAccessControlList/?limit=2&offset=2"
},
"objects": [
{
"ipacl_uuid": "f19c4773-4ae6-4b75-92ea-9cf3ea4227d6",
"name": "sample_ipacl_1",
"ip_addresses": [
"192.162.1.1,126.0.1.1"
]
},
{
"ipacl_uuid": "f19c4773-4ae6-4b75-92ea-9cf3ea4227d6",
"name": "sample_ipacl_2",
"ip_addresses": [
"192.168.1.1,127.0.1.1"
]
}
]
}
Updates an IP access control lists name or IP addresses.
POST
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/IPAccessControlList/{ipacl_uuid}/
namestring |
Friendly name for the IP access control list. |
ip_addressesarray |
Comma-separated list of IP addresses. |
Returns a confirmation that the object was updated.
1
2
3
4
curl -i --user AUTH_ID:AUTH_TOKEN \
-H "Content-Type: application/json" \
-d '{"name": "testname", "ip_addresses": ["92.168.0.1","92.168.0.2"]}' \
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/IPAccessControlList/f19c4773-4ae6-4b75-92ea-9cf3ea4227d6/
Was this code helpful
{
"api_id": "4e1f954c-baf3-11ec-bafe-0242ac110003",
"message": "IP access control list updated successfully.",
"ipacl_uuid": "f19c4773-4ae6-4b75-92ea-9cf3ea4227d6"
}
Permanently deletes an IP access control list.
DELETE
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/IPAccessControlList/{ipacl_uuid}/
No arguments need to be passed.
1
2
curl -X DELETE -i --user AUTH_ID:AUTH_TOKEN \
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/IPAccessControlList/f19c4773-4ae6-4b75-92ea-9cf3ea4227d6/
Was this code helpful