Skip to main content

Obtain your credentials

The Email API client requires two credentials:
  • API key: a secret token that authenticates your requests
  • Username: your Paubox API endpoint username (not your login email)
Both are available in the Paubox dashboard under API Credentials.

Create a client

Pass the API key and username directly to paubox.New:
The SDK sets the Authorization header automatically on every request:

Environment variables

The SDK does not read environment variables automatically; you must read them and pass the values to paubox.New. The convention used throughout this documentation is PAUBOX_API_KEY and PAUBOX_USERNAME.

Forms client

The Forms client (paubox.NewFormsClient) requires no credentials. Form submissions are associated with the form ID, not an API key.

Security notes

  • Never hard-code credentials in source files.
  • The SDK never logs request bodies, response bodies, or the Authorization header.
  • Clients are safe to create once and reuse across goroutines for the lifetime of your application.