Pular para o conteúdo principal
PUT
/
files
/
v3
/
files
/
{fileId}
Substituir arquivo
curl --request PUT \
  --url https://api.hubapi.com/files/v3/files/{fileId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'charsetHunch=<string>' \
  --form file='@example-file' \
  --form 'options=<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
}

Produtos suportados

Requer um dos seguintes produtos ou superior.
Marketing HubMarketing Hub -Grátis
Sales HubSales Hub -Grátis
Service HubService Hub -Grátis
Content HubContent Hub -Grátis

Autorizações

Authorization
string
header
obrigatório

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

Parâmetros de caminho

fileId
string
obrigatório

O ID do arquivo desejado.

Pattern: \d+

Corpo

multipart/form-data
charsetHunch
string

Character set of given file data.

file
file

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

options
string

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

Resposta

successful operation

File

access
enum<string>
obrigatório

PUBLIC_INDEXABLE: o arquivo pode ser acessado por qualquer pessoa que tenha o URL. Os mecanismos de pesquisa podem indexar o arquivo. PUBLIC_NOT_INDEXABLE: o arquivo pode ser acessado por qualquer pessoa que tenha o URL. Os mecanismos de pesquisa não podem indexar o arquivo. PRIVATE: o arquivo NÃO pode ser acessado por qualquer pessoa. Exige um URL assinado para ver o conteúdo. Os mecanismos de pesquisa não podem indexar o arquivo.

Opções disponíveis:
HIDDEN_INDEXABLE,
HIDDEN_NOT_INDEXABLE,
HIDDEN_PRIVATE,
HIDDEN_SENSITIVE,
PRIVATE,
PUBLIC_INDEXABLE,
PUBLIC_NOT_INDEXABLE,
SENSITIVE
archived
boolean
obrigatório

Marca se a pasta foi excluída ou não.

createdAt
string<date-time>
obrigatório

A data e hora de criação da pasta.

id
string
obrigatório

O ID do arquivo.

updatedAt
string<date-time>
obrigatório

A data e hora da última atualização da pasta.

archivedAt
string<date-time>

A data e hora de exclusão da pasta.

defaultHostingUrl
string

O URL de hospedagem padrão do arquivo. Usará um dos URLs fornecidos pela HubSpot para atender o arquivo.

encoding
string

A codificação do arquivo.

expiresAt
integer<int64>
extension
string

Extensão do arquivo solicitado.

fileMd5
string

O hash MD5 do arquivo.

height
integer<int32>

Para arquivos de imagem e vídeo. A altura do arquivo.

isUsableInContent
boolean

Marque se o arquivo deve ser usado no conteúdo novo.

name
string

O novo nome. Se especificado, o nome da pasta e fullPath serão alterados. Todos os objetos secundários serão atualizados de acordo.

parentFolderId
string

O folderId da nova pasta principal. Se alterado, a pasta e todos os seus objetos secundários serão movidos para a pasta especificada. parentFolderId e parentFolderPath não podem ser especificados ao mesmo tempo.

path
string

O caminho da pasta no gerenciador de arquivos.

size
integer<int64>

Tamanho em bytes do arquivo solicitado.

sourceGroup
enum<string>
Opções disponíveis:
CONTENT,
CONVERSATIONS,
FORMS,
UI_EXTENSIONS,
UNKNOWN
type
string

O tipo do arquivo. Pode ser IMG, DOCUMENT, AUDIO, MOVIE ou OTHER.

url
string

O URL do qual baixar o novo arquivo.

width
integer<int32>

Para arquivos de imagem e vídeo. A largura do arquivo.

Last modified on March 24, 2026