Plivo

Usage Instructions

Integrate Plivo voice and messaging into the workflow. Call a lead and hand the call to your own Plivo XML app or an AI voice agent such as Bolna or Vapi, hang up live calls, send SMS, MMS, and WhatsApp template messages, check call and message records, search for and buy phone numbers, and look up a number’s carrier and line type. Can also run workflows when a call ends, a message status changes, or a Plivo number receives a message. Requires a Plivo Auth ID and Auth Token.

Actions

Plivo Make Call

Place an outbound phone call from a Plivo number. When the call is answered, Plivo fetches the answer URL, which must return Plivo XML telling it what to do. The answer URL can point to your own Plivo XML app, or to an AI voice platform such as Bolna or Vapi that returns the XML that connects the call to its voice agent. Returns a request UUID; the call UUID arrives in the hangup callback.

Input

ParameterTypeRequiredDescription
authIdstringYesPlivo Auth ID (the Basic auth username), from the Plivo console overview page
authTokenstringYesPlivo Auth Token (the Basic auth password), from the Plivo console overview page
fromstringYesCaller ID: a Plivo number on your account, in E.164 format (e.g. 14157654321)
tostringYesNumber or SIP URI to call, in E.164 format. Separate several destinations with "<" (max 1000).
answerUrlstringYesURL Plivo requests when the call is answered. It must return valid Plivo XML, either from your own Plivo XML app or from an AI voice platform such as Bolna or Vapi.
answerMethodstringNoHTTP method for the answer URL: GET or POST (default POST)
ringUrlstringNoURL Plivo notifies when the call starts ringing
ringMethodstringNoHTTP method for the ring URL: GET or POST (default POST)
hangupUrlstringNoURL Plivo notifies when the call ends, such as a Plivo Call Status trigger URL
hangupMethodstringNoHTTP method for the hangup URL: GET or POST (default POST)
fallbackUrlstringNoURL Plivo uses if the answer URL fails after 3 retries or a 60s timeout
fallbackMethodstringNoHTTP method for the fallback URL: GET or POST (default POST)
callerNamestringNoCaller name to display, up to 50 characters
sendDigitsstringNoDTMF digits to send once connected. Use w for a 0.5s wait and W for 1s.
timeLimitnumberNoMaximum call length in seconds (default 14400)
hangupOnRingnumberNoSeconds after ringing starts to hang up
ringTimeoutnumberNoSeconds to ring the destination before giving up
machineDetectionstringNoAnswering machine detection: "true" to detect and report, or "hangup" to hang up on a machine
machineDetectionTimenumberNoMilliseconds to spend detecting a machine (2000 to 10000, default 5000)
machineDetectionUrlstringNoURL notified with the asynchronous machine detection result
machineDetectionMethodstringNoHTTP method for the machine detection URL: GET or POST (default POST)
sipHeadersstringNoCustom SIP headers as comma-separated key=value pairs, e.g. leadId=42. Sent with an X-PH- prefix.

Output

ParameterTypeDescription
messagestringPlivo status text, "call fired" on success
requestUuidstringRequest identifier. The hangup callback carries it as RequestUUID next to the CallUUID.
apiIdstringPlivo API request ID

Plivo Get Call

Get the call detail record of a completed Plivo call: numbers, times, duration, cost, and why it ended.

Input

ParameterTypeRequiredDescription
authIdstringYesPlivo Auth ID (the Basic auth username), from the Plivo console overview page
authTokenstringYesPlivo Auth Token (the Basic auth password), from the Plivo console overview page
callUuidstringYesUUID of the call (CallUUID from a callback, or call_uuid from List Calls)

Output

