Skip to main content
POST
/
api-keys
import { Emailr } from 'emailr';

const emailr = new Emailr('em_xxxxxxxxx');

const { data, error } = await emailr.apiKeys.create({ name: 'Production' });
{
  "id": "dacf4072-4119-4d88-932f-6202748ac7c8",
  "token": "em_xxxxxxxxx_NKFusih9vKVQknRAQfmFcWCv"
}
POST https://api.emailr.dev/api-keys

Body Parameters

name
string
required
The API key name.
permission
full_access | sending_access
The API key can have full access to Emailr’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.
import { Emailr } from 'emailr';

const emailr = new Emailr('em_xxxxxxxxx');

const { data, error } = await emailr.apiKeys.create({ name: 'Production' });
{
  "id": "dacf4072-4119-4d88-932f-6202748ac7c8",
  "token": "em_xxxxxxxxx_NKFusih9vKVQknRAQfmFcWCv"
}