---
title: "List your personal access tokens"
method: GET
path: "/api/api_keys"
tags: ["api keys"]
---

# List your personal access tokens

`GET /api/api_keys`

## Request

- Base URL: `https://telawiki.com`
- URL: `https://telawiki.com/api/api_keys`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `tela_session`

Caller's own tokens, newest first, revoked ones included. The raw token is never returned again.

## Response `200`

Tokens.

- object
  - `api_keys` APIKey[], required
    - `id` integer, required
    - `name` string, required
    - `key_prefix` string, required: The first 8 characters after `tela_pat_`, for identifying a token you still hold.
    - `scope` 'read' | 'write' | 'admin', required: `read` permits GET and HEAD; `write` and `admin` permit any method.
    - `space_id` integer, nullable, required: Non-null when the token is pinned to one space.
    - `last_used_at` string, nullable
    - `expires_at` string, nullable
    - `created_at` string, required: `YYYY-MM-DD HH:MM:SS` in UTC.
    - `revoked_at` string, nullable

## Other responses

- `401`: `unauthorized` — no valid credential. A malformed bearer token never falls back to the session cookie.
- `403`: `forbidden` (no access, or the role is too low), `viewer_no_write`, `api_key_scope` (the token's scope forbids this method), or `api_key_space_scope` (the token is pinned to another space).
- `500`: `internal` — server error.

---

[API](https://skmtc.dev/telawiki/apis/tela-rest-api.md) · [All operations](https://skmtc.dev/telawiki/apis/tela-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/telawiki/apis/tela-rest-api/revisions/f316f31f6fcb?raw)
