---
title: "List sub-account API keys"
method: GET
path: "/v1/sub_accounts/{sub_account_id}/api_keys"
tags: ["subAccounts"]
---

# List sub-account API keys

`GET /v1/sub_accounts/{sub_account_id}/api_keys`

## Request

- Base URL: `https://api.middesk.com`
- URL: `https://api.middesk.com/v1/sub_accounts/{sub_account_id}/api_keys`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/middesk/apis/middesk-api/docs/v1/sub_accounts/:sub_account_id/api_keys/get.ts> (a function with typed inputs; its response is checked against the schema)

Lists active API keys for a sub-account owned by the caller. The response includes each key value; store and handle the response as a secret.

## Path parameters

- `sub_account_id` string, required

## Query parameters

- `page` integer
- `per_page` integer

## Response `200`

sub-account API keys list

- SubAccountsListSubAccountApiKeysResponse
  - `data` ApiKey[], required
    - `object` 'api_key', required
    - `id` string, uuid, required
    - `name` string, required
    - `value` string, required
    - `live_mode` boolean, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `api_version` '2020-01-01' | '2020-05-11', required
  - `object` string, required
  - `has_more` boolean, required
  - `total_count` integer

## Other responses

- `403`: sub-account provisioning not enabled
- `404`: sub-account not found
- `422`: invalid pagination

## Changes

- **2026-10-20** `410a449f7a40`: 1 info
  - the response property `data` became required for the status `200`
- **2026-09-17** `4c9cd4e834ba`: 1 warning, 1 info
  - deleted the `header` request parameter `Authorization`
  - the endpoint scheme security `bearer_auth` was added to the API
- **2026-09-12** `668373c892ce`: 1 info
  - api operation id `listSubAccountApiKeys` removed and replaced with `subAccounts_listSubAccountApiKeys`
- **2026-09-03** `ac0d9be94846`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/middesk/apis/middesk-api/changes/v1/sub_accounts/:sub_account_id/api_keys/get.md)

---

[API](https://skmtc.dev/middesk/apis/middesk-api.md) - [All operations](https://skmtc.dev/middesk/apis/middesk-api/llms.txt) - [OpenAPI document](https://skmtc.dev/middesk/apis/middesk-api/revisions/adc98c847a77?raw)
