> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getinboxzero.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

Use the Inbox Zero API to manage emails and automation rules programmatically.

If you prefer a CLI wrapper for scripts or bots, see the [API CLI](/api-reference/cli).

## Supported Email Providers

Inbox Zero supports integration with:

* **Gmail** (Google Workspace and personal accounts)
* **Outlook** (Microsoft 365 and personal accounts)

## Getting Started

To begin using the Inbox Zero API, you'll need to obtain an API key. Here's how:

1. Log in to your Inbox Zero account
2. Navigate to the [Settings](https://www.getinboxzero.com/settings) page and scroll down to the `API Keys` section
3. Click on the `Create New Secret Key` button
4. Select the permissions (scopes) you need for your key
5. Choose an expiry period

<img src="https://mintcdn.com/inboxzero/wF-r9j9cfWEkqcpp/images/settings-api-key.png?fit=max&auto=format&n=wF-r9j9cfWEkqcpp&q=85&s=0dda1420ab2fe2221e45698a8e393ccb" alt="Create New Secret Key" width="2686" height="624" data-path="images/settings-api-key.png" />

API keys are scoped to a specific inbox account and only grant access to the permissions you select. Keep your key secure and do not share it publicly.

### Self-Hosting

If you are self-hosting Inbox Zero, set the `NEXT_PUBLIC_EXTERNAL_API_ENABLED=true` environment variable and rebuild the app to enable the API. Use your deployment URL as the base URL for requests (for example, `https://your-domain.com/api/v1`).

## Base URL

All API requests should be made to the following base URL:

```
https://www.getinboxzero.com/api/v1
```

## Authentication

Include your API key in the header of each request:

```
API-Key: YOUR_API_KEY
```

## Request New Endpoint

If you have a new endpoint that you would like to add to the API, open an issue on [GitHub](https://github.com/elie222/inbox-zero/issues/new).
