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

Authorizations

Authorization
string
header
required

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

Path Parameters

fileId
string
required

O ID do arquivo desejado.

Body

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.

Response

successful operation

File

access
enum<string>
required

Acesso ao arquivo. Pode ser PUBLIC_INDEXABLE, PUBLIC_NOT_INDEXABLE, PRIVATE.

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

Se o arquivo foi excluído.

createdAt
string<date-time>
required

Hora de criação do objeto de arquivo.

id
string
required

O ID do arquivo.

updatedAt
string<date-time>
required

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

archivedAt
string<date-time>

Hora de exclusão do objeto de arquivo.

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

A extensão do arquivo. Por exemplo: .jpg, .png, .gif, .pdf etc.

fileMd5
string

O hash MD5 do arquivo.

height
integer<int32>

Para arquivos de imagem e vídeo, a altura do conteúdo.

isUsableInContent
boolean

Anteriormente, era "archived". Indica se o arquivo deve ser usado ao criar conteúdo novo, como páginas da web.

name
string

O nome do arquivo.

parentFolderId
string

O ID da pasta em que o arquivo se encontra.

path
string

O caminho do arquivo no gerenciador de arquivos.

size
integer<int64>

O tamanho do arquivo em bytes.

sourceGroup
string
type
string

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

url
string

O URL do arquivo fornecido. Esse URL pode mudar dependendo das configurações de domínio da conta. Usará o domínio de hospedagem de arquivo selecionado.

width
integer<int32>

Para arquivos de imagem e vídeo, a largura do conteúdo.