Rename asset
curl --request PATCH \
--url https://app.base44.com/api/apps/{app_id}/assets/{asset_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"file_name": "Logo-light.png"
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/assets/{asset_id}"
payload = { "file_name": "Logo-light.png" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({file_name: 'Logo-light.png'})
};
fetch('https://app.base44.com/api/apps/{app_id}/assets/{asset_id}', 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/{asset_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'file_name' => 'Logo-light.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/{asset_id}"
payload := strings.NewReader("{\n \"file_name\": \"Logo-light.png\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://app.base44.com/api/apps/{app_id}/assets/{asset_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"file_name\": \"Logo-light.png\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/assets/{asset_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"file_name\": \"Logo-light.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"
}Branding
Rename asset
This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.
Changes an asset’s file name in the media library. Only the name changes: file_url and file_type stay the same, so code that uses the URL keeps working.
This endpoint is limited to 120 requests per minute, shared with Create asset, Rename asset and Delete asset. Some workspaces have a different limit.
This endpoint accepts a personal API key belonging to a user with editor access to the app, or a workspace API key, which acts as the workspace owner. A read-only key is refused.
The response includes fields beyond the ones documented here. Don’t rely on undocumented response fields, as they can change at any time. Send only the fields documented here. Other request fields are not supported and their behavior can change.
PATCH
/
api
/
apps
/
{app_id}
/
assets
/
{asset_id}
Rename asset
curl --request PATCH \
--url https://app.base44.com/api/apps/{app_id}/assets/{asset_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"file_name": "Logo-light.png"
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/assets/{asset_id}"
payload = { "file_name": "Logo-light.png" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({file_name: 'Logo-light.png'})
};
fetch('https://app.base44.com/api/apps/{app_id}/assets/{asset_id}', 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/{asset_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'file_name' => 'Logo-light.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/{asset_id}"
payload := strings.NewReader("{\n \"file_name\": \"Logo-light.png\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://app.base44.com/api/apps/{app_id}/assets/{asset_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"file_name\": \"Logo-light.png\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/assets/{asset_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"file_name\": \"Logo-light.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
PersonalAccessTokenAuthWorkspaceApiKeyAuthWorkspaceApiKeyBearerAuth
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
Path Parameters
ID of the asset to rename. Get it from id in List assets.
Body
application/json
Response
The renamed asset.
A file in the app's media library.
Was this page helpful?