# List keys

> Your company's keys: waiting, active, declined and revoked, with their limits and use. With a key, or signed in on siteswap.pro as an owner or admin of the company.


`GET https://dev.siteswap.pro/api/v1/keys`

Your company's keys: waiting, active, declined and revoked, with their limits and use. With a key, or signed in on siteswap.pro as an owner or admin of the company.

## Responses

- 200: OK
- 400: bad_request, key_in_url or invalid_json: the request could not be read
- 401: missing_key or invalid_key: no key, or a key that is not valid or was revoked
- 403: key_pending, key_declined, scope_missing, terms_required or account_unavailable: see Errors
- 404: not_found: nothing here that you may see
- 413: too_large: the body is over 256 KB
- 429: rate_limited or daily_quota: wait for Retry-After seconds

## Response fields

- `id` (string): The key's public prefix: the 10 characters after `ssk_`
- `name` (string)
- `purpose` (string)
- `status` ("pending" | "active" | "declined" | "revoked"): `pending` until a SiteSwap admin approves it
- `scopes_asked` (string[])
- `scopes` (string[]): What it was granted; empty until approved
- `per_minute` (integer): Requests a minute
- `per_day` (integer): Requests a day (UTC)
- `calls` (integer): Calls counted so far
- `last_used_at` (string | null): The last call
- `created_at` (string): When it was asked for. ISO 8601 in UTC
- `asked_by` (string): Who asked for it
- `note` (string | null): Why it was declined, from the SiteSwap admin

```json
{
  "data": [
    {
      "id": "string",
      "name": "string",
      "purpose": "string",
      "status": "pending",
      "scopes_asked": [
        "string"
      ],
      "scopes": [
        "string"
      ],
      "per_minute": 0,
      "per_day": 0,
      "calls": 0,
      "last_used_at": "string",
      "created_at": "string",
      "asked_by": "string",
      "note": "string"
    }
  ],
  "meta": {
    "request_id": "3f9a1c0b7d2e",
    "api_version": "v1"
  }
}
```

## Example

```bash
curl "https://dev.siteswap.pro/api/v1/keys" \
  -H "Authorization: Bearer ssk_YOUR_KEY"
```