Skip to main content
PATCH
/
files
/
v3
/
files
/
{fileId}
Update file properties
curl --request PATCH \
  --url https://api.hubapi.com/files/v3/files/{fileId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "access": "HIDDEN_INDEXABLE",
  "clearExpires": true,
  "expiresAt": "2023-11-07T05:31:56Z",
  "isUsableInContent": true,
  "name": "<string>",
  "parentFolderId": "<string>",
  "parentFolderPath": "<string>"
}
'
{
  "access": "HIDDEN_INDEXABLE",
  "archived": true,
  "createdAt": "2023-11-07T05:31:56Z",
  "id": "<string>",
  "updatedAt": "2023-11-07T05:31:56Z",
  "archivedAt": "2023-11-07T05:31:56Z",
  "defaultHostingUrl": "<string>",
  "encoding": "<string>",
  "expiresAt": 123,
  "extension": "<string>",
  "fileMd5": "<string>",
  "height": 123,
  "isUsableInContent": true,
  "name": "<string>",
  "parentFolderId": "<string>",
  "path": "<string>",
  "size": 123,
  "sourceGroup": "CONTENT",
  "type": "<string>",
  "url": "<string>",
  "width": 123
}

Supported products

Requires one of the following products or higher.
Marketing HubMarketing Hub -Free
Sales HubSales Hub -Free
Service HubService Hub -Free
Content HubContent Hub -Free
Data HubData Hub -Free

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

fileId
string
required

ID of file to update

Body

application/json

Object for updating files.

access
enum<string>

PUBLIC_INDEXABLE: File is publicly accessible by anyone who has the URL. Search engines can index the file. PUBLIC_NOT_INDEXABLE: File is publicly accessible by anyone who has the URL. Search engines can't index the file. PRIVATE: File is NOT publicly accessible. Requires a signed URL to see content. Search engines can't index the file.

Available options:
HIDDEN_INDEXABLE,
HIDDEN_NOT_INDEXABLE,
HIDDEN_PRIVATE,
HIDDEN_SENSITIVE,
PRIVATE,
PUBLIC_INDEXABLE,
PUBLIC_NOT_INDEXABLE,
SENSITIVE
clearExpires
boolean
expiresAt
string<date-time>
isUsableInContent
boolean

Mark whether the file should be used in new content or not.

name
string

New name. If specified the folder's name and fullPath will change. All children of the folder will be updated accordingly.

parentFolderId
string

New parent folderId. If changed, the folder and all it's children will be moved into the specified folder. parentFolderId and parentFolderPath cannot be specified at the same time.

parentFolderPath
string

Folder path where the file should be moved to. folderId and folderPath parameters cannot be set at the same time.

Response

successful operation

File

access
enum<string>
required

PUBLIC_INDEXABLE: File is publicly accessible by anyone who has the URL. Search engines can index the file. PUBLIC_NOT_INDEXABLE: File is publicly accessible by anyone who has the URL. Search engines can't index the file. PRIVATE: File is NOT publicly accessible. Requires a signed URL to see content. Search engines can't index the file.

Available options:
HIDDEN_INDEXABLE,
HIDDEN_NOT_INDEXABLE,
HIDDEN_PRIVATE,
HIDDEN_SENSITIVE,
PRIVATE,
PUBLIC_INDEXABLE,
PUBLIC_NOT_INDEXABLE,
SENSITIVE
archived
boolean
required

Marks whether the folder is deleted or not.

createdAt
string<date-time>
required

Timestamp of folder creation.

id
string
required

File ID.

updatedAt
string<date-time>
required

Timestamp of the latest update to the folder.

archivedAt
string<date-time>

Timestamp of folder deletion.

defaultHostingUrl
string

Default hosting URL of the file. This will use one of HubSpot's provided URLs to serve the file.

encoding
string

Encoding of the file.

expiresAt
integer<int64>
extension
string

Extension of the requested file.

fileMd5
string

The MD5 hash of the file.

height
integer<int32>

For image and video files. The height of the file.

isUsableInContent
boolean

Mark whether the file should be used in new content or not.

name
string

New name. If specified the folder's name and fullPath will change. All children of the folder will be updated accordingly.

parentFolderId
string

New parent folderId. If changed, the folder and all it's children will be moved into the specified folder. parentFolderId and parentFolderPath cannot be specified at the same time.

path
string

Path of the folder in the file manager.

size
integer<int64>

Size in bytes of the requested file.

sourceGroup
enum<string>
Available options:
CONTENT,
CONVERSATIONS,
FORMS,
UI_EXTENSIONS,
UNKNOWN
type
string

Type of the file. Can be IMG, DOCUMENT, AUDIO, MOVIE, or OTHER.

url
string

URL to download the new file from.

width
integer<int32>

For image and video files. The width of the file.

Last modified on February 12, 2026