v1

latestOpenAPI 3.0.12026-07-14182037.3 KB
Files

Import a file from a URL into the file manager.

Asynchronously imports the file at the given URL into the file manager.

post/files/v3/files/import-from-url/async

Request body

access'PUBLIC_INDEXABLE' | 'PUBLIC_NOT_INDEXABLE' | 'HIDDEN_INDEXABLE' | 'HIDDEN_NOT_INDEXABLE' | 'HIDDEN_PRIVATE' | 'PRIVATE' required

PUBLIC_INDEXABLE: File is publicly accessible by anyone who has the URL. Search engines can index the file. PUBLIC_NOT_INDEXABLE: File is publicly accessible by anyone who has the URL. Search engines can't index the file. PRIVATE: File is NOT publicly accessible. Requires a signed URL to see content. Search engines can't index the file.

duplicateValidationScope'ENTIRE_PORTAL' | 'EXACT_FOLDER' required

ENTIRE_PORTAL: Look for a duplicate file in the entire account. EXACT_FOLDER: Look for a duplicate file in the provided folder.

duplicateValidationStrategy'NONE' | 'REJECT' | 'RETURN_EXISTING' required

NONE: Do not run any duplicate validation. REJECT: Reject the upload if a duplicate is found. RETURN_EXISTING: If a duplicate file is found, do not upload a new file and return the found duplicate instead.

folderIdstring

One of folderId or folderPath is required. Destination folder ID for the uploaded file.

folderPathstring

One of folderPath or folderId is required. Destination folder path for the uploaded file. If the folder path does not exist, there will be an attempt to create the folder path.

namestring

Name to give the resulting file in the file manager.

overwriteboolean required

If true, it will overwrite existing files if a file with the same name exists in the given folder.

ttlstring

Time to live. If specified the file will be deleted after the given time frame.

urlstring required

URL to download the new file from.

Response

accepted

idstring required

The ID of the task

linksobject

Links for where to check information related to the task. The status link gives the URL for where to check the status of the task.

Example response

{
  "id": "57122e26-59f8-4cfc-ba53-96e30c816762",
  "links": [
    {
      "status": "https://api.hubspot.com/files/v3/files/import-from-url/async/tasks/57122e26-59f8-4cfc-ba53-96e30c816762/status"
    }
  ]
}