---
title: "List API tokens."
method: GET
path: "/v1/api_tokens"
tags: ["API Tokens"]
---

# List API tokens.

`GET /v1/api_tokens`

List all the tokens in the workspace, some filters are available and described
below.

## Query parameters

- `cursor` string
- `per_page` integer
- `status` 'active' | 'expired' | 'revoked' — Status of the token.
- `member_id` integer
- `creator_id` integer
- `scopes` 'scan' | 'incidents:read' | 'incidents:write' | 'incidents:share' | 'members:read' | 'members:write' | 'teams:read' | 'teams:write' | 'audit_logs:read' | 'honeytokens:read' | 'honeytokens:write' | 'honeytokens:check' | 'api_tokens:read' | 'api_tokens:write' | 'ip_allowlist:read' | 'ip_allowlist:write' | 'sources:read' | 'sources:write' | 'nhi:send-inventory' | 'nhi:write-vault' | 'endpoints:send' | 'ai-discover:send' — Tokens with one of the following scopes.
- `search` string — Search tokens based on their name.
- `ordering` 'created_at' | '-created_at' | 'last_used_at' | '-last_used_at' | 'expire_at' | '-expire_at' | 'revoked_at' | '-revoked_at'

## Response `200`

API tokens list

- object[]
  - `id` string — Id of API token
  - `name` string — Name of API token
  - `workspace_id` integer — Workspace id
  - `type` 'personal_access_token' | 'service_account'
  - `status` 'active' | 'expired' | 'revoked'
  - `created_at` string, date-time — Creation date of the API token
  - `last_used_at` string, date-time, nullable — Last usage of the API token
  - `expire_at` string, date-time, nullable — Expiration date of the API token
  - `revoked_at` string, date-time, nullable — Revocation date of the API token
  - `member_id` integer, nullable — Member id
  - `creator_id` integer, nullable — Creator id
  - `scopes` string[] — List of scopes

## Other responses

- `400` — Invalid data
- `401` — Invalid API key

---

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