HubSpot

Files

Upload and manage files.

Other#openapi

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

Upload and manage files.

Endpoints 18

Files

  • POSTUpload file/files/v3/filesUpload a single file with content specified in request body.
  • POSTImport a file from a URL into the file manager./files/v3/files/import-from-url/asyncAsynchronously imports the file at the given URL into the file manager.
  • GETCheck import status./files/v3/files/import-from-url/async/tasks/:taskId/statusCheck the status of requested import.
  • GETSearch files/files/v3/files/search?properties=string&after=string&before=string&limit=0&sort=string&id=string&createdAt=2024-01-01T00:00:00Z&createdAtLte=2024-01-01T00:00:00Z&createdAtGte=2024-01-01T00:00:00Z&updatedAt=2024-01-01T00:00:00Z&updatedAtLte=2024-01-01T00:00:00Z&updatedAtGte=2024-01-01T00:00:00Z&name=string&path=string&parentFolderId=0&size=0&height=0&width=0&encoding=string&type=string&extension=string&url=string&isUsableInContent=true&allowsAnonymousAccess=trueSearch through files in the file manager. Does not display hidden or archived files.
  • GETGet file./files/v3/files/:fileId?properties=stringGet file by ID.
  • PUTReplace file./files/v3/files/:fileIdReplace existing file data with new file data. Can be used to change image content without having to upload a new file and update all references.
  • DELETEDelete file/files/v3/files/:fileIdDelete file by ID
  • PATCHupdate file properties/files/v3/files/:fileIdUpdate properties of file by ID.
  • DELETEGDPR delete/files/v3/files/:fileId/gdpr-deleteGDRP delete file
  • GETGet signed URL to access private file./files/v3/files/:fileId/signed-url?size=thumb&expirationSeconds=0&upscale=trueGenerates signed URL that allows temporary access to a private file.

Folders

  • POSTCreate folder./files/v3/foldersCreates a folder.
  • GETSearch folders/files/v3/folders/search?properties=string&after=string&before=string&limit=0&sort=string&id=string&createdAt=2024-01-01T00:00:00Z&createdAtLte=2024-01-01T00:00:00Z&createdAtGte=2024-01-01T00:00:00Z&updatedAt=2024-01-01T00:00:00Z&updatedAtLte=2024-01-01T00:00:00Z&updatedAtGte=2024-01-01T00:00:00Z&name=string&path=string&parentFolderId=0Search for folders. Does not contain hidden or archived folders.
  • POSTUpdate folder properties/files/v3/folders/update/asyncUpdate properties of folder by given ID. This action happens asynchronously and will update all of the folder's children as well.
  • GETCheck folder update status./files/v3/folders/update/async/tasks/:taskId/statusCheck status of folder update. Folder updates happen asynchronously.
  • GETGet folder/files/v3/folders/:folderId?properties=stringGet folder by ID
  • DELETEDelete folder./files/v3/folders/:folderIdDelete folder by ID.
  • GETGet folder./files/v3/folders/:folderPath?properties=stringGet folder by path.
  • DELETEDelete folder./files/v3/folders/:folderPathDelete folder by path.

API details

Base URL
https://api.hubapi.com
Authentication
An API key in the hapikey query parameter
OAuth 2.0 (authorization code flow) with 2 scopes
An API key in the private-app-legacy header
Operations
18 operations on 13 pathsGET 8POST 4DELETE 4PUT 1PATCH 1
Main resources
Files 10Folders 8
Response formats
application/json
Description format
OpenAPI 3.0.1, API version v3
Listed from
APIs.guru OpenAPI Directory (CC0-1.0)
Source updated

How to test the Files in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the Files collection, without the publisher's secrets.
  3. Add your credentialsThis API uses an API key in the hapikey query parameter. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “Upload file” (POST /files/v3/files), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the Files?

Upload and manage files. It is listed under Other and has 18 endpoints.

Who publishes the Files?

It is listed from HubSpot's public API description (an OpenAPI document), not published by HubSpot on Swastik Codes. Anyone who controls hubapi.com can claim the profile by adding a DNS TXT record.

What is the base URL of the Files?

Requests go to https://api.hubapi.com. Endpoint paths are added to this base URL.

How do I authenticate with the Files?

It accepts 3 methods: an API key in the hapikey query parameter; OAuth 2.0 (authorization code flow) with 2 scopes; an API key in the private-app-legacy header.

How many endpoints does the Files have?

18 operations on 13 paths (8 GET, 4 POST, 4 DELETE, 1 PUT, 1 PATCH). The largest groups are Files, Folders.

Is forking the Files free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.