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

# unkey-go

> Reference for the unkey-go SDK. Create, verify, update, and revoke API keys programmatically from your Go applications and microservices.

## SDK Installation

To add the SDK as a dependency to your project:

```bash theme={"theme":"kanagawa-wave"}
go get github.com/unkeyed/sdks/api/go/v2@latest
```

## SDK Example Usage

### Example

```go theme={"theme":"kanagawa-wave"}
package main

import (
	"context"
	unkey "github.com/unkeyed/sdks/api/go/v2"
	"github.com/unkeyed/sdks/api/go/v2/models/components"
	"log"
	"os"
)

func main() {
	ctx := context.Background()

	s := unkey.New(
		unkey.WithSecurity(os.Getenv("UNKEY_ROOT_KEY")),
	)

	res, err := s.Apis.CreateAPI(ctx, components.V2ApisCreateAPIRequestBody{
		Name: "payment-service-production",
	})
	if err != nil {
		log.Fatal(err)
	}
	if res.V2ApisCreateAPIResponseBody != nil {
		// handle response
	}
}

```

## Repository

<Card title="GitHub" icon="github" href="https://github.com/unkeyed/sdks/blob/main/api/go/README.md" cta="README">
  The full autogenerated documentation can be found on GitHub.
</Card>
