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

# Go SDK

> Official Go SDK for CutMeShort API

## Installation

```bash theme={null}
go get github.com/cutmeshort/go-sdk
```

## Getting Started

```go theme={null}
package main

import (
	"fmt"
	cms "github.com/cutmeshort/go-sdk"
)

func main() {
	client := cms.NewClient(&cms.Config{
		APIKey:      "your-api-key",
		WorkspaceID: "your-workspace-id",
	})

	// Create a short link
	link, err := client.Links.Create(&cms.CreateLinkRequest{
		OriginalURL:   "https://example.com",
		CustomKeyword: "my-link",
		Title:         "My Short Link",
	})
	if err != nil {
		panic(err)
	}

	// Get link details
	details, err := client.Links.Get(link.ID)
	if err != nil {
		panic(err)
	}
	fmt.Println(details)

	// Track conversion
	err = client.Conversions.Track(&cms.TrackConversionRequest{
		LinkID:    link.ID,
		EventType: "sale",
		Value:     99.99,
		Currency:  "USD",
	})
	if err != nil {
		panic(err)
	}
}
```

## Available Methods

### Links

* `Links.Create(request)` - Create a new short link
* `Links.Get(id)` - Get link details
* `Links.List()` - List all links
* `Links.Update(id, request)` - Update a link
* `Links.Delete(id)` - Delete a link

### Custom Domains

* `Domains.Create(request)` - Create a custom domain
* `Domains.Get(id)` - Get domain details
* `Domains.List()` - List all domains
* `Domains.Update(id, request)` - Update a domain
* `Domains.Delete(id)` - Delete a domain

### Tags

* `Tags.Create(name)` - Create a tag
* `Tags.Get(id)` - Get tag details
* `Tags.List()` - List all tags

### Conversions

* `Conversions.Track(request)` - Track a conversion event
* `Conversions.GetAttributionData(linkID)` - Get attribution data for a link

## Documentation

For complete documentation, visit [Go SDK Docs](https://github.com/cutmeshort/go-sdk)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.