files

List the org's files

Changed on

Returns one page of the org's file library, newest first, with the org's standing usage against its storage quota. Every file carries its source (upload, capture or message) and, for a capture or message attachment, its surface and capture state. Filter with source, surface, session_id, phone_id and media_type, among others. Files persist until deleted and any ready file can be delivered to a phone the org holds.

get/files

Request

Query parameters

limitinteger

max items per page

offsetinteger

pagination offset

searchstring

filter by filename, case-insensitive substring match

source'upload' | 'capture' | 'message'

only files of this source

surface'phone'

only captures off this surface

session_idstring uuid

only files captured by this session

phone_idstring

only files from this phone: attachments on messages it received, and files its sessions captured

mime_typestring

only files of exactly this media type

media_type'image' | 'video'

only images or only videos, whatever their exact media type

min_size_bytesinteger

only files at least this many bytes (0 = no bound)

max_size_bytesinteger

only files at most this many bytes (0 = no bound)

created_afterstring date-time

only files registered at or after this time (RFC 3339)

created_beforestring date-time

only files registered at or before this time (RFC 3339)

order_bystring

Sort expression '<field> [asc|desc]', direction defaulting to desc; field is created_at, filename, size_bytes or source (which groups files by source, newest first within each).

Response

OK

$schemastring uri

A URL to the JSON Schema for this object.

totalinteger required

Total files matching the query.

Example response

{
  "$schema": "/api/v1/FileListResponse.json",
  "files": [
    {
      "$schema": "/api/v1/FileSummary.json"
    }
  ]
}

Changes

    • warning

      deleted the query request parameter order

    • warning

      deleted the query request parameter q

    • warning

      deleted the query request parameter sort

    • warning

      added the new message enum value to the // response property for the response status

    • info

      added the new optional query request parameter media_type

    • info

      added the new optional query request parameter order_by

    • info

      added the new optional query request parameter phone_id

    • info

      added the new optional query request parameter search

    • info

      added the new enum value message to the query request parameter source

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      endpoint added