> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://docs.postnuvia.com/llms.txt.

# How do I get my API key?

You need an API key to authenticate requests to the PostNuvia API. API keys start with `am_` and are created in the PostNuvia Console.

## Steps

1. Go to the [PostNuvia Console](https://console.postnuvia.com)
2. Sign up or log in. Free tier, no credit card required.
3. Navigate to the **API Keys** section in the left side of the dashboard
4. Click **Create New API Key**
5. Give it a descriptive name (e.g., "my-support-agent")
6. Copy the key immediately and store it securely

> **Warning**
>
> Your API key is only shown once when it is created. If you lose it, you will need to create a new one. Never commit API keys to version control or share them publicly.

## Using your API key

Store your API key in an environment variable to keep it out of your source code:

**`Bash`**

```bash title="Bash"
# .env file
POSTNUVIA_API_KEY=am_your_key_here
```

Then initialize the SDK using the environment variable:

**`TypeScript`**

```typescript title="TypeScript"
import { PostNuviaClient } from "postnuvia";
import "dotenv/config";

const client = new PostNuviaClient({
  apiKey: process.env.POSTNUVIA_API_KEY,
});

// Test the connection by creating an inbox
const inbox = await client.inboxes.create();
console.log(`Connected! Created inbox: ${inbox.inboxId}`);
```

## Scoped API keys

In addition to organization-level keys, you can create keys scoped to a single pod or inbox. Scoped keys restrict access so that the key can only operate on resources within that pod or inbox.

* **Pod-scoped keys**: Create via `POST /pods/{pod_id}/api-keys` or `client.pods.api_keys.create()`
* **Inbox-scoped keys**: Create via `POST /inboxes/{inbox_id}/api-keys` or `client.inboxes.api_keys.create()`

See the [Multi-Tenancy guide](/multi-tenancy#scoped-api-keys) for details.

## Free tier

No credit card required to get started. The free tier includes:

| Feature          | Limit                             |
| ---------------- | --------------------------------- |
| Inboxes          | 3                                 |
| Emails per month | 3,000                             |
| Storage          | 3 GB                              |
| API access       | Full (REST, WebSockets, webhooks) |
| SDKs             | Python and TypeScript             |

To create more inboxes or send higher volumes, see the [pricing page](https://postnuvia.com/pricing).