Obtain your API key
The Email API client requires one credential:- API key: a secret token that authenticates your requests
Create a client
Pass the API key directly topaubox.New:
Authorization header automatically on every request:
Environment variables
The SDK does not read environment variables automatically; you must read them and pass the value topaubox.New. The convention used throughout this documentation is PAUBOX_API_KEY.
Forms client
The Forms client (paubox.NewForms) takes an API key with the forms scope and sends it as Authorization: Bearer YOUR_API_KEY. Pass an empty string for a public-only client that can call only GetPublicForm and SubmitForm:
Security notes
- Never hard-code credentials in source files.
- The SDK never logs request bodies, response bodies, or the
Authorizationheader. - Clients are safe to create once and reuse across goroutines for the lifetime of your application.