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

# Quickstart

> Install the Paubox Go SDK and send your first HIPAA-compliant email in minutes.

<Steps>
  <Step title="Install the SDK">
    Add the SDK to your Go module:

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

    The SDK requires Go 1.22 or later and has no external dependencies.
  </Step>

  <Step title="Set your credentials">
    Export your Paubox API key and username as environment variables:

    ```bash theme={null}
    export PAUBOX_API_KEY="YOUR_API_KEY"
    export PAUBOX_USERNAME="YOUR_USERNAME"
    ```

    To obtain credentials, see [Authentication](/go-sdk/authentication).
  </Step>

  <Step title="Send your first email">
    Create a file `main.go` with the following code:

    ```go theme={null}
    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)
        }

        ctx := context.Background()

        resp, err := client.SendMessage(ctx, &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)
    }
    ```

    Run it:

    ```bash theme={null}
    go run main.go
    ```

    ```
    Sent. Tracking ID: abc123-def456-...
    ```
  </Step>

  <Step title="Check delivery status">
    Use the tracking ID returned by `SendMessage` to check delivery:

    ```go theme={null}
    disp, err := client.GetEmailDisposition(ctx, resp.SourceTrackingID)
    if err != nil {
        log.Fatal(err)
    }

    for _, d := range disp.Data.Message.MessageDeliveries {
        fmt.Printf("%s → %s\n", d.Recipient, d.Status.DeliveryStatus)
    }
    ```

    ```
    recipient@example.com → delivered
    ```
  </Step>
</Steps>

## Next steps

* [Email client](/go-sdk/email-client): send batches, attach files, manage dynamic templates, handle errors
* [Forms client](/go-sdk/forms-client): retrieve form schemas and submit responses
