> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vobiz.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Go SDK

> Build Go voice apps with the Vobiz SDK - place outbound calls, manage SIP trunks, and craft VobizXML synchronously for 130+ countries including India.

The official Go SDK for the Vobiz Voice API. Make outbound calls, manage SIP trunks, handle phone numbers, and construct programmatic XML workflows synchronously in Go.

**Source code:** [vobiz-ai/vobiz-go-sdk](https://github.com/vobiz-ai/vobiz-go-sdk)

## Installation

Clone the repository and integrate it locally:

```bash theme={null}
git clone https://github.com/vobiz-ai/Vobiz-Go-SDK.git
cd Vobiz-Go-SDK
go mod tidy
```

## Quick start

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

```go theme={null}
package main

import (
    "fmt"

    "github.com/vobiz-ai/vobiz-go-sdk/client"
    "github.com/vobiz-ai/vobiz-go-sdk/services/calls"
)

func main() {
    c := client.New("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN")

    call, err := calls.New(c).Create(&calls.CreateParams{
        To:           "+1xxxxxxxxxx",
        AnswerURL:    "https://yourserver.com/answer",
        AnswerMethod: "POST",
    })
    if err != nil {
        panic(err)
    }

    fmt.Println("Call UUID:", call.RequestUUID)
}
```

## Authentication

The Go client requires your **Auth ID** and **Auth Token**. Find both in the [Vobiz Console](https://console.vobiz.ai).

```go theme={null}
import "github.com/vobiz-ai/vobiz-go-sdk/client"

c := client.New("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN")
```

## VobizXML

The SDK ships with a strongly typed `xml` builder that generates valid VobizXML directly. It provides code completion for all available verbs (`Gather`, `Record`, `Dial`).

```go theme={null}
import "github.com/vobiz-ai/vobiz-go-sdk/xml"

response := xml.NewResponse()
response.AddSpeak("Welcome to Vobiz!", "WOMAN", "en-US")
response.AddRecord(xml.RecordParams{
    Action:    "https://yourserver.com/recording",
    MaxLength: 30,
    PlayBeep:  true,
})

fmt.Println(response.ToXML())
```

## Common operations

### Live audio routing

```go theme={null}
svc := calls.New(c)

svc.Play("call-uuid", &calls.PlayParams{
    URLs: []string{"https://example.com/audio.mp3"},
    Legs: "aleg",
})
```

### Conferences

```go theme={null}
import "github.com/vobiz-ai/vobiz-go-sdk/services/conferences"

svc := conferences.New(c)

// Kick a member
svc.Member.Delete("conference-name", "member-id")

// Start silent recording of the entire bridge
svc.Record("conference-name", &conferences.RecordParams{ FileFormat: "mp3" })
```

## Resources

* [GitHub repository](https://github.com/vobiz-ai/vobiz-go-sdk)
* [Vobiz Console](https://console.vobiz.ai)
* [API documentation](/introduction)
* [VobizXML reference](/xml/response)
