Knowledge base

Managing API tokens

API tokens are used for authentication when sending emails or accessing server-specific endpoints. They’re the preferred alternative to using a username and password, as you can revoke an API token at any time and use different permissions.

Creating API tokens

To generate an API token:

  1. Go to Integrations.

  2. Locate MailerSend API and click Manage.

3. Click Generate new token. In the pop-up window, you can create your API token.

4. Click Manage next to your chosen domain to configure settings for that domain.

Creating a new API token in MailerSend

First you need to name your token. You're free to use any name you want, as long as it’s clear to you.

API tokens can have different permissions. At MailerSend, you can choose between Full access and Custom access permissions.

  • Full access allows the API token to access GET, PUT, DELETE and POST endpoints for all parts of your account. It's the most powerful access option, so use it carefully. 

  • Custom access allows you to choose which access to provide for the token.

API access

No access

Read only

Full access

Email
The main API endpoint for sending emails through MailerSend.

X

Domains

You can access all domains that belong to your account.

X

Activity

Obtain activity logs of your domain.

X

Analytics
Obtain accumulated data of your sendings.

X

API tokens
Create, update or delete API tokens.

X

Webhooks

Create and manage webhooks for listening to events and triggering actions.

X

Templates

Fetch and delete templates created on MailerSend.

X

Suppressions

Manage recipients on a suppressions list.

X

SMS

X

Email verification

X

Once you have set the permissions, click on the Create token button.

Remember:

For security reasons, you will only be shown your API token one time, so please copy or download it and save it somewhere safe.

Managing API tokens

Once you have created your token you can manage it from the API token section.

View of the API token management section with the available options.

There are a few available options to manage your token:

  • Manage. You can rename the token if you need to at any point. Click Manage to open the pop-up, enter the new name and click Save. In the same pop-up, you can also see what permissions are given for this token. If you want to change the permissions, you need to delete the existing token and create a new one.

  • Pause. If you want to pause the token, click the drop-down arrow next to Manage and click Pause. This action pauses your access token immediately—all of the applications or users won't be able to use it (access your account) until you resume it by clicking the Resume button. 

  • Delete. In order to delete the token, click the drop-down arrow next to Manage and choose Delete. Before deleting the token you need to confirm it in the pop-up window.

API tokens page

API tokens are not restricted to specific domains, and can be used across all or multiple domains. You can view and manage all API tokens from the API tokens page, which is accessible from the main left-hand navigation menu under Settings.

API Tokens page in Settings.

Need more info?

Please feel free to contact us at support@mailersend.com and a member of our support team will gladly assist you.