---
title: Go SDK
description: Send Cuitty events from Go services with a context-aware client.
section: SDK
order: 3
updatedAt: 2026-04-27
slug: sdk/go
---
# Go SDK

> **Status: Preview.** The Go SDK is on the Phase 3 roadmap. Use the [wire protocol](/docs/reference/wire-protocol) until then.

## Planned API

```go
c := cuitty.New(cuitty.Config{
    PortalURL: "https://app.cuitty.com",
    ProjectID: id,
    APIKey:    key,
})

c.Audit(ctx, cuitty.AuditEvent{
    Actor:    "alice@example.com",
    Action:   "secret.rotate",
    Resource: "stripe.live_key",
})
```

## Wire-protocol equivalent today

```go
package main

import (
    "bytes"
    "crypto/hmac"
    "crypto/sha256"
    "encoding/hex"
    "net/http"
    "os"
)

func main() {
    body := []byte(`{"events":[{"type":"audit","ts":"2026-04-27T12:00:00Z","data":{"actor":"alice@example.com","action":"secret.rotate","resource":"stripe.live_key"}}]}`)
    mac := hmac.New(sha256.New, []byte(os.Getenv("CUITTY_WEBHOOK_SECRET")))
    mac.Write(body)
    sig := hex.EncodeToString(mac.Sum(nil))

    req, _ := http.NewRequest("POST", "https://app.cuitty.com/api/ingest",
        bytes.NewReader(body))
    req.Header.Set("Authorization", "Bearer "+os.Getenv("CUITTY_API_KEY"))
    req.Header.Set("Content-Type", "application/json")
    req.Header.Set("X-Cuitty-Signature", sig)

    http.DefaultClient.Do(req)
}
```

## Live performance numbers

See live benchmarks at [https://benchmarks.cuitty.com/sdks/go](https://benchmarks.cuitty.com/sdks/go).

## See also

- [Wire protocol](/docs/reference/wire-protocol)
- [SDK parity & divergence](/docs/sdk/parity)