---
search:
  tags:
    - Assets
    - PATCH
seo:
  description: >-
    Renames an Asset. The name is what the console shows and what a provider
    receives… Reference for the PATCH /library/assets/{id} endpoint in the
    AdCrunch API.
sidebar:
  label: Rename an Asset
  badge: PATCH
title: Rename an Asset
type: openapi-operation
---
Renames an Asset. The name is what the console shows and what a provider receives at future registrations. AdCrunch trims the name, and a name that is empty after the trim clears it back to the original filename. A Registration already made keeps the name it was given. An Asset belonging to another organization is reported as missing, so the surface cannot be used to discover that an id is real.

`PATCH /library/assets/{id}`

**Request body** (`application/json`, required)

- `name` (string, required) — The name to show. AdCrunch trims it. Send an empty string to clear it back to the original filename.

Request body example:

```json
{
  "name": "Spring sale 9:16"
}
```

**Responses**

- `200` — The Asset, with its new name. It carries no Registration — read the Asset for those.
- `400` — The request does not match the schema of this operation: a field is missing or has the wrong type, or the body is not valid JSON. \`error\` is \`invalid\_request\`, and \`issues\` names each field. Nothing was changed.
- `401` — No API key, or one that does not resolve. See the security scheme. \`error\` is \`unauthorized\`.
- `402` — The organization has no active subscription. An owner subscribes at \`paywallUrl\`. \`error\` is \`organization\_unentitled\`.
- `403` — The caller does not hold \`library:write\`. \`error\` is \`forbidden\`.
- `404` — No stored Asset with that id in this organization. A reservation answers this too, until a read promotes it to \`ready\`. \`error\` is \`not\_found\`.

Response example, 200:

```json
{
  "contentHash": "9d2f41b7c6e8a35014f7b2d9c3e6a810",
  "createdAt": 1790000000000,
  "createdBy": "usr_2e5b84",
  "deletedAt": null,
  "durationMs": 15000,
  "failureCode": null,
  "failureReason": null,
  "filename": "spring-sale.mp4",
  "height": 1920,
  "id": "ast_7c1e9a",
  "key": "org_3a7f10/ast_7c1e9a",
  "kind": "video",
  "mimeType": "video/mp4",
  "name": "Spring sale 9:16",
  "organizationId": "org_3a7f10",
  "sizeBytes": 24117248,
  "status": "ready",
  "updatedAt": 1790000120000,
  "width": 1080
}
```
