Skip to content
BolderBolder Developers
Esc
↑↓navigate↵open⌘Jpreview

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}/templates
Authorization
AuthorizationBearer token (JWT) · headerrequired

OAuth 2.0 Bearer token. Obtain via POST https://auth.onbolder.com/oauth/token.

Scopes:admin
Path parameters
theme_idstringrequired
Request body
requiredapplication/json
file_namestringrequired

File name including extension, e.g. about.html

bodystringrequired

Template content

Responses
201

Template created

idstring
file_namestring
namestring
content_typestring
Allowed:htmlcssjs
bodystring
updated_onstring<date-time>
_linksobject
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://api.onbolder.com/v1/themes/string/templates' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "file_name": "about.html",
  "body": "<h1>About Us</h1>"
}'
Response
{
  "id": "string",
  "file_name": "string",
  "name": "string",
  "content_type": "html",
  "body": "string",
  "updated_on": "2019-08-24T14:15:22Z",
  "_links": {}
}

Was this page helpful?