HEY software dev kit
// readme
HEY SDK
The Go SDK for the HEY API. It is the library behind
hey-cli, and it is generated from a Smithy model of
the API in spec/, so what the SDK offers is what HEY actually serves.
Today the repository ships a single Go module, github.com/basecamp/hey-sdk/go.
TypeScript, Ruby, Swift and Kotlin SDKs will be added in future updates, generated from the
same Smithy model; the Makefile already reserves targets for them (ts-, rb-, swift-,
kt-), which fail until those SDKs exist.
Install
go get github.com/basecamp/hey-sdk/go@latest
Requires Go 1.26 or newer.
Authenticate
Static token (scripts, agents, anything that already holds a token):
import hey "github.com/basecamp/hey-sdk/go/pkg/hey"
cfg := hey.DefaultConfig() // https://app.hey.com
client := hey.NewClient(cfg, &hey.StaticTokenProvider{Token: os.Getenv("HEY_TOKEN")})
OAuth 2.0 with PKCE (user-facing apps): hey.NewAuthManager handles the token lifecycle
and refresh, and the oauth subpackage provides discovery, PKCE and the code exchange.
Anything else can plug in with hey.WithAuthStrategy, which sets headers on…