HubSpot: Files schemas
17 HubSpot schemas with complete fields and constraints.
← Files operations · All schemas
Create folder — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
name | string | Required within parent | The name of the folder to be created. This is a required string property. |
parentFolderId | string | Optional | The ID of the parent folder under which the new folder will be created. This is an optional string field. |
parentPath | string | Optional | The path of the parent folder under which the new folder will be created. This is an optional string property. |
Create folder — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
archived | boolean | Required within parent | A boolean indicating whether the folder is archived. |
archivedAt | string | Optional | The date and time when the folder was archived, in ISO 8601 format. Format: date-time |
createdAt | string | Required within parent | The date and time when the folder was created, in ISO 8601 format. Format: date-time |
id | string | Required within parent | The unique ID for the folder, represented as a string. |
name | string | Optional | The name of the folder, represented as a string. |
parentFolderId | string | Optional | The unique identifier of the parent folder, represented as a string. |
path | string | Optional | The path of the folder within the file system, represented as a string. |
updatedAt | string | Required within parent | The date and time when the folder was last updated, in ISO 8601 format. Format: date-time |
Generate signed URL — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
expiresAt | string | Required within parent | The date and time when the URL expires, in ISO 8601 format. Format: date-time |
extension | string | Optional | The file extension of the file. |
height | JSON | Optional | |
height (anyOf 1) | integer | Alternative | The height of the file in pixels. Format: int32 |
height (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
name | string | Optional | The name of the file. |
size | JSON | Optional | |
size (anyOf 1) | integer | Alternative | The size of the file in bytes. Format: int64 |
size (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
type | string | Optional | The type of the file. |
url | string | Required within parent | The signed URL string that provides access to the file. |
width | JSON | Optional | |
width (anyOf 1) | integer | Alternative | The width of the file in pixels. Format: int32 |
width (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Import File — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
access | string | Required within parent | Specifies 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 |
duplicateValidationScope | string | Required within parent | Optional: Specifies the scope for duplicate validation. Valid values include 'ENTIRE_PORTAL' and 'EXACT_FOLDER'. One of: ENTIRE_PORTAL, EXACT_FOLDER |
duplicateValidationStrategy | string | Required within parent | Defines the strategy for handling duplicate files. Valid values are 'NONE', 'REJECT', and 'RETURN_EXISTING'. One of: NONE, REJECT, RETURN_EXISTING |
expiresAt | string | Optional | Optional: Epoch time when the file will expire, in ISO 8601 format. Do not set if the file should live indefinitely Format: date-time |
folderId | string | Optional | The ID of the folder where the file will be stored. This or folderPath must be set |
folderPath | string | Optional | The path of the folder where the file will be stored. This or FolderId must be set. |
name | string | Optional | The name of the file to be imported. |
overwrite | boolean | Required within parent | Optional boolean indicating whether to overwrite an existing file at the same location. |
ttl | string | Optional | Deprecated Do Not use. Optional: String representing the time-to-live for the file, same a expiresAt but takes a Period String. |
url | string | Optional | The URL from which the file will be imported. |
Import File — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
id | string | Required within parent | The ID of the import task. |
links | object | Optional | A 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.* | string | Additional keys |
Retrieve file stats — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
file | Model | Optional | Expand Upload file — response body |
folder | Model | Optional | Expand Create folder — response body |
Referenced models: Create folder — response body, Upload file — response body
Retrieve status — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
completedAt | string | Required within parent | The date and time when the file action was completed, in ISO 8601 format. Format: date-time |
errors | array | Optional | An array of StandardError objects detailing any errors that occurred during the file action. |
errors[] | Model | Each item | Expand Retrieve status — response body — errors item |
links | object | Optional | A map of link names to associated URIs, providing additional information about the file action. Additional keys: see wildcard field |
links.* | string | Additional keys | |
numErrors | JSON | Optional | |
numErrors (anyOf 1) | integer | Alternative | The number of errors encountered during the file action, represented as an integer. Format: int32 |
numErrors (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
requestedAt | string | Optional | The date and time when the file action was requested, in ISO 8601 format. Format: date-time |
result | Model | Optional | Expand Upload file — response body |
startedAt | string | Required within parent | The date and time when the file action started, in ISO 8601 format. Format: date-time |
status | string | Required within parent | The current status of the file action. Valid values include 'PENDING', 'PROCESSING', 'CANCELED', and 'COMPLETE'. Known values: CANCELED, COMPLETE, PENDING, PROCESSING |
taskId | string | Required within parent | The 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Ye olde error |
category | string | Required within parent | A string that categorizes the type of error. |
context | object | Required within parent | An object containing additional context about the error condition, with properties as arrays of strings. Additional keys: see wildcard field |
context.* | array | Additional keys | |
context.*[] | string | Each item | |
errors | array | Required within parent | An array of ErrorDetail objects that provide further information about the error. |
errors[] | Model | Each item | Expand Retrieve status — response body — errors item errors item |
id | string | Optional | A string representing a unique identifier for the error. |
links | object | Required within parent | An object mapping link names to associated URIs with documentation or remediation steps for the error. Additional keys: see wildcard field |
links.* | string | Additional keys | |
message | string | Required within parent | A string containing a human-readable message describing the error. |
status | string | Required within parent | A string indicating the status of the error. |
subCategory | object | Optional | An 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents 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. |
code | string | Optional | The status code associated with the error detail. |
context | object | Optional | Context about the error condition, represented as an object with additional properties that are arrays of strings. Additional keys: see wildcard field |
context.* | array | Additional keys | |
context.*[] | string | Each item | |
in | string | Optional | The name of the field or parameter in which the error was found. |
message | string | Required within parent | A human readable message describing the error along with remediation steps where appropriate. It is a string. |
subCategory | string | Optional | A specific category that contains more specific detail about the error. This is a string. |
Search files — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
paging | Model | Optional | Expand Search files — response body — paging |
results | array | Required within parent | An array of file objects, each representing a file with its associated metadata. |
results[] | Model | Each item | Expand Upload file — response body |
Referenced models: Search files — response body — paging, Upload file — response body
Search files — response body — paging
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents 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. |
next | Model | Optional | Expand Search files — response body — paging next |
prev | Model | Optional | Expand 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Specifies the paging information needed to retrieve the next set of results in a paginated API response |
after | string | Required within parent | A string token used to retrieve the next page of results. |
link | string | Optional | A string URL that provides the link to access the next page of results. |
Search files — response body — paging prev
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | specifies the paging information needed to retrieve the previous set of results in a paginated API response |
before | string | Required within parent | A string token representing the cursor for the previous page of results. |
link | string | Optional | A string URL that provides a link to the previous page of results. |
Search folders — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
paging | Model | Optional | Expand Search files — response body — paging |
results | array | Required within parent | An array of folder objects, each representing a folder within the file manager. |
results[] | Model | Each item | Expand 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
access | string | Optional | The 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 |
clearExpires | boolean | Required within parent | A boolean indicating whether to clear the expires TTL on the file. |
expiresAt | string | Optional | The date and time when the file will expire, represented in ISO 8601 format. Format: date-time |
isUsableInContent | boolean | Optional | A boolean indicating whether the file can be used in content. |
name | string | Optional | New Name to rename the file to. |
parentFolderId | string | Optional | The ID of the parent folder where the file should be moved. This cannot be set in tandem with parentFolderPath. |
parentFolderPath | string | Optional | The new parentFolder path to move the file to. This cannot be set in tandem with parentFolderId. |
Update folder — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
name | string | Optional | The new name for the folder. |
parentFolderId | integer | Optional | The ID of the parent folder to which this folder will be moved. Format: int64 |
Upload file — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
access | string | Optional | The 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 |
archived | boolean | Required within parent | A boolean indicating whether the file is archived. |
archivedAt | string | Optional | The date and time when the file was deleted, in ISO 8601 format. Format: date-time |
createdAt | string | Required within parent | The date and time when the file was created, in ISO 8601 format. Format: date-time |
defaultHostingUrl | string | Optional | The static cdn URL where the file is hosted. |
encoding | string | Optional | The encoding of the file. |
expiresAt | JSON | Optional | |
expiresAt (anyOf 1) | integer | Alternative | The expiration epoch timestamp, if set. Format: int64 |
expiresAt (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
extension | string | Optional | The file extension. |
fileMd5 | string | Optional | The MD5 hash of the file. |
height | JSON | Optional | |
height (anyOf 1) | integer | Alternative | The height of the file in pixels, applicable if the file is an image or video. Format: int32 |
height (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
id | string | Required within parent | The ID of the file. |
isUsableInContent | boolean | Optional | A boolean indicating whether the file can be used in content. |
name | string | Optional | The name of the file. |
parentFolderId | string | Optional | The unique identifier of the parent folder containing the file, represented as a string. |
path | string | Optional | The path of the file within the file manager. |
size | JSON | Optional | |
size (anyOf 1) | integer | Alternative | The size of the file in bytes. Format: int64 |
size (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
sourceGroup | string | Optional | The source group of the file, with possible values including 'UNKNOWN', 'CONTENT', 'FORMS', 'CONVERSATIONS', and 'UI_EXTENSIONS'. Known values: CONTENT, CONVERSATIONS, FORMS, UI_EXTENSIONS, UNKNOWN |
type | string | Optional | The type of the file. Values include: IMG, DOCUMENT, AUDIO, MOVIE, OTHER. |
updatedAt | string | Required within parent | The date and time when the file was last updated, in ISO 8601 format. Format: date-time |
url | string | Optional | The URL where the file can be accessed, represented as a string. |
width | JSON | Optional | |
width (anyOf 1) | integer | Alternative | The width of the file in pixels, applicable if the file is an image or video. Format: int32 |
width (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |