Skip to main content
The official Go SDK for the Vobiz Voice API. Make outbound calls, manage SIP trunks, handle phone numbers, and drive live call flows from idiomatic, type-safe Go. Source code: vobiz-ai/Vobiz-Go-SDK

Installation

Requires Go 1.21 or later. Add the SDK with go get:

Quick start

Place an outbound call. When the call connects, Vobiz pings your AnswerURL endpoint, and you must respond with a VobizXML payload.

Authentication

The Go client requires your Auth ID and Auth Token. Find both in the Vobiz Console. Use option.WithAPIKey for your Auth ID (mapped to the X-Auth-ID header) and option.WithAuthToken for your Auth Token (mapped to X-Auth-Token):

VobizXML

When Vobiz calls your AnswerURL, your handler must respond with a VobizXML document that defines the call flow. The SDK ships a typed builder in the github.com/vobiz-ai/Vobiz-Go-SDK/vobizxml subpackage - each Add* returns the created child for nesting, and vobizxml.Attr(key, value) sets attributes in order:
Prefer the builder, but you can also return a raw VobizXML string if you like. See the VobizXML reference for all verbs and attributes.

Common operations

Retrieve account balance

List Call Detail Records (CDRs)

Create a SIP trunk

Error handling

The SDK returns a standard Go error for any non-2xx response. Always check err before using the response:

Resources