APIHub
Back to Explore

Files

The Files API lets you upload, retrieve, update, replace, and delete individual files, generate signed URLs for private access, import files from external URLs, and perform detailed searches with extensive filtering options. It also supports creating, searching, updating (asynchronously), and deleting folders, as well as GDPR‑compliant file deletion and async task status checks.

Uncategorized
apiKeyQuery
HTTPS
CORS: Unknown
Description enriched
Visit official documentation

Latency

386ms p95

Uptime

100.0% 30d

Playground

Verified

live

Endpoints

REST · JSON
POST

/files/v3/files

Upload file

GET

/files/v3/files/import-from-url/async/tasks/{taskId}/status

Check import status.

  • taskId (path, required) — Import by URL task ID
POST

/files/v3/files/import-from-url/async

Import a file from a URL into the file manager.

GET

/files/v3/files/search

Search files

  • properties (query) — Desired file properties in the return object.
  • after (query) — The maximum offset of items for a given search is 10000. Narrow your search down if you are reaching this limit.
  • before (query)
  • limit (query, limit) — Number of items to return. Maximum limit is 100.
  • sort (query) — Sort files by a given field.
  • id (query) — Search files by given ID.
  • createdAt (query) — Search files by time of creation.
  • createdAtLte (query)
  • createdAtGte (query)
  • updatedAt (query) — Search files by time of latest updated.
  • updatedAtLte (query)
  • updatedAtGte (query)
  • name (query) — Search for files containing the given name.
  • path (query) — Search files by path.
  • parentFolderId (query) — Search files within given folder ID.
  • size (query, limit) — Query by file size.
  • height (query) — Search files by height of image or video.
  • width (query) — Search files by width of image or video.
  • encoding (query) — Search files with specified encoding.
  • type (query) — Filter by provided file type.
  • extension (query) — Search files by given extension.
  • url (query) — Search for given URL
  • isUsableInContent (query) — If true shows files that have been marked to be used in new content. It false shows files that should not be used in new content.
  • allowsAnonymousAccess (query) — If 'true' will show private files; if 'false' will show public files
DELETE

/files/v3/files/{fileId}

Delete file

  • fileId (path, required) — File ID to delete
GET

/files/v3/files/{fileId}

Get file.

  • fileId (path, required) — Id of the desired file.
  • properties (query)
PATCH

/files/v3/files/{fileId}

update file properties

  • fileId (path, required) — ID of file to update
PUT

/files/v3/files/{fileId}

Replace file.

  • fileId (path, required) — Id of the desired file.
DELETE

/files/v3/files/{fileId}/gdpr-delete

GDPR delete

  • fileId (path, required) — ID of file to GDPR delete
GET

/files/v3/files/{fileId}/signed-url

Get signed URL to access private file.

  • fileId (path, required) — ID of file.
  • size (query, limit) — For image files. This will resize the image to the desired size before sharing. Does not affect the original file, just the file served by this signed URL.
  • expirationSeconds (query) — How long in seconds the link will provide access to the file.
  • upscale (query) — If size is provided, this will upscale the image to fit the size dimensions.
POST

/files/v3/folders

Create folder.

GET

/files/v3/folders/search

Search folders

  • properties (query) — Properties that should be included in the returned folders.
  • after (query) — The maximum offset of items for a given search is 10000. Narrow your search down if you are reaching this limit.
  • before (query)
  • limit (query, limit) — Limit of results to return. Max limit is 100.
  • sort (query) — Sort results by given property. For example -name sorts by name field descending, name sorts by name field ascending.
  • id (query) — Search folder by given ID.
  • createdAt (query) — Search for folders with the given creation timestamp.
  • createdAtLte (query)
  • createdAtGte (query)
  • updatedAt (query) — Search for folder at given update timestamp.
  • updatedAtLte (query)
  • updatedAtGte (query)
  • name (query) — Search for folders containing the specified name.
  • path (query) — Search for folders by path.
  • parentFolderId (query) — Search for folders with the given parent folder ID.
POST

/files/v3/folders/update/async

Update folder properties

GET

/files/v3/folders/update/async/tasks/{taskId}/status

Check folder update status.

  • taskId (path, required) — Task ID of folder update
DELETE

/files/v3/folders/{folderId}

Delete folder.

  • folderId (path, required) — ID of folder to delete.
GET

/files/v3/folders/{folderId}

Get folder

  • folderId (path, required) — ID of desired folder
  • properties (query) — Properties to set on returned folder.
DELETE

/files/v3/folders/{folderPath}

Delete folder.

  • folderPath (path, required) — Path of folder to delete
GET

/files/v3/folders/{folderPath}

Get folder.

  • folderPath (path, required) — Path of desired folder.
  • properties (query) — Properties to set on returned folder.

18 endpoints auto-detected

Authentication

This API uses an API key, passed as the "hapikey" query parameter. No OAuth required.

curl -X POST \
  "https://api.hubapi.com/files/v3/files?hapikey=YOUR_API_KEY"

api.hubapi.com · HTTPS only