---
title: "Get all API tokens in an org"
method: GET
path: "/orgs/{orgId}/api-tokens"
tags: ["API Token"]
---

# Get all API tokens in an org

`GET /orgs/{orgId}/api-tokens`

Gets all [user API tokens](/cloud/admin/api-access/rest/intro/#API%20Tokens) in an organization.

#### Scopes
**[Authorization scopes](/cloud/admin/scopes/) required:** `read:tokens:admin`

## Path parameters

- `orgId` string, required

## Query parameters

- `q` string
- `status` 'allowed' | 'blocked'
- `createdAtSearchType` 'range' | 'gt' | 'lt' | 'range_time'
- `createdAtUom` 'day' | 'hour' | 'minute' | 'week'
- `createdAtValue` integer
- `createdAtFrom` string, ISO 8601
- `createdAtTo` string, ISO 8601
- `createdAtRangeFrom` string, 1w 2d 3h 4m
- `createdAtRangeTo` string, 1w 2d 3h 4m
- `lastActiveAtSearchType` 'range' | 'gt' | 'lt' | 'range_time'
- `lastActiveAtUom` 'day' | 'hour' | 'minute' | 'week'
- `lastActiveAtValue` integer
- `lastActiveAtFrom` string, ISO 8601
- `lastActiveAtTo` string, ISO 8601
- `lastActiveAtRangeFrom` string, 1w 2d 3h 4m
- `lastActiveAtRangeTo` string, 1w 2d 3h 4m
- `sort` 'label' | '-label' | 'user.name' | '-user.name' | 'createdAt' | '-createdAt' | 'expiresAt' | '-expiresAt' | 'lastActiveAt' | '-lastActiveAt', [-|+]<field>, ...
- `pageSize` integer
- `cursor` string

## Response `200`

Returned if the request is successful.

- ApiTokenSearchResponse
  - `data` ApiToken[], required — List of API tokens.
    - `id` string, required — The token ID generated in the token-service.
    - `label` string, required — The token label.
    - `status` 'ALLOWED' | 'BLOCKED', required — The token status.
    - `createdAt` string, required — An ISO-8601 formatted timestamp representing the time when a token was created.
    - `expiresAt` string — An ISO-8601 formatted timestamp representing the time when a token expires.
    - `lastActiveAt` string — An ISO-8601 formatted timestamp representing the time when a token was last used.
    - `user` ApiTokenUser, required — The user associated with the token.
      - `id` string, required — User ID of the API token user.
      - `orgId` string — Org ID of the API token user.
      - `name` string, required — Name of the API token user.
      - `email` string, required — Email of the API token user.
    - `scopes` string[] — Array of scopes associated with the token. An empty array indicates an unscoped API token.
  - `links` Links, required
    - `self` string — A cursor representing the current page of records. Only encodes the sort value and record ID — pass all other parameters (filters, sort, pageSize) alongside this cursor.
    - `next` string — A cursor representing the next page of records. Only encodes the sort value and record ID — pass all other parameters (filters, sort, pageSize) alongside this cursor.
    - `prev` string — A cursor representing the previous page of records. Only encodes the sort value and record ID — pass all other parameters (filters, sort, pageSize) alongside this cursor.

## Other responses

- `400` — Returned if request is not in correct format.
- `403` — Returned if the user does not have correct permissions to read user API tokens.
- `500` — Internal Error

---

[API](https://skmtc.net/atlassian/apis/api-access.md) · [All operations](https://skmtc.net/atlassian/apis/api-access/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/atlassian/api-access/versions/412d18f78d91/schema)