ParameterTypeDescription
callUuidstringUnique call identifier (call_uuid)
fromNumberstringCaller ID used for the call
toNumberstringNumber or SIP URI that was called
callDirectionstringinbound or outbound
answerTimestringWhen the call was answered
endTimestringWhen the call ended
initiationTimestringWhen the call was started
callDurationnumberCall duration in seconds
billDurationnumberActual call duration in seconds
billedDurationnumberDuration rounded to the billing increment, in seconds
totalAmountstringAmount charged for the call
totalRatestringPer-minute rate
parentCallUuidstringUUID of the A-leg
hangupCauseNamestringWhy the call ended, e.g. "Normal Hangup" or "Busy Line". Use it for the outcome.
hangupCauseCodenumberNumeric hangup cause
hangupSourcestringWho hung up: Caller, Callee, Plivo, API Request, Answer XML, Error, or Unknown
stirVerificationstringSTIR/SHAKEN status: Verified, Not Verified, or Not Applicable
resourceUristringAPI path of the call record

Plivo List Calls

List completed Plivo calls with optional filters. Without an end time filter Plivo searches the last 7 days; the range can be at most 30 days within the last 90 days.

Input

ParameterTypeRequiredDescription
authIdstringYesPlivo Auth ID (the Basic auth username), from the Plivo console overview page
authTokenstringYesPlivo Auth Token (the Basic auth password), from the Plivo console overview page
fromNumberstringNoOnly calls made from this number
toNumberstringNoOnly calls made to this number
callDirectionstringNoinbound or outbound
billDurationGtenumberNoOnly calls with a billed duration of at least this many seconds
billDurationLtenumberNoOnly calls with a billed duration of at most this many seconds
endTimeGtestringNoOnly calls that ended at or after this time (YYYY-MM-DD HH:MM[:ss])
endTimeLtestringNoOnly calls that ended at or before this time (YYYY-MM-DD HH:MM[:ss])
hangupCauseCodenumberNoOnly calls with this hangup cause code
hangupSourcestringNoOnly calls hung up by this source, e.g. customer or carrier
stirVerificationstringNoSTIR/SHAKEN status: Verified, Not Verified, or Not Applicable
limitnumberNoResults per page, 1 to 20 (default 20)
offsetnumberNoNumber of results to skip, for paging

Output

ParameterTypeDescription
metajsonPagination: limit, offset, totalCount, next, and previous
↳ limitnumberResults per page
↳ offsetnumberResults skipped
↳ totalCountnumberTotal matching records
↳ nextstringAPI path of the next page
↳ previousstringAPI path of the previous page
callsarrayCall detail records
↳ callUuidstringUnique call identifier (call_uuid)
↳ fromNumberstringCaller ID used for the call
↳ toNumberstringNumber or SIP URI that was called
↳ callDirectionstringinbound or outbound
↳ answerTimestringWhen the call was answered
↳ endTimestringWhen the call ended
↳ initiationTimestringWhen the call was started
↳ callDurationnumberCall duration in seconds
↳ billDurationnumberActual call duration in seconds
↳ billedDurationnumberDuration rounded to the billing increment, in seconds
↳ totalAmountstringAmount charged for the call
↳ totalRatestringPer-minute rate
↳ parentCallUuidstringUUID of the A-leg
↳ hangupCauseNamestringWhy the call ended, e.g. "Normal Hangup" or "Busy Line". Use it for the outcome.
↳ hangupCauseCodenumberNumeric hangup cause
↳ hangupSourcestringWho hung up: Caller, Callee, Plivo, API Request, Answer XML, Error, or Unknown
↳ stirVerificationstringSTIR/SHAKEN status: Verified, Not Verified, or Not Applicable
↳ resourceUristringAPI path of the call record

Plivo Hang Up Call

Hang up one ongoing Plivo call by its call UUID.

Input

ParameterTypeRequiredDescription
authIdstringYesPlivo Auth ID (the Basic auth username), from the Plivo console overview page
authTokenstringYesPlivo Auth Token (the Basic auth password), from the Plivo console overview page
callUuidstringYesUUID of the ongoing call to hang up

Output

ParameterTypeDescription
callUuidstringUUID of the call that was hung up
hungUpbooleanTrue when Plivo accepted the hangup (HTTP 204)

Plivo Send Message

