---
title: "List Service Accounts"
method: GET
path: "/service-accounts"
tags: ["Service Accounts"]
---

# List Service Accounts

`GET /service-accounts`

List service accounts. Returns metadata and display prefixes only - never hashes or plaintext.

## Query parameters

- `include_revoked` boolean
- `limit` integer
- `page` integer
- `sort_by` string
- `sort_order` string

## Response `200`

Successful Response

- PaginatedResponseServiceAccountResponse
  - `data` ServiceAccountResponse[], required — List of items for the current page
    - `id` string, required
    - `name` string, required
    - `principal` string, required — The user_id attached to runs made with this token, e.g. 'sa:claude-code'
    - `user_id` string, nullable — The user this account belongs to; None for workspace-level accounts. Distinct from created_by, which records who minted the token.
    - `token_prefix` string, required — First characters of the token, for display only
    - `scopes` ScopeSchema[] — Scopes granted to the token, in the shared RBAC read shape
      - `id` string, nullable — Scope id (always null here; kept for shape parity with the cloud RBAC API, which addresses scopes individually)
      - `raw` string, required — Original scope string, e.g. 'agents:*:run'
      - `namespace` string, required — Resource namespace, e.g. 'agents'
      - `sub_namespace` string, nullable — Specific resource id or wildcard '*'
      - `permission` string, required — Action, e.g. 'read' / 'run' / 'write'
      - `value` string — 'allow' or 'deny'
    - `created_at` integer, required
    - `expires_at` integer, nullable
    - `last_used_at` integer, nullable
    - `revoked_at` integer, nullable
    - `created_by` string, nullable
  - `meta` PaginationInfo, required
    - `page` integer — Current page number (0-indexed)
    - `limit` integer — Number of items per page
    - `total_pages` integer — Total number of pages
    - `total_count` integer — Total count of items
    - `search_time_ms` number — Search execution time in milliseconds

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/agno/apis/agno-api-reference.md) · [All operations](https://skmtc.net/agno/apis/agno-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/agno/agno-api-reference/revisions/5f6149d395d0/schema)
