inboxes > files

Lists the inbox's files in path order, pending ones included, optionally only those whose path starts with path_prefix. A prefix matches characters, not whole segments: reports/q matches reports/q3.pdf. Items carry no download URL; get a file for one.

The list is read in the region that serves the request, so a file created or deleted a moment ago may not show yet. Expired files never show.

Requires the file_read permission.

get/v0/inboxes/{inbox_id}/files

Request

  • Base URL
    https://api.agentmail.to
  • URL
    https://api.agentmail.to/v0/inboxes/{inbox_id}/files
  • Auth
    HTTP bearer

Path parameters

inbox_idstring required

The ID of the inbox.

Query parameters

path_prefixstring

Only files whose path starts with this. Held to the path rules, except it may stop partway.

limitinteger

Limit of number of items returned.

Page size, 100 by default and at most 500.

page_tokenstring

Page token for pagination.

ascendingboolean

Path order, true by default. false lists in reverse.

Response

Response with status 200

countinteger required

Number of items returned.

limitinteger required

Limit of number of items returned.

next_page_tokenstring

Page token for pagination.

Changes