---
title: "List media files (JSON body)"
method: POST
path: "/media/list/"
tags: ["Media"]
---

# List media files (JSON body)

`POST /media/list/`

## Request

- Base URL: `https://wbiztool.com/api/v1`
- URL: `https://wbiztool.com/api/v1/media/list/`
- Auth: none required

Same as the GET form with the parameters in a JSON body, which keeps the API key out of URLs. If `client_id` is also in the query string, the body is ignored. In form fields `page` and `limit` are ignored.

## Request body

- ListMediaRequest: Your API credentials, sent in the request body (JSON or form fields) of every request that uses them. Both come from Settings → API keys in the dashboard. The API key decides which workspace the request acts on.
  - `client_id` integer, required: Your API Client ID from Settings → API keys.
  - `api_key` string, required: One of your API keys from the same page. Keep it secret.
  - `page` integer
  - `limit` integer
  - `file_type` 'image' | 'file'
  - `search` string: Case-insensitive match on the original or stored name.

## Response `200`

The files (`status: 1`), newest first, or an error (`status: 0`). Errors also come back with HTTP 200 and `status: 0`: `client_id is required`, `api_key is required`, `client_id must be a valid integer`, `Invalid API key`, `Invalid client_id for this API key`, `Error retrieving media files: …`.

- union
  - MediaList
    - `status` 1, required
    - `message` string, required
    - `data` object, required
      - `total_count` integer
      - `page` integer
      - `limit` integer
      - `total_pages` integer
      - `has_next` boolean
      - `has_previous` boolean
      - `media_files` MediaFile[]
        - `id` integer: ID of the media file.
        - `file_name` string: Name the file is stored under (generated by WbizTool).
        - `original_file_name` string: The name of the uploaded file.
        - `file_url` string, uri: Public download URL; use it as `img_url` or `file_url` when sending. Store it as it is (CDN or S3 host).
        - `file_type` 'image' | 'file'
        - `file_size` integer: Size in bytes.
        - `file_size_display` string
        - `mime_type` string
        - `is_image` boolean
        - `file_extension` string: Lower-case extension without the dot.
        - `created_at` string, date-time
        - `uploaded_by` string, nullable: Login username of the team member who uploaded the file. Not returned by the upload endpoint.
        - `modified_at` string, date-time: Only returned by the get-media endpoint.
  - MediaError
    - `status` 0, required
    - `message` string, required

---

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