Skip to main content
The official Python SDK for the Vobiz Voice API. Make outbound calls, manage SIP trunks, handle phone numbers, and build dynamic call flows using VobizXML - all seamlessly integrated into your Python applications. Source code and reference: vobiz-ai/Vobiz-Python-SDK

Installation

The SDK is distributed from its GitHub repo (not a package registry). Clone it and install from source:
Or install it in one step straight from GitHub:
The SDK supports Python 3.8 and later.

Quick start

Make an outbound call:
When the destination party answers, Vobiz makes a synchronous HTTP request to your answer_url to ask for instructions on what to do next.

Authentication

Vobiz uses your Auth ID and Auth Token. Find both in the Vobiz Console. The Vobiz client takes them directly - api_key maps to your Auth ID and auth_token to your Auth Token:
We recommend keeping credentials out of source by reading them from environment variables:

Receiving calls (Flask server)

When an outbound call connects (or an inbound call arrives), Vobiz requests your answer_url to interpret the VobizXML instructions. Use the bundled vobizxml builder to construct the response - it handles escaping and schema validation for you:

VobizXML

The Python SDK bundles a vobizxml module to construct robust IVR systems without manually formatting XML. Build a ResponseElement, add nested verbs, and serialize with to_string():
Gather uses input_type and execution_timeout (not timeout). The timeout attribute belongs to Dial/Number elements only.
In a webhook handler you return the serialized string with an XML mimetype:

Common operations

Live calls

In-call actions

Phone numbers and account balance

Call detail records (CDR)

Exact required parameters per method are listed in the SDK reference.md and at vobiz.ai/docs. Most write methods accept the same fields as the REST API reference.

Messaging (SMS, MMS and RCS)

The Python SDK includes the full Vobiz Messaging API under client.sms. Send a message with the client you created above:
Every Messaging operation has a matching method, for example client.sms.messages.preview_message_cost and client.sms.numbers.list_numbers. See Messaging in the SDKs for the full method list and error handling; each Messaging API reference page shows a complete Python example.

Resources