Boundry with Encore.go
Create the client in backend code and call it from an Encore API endpoint or subscription.
Install
This guide uses the official github.com/flindev/boundry-go package. Its generated source is public on GitHub.
Shell
go get github.com/flindev/boundry-goAdd the server-side helper
Store BOUNDRY_API_KEY in the framework’s secret or server environment. Never include a project key in browser code.
go
client := boundry.NewClient(os.Getenv("BOUNDRY_API_KEY"))
email, err := client.Emails.Send(ctx, &boundry.SendEmailParams{
From: "Acme <hello@acme.com>",
To: []string{recipient},
Subject: "Welcome to Acme",
HTML: "<p>It works.</p>",
})Production checklist
- Send only from a domain verified in this regional project.
- Move user-facing sends to the framework’s job system when available.
- Reuse an idempotency key if you retry after an uncertain response.