> ## Documentation Index
> Fetch the complete documentation index at: https://developers.benchmarkemail.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List account images

> Returns a paginated list of active image files for the account (for image picker). When `searchText`, `fileType` or `source` is supplied, only the most recent 5000 files are considered: `total` counts within that window and later pages are not reachable. With `kind=file`, lists ready hosted documents, newest first; `fileType`, `source`, `includeImported` and `sort` are rejected.



## OpenAPI

````yaml /openapi.json get /api/file-upload
openapi: 3.0.0
info:
  description: >-
    Public REST API for Benchmark Email.


    Authenticate every request by including your API key in the `X-API-Key`
    header.

    Each key is issued with one or more scopes that control which endpoints it
    may call.


    Rate limits: 60 requests per minute per account.

    Monthly quota: determined by your subscription plan.


    Contact text field values are HTML-entity encoded. When a contact is
    created, updated or imported, Benchmark stores its text field values
    HTML-entity escaped: `&` `<` `>` `"` `'` `/` `\` and the backtick become
    `&amp;` `&lt;` `&gt;` `&quot;` `&#x27;` `&#x2F;` `&#x5C;` and `&#96;`.
    Responses return that stored form (for example `Maple &amp; Co` for `Maple &
    Co`), so decode values before displaying them. Send plain, unescaped text in
    requests and search filters: Benchmark escapes it before storing or matching
    it. Create and update also remove anything that looks like an HTML tag,
    including the text after a bare `<`.
  title: Benchmark Email API
  version: 1.0.0
servers:
  - description: >-
      Your account's API base URL. Copy the full URL shown on Settings > API
      Keys in your Benchmark Email account and paste it here.
    url: '{apiBaseUrl}'
    variables:
      apiBaseUrl:
        default: ''
        description: >-
          Your account's API base URL. Copy it from Settings > API Keys in your
          Benchmark Email account.
security:
  - apiKeyAuth: []
tags:
  - description: Account related endpoints
    name: account
  - description: File upload (Unlayer custom storage) endpoints
    name: file-upload
  - description: Contact related endpoints
    name: contact
  - description: Contact structure related endpoints
    name: contact-structure
  - description: List related endpoints
    name: lists
  - description: Contact import related endpoints
    name: contact-import
  - description: Email domain related endpoints
    name: email-domain
  - description: Email campaign related endpoints
    name: email-campaign
  - description: Email template related endpoints
    name: email-template
  - description: Report related endpoints
    name: reports
