Skip to main content

Obtain your credentials

The Email API client requires one value:
  • API key: a secret token that authenticates your requests
Your API key is available in the Paubox dashboard under API Credentials. Set the key in your shell or a .env file loaded by your application:
The SDK reads PAUBOX_API_KEY when the paubox package is first imported, so set it (or load your .env file) before that import. No constructor arguments are needed:

Constructor parameters

Pass credentials directly if you prefer not to use environment variables:
The client sends requests to https://api.paubox.com/v1/email by default. Leave PAUBOX_HOST and host unset unless you need to override that base URL; an override must include the /email path. The SDK sets the Authorization header automatically on every request:

Forms client

get_form and submit_form on PauboxFormsClient require no credentials:
The form management methods (for example list_forms, create_form, and list_submissions) require a scoped API key with the forms scope, sent as Authorization: Bearer. It can be the same key as PAUBOX_API_KEY if that key also has the forms scope:

Security notes

  • Never hard-code credentials in source files.
  • The SDK does not log API keys or request bodies.