Send an SMS or MMS (or a free-form WhatsApp message in an open conversation) through Plivo. Returns one message UUID per recipient; delivery is reported later to the status URL.

Input

ParameterTypeRequiredDescription
authIdstringYesPlivo Auth ID (the Basic auth username), from the Plivo console overview page
authTokenstringYesPlivo Auth Token (the Basic auth password), from the Plivo console overview page
srcstringNoSender: a Plivo number, short code, or alphanumeric sender ID. Required unless a Powerpack UUID is set.
dststringYesRecipient in E.164 format, e.g. 14156667777. Separate several recipients with "<".
textstringNoMessage text. SMS allows up to 1600 GSM or 737 Unicode characters; WhatsApp up to 4096.
typestringNosms (default), mms, or whatsapp
mediaUrlsstringNoComma-separated media URLs: up to 10 for MMS (under 5 MB total), or one for WhatsApp
urlstringNoURL Plivo sends delivery status updates to, such as a Plivo Message Status trigger URL
methodstringNoHTTP method for the status URL: GET or POST (default POST)
messageExpirynumberNoSeconds the message may wait in the queue before it expires (5 to 10799)
logstringNoWhat Plivo logs: "true" (default), "false", "content_only", or "number_only" (for GDPR redaction)
trackablebooleanNoMark the message as trackable, e.g. a 2FA code, for conversion feedback
powerpackUuidstringNoPowerpack UUID to send from a number pool instead of a single sender

Output

ParameterTypeDescription
messagestringPlivo status text, e.g. "message(s) queued"
messageUuidsarrayOne message UUID per recipient. Use it with Get Message.
apiIdstringPlivo API request ID

Plivo Send WhatsApp Template

Send a Meta-approved WhatsApp template message through Plivo, the only way a business can start a WhatsApp conversation. The sender must be a WhatsApp Business number connected in Plivo.

Input

ParameterTypeRequiredDescription
authIdstringYesPlivo Auth ID (the Basic auth username), from the Plivo console overview page
authTokenstringYesPlivo Auth Token (the Basic auth password), from the Plivo console overview page
srcstringYesYour WhatsApp Business number registered with Plivo, in E.164 format
dststringYesRecipient WhatsApp number in E.164 format
templateNamestringYesName of the approved template, e.g. order_update
languagestringYesTemplate language code, e.g. en_US or hi
componentsjsonNoJSON array of template components with their dynamic values, e.g. [{"type":"body","parameters":[{"type":"text","text":"Asha"}]}]. Header parameters can be text or media; buttons take sub_type, index, and a payload or text parameter.
urlstringNoURL Plivo sends delivery status updates to, such as a Plivo Message Status trigger URL
methodstringNoHTTP method for the status URL: GET or POST (default POST)
messageExpirynumberNoSeconds the message may wait in the queue before it expires (5 to 10799)
logstringNoWhat Plivo logs: "true" (default), "false", "content_only", or "number_only" (for GDPR redaction)
trackablebooleanNoMark the message as trackable, e.g. a 2FA code, for conversion feedback
powerpackUuidstringNoPowerpack UUID to send from a number pool instead of a single sender

Output

ParameterTypeDescription
messagestringPlivo status text, e.g. "message(s) queued"
messageUuidsarrayOne message UUID per recipient. Use it with Get Message.
apiIdstringPlivo API request ID

Plivo Get Message

Get the delivery state, cost, and error code of one Plivo SMS, MMS, or WhatsApp message.

Input

ParameterTypeRequiredDescription
authIdstringYesPlivo Auth ID (the Basic auth username), from the Plivo console overview page
authTokenstringYesPlivo Auth Token (the Basic auth password), from the Plivo console overview page
messageUuidstringYesUUID of the message, as returned by Send Message

Output

