New API Key Permissions

Easily secure your account access with different permissions.

Bu KinoshitaBu Kinoshita

You can now create API keys with limited access to your account.

This is useful if you want to give a third-party access to your account, but don't want to give them full access.

Types of API keys

There are 2 different permissions of API keys:

  • Full access: allows the API key to create, delete, get, and update any resource.
  • Sending access: allows the API key to only send emails.

With API key permissions, Resend users can give each API key different permissions, which can limit the damage that may be done both accidentally or maliciously.

Creating an API key

  1. Navigate to API Keys on the sidebar.
  2. Click Create API Key.
  3. Give your API key a name.
  4. Select Full access or Sending access as the permission.
  5. If you select Sending access, you can choose the specific domain you want restrict access.

Adding an API key
Adding an API key

After an API key is created, you can view the API key and its permissions.

Listing API keys
Listing API keys

Using the API

Alternatively, you can use the API to programmatically manage API keys.

Here's how to create API keys using Node.js:

import { Resend } from 'resend';
const resend = new Resend('re_123456789');
resend.apiKeys.create({
name: 'Production',
permission: 'full_access',
});

Check the documentation to learn how to create, list, and delete API keys using the API.