Upload theme asset
Uploads a new static asset (image, font, etc.) to a theme. The file data must be
Base64-encoded. Requires admin scope.
POST
/themes/{theme_id}/assetsAuthorization
AuthorizationBearer token (JWT) · headerrequiredOAuth 2.0 Bearer token. Obtain via `POST https://auth.onbolder.com/oauth/token`.
Scopes:
adminPath parameters
theme_idstringrequiredRequest body
requiredapplication/jsonfile_namestringrequireddatastringrequiredBase64-encoded file data URI
Responses
201Asset uploaded
idstringfile_namestringcontent_typestringfile_sizeintegerdigeststringupdated_onstring<date-time>_linksobjectShow propertiesHide properties
fileHalLinkShow propertiesHide properties
hrefstringmethodstringtitlestringtypestringtemplatedbooleanRequest
curl -X POST "https://api.onbolder.com/v1/themes/string/assets" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"file_name": "string",
"data": "string"
}'const response = await fetch("https://api.onbolder.com/v1/themes/string/assets", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"file_name": "string",
"data": "string"
})
});import requests
response = requests.post(
"https://api.onbolder.com/v1/themes/string/assets",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"file_name": "string",
"data": "string"
},
)Response
{
"id": "string",
"file_name": "string",
"content_type": "string",
"file_size": 0,
"digest": "string",
"updated_on": "2019-08-24T14:15:22Z",
"_links": {
"file": {
"href": "string",
"method": "string",
"title": "string",
"type": "string",
"templated": true
}
}
}