API Keys
Create API key
Add a new API key to authenticate communications with Resend.
Body Parameters
namerequired
string
The API key name.
permission
full_access | sending_access
The API key can have full access to Resend’s API or be only restricted to send
emails. * full_access
: Can create, delete, get, and update any resource. *
sending_access
: Can only send emails.
domain_id
string
Restrict an API key to send emails only from a specific domain. Only used when
the permission
is sending_access
.
import { Resend } from 'resend';
const resend = new Resend('re_123456789');
resend.apiKeys.create({ name: 'Production' });
{
"id": "dacf4072-4119-4d88-932f-6202748ac7c8",
"token": "re_c1tpEyD8_NKFusih9vKVQknRAQfmFcWCv"
}
import { Resend } from 'resend';
const resend = new Resend('re_123456789');
resend.apiKeys.create({ name: 'Production' });
{
"id": "dacf4072-4119-4d88-932f-6202748ac7c8",
"token": "re_c1tpEyD8_NKFusih9vKVQknRAQfmFcWCv"
}