Create template
Adds a new HTML, CSS or JavaScript template to a theme. The file_name extension
determines the content type (html, css, js). Requires admin scope.
POST
/themes/{theme_id}/templatesAuthorization
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_namestringrequiredFile name including extension, e.g. `about.html`
bodystringrequiredTemplate content
Responses
201Template created
idstringfile_namestringnamestringcontent_typestringAllowed:
htmlcssjsbodystringupdated_onstring<date-time>_linksobjectRequest
curl -X POST "https://api.onbolder.com/v1/themes/string/templates" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"file_name": "string",
"body": "string"
}'const response = await fetch("https://api.onbolder.com/v1/themes/string/templates", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"file_name": "string",
"body": "string"
})
});import requests
response = requests.post(
"https://api.onbolder.com/v1/themes/string/templates",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"file_name": "string",
"body": "string"
},
)Response
{
"id": "string",
"file_name": "string",
"name": "string",
"content_type": "html",
"body": "string",
"updated_on": "2019-08-24T14:15:22Z",
"_links": {}
}