Updating Assets
Konifer lets you update asset information only. Asset content cannot be updated.
Request
PUT /assets/users/123/-/entry/0
Content-Type: application/json
{
"alt": "Profile Picture",
"tags": ["headshot", "team"],
"labels": {
"department": "engineering"
}
}
| Field Name | Type | Description | Required |
|---|---|---|---|
alt | String | The supplied alt text of your asset | No |
labels | Object | Supplied key-value pairs associated with the asset | No |
tags | Array | Supplied attributes associated with the asset | No |
warning
PUT is a complete replacement of the asset's information. Even if updating one field, the rest of the fields must be supplied, or they are erased.
Example
Replace 0 in the curl URL with the entryId returned by your upload. The request replaces all editable fields.
The client examples first fetch that entry's current metadata, then replace its fields; modifiers return new requests.
Retain fields you want to preserve, or replace them explicitly as shown here.
- curl
- Kotlin (suspending)
- Java (blocking)
curl --fail-with-body \
--request PUT \
'http://localhost:8080/assets/user/123/profile-picture/-/entry/0' \
--header 'Content-Type: application/json' \
--data '{
"alt": "Profile Picture",
"labels": {
"department": "engineering"
},
"tags": [
"headshot",
"team"
]
}'
val assets = client.assets(path)
val current = assets.entry(entryId).fetchInfo().valueOrThrow()
assets.updateAsset(current)
.withAlt("Profile Picture")
.replaceLabels(mapOf("department" to "engineering"))
.replaceTags(setOf("headshot", "team"))
.update()
.valueOrThrow()
var assets = client.assets(path);
var current = assets.entry(entryId).fetchInfo().valueOrThrow();
assets.updateAsset(current)
.withAlt("Profile Picture")
.replaceLabels(Map.of("department", "engineering"))
.replaceTags(Set.of("headshot", "team"))
.update()
.valueOrThrow();
Response
The entire asset information response is returned.
HTTP/1.1 200
Content-Type: application/json
{
"class": "image",
"alt": "Profile Picture",
"entryId": 0,
"labels": {
"department": "engineering"
},
"tags": ["headshot", "team"],
"source": "upload",
"variants": [
{
"isOriginalVariant": false,
"storeBucket": "assets",
"storeKey": "b5050e94-0b05-471a-ae73-6cede8e077bd.webp",
"attributes": {
"height": 1752,
"width": 2560,
"format": "webp",
"pageCount": 1,
"loop": 0,
"colorSpace": "srgb",
"rotate": "0",
"horizontalFlip": false
},
"transformation": {
"width": 2560,
"height": 1752,
"fit": "fit",
"gravity": "center",
"format": "webp",
"rotate": "0",
"flip": "none",
"filter": "none",
"blur": 150,
"quality": 80,
"padding": {
"amount": 0,
"color": []
},
"metadata": {
"strip": ["exif", "xmp", "iptc"]
},
"colorSpace": "srgb"
},
"lqip": {}
},
{
"isOriginalVariant": true,
"storeBucket": "assets",
"storeKey": "d1caa24e-daba-4398-9fef-68c8b275456b.webp",
"attributes": {
"height": 1752,
"width": 2560,
"format": "webp",
"pageCount": 1,
"loop": 0,
"colorSpace": "srgb",
"rotate": "0",
"horizontalFlip": false
},
"lqip": {}
}
],
"createdAt": "2025-11-12T01:20:55Z",
"modifiedAt": "2025-11-12T01:30:00Z"
}
Error codes
API failures return JSON with a code and an optional message. See
Error Responses for the codes, HTTP statuses, and client compatibility behavior.