ParameterTypeDescription
messageUuidstringUnique message identifier (message_uuid)
messageTimestringWhen the message was sent or received
messageDirectionstringinbound or outbound
messageStatestringOutbound: queued, sent, failed, delivered, undelivered, or read (WhatsApp). Inbound: received, delivered, or undelivered.
messageTypestringsms, mms, or whatsapp
fromNumberstringSender
toNumberstringRecipient
unitsnumberNumber of units the message used
totalRatestringCharge per unit
totalAmountstringTotal charge
errorCodestringPlivo error code; "000" means delivered
conversationIdstringWhatsApp conversation ID
conversationOriginstringWhatsApp conversation category: utility, authentication, marketing, or service

Plivo List Messages

List Plivo SMS, MMS, and WhatsApp message records with optional filters for direction, state, type, and time.

Input

ParameterTypeRequiredDescription
authIdstringYesPlivo Auth ID (the Basic auth username), from the Plivo console overview page
authTokenstringYesPlivo Auth Token (the Basic auth password), from the Plivo console overview page
messageDirectionstringNoinbound or outbound
messageStatestringNoqueued, sent, delivered, undelivered, failed, or received
messageTypestringNosms, mms, or whatsapp
messageTimeGtstringNoOnly messages after this time (yyyy-MM-dd HH:mm:ss)
messageTimeLtstringNoOnly messages before this time (yyyy-MM-dd HH:mm:ss)
errorCodenumberNoOnly messages with this Plivo error code
subaccountstringNoOnly messages of this subaccount Auth ID
powerpackIdstringNoOnly messages sent through this Powerpack
limitnumberNoResults per page, 1 to 20 (default 20)
offsetnumberNoNumber of results to skip, for paging

Output

ParameterTypeDescription
metajsonPagination: limit, offset, totalCount, next, and previous
↳ limitnumberResults per page
↳ offsetnumberResults skipped
↳ totalCountnumberTotal matching records
↳ nextstringAPI path of the next page
↳ previousstringAPI path of the previous page
messagesarrayMessage detail records
↳ messageUuidstringUnique message identifier (message_uuid)
↳ messageTimestringWhen the message was sent or received
↳ messageDirectionstringinbound or outbound
↳ messageStatestringOutbound: queued, sent, failed, delivered, undelivered, or read (WhatsApp). Inbound: received, delivered, or undelivered.
↳ messageTypestringsms, mms, or whatsapp
↳ fromNumberstringSender
↳ toNumberstringRecipient
↳ unitsnumberNumber of units the message used
↳ totalRatestringCharge per unit
↳ totalAmountstringTotal charge
↳ errorCodestringPlivo error code; "000" means delivered
↳ conversationIdstringWhatsApp conversation ID
↳ conversationOriginstringWhatsApp conversation category: utility, authentication, marketing, or service

Plivo List Numbers

List the phone numbers rented on your Plivo account, with their type, capabilities, monthly rate, and renewal date.

Input

ParameterTypeRequiredDescription
authIdstringYesPlivo Auth ID (the Basic auth username), from the Plivo console overview page
authTokenstringYesPlivo Auth Token (the Basic auth password), from the Plivo console overview page
typestringNolocal, mobile, fixed, national, or tollfree
numberStartswithstringNoOnly numbers starting with this prefix, e.g. 91 or 1415
servicesstringNoOnly numbers with these services: voice, sms, mms, or a combination like voice,sms
aliasstringNoOnly the number with this exact alias
subaccountstringNoOnly numbers of this subaccount Auth ID
limitnumberNoResults per page, 1 to 20 (default 20)
offsetnumberNoNumber of results to skip, for paging

Output

ParameterTypeDescription
metajsonPagination: limit, offset, totalCount, next, and previous
↳ limitnumberResults per page
↳ offsetnumberResults skipped
↳ totalCountnumberTotal matching records
↳ nextstringAPI path of the next page
↳ previousstringAPI path of the previous page
numbersarrayRented phone numbers
↳ numberstringThe phone number
↳ aliasstringAlias
↳ addedOnstringDate rented (YYYY-MM-DD)
↳ applicationstringLinked application path
↳ carrierstringPlivo or the incoming carrier
↳ regionstringCity and country
↳ numberTypestringlocal, fixed, tollfree, mobile, or national
↳ monthlyRentalRatestringMonthly fee in USD
↳ renewalDatestringNext billing date
↳ smsEnabledbooleanCan receive SMS
↳ mmsEnabledbooleanCan receive MMS
↳ voiceEnabledbooleanCan receive calls
↳ resourceUristringAPI path of the number

