# List API keys

Source: https://openpanel.sh/docs/api/api-keys/list-api-keys

Your own keys; the owner and admins see everyone's. Keys are managed by a signed-in person (the console or the CLI), never by another key.

`GET https://openpanel.sh/api/v1/api-keys`

## Parameters

| Name | In | Required | Description |
|---|---|---|---|
| `limit` | query | no | How many items to return, 1 to 100. Default 50. |
| `cursor` | query | no | The nextCursor of the previous page. |

## Responses

| Status | Meaning | Body |
|---|---|---|
| 200 | List API keys | `application/json`, `ApiKeyPage` |
| 401 | No valid credential was sent. | `application/problem+json`, `Problem` |
| 403 | The credential may not do this. | `application/problem+json`, `Problem` |
| 422 | The input was refused; detail says why. | `application/problem+json`, `Problem` |
| 429 | Too many requests; wait for Retry-After seconds. | `application/problem+json`, `Problem` |

## Schemas

### ApiKey

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "prefix": {
      "type": "string",
      "description": "The key's first characters, to tell keys apart."
    },
    "scope": {
      "type": "string",
      "enum": [
        "view",
        "deploy",
        "admin"
      ]
    },
    "projectIds": {
      "anyOf": [
        {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "expiresAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "lastUsedAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "revokedAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "createdBy": {
      "type": "string"
    },
    "creatorName": {
      "type": [
        "string",
        "null"
      ]
    },
    "creatorEmail": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "id",
    "name",
    "prefix",
    "scope",
    "projectIds",
    "expiresAt",
    "lastUsedAt",
    "revokedAt",
    "createdAt",
    "createdBy",
    "creatorName",
    "creatorEmail"
  ]
}
```

### ApiKeyPage

```json
{
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ApiKey"
      }
    },
    "nextCursor": {
      "description": "Pass as cursor for the next page; null on the last.",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "data",
    "nextCursor"
  ]
}
```

### Problem

```json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "description": "A link to the error's explanation in the docs."
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "integer"
    },
    "code": {
      "type": "string",
      "description": "Stable machine-readable code: not_found, forbidden, invalid, conflict, rate_limited, not_implemented, …"
    },
    "detail": {
      "type": "string",
      "description": "What went wrong, in a sentence written for a person."
    }
  },
  "required": [
    "type",
    "title",
    "status",
    "code",
    "detail"
  ]
}
```