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

# Go SDK usage

> Initialize the Telnyx Go client and make your first API request.

## Usage

The full API of this library can be found in [api.md](https://github.com/team-telnyx/telnyx-go/tree/master/api.md).

```go theme={null}
package main

import (
	"context"
	"fmt"

	"github.com/team-telnyx/telnyx-go"
	"github.com/team-telnyx/telnyx-go/option"
)

func main() {
	client := telnyx.NewClient(
		option.WithAPIKey("My API Key"), // defaults to os.LookupEnv("TELNYX_API_KEY")
	)
	response, err := client.Calls.Dial(context.TODO(), telnyx.CallDialParams{
		ConnectionID: "conn12345",
		From:         "+15557654321",
		To: telnyx.CallDialParamsToUnion{
			OfString: telnyx.String("+15551234567"),
		},
		WebhookURL: telnyx.String("https://your-webhook.url/events"),
	})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", response.Data)
}

```