Plivo Search Numbers

Search Plivo's inventory for phone numbers available to buy in a country, with their setup fee, monthly rental, capabilities, and any verification needed.

Input

ParameterTypeRequiredDescription
authIdstringYesPlivo Auth ID (the Basic auth username), from the Plivo console overview page
authTokenstringYesPlivo Auth Token (the Basic auth password), from the Plivo console overview page
countryIsostringYesTwo-letter ISO country code, e.g. US or IN
typestringNotollfree, local, mobile, national, or fixed
patternstringNoDigits the number should contain after the country code, e.g. 415
servicesstringNoRequired capabilities: voice, sms, mms, voice,sms, or voice,sms,mms
citystringNoCity name, for local numbers only
regionstringNoRegion name, e.g. Frankfurt, for fixed numbers only
npanxxnumberNoSix-digit NPA-NXX prefix (US and Canada only)
localCallingAreabooleanNoExpand an NPA-NXX search to its local calling area
latanumberNoLATA code (US and Canada only)
rateCenterstringNoRate center (US and Canada only)
limitnumberNoResults per page, 1 to 20 (default 20)
offsetnumberNoNumber of results to skip, for paging

Output

ParameterTypeDescription
metajsonPagination: limit, offset, totalCount, next, and previous
↳ limitnumberResults per page
↳ offsetnumberResults skipped
↳ totalCountnumberTotal matching records
↳ nextstringAPI path of the next page
↳ previousstringAPI path of the previous page
numbersarrayNumbers available to buy
↳ numberstringNumber available to buy
↳ prefixstringArea code
↳ citystringCity (null for national numbers)
↳ countrystringCountry
↳ regionstringCity and country
↳ typestringfixed, mobile, or tollfree
↳ subTypestringfixed, mobile, tollfree, national, or local
↳ setupRatestringOne-time setup fee in USD
↳ monthlyRentalRatestringMonthly rental in USD
↳ smsEnabledbooleanCan receive SMS
↳ mmsEnabledbooleanCan receive MMS
↳ voiceEnabledbooleanCan receive calls
↳ restrictionstringVerification needed: city-address, country-address, or terms-and-conditions
↳ restrictionTextstringWhat verification is needed
↳ resourceUristringAPI path of the number

Plivo Buy Number

Buy (rent) a phone number found with Search Numbers and add it to your Plivo account. This charges any setup fee now and a recurring monthly rental fee until the number is released. Numbers that need verification, such as Indian numbers, stay pending until a compliance application is accepted. Must be called with main-account credentials.

Input

ParameterTypeRequiredDescription
authIdstringYesPlivo Auth ID (the Basic auth username), from the Plivo console overview page
authTokenstringYesPlivo Auth Token (the Basic auth password), from the Plivo console overview page
numberstringYesThe number to buy, exactly as returned by Search Numbers, e.g. 14155559186
appIdstringNoPlivo application to attach for incoming calls and messages
cnamLookupstringNoCaller name lookup on inbound calls: enabled or disabled (US numbers only)
complianceApplicationIdstringNoAccepted compliance application to attach, needed for numbers such as Indian numbers. If empty, Plivo picks the latest matching accepted application.
subaccountstringNoSubaccount Auth ID to assign the number to

Output

ParameterTypeDescription
messagestringPlivo status text, "created" on success
statusstringOrder status, e.g. fulfilled, or pending while verification is reviewed
numbersarrayEach number in the order with its status
↳ numberstringPhone number
↳ statusstringPurchase status, e.g. Success
apiIdstringPlivo API request ID

Plivo Number Lookup

