---
title: "Count trust-level audit logs for users"
method: POST
path: "/api/admin/v1/audit_logs/counts"
tags: ["Admin"]
---

# Count trust-level audit logs for users

`POST /api/admin/v1/audit_logs/counts`

Returns the number of trust-level audit log entries for each requested user ID. Users with no audit logs are included with a count of 0. Up to 1000 user IDs are honored.

## Request body

- object
  - `user_ids` integer[], required — Array of user IDs (up to 1000). Required; a blank or non-array value returns 422.

## Response `200`

successful

- object
  - `counts` object — Map of user ID (as string) to audit log count.

## Other responses

- `422` — invalid user_ids — Returned ("user_ids array required") when user_ids is blank or not an array, or ("no valid user_ids provided") when the array is empty.

---

[API](https://skmtc.net/hackclub/apis/hackatime-admin-api.md) · [All operations](https://skmtc.net/hackclub/apis/hackatime-admin-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hackclub/hackatime-admin-api/versions/6ba07170a777/schema)
