メインコンテンツへスキップ
POST
/
files
/
v3
/
files
ファイルをアップロード
curl --request POST \
  --url https://api.hubapi.com/files/v3/files \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'charsetHunch=<string>' \
  --form file='@example-file' \
  --form 'fileName=<string>' \
  --form 'folderId=<string>' \
  --form 'folderPath=<string>' \
  --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
}

サポートされる製品

次のいずれかの製品またはそれ以上が必要です。
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.

ボディ

multipart/form-data
charsetHunch
string

Character set of the uploaded file.

file
file

File to be uploaded.

fileName
string

Desired name for the uploaded file.

folderId
string

Either 'folderId' or 'folderPath' is required. folderId is the ID of the folder the file will be uploaded to.

folderPath
string

Either 'folderPath' or 'folderId' is required. This field represents the destination folder path for the uploaded file. If a path doesn't exist, the system will try to create one.

options
string

JSON string representing FileUploadOptions.

レスポンス

successful operation

File

access
enum<string>
必須

PUBLIC_INDEXABLE:ファイルはURLを知っていれば誰でもアクセスできます。検索エンジンはファイルをインデックスできます。PUBLIC_NOT_INDEXABLE:ファイルはURLを知っていれば誰でもアクセスできます。検索エンジンはファイルをインデックス「できません」。PRIVATE:ファイルは公開アクセスできません。コンテンツを表示するには、署名付きURLが必要です。検索エンジンはファイルをインデックス「できません」。

利用可能なオプション:
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

リクエストされたファイルの拡張子。

fileMd5
string

ファイルのMD5ハッシュ。

height
integer<int32>

画像や動画ファイル用。ファイルの高さ。

isUsableInContent
boolean

新しいコンテンツでこのファイルを使用する必要があるかどうかを示します。

name
string

新しい名前。指定すると、フォルダーの名前とfullPathが変更されます。このフォルダーの全ての子は変更に合わせて更新されます。

parentFolderId
string

新しい親folderId。変更すると、フォルダーとその全ての子が指定したフォルダーに移動されます。parentFolderIdとparentFolderPathを同時に指定することはできません。

path
string

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

size
integer<int64>

リクエストされたファイルのサイズ(バイト)。

sourceGroup
enum<string>
利用可能なオプション:
CONTENT,
CONVERSATIONS,
FORMS,
UI_EXTENSIONS,
UNKNOWN
type
string

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

url
string

新しいファイルのダウンロード元のURL。

width
integer<int32>

画像や動画ファイル用。ファイルの幅。

Last modified on February 12, 2026