Skip to main content
POST
/
files
/
v3
/
files
/
import-from-url
/
async
Import file from URL
curl --request POST \
  --url https://api.hubapi.com/files/v3/files/import-from-url/async \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "access": "HIDDEN_INDEXABLE",
  "url": "<string>",
  "duplicateValidationScope": "ENTIRE_PORTAL",
  "duplicateValidationStrategy": "NONE",
  "expiresAt": "2023-11-07T05:31:56Z",
  "folderId": "<string>",
  "folderPath": "<string>",
  "name": "<string>",
  "overwrite": true,
  "ttl": "<string>"
}
'
{
  "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"
    }
  ]
}

Supported products

Requires one of the following products or higher.
Marketing HubMarketing Hub -Free
Sales HubSales Hub -Free
Service HubService Hub -Free
Content HubContent Hub -Free
Data HubData Hub -Free

Authorizations

Authorization
string
header
required

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

Body

application/json
access
enum<string>
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.

Available options:
HIDDEN_INDEXABLE,
HIDDEN_NOT_INDEXABLE,
HIDDEN_PRIVATE,
HIDDEN_SENSITIVE,
PRIVATE,
PUBLIC_INDEXABLE,
PUBLIC_NOT_INDEXABLE,
SENSITIVE
url
string
required

URL to download the new file from.

duplicateValidationScope
enum<string>

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

Available options:
ENTIRE_PORTAL,
EXACT_FOLDER
duplicateValidationStrategy
enum<string>

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.

Available options:
NONE,
REJECT,
RETURN_EXISTING
expiresAt
string<date-time>

Specifies the date and time when the file will expire.

folderId
string

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

folderPath
string

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.

name
string

Name to give the resulting file in the file manager.

overwrite
boolean

If true, will overwrite existing file if one with the same name and extension exists in the given folder. The overwritten file will be deleted and the uploaded file will take its place with a new ID. If unset or set as false, the new file's name will be updated to prevent colliding with existing file if one exists with the same path, name, and extension

ttl
string

Time to live. If specified the file will be deleted after the given time frame. If left unset, the file will exist indefinitely

Response

accepted

Information on the task that has been started, and where to check it's status.

id
string
required

ID of the task

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.

Last modified on December 16, 2025