---
title: "Rename asset"
method: PATCH
path: "/api/apps/{app_id}/assets/{asset_id}"
---

# Rename asset

`PATCH /api/apps/{app_id}/assets/{asset_id}`

## Request

- Base URL: `https://app.base44.com`
- URL: `https://app.base44.com/api/apps/{app_id}/assets/{asset_id}`
- Auth: HTTP bearer

<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

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.

<Note>This endpoint accepts a personal API key belonging to a user with editor access to the app. A read-only key is refused, and workspace API keys are not accepted.</Note>

<Warning>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.</Warning>

## Path parameters

- `asset_id` string, required: ID of the asset to rename. Get it from `id` in [List assets](/api-reference/list-assets).
- `app_id` string, required: ID of the app whose media library to change.

## Request body

- object
  - `file_name` string, required: New name of the file. Characters other than letters, digits, `_`, `.` and `-` become `_`, anything up to the last `/` is dropped, and an empty name becomes `untitled`.

## Response `200`

The renamed asset.

- AssetSummary: A file in the app's media library.
  - `id` string, required: ID of the asset.
  - `app_id` string, required: ID of the app the asset belongs to.
  - `file_name` string, required: Name of the file.
  - `file_url` string, required: URL of the file.
  - `source_type` 'upload' | 'generated', required: 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.
  - `file_type` string, nullable, required: File extension without the dot, usually lowercase, such as `png` or `mp4`. The value is `null` when the file was added without one.
  - `created_date` string, required: When the asset was added to the library, as a UTC timestamp in ISO 8601 format.
  - `updated_date` string, required: When the asset was last changed, such as renamed, as a UTC timestamp in ISO 8601 format.

## Other responses

- `401`: Missing or invalid credentials.
- `403`: You don't have editor access to this app, the app is blocked, your API key is read-only, or you used a workspace API key.
- `404`: App not found, or the app has no asset with this ID.
- `422`: `file_name` is missing.
- `429`: Rate limit exceeded. The base limit is 120 requests per minute. See [Rate limits](/developers/references/apps-api/get-started/rate-limits) for the multiplier your plan gets.

## Changes

- **2026-10-11** `80287813ab84`: 1 info
  - the endpoint scheme security `PersonalAccessTokenAuth` was added to the API
- **2026-10-10** `fc604cdcc3a2`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/idealspot/apis/base44-app-management-api/changes/api/apps/:app_id/assets/:asset_id/patch.md)

---

[API](https://skmtc.dev/idealspot/apis/base44-app-management-api.md) - [All operations](https://skmtc.dev/idealspot/apis/base44-app-management-api/llms.txt) - [OpenAPI document](https://skmtc.dev/idealspot/apis/base44-app-management-api/revisions/b5b4ebd82a1e?raw)
