curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/assets/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://cdn.acme.com/catalog/shoe-red.jpg",
"file_name": "shoe-red.jpg"
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/assets/import"
payload = {
"url": "https://cdn.acme.com/catalog/shoe-red.jpg",
"file_name": "shoe-red.jpg"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://cdn.acme.com/catalog/shoe-red.jpg', file_name: 'shoe-red.jpg'})
};
fetch('https://app.base44.com/api/apps/{app_id}/assets/import', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.base44.com/api/apps/{app_id}/assets/import",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://cdn.acme.com/catalog/shoe-red.jpg',
'file_name' => 'shoe-red.jpg'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.base44.com/api/apps/{app_id}/assets/import"
payload := strings.NewReader("{\n \"url\": \"https://cdn.acme.com/catalog/shoe-red.jpg\",\n \"file_name\": \"shoe-red.jpg\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.base44.com/api/apps/{app_id}/assets/import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://cdn.acme.com/catalog/shoe-red.jpg\",\n \"file_name\": \"shoe-red.jpg\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/assets/import")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://cdn.acme.com/catalog/shoe-red.jpg\",\n \"file_name\": \"shoe-red.jpg\"\n}"
response = http.request(request)
puts response.read_body{
"id": "68b0e1f2a3c4d5e6f7a8b9c0",
"app_id": "6820f3a4e7b91d003c45a1f2",
"file_name": "shoe-red.jpg",
"file_url": "https://media.base44.com/images/public/6820f3a4e7b91d003c45a1f2/a1b2c3d4e_shoe-red.jpg",
"source_type": "upload",
"file_type": "jpg",
"created_date": "2026-01-15T09:23:41+00:00",
"updated_date": "2026-01-15T09:23:41+00:00"
}Import asset
Downloads a file from a public URL and stores a copy in the app’s media library, so you don’t have to download and upload it yourself. To add a file by URL without copying it, use Create asset.
The file name, from file_name or else the end of the URL’s path, decides what’s accepted, the same as Upload asset, except that svg, glb and fbx files can’t be imported: upload them instead. The copy is stored at a public URL, returned in file_url.
url must download the file for anyone, with no sign-in, cookie or session token. An app’s preview or sandbox address, a link that needs a login, and a page that only shows the file don’t work and return file_unavailable: upload those files instead.
To retry safely, send an Idempotency-Key header. A retry with the same key and body within 24 hours returns the asset the first request added instead of importing the file again.
In this response, created_date and updated_date include a +00:00 offset. List assets returns them without one.
This endpoint is limited to 60 requests per minute, shared with Upload asset. Some workspaces have a different limit.
curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/assets/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://cdn.acme.com/catalog/shoe-red.jpg",
"file_name": "shoe-red.jpg"
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/assets/import"
payload = {
"url": "https://cdn.acme.com/catalog/shoe-red.jpg",
"file_name": "shoe-red.jpg"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://cdn.acme.com/catalog/shoe-red.jpg', file_name: 'shoe-red.jpg'})
};
fetch('https://app.base44.com/api/apps/{app_id}/assets/import', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.base44.com/api/apps/{app_id}/assets/import",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://cdn.acme.com/catalog/shoe-red.jpg',
'file_name' => 'shoe-red.jpg'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.base44.com/api/apps/{app_id}/assets/import"
payload := strings.NewReader("{\n \"url\": \"https://cdn.acme.com/catalog/shoe-red.jpg\",\n \"file_name\": \"shoe-red.jpg\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.base44.com/api/apps/{app_id}/assets/import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://cdn.acme.com/catalog/shoe-red.jpg\",\n \"file_name\": \"shoe-red.jpg\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/assets/import")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://cdn.acme.com/catalog/shoe-red.jpg\",\n \"file_name\": \"shoe-red.jpg\"\n}"
response = http.request(request)
puts response.read_body{
"id": "68b0e1f2a3c4d5e6f7a8b9c0",
"app_id": "6820f3a4e7b91d003c45a1f2",
"file_name": "shoe-red.jpg",
"file_url": "https://media.base44.com/images/public/6820f3a4e7b91d003c45a1f2/a1b2c3d4e_shoe-red.jpg",
"source_type": "upload",
"file_type": "jpg",
"created_date": "2026-01-15T09:23:41+00:00",
"updated_date": "2026-01-15T09:23:41+00:00"
}Authorizations
Personal access token, sent as Authorization: Bearer <token>. Each operation lists the permission it needs: read_only or full_access. A full-access token can call every operation. A read-only token can call only the operations that list read_only; anything else returns 403 read_only_credential_route_not_allowed.
Scopes
Headers
Body
Public https URL that downloads the file for anyone, with no sign-in or session token. Base44 downloads it once and stores a copy. Addresses on private networks and Base44's own hosts, other than its media CDN, are refused, and an app's preview address can't be downloaded.
"https://cdn.acme.com/catalog/shoe-red.jpg"
Response
The new asset.
A file in the app's media library.
Was this page helpful?