paths:
  /api/file-upload:
    get:
      tags:
        - file-upload
      summary: List account images
      description: >-
        Returns a paginated list of active image files for the account (for
        image picker). When `searchText`, `fileType` or `source` is supplied,
        only the most recent 5000 files are considered: `total` counts within
        that window and later pages are not reachable. With `kind=file`, lists
        ready hosted documents, newest first; `fileType`, `source`,
        `includeImported` and `sort` are rejected.
      operationId: listFileUploads
      parameters:
        - description: 1-based page number
          in: query
          name: pageNumber
          required: false
          schema:
            default: 1
            minimum: 1
            type: integer
        - description: Number of items per page
          in: query
          name: pageSize
          required: false
          schema:
            default: 20
            maximum: 100
            minimum: 10
            type: integer
        - description: >-
            When false (default), excludes auto-imported images (template-copy,
            campaign-copy) from listing. Set to true to include all images.
            Ignored when `source` is supplied.
          in: query
          name: includeImported
          required: false
          schema:
            default: false
            type: boolean
        - description: >-
            Filename search query. When present, results are filename matches
            (exact/case-insensitive/prefix, plus substring/suffix for EN/ES/PT;
            prefix/exact for JA/TW; single-char min for JA/TW, 2-char min for
            EN/ES/PT); when absent, the default list is returned.
          in: query
          name: searchText
          required: false
          schema:
            maxLength: 200
            type: string
        - description: >-
            Optional image-format filter (jpeg, png, gif, webp). Combinable with
            searchText (AND). When present without searchText, filters the list
            by format only.
          in: query
          name: fileType
          required: false
          schema:
            enum:
              - jpeg
              - png
              - gif
              - webp
            type: string
        - description: >-
            Lists only files with this source, in the order `sort` selects,
            instead of the default listing. Overrides includeImported.
            Combinable with searchText and fileType (AND).
          in: query
          name: source
          required: false
          schema:
            enum:
              - brand-kit
            type: string
        - description: >-
            Newest first (default) or oldest first. With `searchText`,
            `fileType` or `source`, ordering applies within the newest 5,000
            files.
          examples:
            ascSort:
              summary: ascending sort by createdAt
              value: createdAt:asc
            descSort:
              summary: descending sort by createdAt
              value: createdAt:desc
          in: query
          name: sort
          required: false
          schema:
            default: createdAt:desc
            enum:
              - createdAt:desc
              - createdAt:asc
            type: string
        - description: >-
            Set to `file` for a hosted document (.pdf, .docx, .pptx, .csv, .txt,
            at most 10 MB) used by the Benchmark email editor's file links.
            `kind=file` is for the email editor only: requests authenticated
            with an API key receive 403. With `kind=file`, `source` and `dedupe`
            are rejected on upload, and `fileType`, `source`, `includeImported`
            and `sort` on the list. Omit it for the image library.
          in: query
          name: kind
          required: false
          schema:
            enum:
              - file
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  files:
                    items:
                      anyOf:
                        - properties:
                            createdAt:
                              format: date-time
                              type: string
                            fileId:
                              format: uuid
                              type: string
                            fileSize:
                              type: integer
                            height:
                              description: Image height in pixels when known
                              minimum: 1
                              type: integer
                            mimeType:
                              type: string
                            originalName:
                              type: string
                            url:
                              format: uri
                              type: string
                            width:
                              description: Image width in pixels when known
                              minimum: 1
                              type: integer
                          type: object
                        - description: A hosted document, answered for kind=file.
                          properties:
                            createdAt:
                              format: date-time
                              type: string
                            downloadUrl:
                              description: Present only when state is ready.
                              format: uri
                              type: string
                            fileId:
                              format: uuid
                              type: string
                            fileSize:
                              type: integer
                            kind:
                              enum:
                                - file
                              type: string
                            mimeType:
                              type: string
                            originalName:
                              type: string
                            state:
                              enum:
                                - scanning
                                - ready
                                - rejected
                                - unavailable
                              type: string
                          required:
                            - fileId
                            - kind
                            - originalName
                            - mimeType
                            - fileSize
                            - createdAt
                            - state
                          type: object
                    type: array
                  pageNumber:
                    minimum: 1
                    type: integer
                  pageSize:
                    maximum: 100
                    minimum: 10
                    type: integer
                  total:
                    minimum: 0
                    type: integer
                required:
                  - files
                  - total
                  - pageNumber
                  - pageSize
                type: object
          description: Paginated list of files
        '400':
          content:
            application/json:
              example:
                errors:
                  - debug:
                      maxLength: 200
                    errorType: ModelValidationError
                    field: searchText
                    message: searchText must be 200 characters or fewer
              schema:
                properties:
                  errors:
                    description: List of application errors
                    items:
                      properties:
                        debug:
                          description: Validation debug payload
                          type: object
                        errorType:
                          description: >-
                            Error code (e.g. ContactFieldInUseError,
                            ValidationError)
                          type: string
                        field:
                          description: Field path when applicable
                          type: string
                        fieldId:
                          description: Field identifier when applicable
                          type: string
                        message:
                          description: Human-readable error message
                          type: string
                      required:
                        - message
                        - errorType
                        - debug
                      type: object
                    type: array
                required:
                  - errors
                type: object
          description: >-
            Invalid query parameter (e.g. searchText over 200 characters), a
            `kind` value other than `file`, or, with `kind=file`, any of
            `fileType`, `source`, `includeImported` or `sort`
            (`ModelValidationError`, with `field` naming the parameter)
        '403':
          description: >-
            API key missing the files:read scope; with `kind=file`, any API key,
            or an account without file attachments (`ForbiddenError`)
        '500':
          content:
            text/plain:
              schema:
                example: System Error
                type: string
          description: Search backend failure. The error handler returns a plain-text body.
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      description: API key authentication
      in: header
      name: X-API-Key
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.