Skip to main content
All Plivo APIs use HTTP verbs and standard HTTP status codes. To secure requests, all APIs are served over HTTPS. API Endpoint
https://api.plivo.com/v1/
The current version of the APIs is v1. Server SDKs are versioned as latest and legacy.

Authentication

All requests to Plivo API are authenticated with BasicAuth using your AUTH ID and AUTH TOKEN. Find your credentials on the Plivo console.
import plivo

client = plivo.RestClient('<auth_id>', '<auth_token>')

Content Type

Plivo only accepts input of type application/json.
  • POST requests: Arguments must be passed as JSON with Content-Type: application/json
  • GET and DELETE requests: Arguments must be passed in the query string

Timeouts and Proxies

Server SDKs support specifying timeouts and proxy settings for API requests.
import plivo

proxies = {
    'http': 'https://username:password@proxyurl:proxyport',
    'https': 'https://username:password@proxyurl:proxyport'
}
client = plivo.RestClient('<auth_id>', '<auth_token>', proxies=proxies, timeout=5)

Pagination

Plivo uses offset-based pagination to list resources.
ParameterDescription
limitNumber of results to return. Range: 1-20. Default: 20.
offsetNumber of results to skip for pagination.
For example, with 100 results, limit=10 and offset=50 returns objects 51-60.

Asynchronous Requests

All Plivo API requests can be made asynchronous. When an async call is made, Plivo returns a generic response with the api_id, and the actual response is sent to your callback URL.
ParameterDescription
callback_urlURL to receive the API response.
callback_methodHTTP method for the callback. Default: POST.
Async Response
{
  "message": "async api spawned",
  "api_id": "63f0761a-e0ed-11e1-8ea7-12313924e3a6"
}

HTTP Status Codes

CodeDescription
200Request executed successfully
201Resource created
202Resource changed
204Resource deleted
400Parameter missing or invalid
401Authentication failed
403Forbidden
404Resource not found
405HTTP method not allowed
429Too many requests (rate limited)
500Server error

Troubleshooting Common Errors

CodeCommon CausesSolution
400Missing required parameter, invalid JSON formatCheck all required parameters. Verify JSON syntax
401Invalid Auth ID or Auth TokenVerify credentials at Console → API Keys
403Account not verified, feature not enabledComplete account verification. Contact support
404Invalid resource ID, typo in endpoint URLVerify the resource exists. Check endpoint spelling
429Rate limit exceeded (300 requests/5 sec)Implement exponential backoff
500Temporary server issueRetry after a few seconds. Check status.plivo.com

Response Format

All API responses are in JSON format. Every response includes an api_id to uniquely identify your request.
FieldDescription
api_idUnique identifier for the request.
messageInformation about the request result.
errorError details if the request failed.
{
  "api_id": "97ceeb52-58b6-11e1-86da-77300b68f8bb",
  "message": "call fired",
  "request_uuid": "75b26856-8638-11e0-802c-6d99d509954e"
}