Skip to main content
Use the Inbox Zero API to read inbox statistics and manage automation rules programmatically. If you prefer a CLI wrapper for scripts or bots, see the API 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 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
Create New Secret Key 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.

Permissions

A key may include more than one scope. Keys are also bound to one inbox account; they cannot read or change another inbox.

Self-Hosting

If you are self-hosting Inbox Zero, set NEXT_PUBLIC_EXTERNAL_API_ENABLED=true and API_KEY_SALT before rebuilding the app. Generate the salt with openssl rand -hex 32. 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:

Authentication

Include your API key in the header of each request:
For example:
To create a rule:

Errors

API errors are returned as JSON with an error message. The DELETE rule action, which moves matching emails to trash, is available only when the deployment enables NEXT_PUBLIC_DELETE_EMAIL_ACTION_ENABLED. This feature flag is separate from DELETE /rules/{id}, which deletes a rule definition.

Request New Endpoint

If you have a new endpoint that you would like to add to the API, open an issue on GitHub.