---
title: "Get service account API token count in an org"
method: POST
path: "/orgs/{orgId}/service-accounts/count"
tags: ["API Token"]
---

# Get service account API token count in an org

`POST /orgs/{orgId}/service-accounts/count`

Gets count of API tokens for specified service accounts within an organization.

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

## Path parameters

- `orgId` string, required

## Request body

- string[] — List of service account IDs (max 100 per request)

## Response `200`

Returned if the request is successful.

- ServiceAccountCredentialCountResponse
  - `validServiceAccountIds` ServiceAccountCredentialCount[], required — List of valid service accounts with their credential counts
    - `serviceAccountId` string, required — The service account ID
    - `credentialsCount` integer, required — The number of API tokens for this service account
  - `invalidServiceAccountIds` string[], required — List of invalid service account IDs that were not found

## Other responses

- `400` — Returned if request is not in correct format.
- `403` — Returned if the user does not have permission to view service account 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)
