GET
/
api-keys
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.apiKeys.list();
{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "id": "91f3200a-df72-4654-b0cd-f202395f5354",
      "name": "Production",
      "created_at": "2023-04-08T00:11:13.110779+00:00"
    }
  ]
}

Query Parameters

Note that the limit parameter is optional. If you do not provide a limit, all API keys will be returned in a single response.
limit
number
Number of API keys to retrieve. Maximum is 100, and minimum is 1.
after
string
The ID after which we’ll retrieve more API keys (for pagination). This ID will not be included in the returned list.Cannot be used with the before parameter.
before
string
The ID before which we’ll retrieve more API keys (for pagination). This ID will not be included in the returned list.Cannot be used with the after parameter.
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.apiKeys.list();
{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "id": "91f3200a-df72-4654-b0cd-f202395f5354",
      "name": "Production",
      "created_at": "2023-04-08T00:11:13.110779+00:00"
    }
  ]
}