There's a new version of the HubSpot API

As of November 30, 2022, HubSpot API keys are no longer a supported authentication method for accessing HubSpot APIs. Instead, you should use a private app access token or OAuth to authenticate API calls. Learn more about this change and how to migrate an API key integration to use a private app instead.

List the folder metadata

Last updated May 31, 2023

GET https://api.hubapi.com/filemanager/api/v2/folders

Method Details

HTTP Methods:

GET

Response Format:

json

Requires Authentication?

Yes

Rate Limited?

Yes

Headers

User-Agent

Products:

Marketing & CRM

Required Scope:

files

Get the metadata for the folders in file manager.

Required Parameters How to use Description
OAuth access token or private app access token Authorization: Bearer {token} header Used to authenticate the request. Please see this page for more details about authentication.

Optional query string filters & options

If a parameter supports a filter type of 'gt', that means you can append a double underscore to the parameter name to find all items greater than the value. For example, the following query will find all items created than the 'updated' time:
Parameter name Description
limit The number of items to return. Defaults to 20
offset The offset set to start returning rows from. Defaults to 0.
deleted_at Get folders deleted on or after a certain date. Available filers are exact, range, gt, gte, lt, lte. Use the parameter followed by two underscores and the filter of choice. For example deleted_at__lt=1431489600000 will return all files deleted before May 15, 2015. Filters take unix timestamps in milliseconds.
id Get a specific folder.
name Get folders with a certain naming convention. Available filters are exact, contains, icontains. Use the paramter followed by two underscores and the filter of choice. For example name__icontains=abc will return all folders that have the characters abc (in a row) in the name.
parent_folder_id Get all folders in a specific folder. Available filers are exact, range, gt, gte, lt, lte. Use the parameter followed by two underscores and the filter of choice. For example parent_folder_id__lte=2857188310 will return all folders with an id less than or equal to 2857188310.

Example Usage and Result

Hit this URL with a HTTP method of GET  http://api.hubapi.com/filemanager/api/v2/folders

JSON Fields returned in the response

Parameter name Type Description
created long When the folder was first created, in milliseconds since the epoch
deleted_at long When the folder was deleted, in milliseconds since the epoch. Zero if the folder was never deleted. Use a DELETE request to delete a folder, do not set this directly.
full_path string The full path to the folder, with all the parent folder paths included
id string The unique id of the folder
name string The name of the folder
parent_folder_id string The id of the parent folder
updated long When the folder was last updated, in milliseconds since the epoch