メインコンテンツへスキップ
PUT
/
files
/
v3
/
files
/
{fileId}
ファイルを置換
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
}
次のいずれかの製品またはそれ以上が必要です。
Marketing HubMarketing Hub -無料ツール
Sales HubSales Hub -無料ツール
Service HubService Hub -無料ツール
Content HubContent Hub -無料ツール

認証

Authorization
string
header
必須

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

パスパラメータ

fileId
string
必須

希望するファイルのID。

ボディ

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.

レスポンス

successful operation

File

access
enum<string>
必須

ファイルアクセス権。PUBLIC_INDEXABLE、PUBLIC_NOT_INDEXABLE、PRIVATEのいずれかになります。

利用可能なオプション:
HIDDEN_INDEXABLE,
HIDDEN_NOT_INDEXABLE,
HIDDEN_PRIVATE,
HIDDEN_SENSITIVE,
PRIVATE,
PUBLIC_INDEXABLE,
PUBLIC_NOT_INDEXABLE,
SENSITIVE
archived
boolean
必須

ファイルが削除されたかどうか。

createdAt
string<date-time>
必須

ファイルオブジェクトの作成日時。

id
string
必須

ファイルID。

updatedAt
string<date-time>
必須

ファイルに対する最新の更新のタイムスタンプ。

archivedAt
string<date-time>

ファイルオブジェクトの削除日時。

defaultHostingUrl
string

ファイルのデフォルトのホスティングURL。ファイルを提供するためにHubSpotが指定したURLのいずれかが使用されます。

encoding
string

ファイルのエンコーディング。

expiresAt
integer<int64>
extension
string

ファイルの拡張子。例:.jpg、.png、.gif、.pdfなど。

fileMd5
string

ファイルのMD5ハッシュ。

height
integer<int32>

画像や動画ファイルのコンテンツの高さ。

isUsableInContent
boolean

以前の「archied」。ウェブページなどの新しいコンテンツを作成する際にこのファイルを使用する必要があるかどうかを示します。

name
string

ファイルの名前。

parentFolderId
string

ファイルがあるフォルダーのID。

path
string

ファイルマネージャーにおけるファイルのパス。

size
integer<int64>

ファイルのサイズ(バイト)。

sourceGroup
string
type
string

ファイルの種類。IMG、DOCUMENT、AUDIO、MOVIE、またはOTHERのいずれかになります。

url
string

指定されたファイルのURL。このURLはアカウントのドメイン設定に応じて変わる可能性があります。選択したファイル ホスティング ドメインが使用されます。

width
integer<int32>

画像や動画ファイルのコンテンツの幅。

Last modified on December 8, 2025