younifyd
Menu

Put /files/v3/files/{file Id} Replace

Replace file

PUT/files/v3/files/{fileId}

Use it in a workflow

  1. Add a step and choose the HubSpot connector.
  2. Pick the Put /files/v3/files/{file Id} Replace action (under Files).
  3. Fill in the fields below, then reference the result from later steps as {{putFilesV3FilesFileIdReplace.response.data}}.

Request

Path parameters

fileIdstringrequired

ID of the desired file.

Request body

Enter the body as JSON in the step's Body field.

charsetHunchstring

Character set of given file data.

filestring (binary)

File data that will replace existing file in the file manager.

optionsstring

JSON string representing FileReplaceOptions. Includes options to set the access and expiresAt properties, which will automatically update when the file is replaced.

json
{
  "charsetHunch": "string",
  "file": "string",
  "options": "string"
}

Response

Returns 200 with an object. Read it in later steps with {{putFilesV3FilesFileIdReplace.response.data.<field>}}.

accessstring

File access. Can be PUBLIC_INDEXABLE, PUBLIC_NOT_INDEXABLE, PRIVATE.

One ofHIDDEN_INDEXABLEHIDDEN_NOT_INDEXABLEHIDDEN_PRIVATEHIDDEN_SENSITIVEPRIVATEPUBLIC_INDEXABLEPUBLIC_NOT_INDEXABLESENSITIVE

archivedboolean

If the file is deleted.

archivedAtstring (date-time)

Deletion time of the file object.

createdAtstring (date-time)

Creation time of the file object.

defaultHostingUrlstring

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

encodingstring

Encoding of the file.

expiresAtinteger (int64)
extensionstring

Extension of the file. ex: .jpg, .png, .gif, .pdf, etc.

fileMd5string

The MD5 hash of the file.

heightinteger (int32)

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

idstring

File ID.

isUsableInContentboolean

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

namestring

Name of the file.

parentFolderIdstring

ID of the folder the file is in.

pathstring

Path of the file in the file manager.

sizeinteger (int64)

Size of the file in bytes.

sourceGroupstring

One ofCONTENTCONVERSATIONSFORMSUI_EXTENSIONSUNKNOWN

typestring

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

updatedAtstring (date-time)

Timestamp of the latest update to the file.

urlstring

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

widthinteger (int32)

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

json
{
  "access": "HIDDEN_INDEXABLE",
  "archived": false,
  "createdAt": "2025-01-01T00:00:00Z",
  "id": "string",
  "updatedAt": "2025-01-01T00:00:00Z",
  "archivedAt": "2025-01-01T00:00:00Z",
  "defaultHostingUrl": "string",
  "encoding": "string",
  "expiresAt": 0,
  "extension": "string",
  "fileMd5": "string",
  "height": 0
}

Need more? See the HubSpot guide for connection setup and behaviour shared by every action.