Integrating with Fastmail

Welcome, developers! Interested in getting started writing integrations for your Fastmail account? You've come to the right place.

Fastmail currently offers a JMAP (RFC8620) API for accessing, managing and sending mail, and for managing your masked email addresses. We hope to expand our API access to scopes over time.

JMAP Crash Course

Want to learn more about JMAP, the modern standard powering Fastmail? Check out our quick guide to how it works.

You need two things to get started with our API:

  1. The JMAP Session Resource, which can be found at https://api.fastmail.com/jmap/session. This will give you all the other endpoints you need; for example, to make API requests or to upload files. For more information, see the specification. We also support DNS autodiscovery as defined in the JMAP standard.
  2. A way to authenticate your requests.

All Fastmail API requests must be authenticated with a bearer token. This is a shared secret that provides access to a limited set of data within a particular user's account. Bearer tokens should be treated as a type of password and stored accordingly. These should be created with as little access to an account possible: only create a token with the scopes you need for your application. If you do not need to modify data, you can create a read-only token.

To authenticate an HTTP request, you add an Authorization header set to Bearer {value}, where {value} is the value of the token. Our APIs are CORS enabled so you can create integrations directly from a web app, as well as from a server or native code.

To get started, you can create a token for your own user in Settings → Password & Security → API tokens. If you would like to share your app more widely, we encourage you to implement OAuth to allow your users to easily log in and get a token for your app.

Check out the JMAP-Samples repository for illustrative examples of bearer tokens in action in a fair sample of programming languages.

Questions?

If you find:

… please email jmapsupport@fastmail.com.