send_sms | Sends an SMS to a single recipient. Parameters: to (str, E.164 format), from_ (str, a Plivo number, short code, or alphanumeric sender ID), body (str). Returns the message UUID if successful or an error message if failed. |
make_call | Places an outbound call. Parameters: to (str, E.164 format), from_ (str, a Plivo voice-enabled number), answer_url (str, must return Plivo XML), answer_method (str, GET or POST, default POST). Returns the call request UUID if successful or an error message if failed. |
get_call_details | Retrieves details of a call using its UUID. Parameters: call_uuid (str). Returns a dictionary with the call’s to, from, state, duration, direction, initiation_time, answer_time, and total_amount. |
list_messages | Lists recent messages. Parameters: limit (int, default 20, capped at the Plivo per-request maximum of 20), offset (int, default 0, for paging past the cap), message_direction (str, optional, inbound or outbound). Returns a list of message details. |
list_calls | Lists recent calls. Parameters: limit (int, default 20, capped at the Plivo per-request maximum of 20), offset (int, default 0, for paging past the cap), call_direction (str, optional, inbound or outbound). Returns a list of call details. |
lookup_number | Looks up carrier and line-type information for a phone number. Parameters: number (str, E.164 format). Returns a dictionary with the number’s number, country, format, and carrier. |