Enroll existing API key
Makes a key you already use at Resend work here, so a program that holds it only needs a new address. The key is checked with Resend, kept as a hash like any other key, and gets the access it has there unless you narrow it.
api_keys_enrollArguments
namestringRequiredA name to recognise the key by, such as the app that holds it. Up to 120 characters.
tokenstringRequiredThe key itself, as Resend gave it. It starts with
re_. It is checked with Resend, kept as a hash and never shown again.accessstringWhat the key may do here:
fullorsending. Without it the key keeps what it may do at Resend. A key that only sends there cannot be givenfull.One of
fullsendingdomainIdstringThe id of the one domain the key may send from. Only for a key with
sendingaccess. Up to 64 characters.
Returns
The answer comes back under structuredContent, with the same JSON as text in content. A call the API refuses comes back with isError set, and the code and the message under structuredContent.error. MCP shows how to connect a client.
object"api_key"Always
api_key.idstringThe id of the key.
namestringThe name you gave the key.
accessstringWhat the key may do:
fullfor everything,sendingfor sending email and nothing else.One of
fullsendingmodestringlivefor a key that sends real email,testfor a key whose emails are simulated and reach nobody.One of
livetestpreviewstringThe start of the key, enough to recognise it.
domainIdstring | nullThe id of the one domain a sending key may send from, or
nullwhen it may send from any.domainstring | nullThe name of that domain, or
null.lastUsedAtstring | nullWhen the key last made a request, or
nullif it never has.createdAtstringWhen the key was made.