Look up a phone number with the Plivo Lookup API: validity and formats, country, carrier name, line type (mobile, fixed, voip, toll-free), and whether it was ported (US and Canada). Plivo bills each lookup.

Input

ParameterTypeRequiredDescription
authIdstringYesPlivo Auth ID (the Basic auth username), from the Plivo console overview page
authTokenstringYesPlivo Auth Token (the Basic auth password), from the Plivo console overview page
phoneNumberstringYesPhone number in E.164 format, e.g. +14155551234

Output

ParameterTypeDescription
phoneNumberstringThe number in E.164 format
countryjsonCountry of the number
↳ namestringCountry name
↳ iso2stringTwo-letter ISO code
↳ iso3stringThree-letter ISO code
formatjsonThe number in each standard format
↳ e164stringE.164 format
↳ nationalstringNational format
↳ internationalstringInternational format
↳ rfc3966stringRFC 3966 tel: URI
carrierjsonCarrier details
↳ mobileCountryCodestringMCC (empty for fixed numbers)
↳ mobileNetworkCodestringMNC (empty for fixed numbers)
↳ namestringCarrier name
↳ typestringfixed, mobile, voip, toll-free, or unknown
↳ portedstringyes, no, or unknown (US and Canada only)
apiIdstringPlivo API request ID

Triggers

A Trigger is a block that starts a workflow when an event happens in this service.

Plivo Call Status

Trigger workflow when a Plivo call ends, from the hangup URL callback

Configuration

ParameterTypeRequiredDescription
signingAuthTokenstringYesThe Auth Token of the Plivo account or subaccount that owns the number or call. Used only to verify that each request was signed by Plivo.

Output

ParameterTypeDescription
callUuidstringUnique call identifier (CallUUID)
requestUuidstringRequest UUID returned when the call was placed (RequestUUID)
fromstringCaller ID of the call
tostringNumber that was called
directionstringinbound or outbound
eventstringCallback event, e.g. Hangup (or Ring on a ring URL)
callStatusstringcompleted, busy, failed, timeout, no-answer, ringing, or in-progress
hangupCausestringWhy the call ended, e.g. NORMAL_CLEARING
startTimestringWhen the call was started
answerTimestringWhen the call was answered
endTimestringWhen the call ended
durationnumberCall duration in seconds
billDurationnumberBilled duration in seconds
totalCoststringTotal cost of the call
aLegUuidstringUUID of the first call leg (ALegUUID)
carrierFailoverTriggeredbooleanTrue only when Plivo attempted an automatic carrier failover
rawjsonEvery field Plivo sent

Plivo Inbound Message

Trigger workflow when a Plivo number receives an SMS, MMS, or WhatsApp message

Configuration

ParameterTypeRequiredDescription
signingAuthTokenstringYesThe Auth Token of the Plivo account or subaccount that owns the number or call. Used only to verify that each request was signed by Plivo.

Output

ParameterTypeDescription
messageUuidstringUnique message identifier (MessageUUID)
fromstringSender's phone number
tostringYour Plivo number that received the message
textstringMessage text
typestringsms, mms, or whatsapp
mediaUrlsarrayMedia URLs of an MMS, from Media0 to MediaN
rawjsonEvery field Plivo sent

Plivo Message Status

Trigger workflow when Plivo reports a delivery status for an SMS, MMS, or WhatsApp message

Configuration

ParameterTypeRequiredDescription
signingAuthTokenstringYesThe Auth Token of the Plivo account or subaccount that owns the number or call. Used only to verify that each request was signed by Plivo.

Output

ParameterTypeDescription
messageUuidstringUnique message identifier (MessageUUID)
statusstringqueued, sent, delivered, undelivered, failed, or read (WhatsApp)
fromstringSender ID of the message
tostringRecipient number
errorCodestringPlivo error code when delivery failed
unitsnumberNumber of message units
totalRatestringCharge per unit
totalAmountstringTotal charge
mccstringMobile Country Code of the recipient
mncstringMobile Network Code of the recipient
rawjsonEvery field Plivo sent