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

# List your organisation's own API keys

> Every key, newest first, revoked ones included so an access review sees a key existed. Metadata only: no secret is returned, and a console session is needed.

This endpoint takes a **signed-in console session**, not an API key. Send the session cookies your browser received when you signed in. A request authenticated with an `arukz_sk_` key is refused with `403`. See [Managing API keys](/administration/api-keys).

Revoked keys stay in the list so an access review can see that a key existed and was withdrawn. No response ever contains a key's secret. Use `last_used_at` to tell a live integration from a forgotten key.

The list is a single page: there is no cursor. You need the owner or admin role.

<ParamField query="limit" type="integer" default="50">
  How many keys to return, from 1 to 100.
</ParamField>

## Response

<ResponseField name="data" type="object[]" required>
  The keys, newest first.

  <Expandable title="properties">
    <ResponseField name="id" type="string" required>
      The key's ID (UUID).
    </ResponseField>

    <ResponseField name="name" type="string" required>
      The key's label.
    </ResponseField>

    <ResponseField name="prefix" type="string" required>
      `arukz_sk_` followed by the first 8 characters of the ID. Not a secret.
    </ResponseField>

    <ResponseField name="role" type="string" required>
      `owner`, `admin`, `editor`, `normal` or `dataset_operator`.
    </ResponseField>

    <ResponseField name="status" type="string" required>
      `active`, `revoked` or `expired`. `expired` means the current time is past `expires_at`; an
      expired key authenticates nothing. A revoked key reads `revoked` even after its expiry.
    </ResponseField>

    <ResponseField name="created_at" type="string" required>
      When the key was created, ISO 8601 in UTC.
    </ResponseField>

    <ResponseField name="created_by" type="string | null" required>
      ID of the user who created the key.
    </ResponseField>

    <ResponseField name="expires_at" type="string | null" required>
      When the key expires, or `null` if it does not.
    </ResponseField>

    <ResponseField name="revoked_at" type="string | null" required>
      When the key was revoked, or `null`.
    </ResponseField>

    <ResponseField name="last_used_at" type="string | null" required>
      When the key last authenticated a request, or `null` if never.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="limit" type="object" required>
  <Expandable title="properties">
    <ResponseField name="max" type="integer" required>
      The largest `limit` this endpoint accepts: `100`.
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  # cookies.txt holds the cookies from your signed-in console session.
  curl --request GET "$MITHUNAI_URL/arukz/api/v1/api-keys?limit=50" \
    --cookie cookies.txt
  ```

  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import os
  from http.cookiejar import MozillaCookieJar

  import requests

  jar = MozillaCookieJar("cookies.txt")
  jar.load()

  response = requests.get(
      f"{os.environ['MITHUNAI_URL']}/arukz/api/v1/api-keys",
      cookies=jar,
      params={"limit": 50},
      timeout=30,
  )
  response.raise_for_status()
  for key in response.json()["data"]:
      print(key["prefix"], key["name"], key["status"], key["last_used_at"])
  ```

  ```javascript JavaScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  // Runs in a page on the MITHUNAI console's own origin, while signed in.
  const response = await fetch('/arukz/api/v1/api-keys?limit=50', {
    credentials: 'include',
  })
  const { data } = await response.json()
  console.table(data.map(({ prefix, name, status }) => ({ prefix, name, status })))
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "data": [
      {
        "id": "3f2a1c9e-8b4d-4e6f-9a1b-2c3d4e5f6a7b",
        "name": "CI pipeline",
        "prefix": "arukz_sk_3f2a1c9e",
        "role": "normal",
        "status": "active",
        "created_at": "2026-09-20T14:03:11.482190+00:00",
        "created_by": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
        "expires_at": "2026-12-19T14:03:11.482190+00:00",
        "revoked_at": null,
        "last_used_at": "2026-09-23T08:41:52.117004+00:00"
      },
      {
        "id": "b81d4c2e-6a3f-4f0b-8e7d-2c1a9f8e7d6c",
        "name": "Old ingestion job",
        "prefix": "arukz_sk_b81d4c2e",
        "role": "dataset_operator",
        "status": "revoked",
        "created_at": "2026-09-02T10:15:00.000000+00:00",
        "created_by": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
        "expires_at": null,
        "revoked_at": "2026-09-18T16:22:40.905311+00:00",
        "last_used_at": "2026-09-18T16:01:07.332198+00:00"
      }
    ],
    "limit": { "max": 100 }
  }
  ```

  ```json 400 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  { "code": "validation_error", "message": "The page size must be between 1 and 100." }
  ```

  ```json 401 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  { "code": "authentication_error", "message": "Authentication is required." }
  ```

  ```json 403 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  { "code": "authorization_error", "message": "API key management requires a signed-in user." }
  ```
</ResponseExample>
