Skip to main content

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.

Obtain your credentials

The Email API 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.

Configure the initializer

Create config/initializers/paubox.rb:
Paubox.configure do |config|
  config.api_key  = ENV['PAUBOX_API_KEY']
  config.api_user = ENV['PAUBOX_API_USER']
end
The gem registers itself as a Railtie, so this initializer runs before ActionMailer is configured. Credentials are automatically applied to every email delivery — no per-request setup is needed.

Set environment variables

Add your credentials to your environment (e.g. via a .env file with dotenv-rails, Rails credentials, or your deployment platform’s secret management):
PAUBOX_API_KEY=YOUR_API_KEY
PAUBOX_API_USER=YOUR_USERNAME

Forms client

PauboxRails::Forms::Client requires no credentials. Form submissions are associated with the form ID, not an API key.
client = PauboxRails::Forms.client

Security notes

  • Never hard-code credentials in initializer files — always read from environment variables or encrypted credentials.
  • The gem does not log API keys or request bodies.