Base URL
Authentication
All API requests use HTTP Basic Authentication with your Plivo credentials:- Username: Your Auth ID
- Password: Your Auth Token
cURL
Request Format
- Content-Type:
application/jsonfor POST requests - All request parameters should be JSON-encoded
Response Format
All responses are JSON with anapi_id for request tracking:
HTTP Status Codes
| Code | Description |
|---|---|
200 | Request executed successfully |
201 | Resource created |
202 | Resource modified |
204 | Resource deleted |
400 | Invalid or missing parameter |
401 | Authentication failed |
403 | Forbidden |
404 | Resource not found |
405 | HTTP method not allowed |
429 | Rate limit exceeded |
500 | Server error |
Troubleshooting Common Errors
| Code | Common Causes | Solution |
|---|---|---|
400 | Missing trunk name, invalid trunk_direction | Check required parameters. Use inbound or outbound for direction |
401 | Invalid Auth ID or Auth Token | Verify credentials at Console → API Keys |
403 | SIP trunking not enabled, geo permissions | Contact support to enable SIP trunking. Check geo permissions |
404 | Invalid trunk ID, credential ID, or URI ID | Verify the resource UUID exists |
429 | Rate limit exceeded | Implement exponential backoff |
500 | Temporary server issue | Retry after a few seconds. Check status.plivo.com |
Pagination
List endpoints return paginated results:| Parameter | Description |
|---|---|
limit | Results per page (1-20). Default: 20 |
offset | Number of results to skip. Default: 0 |
API Resources
Core Resources
Authentication Resources
| Resource | Description |
|---|---|
| Credentials | Manage username/password for digest auth |
| IP Access Control Lists | Manage IP whitelists |
Routing Resources
| Resource | Description |
|---|---|
| Origination URIs | Manage inbound call destinations |
Trunk Configuration
Outbound Trunks
Route calls from your PBX to Plivo’s network:- Create Credentials or IP ACL
- Create Trunk with
trunk_direction: outbound - Attach credentials or IP ACL to the trunk
- Configure your PBX to send SIP INVITE to the trunk domain
Inbound Trunks
Route calls from Plivo to your PBX:- Create Origination URIs pointing to your servers
- Create Trunk with
trunk_direction: inbound - Attach primary and optionally fallback URIs
- Configure a Plivo number to use the trunk
Rate Limits
API requests are rate limited. If you exceed the limit, you’ll receive a429 response.
Related
- Concepts - SIP trunking fundamentals
- Interconnection Guides - PBX setup guides
- Troubleshooting - Hangup codes and debugging