GET/files

List Files

Lists Files with optional filters for creation time, purpose, and idempotency key. Use cursor to continue from the previous page and limit to control the number of results returned.

8 parameters
cursorstringoptional
Return the page of entries after this cursor.
limitintegeroptional
Maximum number of Files to return, from 1 to 100. Defaults to 100 when omitted.
Default:100
created_at.afterstringoptional
Return Files created after this ISO 8601 date-time.
created_at.beforestringoptional
Return Files created before this ISO 8601 date-time.
created_at.on_or_afterstringoptional
Return Files created at or after this ISO 8601 date-time.
created_at.on_or_beforestringoptional
Return Files created at or before this ISO 8601 date-time.
purpose.inarray<string>optional
Filter by one or more supported File purposes, encoded as a comma-delimited list. Examples include `card_dispute_attachment`, `check_image_front`, and `form_1099_int`.
idempotency_keystringoptional
Filter by the idempotency key associated with the File. Must be 1 to 200 characters.

3 status codes
200Returns a list of File objects in `data` and a `next_cursor` for retrieving the next page, or null when there are no more results.
dataarray<File>required
The contents of the list.
next_cursorstringrequired
A pointer to a place in the list. Pass this as the `cursor` parameter to retrieve the next page of results. If there are no more results, the value will be `null`.
4XXReturned when the request has a client-side error.
5XXReturned when the server encounters an error processing the request.

Error handling

limit must be between 1 and 100 and defaults to 100 when omitted. Creation-time filters must use ISO 8601 date-time values, and idempotency_key must be 1 to 200 characters. Encode multiple purpose.in values as a comma-delimited list of supported File purposes.