Put an object in one request.
Put an object in one request. The request enforces Storage access, workspace ownership, and entry lifecycle state.
curl --request POST \
--url https://api.revoengine.com/api/v1/storage/objects \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "logo.png",
"data": "iVBORw0KGgoAAAANSUhEUgAAAAUA"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'logo.png', data: 'iVBORw0KGgoAAAANSUhEUgAAAAUA'})
};
fetch('https://api.revoengine.com/api/v1/storage/objects', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.revoengine.com/api/v1/storage/objects"
payload = {
"name": "logo.png",
"data": "iVBORw0KGgoAAAANSUhEUgAAAAUA"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Authorizations
Bearer JWT token or API Key (sk-*).
Body
Object name.
"logo.png"
Object payload. For binary payloads send a base64 string and set dataEncoding to "base64".
"iVBORw0KGgoAAAANSUhEUgAAAAUA"
File retention. Omit for the caller default, or set null for no expiration.
Show child attributes
Show child attributes
Parent folder id. Omit for root.
"00000000-0000-4000-8000-000000000000"
Optional configured storage id for root-level writes. Omit for managed default storage.
"00000000-0000-4000-8000-000000000001"
Existing file entry id to replace.
"00000000-0000-4000-8000-000000000002"
Payload encoding.
utf8, base64 "base64"
Mime type of the object.
"image/png"
Post-write compute mode. Defaults to sync for text/* objects and none for other binary objects; an explicit value always overrides the default.
none, sync, async "sync"
Whether the finalized entry should be restricted.
Explicit allowed group ids.
Explicit allowed user ids.
Optional external reference id.
Optional external reference type.
Optional external reference version.
Entry metadata. Values may use any JSON type. Maximum 16 KiB and 64 top-level keys. Top-level keys starting with "__" are reserved for backend use.
{
"scope": "integration",
"source": "put-object"
}
Suppress Storage lifecycle events for this file. Omit to preserve the existing setting on replacement; false explicitly enables events.
Logical storage lifecycle tier. Select only when creating a new file or upload session; existing files keep their tier. HOT: Active files used in live workflows, previews, and frequent downloads. WARM: Completed or less-active business files that are still occasionally accessed. COLD: Compliance snapshots, historic imports, and retained evidence that is rarely opened. FROZEN: Deep archive or legal-hold data kept mainly for audit or recovery obligations.
HOT, WARM, COLD, FROZEN "HOT"
Response
OK.
curl --request POST \
--url https://api.revoengine.com/api/v1/storage/objects \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "logo.png",
"data": "iVBORw0KGgoAAAANSUhEUgAAAAUA"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'logo.png', data: 'iVBORw0KGgoAAAANSUhEUgAAAAUA'})
};
fetch('https://api.revoengine.com/api/v1/storage/objects', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.revoengine.com/api/v1/storage/objects"
payload = {
"name": "logo.png",
"data": "iVBORw0KGgoAAAANSUhEUgAAAAUA"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
