The site's look: the theme (colours, fonts, dark mode), header, footer, popups and reusable custom components built with HTML, CSS and JS.
Endpoints that need a token: the site owner creates it in their admin (Developers > API reference). AI assistants: how to ask the user for one.
81 endpoints in 7 parts: Custom Component, Custom Font, Editor, Index Component, Popup, Wildcard, AI builder.
The custom code components. Answers an array of every record.
Public - no token needed.
Returns a list of CustomComponent objects.
curl -X GET 'http://butholding.com/custom-components?ionic=true'
[
{
"name": "Example",
"html": "example",
"compiled_html": "example",
"css": "example",
"compiled_css": "example",
"js": "example",
"variables": [
{
"value": "example",
"_id": "6543210fedcba98765432100"
}
],
"iframe": false,
"media": "6543210fedcba98765432100",
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z"
}
]Creates a custom code component. Answers 201 with no body.
Needs a site admin token.
Returns the CustomComponent object.
curl -X POST 'http://butholding.com/custom-components?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
{
"name": "Example",
"html": "example",
"compiled_html": "example",
"css": "example",
"compiled_css": "example",
"js": "example",
"variables": [
{
"value": "example",
"_id": "6543210fedcba98765432100"
}
],
"iframe": false,
"media": "6543210fedcba98765432100",
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z"
}One custom code component. 404 when there is no such record.
Public - no token needed.
The ID of the custom component.
Returns the CustomComponent object.
curl -X GET 'http://butholding.com/custom-components/{id}?ionic=true'{
"name": "Example",
"html": "example",
"compiled_html": "example",
"css": "example",
"compiled_css": "example",
"js": "example",
"variables": [
{
"value": "example",
"_id": "6543210fedcba98765432100"
}
],
"iframe": false,
"media": "6543210fedcba98765432100",
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z"
}Updates a custom code component. Fields outside the allowed list are silently ignored. Answers the updated record, or 404.
Needs a site admin token.
The ID of the custom component.
Returns the CustomComponent object.
curl -X PATCH 'http://butholding.com/custom-components/{id}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'{
"name": "Example",
"html": "example",
"compiled_html": "example",
"css": "example",
"compiled_css": "example",
"js": "example",
"variables": [
{
"value": "example",
"_id": "6543210fedcba98765432100"
}
],
"iframe": false,
"media": "6543210fedcba98765432100",
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z"
}Deletes a custom code component. Answers the deleted record, or 404. Records that point to it are not changed.
Needs a site admin token.
The ID of the custom component.
Returns an empty answer on success.
curl -X DELETE 'http://butholding.com/custom-components/{id}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'The uploaded fonts. Answers an array of every record.
Needs a site admin token.
Returns the CustomFont object.
curl -X GET 'http://butholding.com/custom-font?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
{
"family": "example",
"link": "example-item",
"name": "Example",
"weights": "example",
"italics": [
"example"
],
"subsets": [
"example"
],
"generic": "example",
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z"
}Import a Google font. Takes `{ query }` — a family name, a Google. Fonts URL, a <link> tag or a `font-family:` declaration — and resolves its real weights against Google's font metadata. The older `{ family, link }` body still works unchanged.
Needs a site admin token.
The custom font's query.
Returns the CustomFont object.
curl -X POST 'http://butholding.com/custom-font?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "query": "..." }'{
"family": "example",
"link": "example-item",
"name": "Example",
"weights": "example",
"italics": [
"example"
],
"subsets": [
"example"
],
"generic": "example",
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z"
}One uploaded font. 404 when there is no such record.
Needs a site admin token.
The ID of the custom font.
Returns the CustomFont object.
curl -X GET 'http://butholding.com/custom-font/{id}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'{
"family": "example",
"link": "example-item",
"name": "Example",
"weights": "example",
"italics": [
"example"
],
"subsets": [
"example"
],
"generic": "example",
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z"
}Updates an uploaded font. Fields outside the allowed list are silently ignored. Answers the updated record, or 404.
Needs a site admin token.
The ID of the custom font.
Returns the CustomFont object.
curl -X PATCH 'http://butholding.com/custom-font/{id}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'{
"family": "example",
"link": "example-item",
"name": "Example",
"weights": "example",
"italics": [
"example"
],
"subsets": [
"example"
],
"generic": "example",
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z"
}Deletes an uploaded font. Answers the deleted record, or 404. Records that point to it are not changed.
Needs a site admin token.
The ID of the custom font.
Returns an empty answer on success.
curl -X DELETE 'http://butholding.com/custom-font/{id}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'Every font the theme picker may offer — the built-in library plus. this tenant's own imports, in one shape.
Needs a site admin token.
curl -X GET 'http://butholding.com/font-catalogue?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
{
"family": "example",
"link": "example-item",
"name": "Example",
"weights": "example",
"italics": [
"example"
],
"subsets": [
"example"
],
"generic": "example",
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z"
}Typeahead over the whole Google Fonts library, for the admin's font. picker. `q` is whatever the user has typed so far.
Needs a site admin token.
The words to search for.
curl -X GET 'http://butholding.com/google-fonts/search?ionic=true&q=...' \ -H 'Authorization: Bearer <TOKEN>'
Adds a word key to the site's locales (locale), for every language. locale is the wording to add; it becomes both the key and the text until translated. Answers 201 when added, 200 when the key already exists. Reads no token.
Public - no token needed.
The add locale's locale.
curl -X POST 'http://butholding.com/add-locale?ionic=true' \
-H 'Content-Type: application/json' \
-d '{ "locale": "..." }'The legacy site file templates/views/404.hbs, as text. Answers the file's text as it is on the server now.
Needs a site admin token.
curl -X GET 'http://butholding.com/get-404?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
The legacy site file public/css/app-stylesheet.css, as text. Answers the file's text as it is on the server now.
Public - no token needed.
curl -X GET 'http://butholding.com/get-app-scss?ionic=true'
The legacy site file templates/views/blogpost.hbs, as text. Answers the file's text as it is on the server now.
Needs a site admin token.
curl -X GET 'http://butholding.com/get-blog?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
The legacy site file templates/views/blogposts.hbs, as text. Answers the file's text as it is on the server now.
Needs a site admin token.
curl -X GET 'http://butholding.com/get-blogs?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
The legacy site file public/css/bs-theme.css, as text. Answers the file's text as it is on the server now.
Needs a site admin token.
curl -X GET 'http://butholding.com/get-bs-css?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
The legacy site file templates/views/my_cart.hbs, as text. Answers the file's text as it is on the server now.
Needs a site admin token.
curl -X GET 'http://butholding.com/get-cart?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
The legacy site file templates/views/contacts.hbs, as text. Answers the file's text as it is on the server now.
Needs a site admin token.
curl -X GET 'http://butholding.com/get-contacts?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
The legacy site file public/css/stylesheet.css, as text. Answers the file's text as it is on the server now.
Needs a site admin token.
curl -X GET 'http://butholding.com/get-css?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
The legacy site file templates/partials/header.hbs, as text. Answers the file's text as it is on the server now.
Needs a site admin token.
curl -X GET 'http://butholding.com/get-header?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
The legacy site file public/css/header.css, as text. Answers the file's text as it is on the server now.
Needs a site admin token.
curl -X GET 'http://butholding.com/get-header-css?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
The legacy site file templates/views/index.hbs, as text. Answers the file's text as it is on the server now.
Needs a site admin token.
curl -X GET 'http://butholding.com/get-index?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
The site's words by language, as JSON. Answers the site's words as { <key>: <text shown> }, from the newest locales record.
Public - no token needed.
Returns a list of Locales objects.
curl -X GET 'http://butholding.com/get-locales?ionic=true'
[
{
"locales_object": {},
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z"
}
]The legacy site file public/css/main.css, as text. Answers the file's text as it is on the server now.
Needs a site admin token.
curl -X GET 'http://butholding.com/get-main-css?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
The legacy site file templates/views/partners.hbs, as text. Answers the file's text as it is on the server now.
Needs a site admin token.
curl -X GET 'http://butholding.com/get-partners?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
The legacy site file templates/views/payment.hbs, as text. Answers the file's text as it is on the server now.
Needs a site admin token.
curl -X GET 'http://butholding.com/get-payment?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
The legacy site file templates/views/product.hbs, as text. Answers the file's text as it is on the server now.
Needs a site admin token.
curl -X GET 'http://butholding.com/get-product?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
The legacy site file templates/views/products.hbs, as text. Answers the file's text as it is on the server now.
Needs a site admin token.
curl -X GET 'http://butholding.com/get-products?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
The legacy site file templates/views/service.hbs, as text. Answers the file's text as it is on the server now.
Needs a site admin token.
curl -X GET 'http://butholding.com/get-service?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
The legacy site file templates/views/services.hbs, as text. Answers the file's text as it is on the server now.
Needs a site admin token.
curl -X GET 'http://butholding.com/get-services?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
The legacy site file templates/views/store.hbs, as text. Answers the file's text as it is on the server now.
Needs a site admin token.
curl -X GET 'http://butholding.com/get-store?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
The site's theme file (colours, fonts) from cloud storage. Answers the theme JSON straight from cloud storage, or 404 when the site has none yet.
Public - no token needed.
curl -X GET 'http://butholding.com/get-theme?ionic=true'
The legacy site file templates/views/video.hbs, as text. Answers the file's text as it is on the server now.
Needs a site admin token.
curl -X GET 'http://butholding.com/get-vlog?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
The legacy site file templates/views/videos.hbs, as text. Answers the file's text as it is on the server now.
Needs a site admin token.
curl -X GET 'http://butholding.com/get-vlogs?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
Overwrites the legacy site file templates/views/404.hbs with content and restarts the site. Send the whole file as content; it replaces the old one and the site restarts to pick it up. A broken template or stylesheet breaks the site's pages until it is fixed.
Needs a site admin token.
The 404's content.
curl -X POST 'http://butholding.com/set-404?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "content": "..." }'Overwrites the legacy site file templates/views/blogpost.hbs with content and restarts the site. Send the whole file as content; it replaces the old one and the site restarts to pick it up. A broken template or stylesheet breaks the site's pages until it is fixed.
Needs a site admin token.
The blog's content.
curl -X POST 'http://butholding.com/set-blog?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "content": "..." }'Overwrites the legacy site file templates/views/blogposts.hbs with content and restarts the site. Send the whole file as content; it replaces the old one and the site restarts to pick it up. A broken template or stylesheet breaks the site's pages until it is fixed.
Needs a site admin token.
The blog's content.
curl -X POST 'http://butholding.com/set-blogs?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "content": "..." }'Overwrites the legacy site file public/css/bs-theme.css with content and restarts the site. Send the whole file as content; it replaces the old one and the site restarts to pick it up. A broken template or stylesheet breaks the site's pages until it is fixed.
Needs a site admin token.
The bs css's content.
curl -X POST 'http://butholding.com/set-bs-css?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "content": "..." }'Overwrites the legacy site file templates/views/my_cart.hbs with content and restarts the site. Send the whole file as content; it replaces the old one and the site restarts to pick it up. A broken template or stylesheet breaks the site's pages until it is fixed.
Needs a site admin token.
The cart's content.
curl -X POST 'http://butholding.com/set-cart?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "content": "..." }'Overwrites the legacy site file templates/views/contacts.hbs with content and restarts the site. Send the whole file as content; it replaces the old one and the site restarts to pick it up. A broken template or stylesheet breaks the site's pages until it is fixed.
Needs a site admin token.
The contact's content.
curl -X POST 'http://butholding.com/set-contacts?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "content": "..." }'Overwrites the legacy site file public/css/stylesheet.css with content and restarts the site. Send the whole file as content; it replaces the old one and the site restarts to pick it up. A broken template or stylesheet breaks the site's pages until it is fixed.
Needs a site admin token.
The css's content.
curl -X POST 'http://butholding.com/set-css?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "content": "..." }'Overwrites the legacy site file templates/partials/header.hbs with content and restarts the site. Send the whole file as content; it replaces the old one and the site restarts to pick it up. A broken template or stylesheet breaks the site's pages until it is fixed.
Needs a site admin token.
The header's content.
curl -X POST 'http://butholding.com/set-header?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "content": "..." }'Overwrites the legacy site file public/css/header.css with content and restarts the site. Send the whole file as content; it replaces the old one and the site restarts to pick it up. A broken template or stylesheet breaks the site's pages until it is fixed.
Needs a site admin token.
The header css's content.
curl -X POST 'http://butholding.com/set-header-css?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "content": "..." }'Overwrites the legacy site file templates/views/index.hbs with content and restarts the site. Send the whole file as content; it replaces the old one and the site restarts to pick it up. A broken template or stylesheet breaks the site's pages until it is fixed.
Needs a site admin token.
The index's content.
curl -X POST 'http://butholding.com/set-index?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "content": "..." }'Replaces the site's words by language (content). Send the whole map as content (JSON text): keys left out are removed. Older locales records are deleted and the app re-reads its startup data.
Needs a site admin token.
The locale's content.
curl -X POST 'http://butholding.com/set-locales?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "content": "..." }'Overwrites the legacy site file public/css/main.css with content and restarts the site. Send the whole file as content; it replaces the old one and the site restarts to pick it up. A broken template or stylesheet breaks the site's pages until it is fixed.
Needs a site admin token.
The main css's content.
curl -X POST 'http://butholding.com/set-main-css?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "content": "..." }'Overwrites the legacy site file templates/views/partners.hbs with content and restarts the site. Send the whole file as content; it replaces the old one and the site restarts to pick it up. A broken template or stylesheet breaks the site's pages until it is fixed.
Needs a site admin token.
The partner's content.
curl -X POST 'http://butholding.com/set-partners?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "content": "..." }'Overwrites the legacy site file templates/views/payment.hbs with content and restarts the site. Send the whole file as content; it replaces the old one and the site restarts to pick it up. A broken template or stylesheet breaks the site's pages until it is fixed.
Needs a site admin token.
The payment's content.
curl -X POST 'http://butholding.com/set-payment?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "content": "..." }'Overwrites the legacy site file templates/views/product.hbs with content and restarts the site. Send the whole file as content; it replaces the old one and the site restarts to pick it up. A broken template or stylesheet breaks the site's pages until it is fixed.
Needs a site admin token.
The product's content.
curl -X POST 'http://butholding.com/set-product?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "content": "..." }'Overwrites the legacy site file templates/views/products.hbs with content and restarts the site. Send the whole file as content; it replaces the old one and the site restarts to pick it up. A broken template or stylesheet breaks the site's pages until it is fixed.
Needs a site admin token.
The product's content.
curl -X POST 'http://butholding.com/set-products?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "content": "..." }'Overwrites the legacy site file templates/views/service.hbs with content and restarts the site. Send the whole file as content; it replaces the old one and the site restarts to pick it up. A broken template or stylesheet breaks the site's pages until it is fixed.
Needs a site admin token.
The service's content.
curl -X POST 'http://butholding.com/set-service?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "content": "..." }'Overwrites the legacy site file templates/views/services.hbs with content and restarts the site. Send the whole file as content; it replaces the old one and the site restarts to pick it up. A broken template or stylesheet breaks the site's pages until it is fixed.
Needs a site admin token.
The service's content.
curl -X POST 'http://butholding.com/set-services?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "content": "..." }'Overwrites the legacy site file templates/views/store.hbs with content and restarts the site. Send the whole file as content; it replaces the old one and the site restarts to pick it up. A broken template or stylesheet breaks the site's pages until it is fixed.
Needs a site admin token.
The store's content.
curl -X POST 'http://butholding.com/set-store?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "content": "..." }'Saves the site's theme (whole, or one section), marks the theme step done and re-renders every page. Send either the whole theme as content (a JSON string), or one section as { section, value }: section 'header' or 'footer' replaces that part with value; section 'theme' writes value's colour and font keys (a null key goes back to absent). A section is merged onto the current theme, so nothing else in it changes: every other key the site's published theme has stays published, including keys the saved theme record lacks. Every page is rendered again with it on its next visit. Answers 200 only once the site shows the new theme: 400 when the section or value is wrong, 500 when it could not be saved or the site could not be updated. A section the site could not be updated with is not kept either (the saved theme goes back to what it was).
Needs a site admin token.
The theme's section.
The theme's value.
The theme's content.
curl -X POST 'http://butholding.com/set-theme?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "section": "...", "value": "...", "content": "..." }'Overwrites the legacy site file templates/views/video.hbs with content and restarts the site. Send the whole file as content; it replaces the old one and the site restarts to pick it up. A broken template or stylesheet breaks the site's pages until it is fixed.
Needs a site admin token.
The vlog's content.
curl -X POST 'http://butholding.com/set-vlog?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "content": "..." }'Overwrites the legacy site file templates/views/videos.hbs with content and restarts the site. Send the whole file as content; it replaces the old one and the site restarts to pick it up. A broken template or stylesheet breaks the site's pages until it is fixed.
Needs a site admin token.
The vlog's content.
curl -X POST 'http://butholding.com/set-vlogs?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "content": "..." }'The home page's blocks. Answers an array of every record.
Needs a site admin token.
Returns a list of IndexComponent objects.
curl -X GET 'http://butholding.com/index-components?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
[
{
"type": "example",
"position": 1,
"about_page": "example",
"isFluid": false,
"isAppComponent": false,
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z"
}
]Replaces every home page block with the list sent, in order. The body is the WHOLE list (an array of blocks): every block not in it is removed. To add one block and keep the rest, use POST /index-components/append. The list is checked before anything is removed - an empty or invalid one answers 400 and changes nothing. A page block names its page by url in about_page, not by id. The home page is rendered again on its next visit. Answers 201.
Needs a site admin token.
The index component's map.
Returns the IndexComponent object.
curl -X POST 'http://butholding.com/index-components?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "map": "..." }'{
"type": "example",
"position": 1,
"about_page": "example",
"isFluid": false,
"isAppComponent": false,
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z"
}One home page block. 404 when there is no such record.
Needs a site admin token.
The ID of the index component.
Returns the IndexComponent object.
curl -X GET 'http://butholding.com/index-components/{id}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'{
"type": "example",
"position": 1,
"about_page": "example",
"isFluid": false,
"isAppComponent": false,
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z"
}Updates a home page block. The home page is rendered again on its next visit. Answers the block, or 404.
Needs a site admin token.
The ID of the index component.
Returns the IndexComponent object.
curl -X PATCH 'http://butholding.com/index-components/{id}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'{
"type": "example",
"position": 1,
"about_page": "example",
"isFluid": false,
"isAppComponent": false,
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z"
}Deletes a home page block. Answers the deleted record, or 404. Records that point to it are not changed.
Needs a site admin token.
The ID of the index component.
Returns an empty answer on success.
curl -X DELETE 'http://butholding.com/index-components/{id}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'Adds one block to the home page, keeping the others - e.g. a page shown on the home page. For a page: { about_page: its id or its url } (type defaults to "about_page"). Other types show a list instead (products_latest, services, blogposts...). position puts it there and moves the blocks from there on down; without it, it goes last. isAppComponent: true adds it to the mobile app's home instead of the website's. 404 when the page does not exist. Answers 201 with the new block.
Needs a site admin token.
What the block shows: about_page (a page), or a list - products, products_latest, products_top, services, services_all, services_latest, services_top, blogposts, blogposts_latest, blogposts_top, videos, videos_latest, price_plans.
Spans the full width of the screen.
Shown in the mobile app's home instead of the website's.
For an about_page block: the URL of the page it shows (AboutPage.url, e.g. "our-story"), not its id. POST /index-components/append takes either and stores the url.
Order on the home page; lower first.
Returns the IndexComponent object.
curl -X POST 'http://butholding.com/index-components/append?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "type": "...", "isFluid": "...", "isAppComponent": "...", "about_page": "...", "position": "..." }'{
"type": "example",
"position": 1,
"about_page": "example",
"isFluid": false,
"isAppComponent": false,
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z"
}The site's popups. Answers an array.
Needs a site admin token.
Returns the Popup object.
curl -X GET 'http://butholding.com/popup?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
{
"title": "Example",
"body": "6543210fedcba98765432100",
"decline_button_text": "Text shown on the site.",
"accept_button_text": "Text shown on the site.",
"accept_button_link": "example-item",
"wide_modal": false,
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z"
}Creates a popup. Answers 201 with no body.
Needs a site admin token.
Returns the Popup object.
curl -X POST 'http://butholding.com/popup?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
{
"title": "Example",
"body": "6543210fedcba98765432100",
"decline_button_text": "Text shown on the site.",
"accept_button_text": "Text shown on the site.",
"accept_button_link": "example-item",
"wide_modal": false,
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z"
}One popup. 404 when there is no such record.
Needs a site admin token.
The ID of the popup.
Returns the Popup object.
curl -X GET 'http://butholding.com/popup/{id}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'{
"title": "Example",
"body": "6543210fedcba98765432100",
"decline_button_text": "Text shown on the site.",
"accept_button_text": "Text shown on the site.",
"accept_button_link": "example-item",
"wide_modal": false,
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z"
}Updates a popup.
Needs a site admin token.
The ID of the popup.
Returns the Popup object.
curl -X PATCH 'http://butholding.com/popup/{id}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'{
"title": "Example",
"body": "6543210fedcba98765432100",
"decline_button_text": "Text shown on the site.",
"accept_button_text": "Text shown on the site.",
"accept_button_link": "example-item",
"wide_modal": false,
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z"
}Deletes a popup.
Needs a site admin token.
The ID of the popup.
Returns an empty answer on success.
curl -X DELETE 'http://butholding.com/popup/{id}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'Serves what a wildcard route points to (a product, service, post or program) at /g/<url>. 404 when no wildcard route has that url; 502 when the page it points to cannot be loaded. Cached for an hour.
Public - no token needed.
The g's URL slug, as in its address on the site.
curl -X GET 'http://butholding.com/g/{url}(*)?ionic=true'{
"url": "example-item",
"points_to": "example",
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z"
}The wildcard routes. Answers an array of every record.
Needs a site admin token.
Only wildcards with this authenticated.
Returns a list of Wildcard objects.
curl -X GET 'http://butholding.com/wildcards?ionic=true&authenticated=...' \ -H 'Authorization: Bearer <TOKEN>'
[
{
"url": "example-item",
"points_to": "example",
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z"
}
]Creates a wildcard route. Answers 201 { id }.
Needs a site admin token.
Returns the Wildcard object.
curl -X POST 'http://butholding.com/wildcards?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
{
"url": "example-item",
"points_to": "example",
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z"
}One wildcard route. 404 when there is no such record.
Needs a site admin token.
The ID of the wildcard.
Returns the Wildcard object.
curl -X GET 'http://butholding.com/wildcards/{id}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'{
"url": "example-item",
"points_to": "example",
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z"
}Updates a wildcard route. Fields outside the allowed list are silently ignored. Answers the updated record, or 404.
Needs a site admin token.
The ID of the wildcard.
Returns the Wildcard object.
curl -X PATCH 'http://butholding.com/wildcards/{id}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'{
"url": "example-item",
"points_to": "example",
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z"
}Deletes a wildcard route. Answers the deleted record, or 404. Records that point to it are not changed.
Needs a site admin token.
The ID of the wildcard.
Returns an empty answer on success.
curl -X DELETE 'http://butholding.com/wildcards/{id}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'Create a popup from a prompt, written by the AI builder.
Needs a site admin token.
What the AI should do with the popup, in plain words - any language.
The AI chat this request belongs to; its history and language carry over. Leave it out to start a new chat.
Which version of the AI builder to use; leave it out for the current one.
The ID of the popup to change.
curl -X POST 'http://butholding.com/create-new-popup?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "prompt": "...", "chatId": "...", "aiVersion": "...", "item_id": "..." }'{
"chat_id": "6543210fedcba98765432100",
"role": "user",
"text": "Text shown on the site.",
"target_url": "example-item",
"action": "RESPONSE",
"options": [
"example"
],
"medias": [
{
"media": "6543210fedcba98765432100",
"gcs_url": "example-item",
"gemini_uri": "example",
"gemini_interaction_id": "example",
"_id": "6543210fedcba98765432100"
}
],
"products": [
"6543210fedcba98765432101"
],
"services": [
"6543210fedcba98765432101"
],
"blogposts": [
"6543210fedcba98765432101"
],
"programs": [
"6543210fedcba98765432101"
],
"files": [
{
"file": "6543210fedcba98765432100",
"name": "Example",
"kind": "example",
"_id": "6543210fedcba98765432100"
}
],
"files_read": [
{
"file": "6543210fedcba98765432100",
"name": "Example",
"_id": "6543210fedcba98765432100"
}
],
"suggestions": [
{
"text": "Text shown on the site.",
"route": "example",
"item_id": "6543210fedcba98765432100",
"medias": [],
"picture": "6543210fedcba98765432100",
"_id": "6543210fedcba98765432100"
}
],
"is_system": false,
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z",
"data": {
"object": "example",
"object_type": "example",
"edit_summary": "example",
"edit_diff": "example",
"undo_record": "example",
"hero_animation_offer": "example",
"preview_state": "example",
"pending_credit_cost": 0,
"applied_version": "example",
"applied_section": "example",
"target_restore": "example",
"media_request": "example"
}
}Use it to create or set up a site popup or modal.
Needs a site admin token.
What the AI should do with the popup, in plain words - any language.
The AI chat this request belongs to; its history and language carry over. Leave it out to start a new chat.
curl -X POST 'http://butholding.com/generate-popup?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "prompt": "...", "chatId": "..." }'