HostPapa · Online Presence Builder
The Online Presence Builder HTTP API lets an authenticated integration read and update customer websites programmatically — page content, structure, design, media, and apps. This guide covers the request model, authentication, and a command reference by category.
Protocol
HTTP · JSONOne command endpoint, GET/POST. Multipart for file uploads.
Authentication
API keyIssued by HostPapa. IP-allowlisted. Targets a customer site via login.
Model
Working copy → publishEdits stage on a draft and go live on an explicit publish; changes are revertible.
Scope of this guide
This covers the OPB APIs relevant to authenticated website updates — reading and editing site content, structure, design, and apps, then publishing. It is the subset identified as relevant to this integration; the platform exposes further capabilities beyond it, which can be provided to authorized integrations on demand, if available.
A command API over an account's content tree
Every call targets one endpoint and names a command as cmd=<category>.<action>. Parameters are supplied as query-string or form fields; the version defaults to 1.0.
# request shape https://<your-domain>/api?cmd=<command>[&version=1.0]&<param>=<value>… # example — update an element's HTML on a customer site POST https://<your-domain>/api cmd=object.set api_key=<API_KEY> login=<customer-login> node_id={SK_NODEID__1234__SK} properties={"HtmlText":"<p>Hello</p>"}
Responses are either raw content (e.g. rendered HTML) or a JSON envelope. Errors, and most successful writes, return the envelope:
{ "return_code": "SUCCESS" | "FAILURE",
"message": "human-readable result",
"data": { /* operation-specific payload */ } }
{SK_NODEID__<id>__SK} — pass them back verbatim. An object receives a new ID after object.move.object.page.publish for one page, or object.site.set with publish=1 for the site.object.site.set_preview_mode to review staged changes before they go live.API key, IP allowlist, and the target account
Every request authenticates with your api_key and must originate from an allowlisted IP. To act on a specific customer site, include that account's login. Your key is scoped to the set of accounts you manage.
Convention used in this guide
The api_key and login parameters apply to every call and are omitted from the per-command tables below — those list only the command-specific parameters.
required required parameteroptional optional parameter
Read and update the page-content tree
A site is a tree of typed objects — Site → Pages → Areas → Sections → Containers → content elements. This is the core surface for editing site content.
Discovering an element's properties
Property sets vary by element type. Rather than a static catalogue, call object.get on any element to return its current editable property keys and values, and object.get_rendered_template to preview the output — the API is self-describing.
| Command | Description | Parameters |
|---|---|---|
object.get | Read an object's metadata and properties. | node_idproperties |
object.set | Update an object's properties (text/HTML, layout, configuration). | node_idpropertiesproperties_typereturn_properties |
object.add | Create an element under a parent node. | parent_idobj_idobj_instobj_orderproperties |
object.add_multiple | Create several elements in one call. | objects |
object.move | Reparent / reorder an element (it gets a new ID). | node_idparent_idobj_order |
object.remove | Delete an element (referenced objects can't be removed). | node_id |
object.remove_multiple | Delete several elements. | node_ids |
object.hide_multiple | Hide elements from display. | node_ids |
object.show_multiple | Reveal hidden elements. | node_ids |
object.get_rendered_template | Render HTML from an object's properties. | node_idpathserialize |
| Command | Description | Parameters |
|---|---|---|
object.page.get | Page details, with optional supplementary data. | node_idareasanchorsreferenceslayoutsschemes |
object.page.get_multiple | Details for several pages at once. | node_idsareasanchors |
object.page.get_tree | Hierarchy of a page's areas and elements. | node_id |
object.page.duplicate | Clone a page, with optional text substitution. | node_idreplacementsadd_to_main |
object.page.remove | Delete a page, with optional link cleanup. | node_idremove_linksreplace_links_with |
object.page.move_to_folder | Move a page between folders. | node_idfolder_id |
object.page.publish | Publish a single page. | node_id |
object.page.export | Export a page's content. | node_id |
object.page.import | Import content into a page. | content |
object.page.get_size | Report a page's storage use. | node_id |
| Command | Description | Parameters |
|---|---|---|
object.site.set | Update site properties & design (title, logo, design, scheme, custom CSS…). Set publish=1 to go live. | propertiespublishswitch_designvariables |
object.site.set_preview_mode | Toggle an admin-only preview state. | preview_mode |
The obj_id parameter on object.add selects the element type:
| Element | obj_id |
|---|---|
| Page | 1 |
| Text & Image | 11 |
| HTML Snippet | 25 |
| Section | 42 |
| Form | 69 |
| Gallery | 72 |
| Gallery Image | 71 |
| Section Group | 93 |
| Container | 94 |
Domains, routing, assets, and whole-site content
| Command | Description | Parameters |
|---|---|---|
| Domains & pages | ||
site.set_domains | Set a site's domains. | domains |
site.set_home_page | Set the home page. | node_id |
site.set_404_page | Set a custom 404 page. | node_id |
| Redirects | ||
site.redirect.add | Create a URL redirect. | propertiesnamepathlink |
site.redirect.update | Modify an existing redirect. | properties |
site.redirect.get | Read one redirect. | redirect_id |
site.redirect.remove | Delete one redirect. | redirect_id |
| Folders | ||
site.folder.add | Create a page folder. | propertiesnamepath |
site.folder.update | Modify a page folder. | properties |
site.folder.get | Read one folder. | folder_id |
site.folder.remove | Delete one folder. | folder_id |
| Static files & stock resources | ||
site.static_file.add | Add a file as a static asset; returns its ID. | url |
site.static_file.remove | Remove a static file. | id |
site.stock_images.get_images | List images in a stock collection. | collection_id |
| Whole-site content | ||
site.import | Restore site content, with optional substitutions. | contentreplacements |
List and manage the apps installed on a site
Use this to enable and configure OPB applications (forms, maps, and more) on a customer site.
| Command | Description | Parameters |
|---|---|---|
app.catalog.get_all | List the applications available to install. | user_id |
app.user.get_all | List a site's installed applications. | user_id |
app.user.install | Install a catalog app onto a site. | user_idapp_idedition_id |
app.user.update | Update an installed app to a given edition. | user_idapp_idedition_id |
app.user.deinstall | Remove an installed app. | user_idapp_id |
app.user.get_settings | Read an app's stored settings. | user_idapp_id |
app.user.set_settings | Store an app's settings (JSON). | user_idapp_idsettings |
How to obtain and validate credentials
loginInclude the customer account's login on each call to act on that site.Additional capabilities (e.g. account and domain management) can be provided to authorized integrations on demand, if available.