curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/assets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"file_name": "Logo-dark.png",
"file_url": "https://cdn.acme.com/brand/Logo-dark.png",
"file_type": "png"
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/assets"
payload = {
"file_name": "Logo-dark.png",
"file_url": "https://cdn.acme.com/brand/Logo-dark.png",
"file_type": "png"
}
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({
file_name: 'Logo-dark.png',
file_url: 'https://cdn.acme.com/brand/Logo-dark.png',
file_type: 'png'
})
};
fetch('https://app.base44.com/api/apps/{app_id}/assets', 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",
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([
'file_name' => 'Logo-dark.png',
'file_url' => 'https://cdn.acme.com/brand/Logo-dark.png',
'file_type' => 'png'
]),
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"
payload := strings.NewReader("{\n \"file_name\": \"Logo-dark.png\",\n \"file_url\": \"https://cdn.acme.com/brand/Logo-dark.png\",\n \"file_type\": \"png\"\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"file_name\": \"Logo-dark.png\",\n \"file_url\": \"https://cdn.acme.com/brand/Logo-dark.png\",\n \"file_type\": \"png\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/assets")
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 \"file_name\": \"Logo-dark.png\",\n \"file_url\": \"https://cdn.acme.com/brand/Logo-dark.png\",\n \"file_type\": \"png\"\n}"
response = http.request(request)
puts response.read_body{
"id": "68b0e1f2a3c4d5e6f7a8b9c0",
"app_id": "6820f3a4e7b91d003c45a1f2",
"file_name": "Logo-dark.png",
"file_url": "https://media.base44.com/files/public/6820f3a4e7b91d003c45a1f2/Logo-dark.png",
"source_type": "upload",
"file_type": "png",
"created_date": "2026-01-15T09:23:41",
"updated_date": "2026-01-15T09:31:07"
}Create asset
Adds a file that’s already online to the app’s media library, by its URL. Base44 doesn’t download the file. To store a file with Base44, use Upload asset instead.
In this response, created_date and updated_date include a +00:00 offset. List assets returns them without one.
This endpoint is limited to 120 requests per minute, shared with Create asset, Rename asset and Delete asset. Some workspaces have a different limit.
curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/assets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"file_name": "Logo-dark.png",
"file_url": "https://cdn.acme.com/brand/Logo-dark.png",
"file_type": "png"
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/assets"
payload = {
"file_name": "Logo-dark.png",
"file_url": "https://cdn.acme.com/brand/Logo-dark.png",
"file_type": "png"
}
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({
file_name: 'Logo-dark.png',
file_url: 'https://cdn.acme.com/brand/Logo-dark.png',
file_type: 'png'
})
};
fetch('https://app.base44.com/api/apps/{app_id}/assets', 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",
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([
'file_name' => 'Logo-dark.png',
'file_url' => 'https://cdn.acme.com/brand/Logo-dark.png',
'file_type' => 'png'
]),
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"
payload := strings.NewReader("{\n \"file_name\": \"Logo-dark.png\",\n \"file_url\": \"https://cdn.acme.com/brand/Logo-dark.png\",\n \"file_type\": \"png\"\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"file_name\": \"Logo-dark.png\",\n \"file_url\": \"https://cdn.acme.com/brand/Logo-dark.png\",\n \"file_type\": \"png\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/assets")
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 \"file_name\": \"Logo-dark.png\",\n \"file_url\": \"https://cdn.acme.com/brand/Logo-dark.png\",\n \"file_type\": \"png\"\n}"
response = http.request(request)
puts response.read_body{
"id": "68b0e1f2a3c4d5e6f7a8b9c0",
"app_id": "6820f3a4e7b91d003c45a1f2",
"file_name": "Logo-dark.png",
"file_url": "https://media.base44.com/files/public/6820f3a4e7b91d003c45a1f2/Logo-dark.png",
"source_type": "upload",
"file_type": "png",
"created_date": "2026-01-15T09:23:41",
"updated_date": "2026-01-15T09:31:07"
}Authorizations
Personal access token, sent as Authorization: Bearer <token>.
Path Parameters
ID of the app whose media library to change.
Body
Name of the file. Characters other than letters, digits, _, . and - become _, anything up to the last / is dropped, and an empty name becomes untitled.
"Logo-dark.png"
Public http or https URL of the file. Base44 doesn't download or copy it, so the asset stays a link to this URL. Addresses on private networks and Base44's own hosts, other than its media CDN, are refused.
"https://media.base44.com/files/public/6820f3a4e7b91d003c45a1f2/Logo-dark.png"
How the file got into the library, upload or generated. Defaults to upload.
upload, generated "upload"
File extension without the dot, such as png. Stored as you send it, and used by the file_type filter in List assets. Leave it out to store null.
"png"
Response
The new asset.
A file in the app's media library.
ID of the asset.
"68b0e1f2a3c4d5e6f7a8b9c0"
ID of the app the asset belongs to.
"6820f3a4e7b91d003c45a1f2"
Name of the file.
"Logo-dark.png"
URL of the file.
"https://media.base44.com/files/public/6820f3a4e7b91d003c45a1f2/Logo-dark.png"
How the file got into the library. upload for a file someone uploaded, and generated for most files Base44 created for the app, such as AI-generated images and videos or a Figma import.
upload, generated "upload"
File extension without the dot, usually lowercase, such as png or mp4. The value is null when the file was added without one.
"png"
When the asset was added to the library, as a UTC timestamp in ISO 8601 format.
"2026-01-15T09:23:41"
When the asset was last changed, such as renamed, as a UTC timestamp in ISO 8601 format.
"2026-01-15T09:31:07"
Was this page helpful?