---
title: "Get attachments statistics"
method: GET
path: "/admin/attachments/stats"
tags: ["Admin Attachments"]
---

# Get attachments statistics

`GET /admin/attachments/stats`

Retrieve statistics about attachments including total, images, videos, explicit content, failed, and successful counts. When filters are provided, returns both general stats and filtered stats.

## Query parameters

- `type` 'image' | 'video' | 'audio' | 'gift' | 'all'
- `status` 'IN_QUEUE' | 'IN_PROGRESS' | 'COMPLETED' | 'FAILED' | 'CANCELLED' | 'TIMED_OUT'
- `explicit` boolean
- `userId` string
- `from` string
- `to` string
- `isFromUser` boolean

## Response `200`

Attachments statistics retrieved successfully

- AttachmentsStatsResponseDto
  - `total` number, required — Total number of attachments
  - `images` number, required — Number of image attachments
  - `videos` number, required — Number of video attachments
  - `explicit` number, required — Number of explicit content attachments
  - `failed` number, required — Number of failed attachments
  - `successful` number, required — Number of successful attachments
  - `filtered` FilteredAttachmentsStatsDto
    - `total` number, required — Total number of filtered attachments
    - `images` number, required — Number of filtered image attachments
    - `videos` number, required — Number of filtered video attachments
    - `explicit` number, required — Number of filtered explicit content attachments
    - `failed` number, required — Number of filtered failed attachments
    - `successful` number, required — Number of filtered successful attachments

---

[API](https://skmtc.dev/miaai/apis/backend-template-api.md) · [All operations](https://skmtc.dev/miaai/apis/backend-template-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/miaai/backend-template-api/revisions/2a8d88a5124f/schema)
