Skip to main content
The official C# SDK for the Vobiz Voice API. Make outbound calls, manage SIP trunks, handle phone numbers, and drive live call flows natively within .NET Core / .NET 8 applications. Source code: vobiz-ai/Vobiz-Csharp-sdk

Installation

The SDK is distributed from its GitHub repo (not NuGet) and requires the .NET 8 SDK or later. Clone it next to your project and add a project reference:
Clone the SDK beside your project folder, not inside it. A .NET project compiles every .cs file under its folder, so a nested clone compiles the SDK’s sources twice and the build fails.

Quick start

Place an outbound call with MakeCallAsync. When the recipient answers, Vobiz fetches your AnswerUrl, which must return a VobizXML document.

Authentication

The .NET SDK uses your Auth Token and Auth ID. Find both in the Vobiz Console. The SDK sets the X-Auth-Token and X-Auth-ID headers on every request. Pass the Auth Token first, then the Auth ID, to the VobizApiClient constructor. Load credentials from environment variables rather than hardcoding them:
All network-bound methods are asynchronous and return a Task or Task<T>; use them with async/await.

VobizXML

When Vobiz calls your AnswerUrl, your controller must respond with a VobizXML document that defines the call flow. The SDK ships a typed builder in the Vobiz.Xml namespace - each Add* returns the created child for nesting, and Attrs keeps attribute order:
Prefer the builder, but returning a raw VobizXML string also works. See the VobizXML reference for all verbs and attributes.

Common operations

Convert text to speech on a live call

Create a SIP trunk

List call recordings

Send DTMF tones

Error handling

The SDK throws VobizApiApiException for any non-2xx response, with a typed subclass per status code (for example NotFoundError). Other failures throw VobizApiException. Wrap calls in a try/catch:

Messaging (SMS, MMS and RCS)

The C# 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.PreviewMessageCostAsync and client.Sms.Numbers.ListNumbersAsync. See Messaging in the SDKs for the full method list and error handling; each Messaging API reference page shows a complete C# example.

Resources