> ## 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.

# Ruby SDK authentication

> Configure Paubox API credentials for the Ruby SDK with global or per-client configuration, plus Forms client setup and key security notes.

## Obtain your credentials

The Email API client requires one credential:

* **API key**: a secret token that authenticates your requests

It is available in the [Paubox dashboard](https://next.paubox.com) under **API Credentials**.

## Global configuration (recommended)

Set your API key once at application startup. All `Paubox::Client` instances will use it automatically:

```ruby theme={null}
require 'paubox'

Paubox.configure do |config|
  config.api_key = ENV['PAUBOX_API_KEY']
end

client = Paubox::Client.new
```

## Per-client configuration

Override the API key for a specific client instance:

```ruby theme={null}
client = Paubox::Client.new(api_key: 'YOUR_API_KEY')
```

The SDK sets the `Authorization` header automatically on every request:

```
Authorization: Token token=YOUR_API_KEY
```

## Forms client

`Paubox::FormsClient` requires no credentials:

```ruby theme={null}
forms_client = Paubox::FormsClient.new
```

## Security notes

* Never hard-code credentials in source files; always read from environment variables.
* The SDK does not log API keys or request bodies.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.