Skip to main content
GET
/
v1
/
api-keys
List API Keys
curl --request GET \
  --url https://api.example.com/v1/api-keys

List API Keys

Retrieve a list of all API keys in your account.
limit
integer
default:"10"
Number of keys to return. Maximum 100.
starting_after
string
Cursor for pagination.

Request

curl "https://api.lettr.dev/v1/api-keys" \
  -H "Authorization: Bearer le_xxxxxxxxxxxx"

Response

{
  "object": "list",
  "data": [
    {
      "id": "key_123abc",
      "object": "api_key",
      "name": "Production Server",
      "keyPrefix": "le_xxxx",
      "permissions": ["emails:send", "emails:read"],
      "lastUsedAt": "2024-01-15T14:30:00Z",
      "createdAt": "2024-01-15T10:30:00Z"
    },
    {
      "id": "key_456def",
      "object": "api_key",
      "name": "Analytics Dashboard",
      "keyPrefix": "le_yyyy",
      "permissions": ["analytics:read"],
      "lastUsedAt": "2024-01-14T09:00:00Z",
      "createdAt": "2024-01-10T08:00:00Z"
    }
  ],
  "hasMore": false,
  "totalCount": 2
}
For security, the full API key is never returned after creation. Only a prefix is shown.