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": "<string>",
  "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>

NONE: Do not run any duplicate validation. REJECT: Reject the upload if a duplicate is found. RETURN_EXISTING: If a duplicate file is found, do not upload a new file and return the found duplicate instead.

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 for the file.

parentFolderId
string

FolderId where the file should be moved to. folderId and folderPath parameters cannot be set 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

File access. Can be PUBLIC_INDEXABLE, PUBLIC_NOT_INDEXABLE, PRIVATE.

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

If the file is deleted.

createdAt
string<date-time>
required

Creation time of the file object.

id
string
required

File ID.

updatedAt
string<date-time>
required

Timestamp of the latest update to the file.

archivedAt
string<date-time>

Deletion time of the file object.

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 file. ex: .jpg, .png, .gif, .pdf, etc.

fileMd5
string

The MD5 hash of the file.

height
integer<int32>

For image and video files, the height of the content.

isUsableInContent
boolean

Previously "archied". Indicates if the file should be used when creating new content like web pages.

name
string

Name of the file.

parentFolderId
string

ID of the folder the file is in.

path
string

Path of the file in the file manager.

size
integer<int64>

Size of the file in bytes.

sourceGroup
string
type
string

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

url
string

URL of the given file. This URL can change depending on the domain settings of the account. Will use the select file hosting domain.

width
integer<int32>

For image and video files, the width of the content.

Last modified on December 16, 2025