Upload a theme asset
Uploads a new file asset (image, font, stylesheet, etc.) to the theme. Send the file as a multipart/form-data upload.
POST
/themes/{theme_id}/assetsAuthorization
AuthorizationBearer token (JWT) · headerrequiredPath parameters
theme_idstringrequiredTheme ID
Request body
requiredmultipart/form-datafilestring<binary>requiredFile to upload
Responses
201Asset uploaded
_linksHalLinksidstringfile_namestringcontent_typestringfile_sizeintegerdigeststringurlstringCDN URL for this asset
updated_onstring<date-time>401Unauthorized
403Access denied
422Validation error
Request
curl -X POST "https://api.onbolder.com/v2/themes/abc123/assets" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: multipart/form-data" \
-d '{
"file": "string"
}'const response = await fetch("https://api.onbolder.com/v2/themes/abc123/assets", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "multipart/form-data"
},
body: JSON.stringify({
"file": "string"
})
});import requests
response = requests.post(
"https://api.onbolder.com/v2/themes/abc123/assets",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "multipart/form-data"
},
json={
"file": "string"
},
)Response
{
"_links": {
"property1": {
"href": "string",
"templated": true,
"method": "get",
"title": "string",
"type": "string"
},
"property2": {
"href": "string",
"templated": true,
"method": "get",
"title": "string",
"type": "string"
}
},
"id": "string",
"file_name": "logo.png",
"content_type": "image/png",
"file_size": 0,
"digest": "string",
"url": "string",
"updated_on": "2019-08-24T14:15:22Z"
}Unauthorized
Access denied
Validation error