API Keys

Managing your Mailosaur API keys at both an account and server level.

What are API keys for?

If you want to automate email and SMS testing with Mailosaur, you need to make calls to the Mailosaur API. API keys are used to authenticate requests to this API.

Authentication to the API is performed via HTTP Basic Auth, with your API key provided as the basic auth username value. You do not need to provide a password.

What are account-level API keys?

Account-level API keys have access to all functions described in the API reference, and have access to all the servers in your account.

Creating an account-level API key

To create an account-level API key, you must be an Administrator or Account Owner on the account in question. This access can be granted by another Administrator on your account if you do not already have this.

  1. Go to the Settings page in the Mailosaur Dashboard (click the cog icon in the main navigation).
  2. Go to the API Keys page.
  3. Click the Create a Key button.
  4. In the dialog that appears, enter a name for your key.
  5. When you are finished, click Create.

Revealing an account-level API key

For your security, API keys are not automatically displayed on-screen. To reveal an account-level API key:

  1. Go to the Settings page in the Mailosaur Dashboard (click the cog icon in the main navigation).
  2. Go to the API Keys page.
  3. Click the Reveal Key button for the API key you want.
  4. Click the revealed value to copy it to your clipboard the dialog that appears, enter a name for your key.
  5. When you are finished, click Create.

What are server API keys?

You may want to restrict how much data an API key can access. This is where server-level API keys come in. This type of API key can only access the data of a single server, and have no ability to list or manage servers on your account.

If you need more access, take a look at account-level API keys above.

Creating an server-level API key

To create an server-level API key, you must have access to the server in question. This access can be granted by an Administrator on your account if you do not already have this.

  1. Go to the Servers page in the Mailosaur Dashboard.
  2. Click on the name of the server you want to create an API key for.
  3. Click on the API tab.
  4. Click Create a Key.
  5. In the dialog that appears, enter a name for your key.
  6. When you are finished, click Create.

Revealing a server-level API key

For your security, API keys are not automatically displayed on-screen. To reveal a server-level API key:

  1. Go to the Servers page in the Mailosaur Dashboard.
  2. Click on the name of the server you want to create an API key for.
  3. Click on the API tab.
  4. Click the Reveal Key button for the API key you want.
  5. Click the revealed value to copy it to your clipboard.