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

# Get all API keys in an org

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

Gets all user API keys in an organization.

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

## Path parameters

- `orgId` string, required

## Query parameters

- `q` string
- `keyType` 'CLOUD_ADMIN'
- `expiresAtSearchType` 'range' | 'gt' | 'lt' | 'range_time'
- `expiresAtUom` 'day' | 'hour' | 'minute' | 'week'
- `expiresAtValue` integer
- `expiresAtFrom` string, ISO 8601
- `expiresAtTo` string, ISO 8601
- `expiresAtRangeFrom` string, 1w 2d 3h 4m
- `expiresAtRangeTo` 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' | 'createdBy.name' | '-createdBy.name' | 'expiresAt' | '-expiresAt' | 'lastActiveAt' | '-lastActiveAt', [-|+]<field>, ...
- `pageSize` 5 | 10 | 20 | 25 | 40 | 50 | 60 | 75 | 80 | 100
- `cursor` string

## Headers

- `Authorization` string, required

## Response `200`

Returned if the request is successful.

- ApiKeySearchResponse
  - `data` ApiKey[], required — List of API keys.
    - `id` string, required — The key ID generated in the token-service.
    - `label` string, required — The key label.
    - `createdAt` string, required — An ISO-8601 formatted timestamp representing the time when a key was created.
    - `expiresAt` string, required — An ISO-8601 formatted timestamp representing the time when a key expires.
    - `lastActiveAt` string, required — An ISO-8601 formatted timestamp representing the time when a key was last used.
    - `systemAccountId` string — System account ID
    - `resource` string — E.g. ari:cloud:confluence::site/abcdefg-hijkl
    - `orgId` string — E.g. b44ad0bd-9758-485a-aea9-8c0e6b2d1606
    - `createdBy` ApiKeyUser, required — The user associated with the key.
      - `id` string, required — User ID of the API key user.
      - `name` string, required — Name of the API key user.
      - `email` string, required — Email of the API key user.
    - `scopes` string[] — E.g. ["manage:org", "read:org"]
  - `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 keys.
- `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/revisions/412d18f78d91/schema)
