Skip to content

HubSpot: Files schemas

17 HubSpot schemas with complete fields and constraints.

← Files operations · All schemas

Create folder — request body — body

FieldTypePresenceDescription and constraints
$objectRoot
namestringRequired within parentThe name of the folder to be created. This is a required string property.
parentFolderIdstringOptionalThe ID of the parent folder under which the new folder will be created. This is an optional string field.
parentPathstringOptionalThe path of the parent folder under which the new folder will be created. This is an optional string property.

Create folder — response body

FieldTypePresenceDescription and constraints
$objectRoot
archivedbooleanRequired within parentA boolean indicating whether the folder is archived.
archivedAtstringOptionalThe date and time when the folder was archived, in ISO 8601 format.
Format: date-time
createdAtstringRequired within parentThe date and time when the folder was created, in ISO 8601 format.
Format: date-time
idstringRequired within parentThe unique ID for the folder, represented as a string.
namestringOptionalThe name of the folder, represented as a string.
parentFolderIdstringOptionalThe unique identifier of the parent folder, represented as a string.
pathstringOptionalThe path of the folder within the file system, represented as a string.
updatedAtstringRequired within parentThe date and time when the folder was last updated, in ISO 8601 format.
Format: date-time

Generate signed URL — response body

FieldTypePresenceDescription and constraints
$objectRoot
expiresAtstringRequired within parentThe date and time when the URL expires, in ISO 8601 format.
Format: date-time
extensionstringOptionalThe file extension of the file.
heightJSONOptional
height (anyOf 1)integerAlternativeThe height of the file in pixels.
Format: int32
height (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
namestringOptionalThe name of the file.
sizeJSONOptional
size (anyOf 1)integerAlternativeThe size of the file in bytes.
Format: int64
size (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
typestringOptionalThe type of the file.
urlstringRequired within parentThe signed URL string that provides access to the file.
widthJSONOptional
width (anyOf 1)integerAlternativeThe width of the file in pixels.
Format: int32
width (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Import File — request body — body

FieldTypePresenceDescription and constraints
$objectRoot
accessstringRequired within parentSpecifies the access level of the file. Valid values include 'PUBLIC_INDEXABLE', 'PUBLIC_NOT_INDEXABLE', 'HIDDEN_INDEXABLE', 'HIDDEN_NOT_INDEXABLE', 'HIDDEN_PRIVATE', 'PRIVATE', 'HIDDEN_SENSITIVE', and 'SENSITIVE'.
One of: HIDDEN_INDEXABLE, HIDDEN_NOT_INDEXABLE, HIDDEN_PRIVATE, HIDDEN_SENSITIVE, PRIVATE, PUBLIC_INDEXABLE, PUBLIC_NOT_INDEXABLE, SENSITIVE
duplicateValidationScopestringRequired within parentOptional: Specifies the scope for duplicate validation. Valid values include 'ENTIRE_PORTAL' and 'EXACT_FOLDER'.
One of: ENTIRE_PORTAL, EXACT_FOLDER
duplicateValidationStrategystringRequired within parentDefines the strategy for handling duplicate files. Valid values are 'NONE', 'REJECT', and 'RETURN_EXISTING'.
One of: NONE, REJECT, RETURN_EXISTING
expiresAtstringOptionalOptional: Epoch time when the file will expire, in ISO 8601 format. Do not set if the file should live indefinitely
Format: date-time
folderIdstringOptionalThe ID of the folder where the file will be stored. This or folderPath must be set
folderPathstringOptionalThe path of the folder where the file will be stored. This or FolderId must be set.
namestringOptionalThe name of the file to be imported.
overwritebooleanRequired within parentOptional boolean indicating whether to overwrite an existing file at the same location.
ttlstringOptionalDeprecated Do Not use. Optional: String representing the time-to-live for the file, same a expiresAt but takes a Period String.
urlstringOptionalThe URL from which the file will be imported.

Import File — response body

FieldTypePresenceDescription and constraints
$objectRoot
idstringRequired within parentThe ID of the import task.
linksobjectOptionalA map of link names to associated URIs related to the import task. Each entry in the map is a string.
Additional keys: see wildcard field
links.*stringAdditional keys

Retrieve file stats — response body

FieldTypePresenceDescription and constraints
$objectRoot
fileModelOptionalExpand Upload file — response body
folderModelOptionalExpand Create folder — response body

Referenced models: Create folder — response body, Upload file — response body

Retrieve status — response body

FieldTypePresenceDescription and constraints
$objectRoot
completedAtstringRequired within parentThe date and time when the file action was completed, in ISO 8601 format.
Format: date-time
errorsarrayOptionalAn array of StandardError objects detailing any errors that occurred during the file action.
errors[]ModelEach itemExpand Retrieve status — response body — errors item
linksobjectOptionalA map of link names to associated URIs, providing additional information about the file action.
Additional keys: see wildcard field
links.*stringAdditional keys
numErrorsJSONOptional
numErrors (anyOf 1)integerAlternativeThe number of errors encountered during the file action, represented as an integer.
Format: int32
numErrors (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
requestedAtstringOptionalThe date and time when the file action was requested, in ISO 8601 format.
Format: date-time
resultModelOptionalExpand Upload file — response body
startedAtstringRequired within parentThe date and time when the file action started, in ISO 8601 format.
Format: date-time
statusstringRequired within parentThe current status of the file action. Valid values include 'PENDING', 'PROCESSING', 'CANCELED', and 'COMPLETE'.
Known values: CANCELED, COMPLETE, PENDING, PROCESSING
taskIdstringRequired within parentThe unique identifier for the task associated with the file action.

Referenced models: Retrieve status — response body — errors item, Upload file — response body

Retrieve status — response body — errors item

FieldTypePresenceDescription and constraints
$objectRootYe olde error
categorystringRequired within parentA string that categorizes the type of error.
contextobjectRequired within parentAn object containing additional context about the error condition, with properties as arrays of strings.
Additional keys: see wildcard field
context.*arrayAdditional keys
context.*[]stringEach item
errorsarrayRequired within parentAn array of ErrorDetail objects that provide further information about the error.
errors[]ModelEach itemExpand Retrieve status — response body — errors item errors item
idstringOptionalA string representing a unique identifier for the error.
linksobjectRequired within parentAn object mapping link names to associated URIs with documentation or remediation steps for the error.
Additional keys: see wildcard field
links.*stringAdditional keys
messagestringRequired within parentA string containing a human-readable message describing the error.
statusstringRequired within parentA string indicating the status of the error.
subCategoryobjectOptionalAn object providing more specific details about the error category.

Referenced models: Retrieve status — response body — errors item errors item

Retrieve status — response body — errors item errors item

FieldTypePresenceDescription and constraints
$objectRootRepresents detailed information about an error that occurred in the API. This component is used to provide additional context and specifics about errors, typically as part of an error response.
codestringOptionalThe status code associated with the error detail.
contextobjectOptionalContext about the error condition, represented as an object with additional properties that are arrays of strings.
Additional keys: see wildcard field
context.*arrayAdditional keys
context.*[]stringEach item
instringOptionalThe name of the field or parameter in which the error was found.
messagestringRequired within parentA human readable message describing the error along with remediation steps where appropriate. It is a string.
subCategorystringOptionalA specific category that contains more specific detail about the error. This is a string.

Search files — response body

FieldTypePresenceDescription and constraints
$objectRoot
pagingModelOptionalExpand Search files — response body — paging
resultsarrayRequired within parentAn array of file objects, each representing a file with its associated metadata.
results[]ModelEach itemExpand Upload file — response body

Referenced models: Search files — response body — paging, Upload file — response body

Search files — response body — paging

FieldTypePresenceDescription and constraints
$objectRootRepresents the pagination information for navigating through a list of results in the API. It provides details on how to access the previous or next set of results.
nextModelOptionalExpand Search files — response body — paging next
prevModelOptionalExpand Search files — response body — paging prev

Referenced models: Search files — response body — paging next, Search files — response body — paging prev

Search files — response body — paging next

FieldTypePresenceDescription and constraints
$objectRootSpecifies the paging information needed to retrieve the next set of results in a paginated API response
afterstringRequired within parentA string token used to retrieve the next page of results.
linkstringOptionalA string URL that provides the link to access the next page of results.

Search files — response body — paging prev

FieldTypePresenceDescription and constraints
$objectRootspecifies the paging information needed to retrieve the previous set of results in a paginated API response
beforestringRequired within parentA string token representing the cursor for the previous page of results.
linkstringOptionalA string URL that provides a link to the previous page of results.

Search folders — response body

FieldTypePresenceDescription and constraints
$objectRoot
pagingModelOptionalExpand Search files — response body — paging
resultsarrayRequired within parentAn array of folder objects, each representing a folder within the file manager.
results[]ModelEach itemExpand Create folder — response body

Referenced models: Search files — response body — paging, Create folder — response body

Update file — files update By File Id — request body — body

FieldTypePresenceDescription and constraints
$objectRoot
accessstringOptionalThe access level to update the file to. Valid values include 'PUBLIC_INDEXABLE', 'PUBLIC_NOT_INDEXABLE', 'HIDDEN_INDEXABLE', 'HIDDEN_NOT_INDEXABLE', 'HIDDEN_PRIVATE', 'PRIVATE', 'HIDDEN_SENSITIVE', and 'SENSITIVE'.
One of: HIDDEN_INDEXABLE, HIDDEN_NOT_INDEXABLE, HIDDEN_PRIVATE, HIDDEN_SENSITIVE, PRIVATE, PUBLIC_INDEXABLE, PUBLIC_NOT_INDEXABLE, SENSITIVE
clearExpiresbooleanRequired within parentA boolean indicating whether to clear the expires TTL on the file.
expiresAtstringOptionalThe date and time when the file will expire, represented in ISO 8601 format.
Format: date-time
isUsableInContentbooleanOptionalA boolean indicating whether the file can be used in content.
namestringOptionalNew Name to rename the file to.
parentFolderIdstringOptionalThe ID of the parent folder where the file should be moved. This cannot be set in tandem with parentFolderPath.
parentFolderPathstringOptionalThe new parentFolder path to move the file to. This cannot be set in tandem with parentFolderId.

Update folder — request body — body

FieldTypePresenceDescription and constraints
$objectRoot
namestringOptionalThe new name for the folder.
parentFolderIdintegerOptionalThe ID of the parent folder to which this folder will be moved.
Format: int64

Upload file — response body

FieldTypePresenceDescription and constraints
$objectRoot
accessstringOptionalThe access level of the file, represented as a string. Valid values include 'PUBLIC_INDEXABLE', 'PUBLIC_NOT_INDEXABLE', 'HIDDEN_INDEXABLE', 'HIDDEN_NOT_INDEXABLE', 'HIDDEN_PRIVATE', 'PRIVATE', 'HIDDEN_SENSITIVE', and 'SENSITIVE'.
Known values: HIDDEN_INDEXABLE, HIDDEN_NOT_INDEXABLE, HIDDEN_PRIVATE, HIDDEN_SENSITIVE, PRIVATE, PUBLIC_INDEXABLE, PUBLIC_NOT_INDEXABLE, SENSITIVE
archivedbooleanRequired within parentA boolean indicating whether the file is archived.
archivedAtstringOptionalThe date and time when the file was deleted, in ISO 8601 format.
Format: date-time
createdAtstringRequired within parentThe date and time when the file was created, in ISO 8601 format.
Format: date-time
defaultHostingUrlstringOptionalThe static cdn URL where the file is hosted.
encodingstringOptionalThe encoding of the file.
expiresAtJSONOptional
expiresAt (anyOf 1)integerAlternativeThe expiration epoch timestamp, if set.
Format: int64
expiresAt (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
extensionstringOptionalThe file extension.
fileMd5stringOptionalThe MD5 hash of the file.
heightJSONOptional
height (anyOf 1)integerAlternativeThe height of the file in pixels, applicable if the file is an image or video.
Format: int32
height (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
idstringRequired within parentThe ID of the file.
isUsableInContentbooleanOptionalA boolean indicating whether the file can be used in content.
namestringOptionalThe name of the file.
parentFolderIdstringOptionalThe unique identifier of the parent folder containing the file, represented as a string.
pathstringOptionalThe path of the file within the file manager.
sizeJSONOptional
size (anyOf 1)integerAlternativeThe size of the file in bytes.
Format: int64
size (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
sourceGroupstringOptionalThe source group of the file, with possible values including 'UNKNOWN', 'CONTENT', 'FORMS', 'CONVERSATIONS', and 'UI_EXTENSIONS'.
Known values: CONTENT, CONVERSATIONS, FORMS, UI_EXTENSIONS, UNKNOWN
typestringOptionalThe type of the file. Values include: IMG, DOCUMENT, AUDIO, MOVIE, OTHER.
updatedAtstringRequired within parentThe date and time when the file was last updated, in ISO 8601 format.
Format: date-time
urlstringOptionalThe URL where the file can be accessed, represented as a string.
widthJSONOptional
width (anyOf 1)integerAlternativeThe width of the file in pixels, applicable if the file is an image or video.
Format: int32
width (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.