Skip to main content
The Plivo Zentrunk API lets you programmatically manage SIP trunks, authentication, and retrieve call records. The API uses standard HTTP methods and returns JSON responses.

Base URL


Authentication

All API requests use HTTP Basic Authentication with your Plivo credentials:
  • Username: Your Auth ID
  • Password: Your Auth Token
Find your credentials on the Plivo Console Dashboard.
cURL

Request Format

  • Content-Type: application/json for POST requests
  • All request parameters should be JSON-encoded

Response Format

All responses are JSON with an api_id for request tracking:

HTTP Status Codes

Troubleshooting Common Errors

For call-level errors (SIP codes), see Zentrunk Hangup Codes.

Pagination

List endpoints return paginated results:

API Resources

Core Resources

Authentication Resources

Routing Resources


Trunk Configuration

Outbound Trunks

Route calls from your PBX to Plivo’s network:
  1. Create Credentials or IP ACL
  2. Create Trunk with trunk_direction: outbound
  3. Attach credentials or IP ACL to the trunk
  4. Configure your PBX to send SIP INVITE to the trunk domain

Inbound Trunks

Route calls from Plivo to your PBX:
  1. Create Origination URIs pointing to your servers
  2. Create Trunk with trunk_direction: inbound
  3. Attach primary and optionally fallback URIs
  4. Configure a Plivo number to use the trunk

Rate Limits

API requests are rate limited. If you exceed the limit, you’ll receive a 429 response.