Go SDK

Send HIPAA compliant email with Go

Add secure, transactional email to any Go app with the Paubox-go module. BAA included, TLS 1.2+ by default.

Go SDK

Integrate with any Go app

Drop the paubox-go module into your existing Go stack and start sending in minutes.

net/httpGin
Read the quickstart
main.go
package main

import (
    "context"
    "fmt"
    "log"
    "os"

    paubox "github.com/paubox/paubox-go"
)

func main() {
    client, err := paubox.New(
        os.Getenv("PAUBOX_API_KEY"),
        os.Getenv("PAUBOX_USERNAME"),
    )
    if err != nil { log.Fatal(err) }

    resp, err := client.SendMessage(context.Background(), &paubox.SendMessageRequest{
        Message: paubox.Message{
            Recipients: []string{"recipient@example.com"},
            Headers: paubox.MessageHeaders{
                From:    "sender@yourdomain.com",
                Subject: "Your first Paubox email",
            },
            Content: paubox.MessageContent{
                PlainText: paubox.Ptr("This message was sent with the Paubox Go SDK."),
            },
        },
    })
    if err != nil { log.Fatal(err) }

    fmt.Println("Sent. Tracking ID:", resp.SourceTrackingID)
}
Get started

All you need to get started

Resources to help you integrate HIPAA compliant email into your application quickly.

Quickstart

Follow the step-by-step guide to send your first secure email.

Read guide

Example repository

Clone the open-source example to get running with the SDK in minutes.

See code

API reference

Understand every REST endpoint and parameter available to your application.

Check docs
Loved by developers

Healthcare teams ship faster on Paubox

"Using Paubox Email API for our system notifications saves our customers time, saves them trouble, and gives them more information."

Morgan Smith Coral
Morgan SmithCoral

"The ease of implementation was really, really helpful. And is still helpful today because we were able to prototype and release new features easily."

Tyler Laracuente
Tyler LaracuenteRollover Rep
FAQ

Frequently asked questions

Everything you need to know about sending HIPAA compliant email with Go.

Does Paubox have a Go SDK?

Yes. The Paubox Go SDK is the official client library for the Paubox Email API. It sends HIPAA compliant transactional email and works in any Go application.

How do I install the Paubox Go SDK?

Run go get github.com/paubox/paubox-go, then set your Paubox API credentials as environment variables. See the Go quickstart for the full setup.

Which Go versions are supported?

Go 1.22 or later.

How do I send HIPAA compliant email in Go?

Install the SDK, configure your Paubox API credentials, build a message with your recipients, subject, and content, then call the send method. Most teams send their first message in minutes. See the Go quickstart for a complete example.

Does it work with popular Go frameworks?

Yes. The SDK is a standard Go package, so it drops into any Go service, HTTP handler, or background worker. You call it the same way from anywhere in your Go code.

Is the Paubox Go SDK HIPAA compliant?

Yes. Every plan includes a signed business associate agreement (BAA) and enforces transport layer security (TLS) 1.2 or higher by default, so messages are compliant out of the box.

Is a BAA included?

Yes. A business associate agreement (BAA) comes with every plan, including the free tier, so you can send protected health information (PHI) from your Go app without signing a separate agreement.

Can I send bulk and templated email from Go?

Yes. The SDK supports single sends, bulk sends, and reusable dynamic templates. Store a personalized template once and render it at send time with per-recipient values.

How is this different from sending with Go’s net/smtp package?

Go’s net/smtp package sends email but does not make you HIPAA compliant on its own. With Paubox you get a BAA and HIPAA compliant infrastructure, and you can either use the Go SDK or keep Go’s net/smtp package and point it at the Paubox SMTP relay.

What does it cost, and is there a free tier?

You can send 300 emails per month for free, BAA included. Paid plans scale from there to millions of messages. See the pricing page for current tiers.

Send 300 emails per month, free

Integrate HIPAA compliant email in minutes. Easy for recipients to read, available in 10 SDK languages.