---
title: "List API keys"
---

> Documentation Index
> Fetch the complete documentation index at: https://simplcron.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# List API keys

Path: Simplcron API › API keys

`GET /v1/keys`

List API key metadata from an owner or admin browser session.

## Authentication

Requires one of the following:

- `browserSession`, apiKey, in cookie
- `localBrowserSession`, apiKey, in cookie

## Header parameters

- `X-Simplcron-Environment` (`listApiKeys.header.X-Simplcron-Environment`; string, optional) — Environment for a browser session. Bearer keys always use their fixed environment.
  - one of `"production"`, `"development"` · default: `"production"`

## Code samples

### cURL

```bash
curl --request GET \
  --url '<base-url>/v1/keys' \
  --cookie '__Host-simplcron_session=<__Host-simplcron_session>'
```

### TypeScript

```typescript
const url = '<base-url>/v1/keys';
const options = {
  method: 'GET',
  headers: {cookie: '__Host-simplcron_session=<__Host-simplcron_session>'}
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "<base-url>/v1/keys"

headers = {"cookie": "__Host-simplcron_session=<__Host-simplcron_session>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

List for the authenticated environment

#### Example

```json
{
  "keys": [
    {
      "id": "string",
      "name": "string",
      "prefix": "string",
      "permissions": [
        "tasks:read"
      ],
      "createdAt": "2019-08-24T14:15:22Z",
      "revokedAt": "2019-08-24T14:15:22Z"
    }
  ]
}
```

- `keys` (`listApiKeys.response.200.keys`; array of object, required)
  - `id` (`listApiKeys.response.200.keys.id`; string, required)
  - `name` (`listApiKeys.response.200.keys.name`; string, required)
    - maxLength: `80` · minLength: `1`
  - `prefix` (`listApiKeys.response.200.keys.prefix`; string, required)
  - `createdAt` (`listApiKeys.response.200.keys.createdAt`; string, required)
    - format: `date-time`
  - `permissions` (`listApiKeys.response.200.keys.permissions`; array of string, optional)
    - one of `"tasks:read"`, `"tasks:write"`, `"runs:read"`, `"runs:write"`, `"schedules:read"`, `"schedules:write"`, `"webhooks:read"`, `"webhooks:write"`
  - `revokedAt` (`listApiKeys.response.200.keys.revokedAt`; any of, optional)
    - any of the following: `string`, `null`

### 401

Authentication is required

#### Example

```json
{
  "error": "string"
}
```

- `error` (`listApiKeys.response.401.error`; string, required)

### 403

The credential lacks permission

#### Example

```json
{
  "error": "string"
}
```

- `error` (`listApiKeys.response.403.error`; string, required)


Source: https://simplcron.dev/docs/api/list-api-keys/index.md
