# List API keys

> Fetch every API key on your N1ED account with its domain and creation date, or list deleted ones, to sync with your own database.

Source: https://n1ed.com/docs/admin-api/list-api-keys  
Section: For developers > Admin API > List API keys  
Updated: 2026-09-29  
Every page of n1ed.com has a Markdown copy at its URL + `.md` (`index.md` after a URL that ends in `/`); all of them are in one file: https://n1ed.com/llms-full.txt

When your CMS or website builder manages many websites, you may want to audit which API keys exist on your N1ED account and verify they are in sync with your own database: find keys you forgot to save, keys with outdated domains, or keys left after removed websites. This request of [Admin API](https://n1ed.com/docs/admin-api) (available on Studio and higher plans) returns all API keys that belong to your account.

This is a lightweight read-only request, so you can safely call it from periodic synchronization scripts.

By default it lists only active API keys. Pass the `deleted` parameter to list the keys you have [deleted](https://n1ed.com/docs/admin-api/delete-api-key) instead — e.g. to find a key you want to [undelete](https://n1ed.com/docs/admin-api/undelete-api-key).

## Request format

**URL:** `https://cloud.n1ed.com/a/admin/api-key-list`  
**Request type:** `POST`  
**Content type:** `application/x-www-form-urlencoded`  
**Parameters:**

- `adminToken`: Your secret Admin API token
- `deleted` *optional*: Pass `true` to list deleted API keys instead of active ones.  
  When omitted (or `false`), only active API keys are listed.

## Response format

The server will return the list of your API keys in the data section if the request succeeds, or an error code otherwise.

**HTTP code:** `200`  
**Content type:** `application/json`  
**Body:**

```js
{
    error: null,
    data: {
        apiKeys: [
            {
                apiKey: "your-api-key",
                domain: "example.com",
                createdAt: 1721400000000
            },
            ...
        ]
    }
}
```

`createdAt` is the creation time as Unix time in milliseconds. `domain` can be `null` for API keys created without a domain.  
When you request deleted API keys (`deleted=true`), every entry additionally contains `deletedAt` — the deletion time as Unix time in milliseconds.

Possible error codes:

- `INCORRECT-TOKEN` - the `adminToken` parameter has been incorrectly specified.

## Sample request

Here is a sample of how to make this request from the Linux console (sh, bash, or any other shell).

```bash
curl \
    -X POST https://cloud.n1ed.com/a/admin/api-key-list \
    -d "adminToken=your-secret-admin-token"
```

Please refer to [Admin API](https://n1ed.com/docs/admin-api) to see samples for PHP, JS, and learn how to write code for other languages.
