---
title: "API"
description: "Send mail and drive a mailbox from your own code, with a workspace API key."
url: "https://nextmail.sh/docs/api/overview"
area: "API"
category: "Getting started"
---

# API

Send mail and drive a mailbox from your own code, with a workspace API key.

## What this is

A REST API over the same mailbox the app uses. Send, schedule, cancel and retrieve messages; read and organise threads; work with drafts, labels, templates, rules, contacts, audiences, domains, suppressions and files. It authenticates with a key you issue yourself, enforces scopes, and refuses any From address the key was not given.

> The API is on in every environment. What decides access is the workspace key you issue in Settings, scoped when you create it, revocable at any time.

A key belongs to a **workspace** (the mailbox it was issued in) rather than to the person who created it. It keeps working after that person leaves, and it does not widen the day they are granted an address somewhere else.

## Where to go

- [Quickstart](https://nextmail.sh/docs/api/quickstart.md): A key and a first send, in two steps.
- [Authentication](https://nextmail.sh/docs/api/authentication.md): Keys, scopes, and the ways a request is refused.
- [Emails](https://nextmail.sh/docs/api/emails.md): Send, batch, schedule, cancel, retrieve.
- [Mailbox](https://nextmail.sh/docs/api/mailbox.md): Threads, drafts, labels, templates, rules, contacts, audiences, domains.
- [TypeScript](https://nextmail.sh/docs/sdk.md): A typed TypeScript client over all of it.
- [Python](https://nextmail.sh/docs/python.md): The same methods for Python, with a sync and an async client.
- [Ruby](https://nextmail.sh/docs/ruby.md): The same methods for Ruby, with keyword arguments.
- [PHP](https://nextmail.sh/docs/php.md): The same methods for PHP, with named arguments.
- [Go](https://nextmail.sh/docs/go.md): The same methods for Go, with the standard library and nothing else.
- [Java](https://nextmail.sh/docs/java.md): The same methods for Java, with no dependencies.
- [C#](https://nextmail.sh/docs/csharp.md): The same methods for C# and .NET, every one asynchronous.
- [CLI](https://nextmail.sh/docs/cli.md): Every operation as a command, from a terminal or a script.
- [Disposable inboxes](https://nextmail.sh/docs/api/temp-mail.md): The one anonymous resource here: a throwaway address, and the token that reads it.
- [Reference](https://nextmail.sh/docs/api/reference.md): The OpenAPI document, and what is not built yet.
- [Changelog](https://nextmail.sh/docs/api/changelog.md): What changed in the API, newest first.
