Skip to main content
Call a Plivo REST endpoint using the profile saved by browser login. Environment credentials are not read. Start with a read of your account’s numbers:

plivo api

Paths such as /Number/ are relative to /v1/Account/<auth_id>/. Full paths beginning with /v1/Account/ are used as given. Keep the trailing slash. GET and HEAD do not need --yes. Writes with POST, PUT, PATCH or DELETE require it; --dry-run previews the request. For example, create msg.json with your sender and recipient:
msg.json
--body @- reads JSON from standard input. With --method, omit the positional method:
Here --query adds a URL parameter, not a JSON filter. Repeat it for multiple parameters.
  • Errors. An HTTP error gets the same code and exit code as on any other command: a 404 is RESOURCE_NOT_FOUND (exit 1), a 401 exits 2 and a 429 exits 4. The HTTP status stays in status_code, and the API’s own body in context.upstream. See Exit codes.
  • Redirects. A redirect is not followed. A 3xx exits 3 and names where it pointed, which is usually a missing trailing slash on the path.
  • Secrets. Auth tokens and passwords in the response read [REDACTED] unless you add --show-secrets.
  • Paths. A path with a control character in it is refused before any request.
Usage
Flags