Site.pro
  • Website Builder
    • Website Builder
    • Online Stores
    • Templates
    • Domains
    • Plugins
    • Languages
    • FAQ
    • Affiliate program
    • Examples
  • Prices
  • Website Import
  • For Resellers
    • White Label
    • Prices
    • Panels
    • How it Works
    • Free Websites
    • Marketing Kit
    • Mass Import
    • Our Partners
    • Free Website Builder
    • FAQ
    • Documentation
    • Blog
  • Contact Sales
  • faceLog In
    Log In with Facebook Log In with Google
    or
    Remind password
    A new password will be sent to the specified e-mail address.
    Return to login form
  • inputRegister
    Sign Up with Facebook
    Sign Up with Google
    or
  • $
    • USD — $
    • EUR — €
    • GBP — £
    • BRL — R$
    • PLN — zł
    • INR — ₹
    • TRY — TL
    • AUD — A$
    • CAD — C$
    • CZK — Kč
    • DKK — kr
    • HKD — HK$
    • HUF — Ft
    • ILS — ₪
    • JPY — 円
    • MXN — Mex$
    • NOK — kr
    • NZD — NZ$
    • PHP — ₱
    • RUB — ₽
    • SGD — S$
    • SEK — kr
    • CHF — Fr
    • TWD — NT$
    • THB — ฿
    • CNY — ¥
    • RSD — din
    • BGN — лв.
    • RON — Lei
    • HRK — kn
    • ZAR — R
    • BYN — p.
    • UAH — ₴
    • KZT — ₸
    • CLP — CH$
  • English
    • Schweizerdeutsch
    • English
    • O'zbek
    • Deutsch
    • Nederlands
    • Français
    • Español
    • Italiano
    • Português (BR)
    • Norsk
    • Suomi
    • Svenska
    • Dansk
    • Čeština
    • Magyar
    • Română
    • 日本語
    • 简体
    • 繁體
    • Polski
    • Ελληνικά
    • Русский
    • Türkçe
    • Беларуская
    • العربية
    • فارسی
    • עברית
    • Latviešu
    • Украї́нська
    • Bahasa Indonesia
    • Bahasa Malaysia
    • ภาษาไทย
    • Eesti
    • Hrvatski
    • Lietuvių
    • Slovenčina
    • Srpski
    • Tiếng Việt
    • Castellano
    • Bosanski
    • Български
    • हिन्दी
    • Қазақ
    • Slovenščina
    • Wikang Tagalog
    • ქართული
    • Azərbaycan
    • ភាសាខ្មែរ
    • And additional 3 languages inside Site.pro website builder
  • Website Builder
    • devicesWebsite BuilderProfessional Website Builder for Your Business
    • Online StoresSell your goods or services anywhere on the website
    • collectionsTemplates200+ Awesome Templates. Choose the website design you want to use from a range of hundreds of pre-made, high quality templates.
    • domainDomainsFind a perfect domain name
    • Plugins
    • Languages
    • FAQ
    • Affiliate program
    • Examples
  • Prices
  • Website Import
  • For ResellersWhite Label
    • local_floristWhite LabelThe most popular white label tool is ideal for reselling.
    • local_offerPricesStart Reselling. Pay for live websites. Free Websites
    • buildPanelsDownload plugin for your panel. Compatible with: cPanel, ISPmanager, WHMCS, Plesk, DirectAdmin, Vesta, ZPanel, InterWorx, Custom Panel or Billing (API)
    • How it WorksBuilder hosted on your own server. Cloud or On-Premises. Recommendations for Builder Server
    • Free WebsitesUnlimited Quantity of Free Websites
    • Marketing KitUse White Label Marketing Kit To Increase Your Sales
    • Mass Import
    • Our Partners
    • redeemFree Website Builder
    • FAQ
    • descriptionDocumentation
    • Blog
  • Contact Sales

API documentation

Table of contents

  • Builder
    • Create session (SSO) (open builder for your customer)
    • Remove existing session
  • Templates
    • List template categories
    • List templates
    • Get page types available in template
  • Websites
    • Create website (remotely)
    • Modify website (remotely)
    • Rename website
    • Publish website (remotely)
    • Edit website pages (remotely)
    • Edit website settings (remotely)
    • Enable Auto Layout (remotely)
    • Disable Auto Layout (remotely)
    • Delete website
    • Create website backup (remotely)
    • Restore website backup (remotely)
    • Get website template
    • Get website pages
    • Get website variables
    • Get website settings (remotely)
    • Add pages to website (remotely)
    • Duplicate pages in website (remotely)
    • Remove pages from website (remotely)
    • Import website (remotely)
    • Get import status
  • Website Blocks
    • Create empty website (remotely)
    • Modify website (remotely)
    • Inspect website (remotely)
    • Add empty page (remotely)
    • Modify page (remotely)
    • Remove page (remotely)
    • Inspect page (remotely)
    • Inspect composition (remotely)
    • Modification descriptor structure by element type
    • Add blocks from compositions (remotely)
    • Remove blocks (remotely)
    • Move blocks (remotely)
    • Modify blocks (remotely)
    • Inspect block (remotely)
  • Licenses
    • Get list of published websites
    • Get statistics of publications/openings
    • Block/unblock published website
    • Controlling IP list
  • Integration with your system
    • Allow/disallow domain in builder
    • Check if domains are allowed in builder
    • Check if imported website is owned by user

Create session (SSO)

Site.pro Builder is a session-based software. It means that it cannot be opened for a customer directly in browser but instead you need to get unique session URL for that customer using this API method.

To open builder you need to call API URL by posting JSON object with information about user, if all went successfully API will return JSON object with URL you will need to redirect client to, if error occurs API will return JSON object with error message. All request to API require HTTP Basic Authorisation. Username and password for API Authorisation can be found inside your brand on licenses page after you login to your account. All documentation on how to make requests to API and some request examples are below.

http://your-builder-domain.com/api/requestLogin
https://site.pro/api/requestLogin
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json

Currently builder supports 2 publishing types: external and internal:

  • external – this type uses FTP account to publish website. During API call you need to pass FTP details which builder will use for site publication. Example implementation: Download here.
  • internal – this type uses your API endpoint to publish website. During API call you need to pass your API endpoint URL which builder will call for site publication. Example implementation: Download here.
  • external
  • internal
Click here to see how publishing works in more details.
JSON Object Properties:

Required:

  • String – "external"
  • String – "internal"
  • String – Client domain name. This field acts as a website identifier in builder. Make sure it is the same for one unique website. Do not pass different values for one website (for example "www" and "non-www" domain versions), otherwise the website will not be found in builder. You can also pass numeric ID for this parameter as website identifier in builder. Then we recommend to add extra parameter "baseDomain". Please see more information about it below.
  • String – Client FTP connection username.
  • String – Client FTP connection password.
  • String – Client FTP public_html directory ex.: /public_html.
  • String – IP address of client FTP server.
  • Number – Website/User ID on your end. It will be passed during your API endpoint call as one of parameters during site publication.
  • String – Your API endpoint URL.

Important: Starting from builder version 3.7.379 properties "username", "password", "uploadDir" and "apiUrl" may be skipped when calling this API method not for the first time for the same domain. If they are skipped builder will take their values from the last session where these properties were known.

Optional:

  • String – HTTP Basic Authorisation username to call API endpoint URL.
  • String – HTTP Basic Authorisation password to call API endpoint URL.
  • String – Language 2 letter code (ex. "en", "ru", ...) to open builder in.
  • String – Hosting plan identifier, will be used for builder feature limitations by plan.
  • String – Real client's domain name. We recommend to specify this parameter if it differs from what is specified for "domain". This parameter is used in URLs of website sitemap generation.
  • String – URL to image to use as builder logo (if not set will be taken from brand).
  • String – URL to image/icon to use as builder favicon (if not set will be taken from brand).
  • String – Title to use for builder (if not set will be taken from brand).
  • Boolean – Do not allow users to remove builder logo from their websites (if not set will be taken from brand).
  • String – URL to place on builder logo in users website.
  • String – Custom identifier accessible in builder plugins.
  • String – Custom templates path (absolute or relative). If set then will be used for loading templates instead of default path (on-premises only since v3.7.230)
  • String – Page ID to open in builder. (on-premises only since v3.7.345)
  • String – Required only when using remote API endpoint of User registration from Public Demo builder
  • Boolean – If set to true response will contain additional two properties: loginHash and builderApiUrl
  • Boolean – If set to true then migration to v4 builder dialog will be suppressed
Return Object Properties:
  • String – Url to redirect client to (only on success)
  • String – Hash that may be used with website controlling API calls (only on success when request property more is set to true)
  • String – Base API url that should be used for website controlling API calls (only on success when request property more is set to true)
  • Object – Error description object (only on error). Error object structure:
    • String – Text describing the error
API endpoint implementation for internal publication type:

During site publication builder will make periodic requests to your API endpoint. The request details are the following:

API endpoint URL
HTTP Basic (only if "username" and "password" parameters were passed to builder API call)
Value of parameter "username" passed to builder API call
Value of parameter "password" passed to builder API call
POST/GET
application/x-www-form-urlencoded
application/json

The publication starts with making POST request to URL API endpoint + /zyro/action and providing zip archive of generated client's website. With this request builder sets the following POST parameters:

  • String – URL to zip file containing website generated files. This zip must be downloaded and extracted to client's hosting.
  • Number – Value of parameter "resellerClientAccountId" passed to builder API.
  • String – Value of parameter "domain" passed to builder API.
  • String – Value of parameter "hostingPlan" passed to builder API (if was set).

API endpoint return result (JSON format):

  • Object – (required if error is not returned) Result description object with structure:
    • String – (required if error is not returned) ID of publication process for further process identification in next builder requests. You can pass any non-empty value here.
  • String – (optional) Error message in case if your endpoint cannot process the publication request.

If endpoint returns error then publication stops in builder and error message in shown to the client which you provide in the response.

After getting successful response from endpoint (with no error) builder starts periodically sending GET requests to API endpoint to determine what status the publication of the site is on your end. It makes request to URL API endpoint + /zyro/action/[id] where [id] is a value returned in endpoint POST request.

During builder GET requests API endpoint must return the following result (JSON format):

  • Object – Result description object with structure:
    • String – (required) It can be one of these:
      • PENDING – the process has not yet started on your end.
      • EXECUTING – the process is being executed on your end.
      • FAILED – the process failed on your end.
      • FINISHED – the process has been complete on your end.
    • String – (optional) Error message if status = FAILED.

The builder will make GET requests to API endpoint every 5 seconds until it receives status "FINISHED" or "FAILED". If the publication lasts for more than 2 hours then GET requests and publication stop and builder will show "operation timed out" error message for client.

This process let's you use queue for publication processes. It can be convenient if you have many customers and there can be many publication processes started at one time then the zip downloading and extraction can slow down the server.
If you want making publication without queue then you can do this by extracting zip file at once on builder POST request and responding to builder first GET request with status "FINISHED".

Note:
Your API endpoint URL must support extra arguments. For example if your endpoint is http://myhostingsite.com/api/publish-site then it also must be accessible via URL http://myhostingsite.com/api/publish-site/zyro/action and http://myhostingsite.com/api/publish-site/zyro/action/[id] from which you will need to retrieve publication process ID.

Request Example (for external publication type):
POST /api/requestLogin HTTP/1.1
Host: your-builder-domain.com
Authorization: Basic W0FQSSBVc2VybmFtZSBmcm9tIGJyYW5kXTpbQVBJIFBhc3N3b3JkIGZyb20gYnJhbmRd
Content-Type: application/json

{
   "type": "external",
   "domain": "test.com",
   "apiUrl": "11.22.33.44",
   "lang": "en",
   "username": "test.com FTP username",
   "password": "test.com FTP password",
   "uploadDir": "/public_html"
}
		
Request Example (for internal publication type):
POST /api/requestLogin HTTP/1.1
Host: your-builder-domain.com
Authorization: Basic W0FQSSBVc2VybmFtZSBmcm9tIGJyYW5kXTpbQVBJIFBhc3N3b3JkIGZyb20gYnJhbmRd
Content-Type: application/json

{
   "type": "internal",
   "domain": "test.com",
   "apiUrl": "http://myhostingsite.com/api/publish-site",
   "resellerClientAccountId": 1234,
   "lang": "en"
}
		
Response Example:
HTTP/1.1 200 OK
Content-Type: application/json

{
   "url": "http://your-builder-domain.com/?login_hash=4asf64df6465"
}
	

Important: The session URL is active for 30 days per domain. Despite the fact one session URL can be used multiple times per domain during this period it is recommended to generate the fresh URL each time you need to open builder for a customer. Otherwise the session may contain outdated builder configuration and will not match your brand configuration on licenses page.

Response With Error Example:
HTTP/1.1 400 Bad Request
Content-Type: application/json

{
   "error": { "message": "some kind of error message" }
}
	

Remove existing session available since version 4.0.63 / 3.7.439

http://your-builder-domain.com/api/remove-auth
https://site.pro/api/remove-auth
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • String - login hash you received from "Create session" API call;
  • String - domain related to this login hash used with parameter "domain" in "Create session" API call;
JSON response Object Properties:
  • Boolean - (optional) returned on success, contains value true, indicates successfully executed action;
  • Object - (optional) Error description object (only on error). Error object structure:
    • String - Text describing the error

List template categories

Get list of template categories as JSON.

http://your-builder-domain.com/api/category-list
GET
application/json
JSON response Object Properties:
  • String - template category ID;
  • String - template category name;
  • Number - number of templates contained in this category;
Note: To get template names in a different language — add language code to API URL, e.g. http://your-builder-domain.com/it/api/category-list

List templates

Get list of templates as JSON.

http://your-builder-domain.com/api/template-list
GET
application/json
JSON response Object Properties:
  • String - template ID;
  • String - template ID (relative to category);
  • String - templates category ID;
  • String - template name;
  • String - template image URL;
Note: To get template names in a different language — add language code to API URL, e.g. http://your-builder-domain.com/it/api/template-list

Get page types available in template available since version 4.0.0 / 3.7.229 (on-premises only)

http://your-builder-domain.com/api/website/get-page-types
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • String - template ID;
JSON response Object Properties:
  • Boolean - (optional) returned on success, contains value true, indicates successfully executed action;
  • String - (optional) returned on success, contains template;
  • Array of String - (optional) returned on success, contains list of page types;
  • String - (optional) returned on error, contains error message, indicates failure to execute action;

Create website available since version 4.0.0 / 3.7.229 (on-premises only)

This API action requires a loginHash, that can be received by using "Create session" API call with additional parameter more = true. Furthermore http://your-builder-domain.com/api/ in Call API URL should be replaced with builderApiUrl received from "Create session" API call, so new API url for this action would be builderApiUrl + website/create.

http://your-builder-domain.com/api/website/create (builderApiUrl + "website/create")
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • String - login hash you received from "Create session" API call;
  • String - template ID to create website from;
  • Array of String - (optional) list of page types to indicate pages that need to be added from template (if not specified all pages will be added). List of available page types can be received by using "Get page types available in template" API call;
  • Object - (optional) key value pair list of variables (reference IDs in template) and their values, that will replace website elements contents (available since version 3.7.256);
    Possible values for different element types:
    • String - text or HTML;
    • Object - object containing the following properties:
      • String - image URL/Data URL;
      • Link Object - (optional) link data;
    • Object - object containing the following properties:
      • Background - background data;
      • Link Object - (optional) link data;
    • Object - object containing the following properties:
      • String - button text;
      • Link Object - (optional) link data;
    • String - comma (,) separated coordinates;
    where:
    • Link Object - object containing the following properties:
      • String - button URL (can also be of type "mail:" or "tel:");
      • String - (optional) button title;
    • Background - object containing the following properties:
      • String - (optional) background color (default: "transparent");
      • String - (optional) background image URL (default: "none");
      • String - (optional) background position (default: "left top");
      • String - (optional) background repeat (default: "repeat");
      • String - (optional) background size (default: "auto auto");
      • String - (optional) background attachment (default: "scroll");
JSON response Object Properties:
  • Boolean - (optional) returned on success, contains value true, indicates successfully executed action;
  • String - (optional) returned on success, contains template used to create website;
  • Object - (optional) returned on success, contains key value pair list of created pages where key is page ID and value is page type;
  • String - (optional) returned on error, contains error message, indicates failure to execute action;

Modify website available since version 4.0.0 / 3.7.229 (on-premises only)

This API action requires a loginHash, that can be received by using "Create session" API call with additional parameter more = true. Furthermore http://your-builder-domain.com/api/ in Call API URL should be replaced with builderApiUrl received from "Create session" API call, so new API url for this action would be builderApiUrl + website/modify.

http://your-builder-domain.com/api/website/modify (builderApiUrl + "website/modify")
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • String - login hash you received from "Create session" API call;
  • Object - (optional) see "variables" parameter in Create website method;
JSON response Object Properties:
  • Boolean - (optional) returned on success, contains value true, indicates successfully executed action;
  • String - (optional) returned on error, contains error message, indicates failure to execute action;

Rename website available since version 4.0.0 / 3.7.295 (on-premises only)

http://your-builder-domain.com/api/website/rename (builderApiUrl + "website/rename")
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • String - domain you want to rename;
  • String - new domain name;
JSON response Object Properties:
  • Boolean - (optional) returned on success, contains value true, indicates successfully executed action;
  • String - (optional) returned on error, contains error message, indicates failure to execute action;

Publish website available since version 4.0.0 / 3.7.350 (on-premises only)

This API action requires a loginHash, that can be received by using "Create session" API call with additional parameter more = true. Furthermore http://your-builder-domain.com/api/ in Call API URL should be replaced with builderApiUrl received from "Create session" API call, so new API url for this action would be builderApiUrl + publish.

This API is for publishing website. Publishing website consists of 2 or more API calls:
    1) use "Create session" API call with additional parameter more = true to get loginHash and builderApiUrl;
    2) with this API use received loginHash and builderApiUrl + 'publish' (as API URL) to initiate publishing process (when API call returns it only means that publishing has started);
    3) optionally call (same as in step 2) API call with additional parameter progress = true to get publishing progress (when you receive response with complete = true, then publishing process has completed);

http://your-builder-domain.com/api/publish (builderApiUrl + "publish")
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • String - login hash you received from "Create session" API call;
  • String - (optional) if set then progress of specified publication process will be returned, otherwise new publication process will be started and its process ID will be returned in the response;
  • String - (optional) template ID, if passed then current template (is exists) will be removed and replaced with this new template (all data will be lost);
JSON response Object Properties:
  • String - (optional) text describing current publish process progress;
  • Number - (optional) numeric value from 0 to 100 to show progress completeness (note publishing consists of multiple actions so this value will go multiple times to 100, so do not rely on it);
  • Boolean - (optional) if true then publishing process is complete;
  • String - (optional) error message, if this parameter is not empty that means publishing process stopped (unless this is authentication error);
  • String - (optional) publication process ID (set only when requested for new publication, that is "processId" property was not set in the request);

Edit website pages available since version 4.0.50 / 3.7.430 (on-premises only)

This API action requires a loginHash, that can be received by using "Create session" API call with additional parameter more = true. Furthermore http://your-builder-domain.com/api/ in Call API URL should be replaced with builderApiUrl received from "Create session" API call, so new API url for this action would be builderApiUrl + website/edit-pages.

http://your-builder-domain.com/api/website/edit-pages (builderApiUrl + "website/edit-pages")
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • String - login hash you received from "Create session" API call;
  • Array of Object - object containing the following structure:
    • String - (optional) new page type. If passed, then "menuItem" -> "name" parameter will be ignored.
    • Object - (optional) object containing the following structure:
      • String - (optional) page title (defined in SEO settings).
      • String - (optional) page user friendly URL (defined in SEO settings).
    • Object - (optional) object containing the following structure:
      • String - (optional) menu item name.
      • Boolean - (optional) indicates if menu item is hidden in Menu element.
JSON response Object Properties:
  • Boolean - (optional) returned on success, contains value true, indicates successfully executed action;
  • String - (optional) returned on error, contains error message, indicates failure to execute action;

Edit website settings available since version 4.0.46 / 3.7.374 (on-premises only)

This API action requires a loginHash, that can be received by using "Create session" API call with additional parameter more = true. Furthermore http://your-builder-domain.com/api/ in Call API URL should be replaced with builderApiUrl received from "Create session" API call, so new API url for this action would be builderApiUrl + website/settings.

http://your-builder-domain.com/api/website/settings (builderApiUrl + "website/settings")
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
Note: All website settings changes made by calling this API will not reflect published website instantly, but only settings in the editor. Changes will be applied only after the website is published.
JSON request Object Properties:
  • String - login hash you received from "Create session" API call;
  • Boolean - (optional) if true then published website will forcefully be redirected to HTTPS protocol; if false then no forced redirection will be applied;
  • Boolean - (optional) possible values:
    • Number - forced redirection will be not be applied to published website;
    • Number - published website will forcefully be redirected to non-WWW domain version;
    • Number - published website will forcefully be redirected to WWW domain version;
  • Boolean - (optional) if true then context menu will not appear on published website when right-clicking website area with a mouse;
  • Boolean - (optional) if true then published website will forcefully be redirected to URL with trailing slashes at the end (for example URL "http://website.com/about" will redirect to "http://website.com/about/"); if false then no forced redirection will be applied;
  • String - (optional) custom code for field "Before </head>" for "Common" item;
  • String - (optional) custom code for field "Before </body>" for "Common" item;
  • String - (optional) custom code for field "After </body>" for "Common" item;
  • Page Scripts Object - (optional) custom code for field "Before </head>" for specific pages;
  • Page Scripts Object - (optional) custom code for field "Before </body>" for specific pages;
  • Page Scripts Object - (optional) custom code for field "After </body>" for specific pages;

where:
  • Page Scripts Object - associative array of custom code for specific pages. The object must be of structure:
    {
        "pageId1": "code1",
        "pageId2": "code2",
        ...
    }
    where pageId is ID of page which can be retrieved with Get website pages API method, and code is custom code for fields specified above in description of properties.
JSON response Object Properties:
  • Boolean - (optional) returned on success, contains value true, indicates successfully executed action;
  • String - (optional) returned on error, contains error message, indicates failure to execute action;

Enable Auto Layout available since version 3.7.412 (on-premises only)

This API action requires a loginHash, that can be received by using "Create session" API call with additional parameter more = true.

http://your-builder-domain.com/api/website/auto-layout/enable (builderApiUrl + "website/auto-layout/enable")
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • String - login hash you received from "Create session" API call;
JSON response Object Properties:
  • Boolean - (optional) returned on success, contains value true, indicates successfully executed action;
  • String - (optional) returned on error, contains error message, indicates failure to execute action;

Disable Auto Layout available since version 3.7.412 (on-premises only)

This API action requires a loginHash, that can be received by using "Create session" API call with additional parameter more = true.

http://your-builder-domain.com/api/website/auto-layout/disable (builderApiUrl + "website/auto-layout/disable")
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • String - login hash you received from "Create session" API call;
JSON response Object Properties:
  • Boolean - (optional) returned on success, contains value true, indicates successfully executed action;
  • String - (optional) returned on error, contains error message, indicates failure to execute action;

Delete website available since version 4.0.0 / 3.7.64 (on-premises only)

This API is for permanently deleting website from on-premises builder. This will only delete website project data from builder itself and leave published website intact.

http://your-builder-domain.com/api/delete-site
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json

  • String - website domain name (required)
  • Boolean - result of response (only on success)
  • Object - error description object (only on error). Error object structure:
    • String - text describing the error
POST /api/delete-site HTTP/1.1
Host: your-builder-domain.com
Authorization: Basic W0FQSSBVc2VybmFtZSBmcm9tIGJyYW5kXTpbQVBJIFBhc3N3b3JkIGZyb20gYnJhbmRd
Content-Type: application/json

{"domain": "test.com"}
HTTP/1.1 200 OK
Content-Type: application/json

{"ok": true}
HTTP/1.1 200 OK
Content-Type: application/json

{"error": {"message": "some kind of error message"}}

Create website backup available since version 4.0.0 / 3.7.316 (on-premises only)

Creates site source file backup and stores locally on builder server or returns as downloadable file.

http://your-builder-domain.com/api/create-site-backup
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json

  • String - domain name used to identify website witch will be backed up (required).
  • String - absolute folder path inside builder server where to store backup file (optional, if not set backup file will be returned in response for downloading). When backup file is stored locally in provided folder it will have file name: "[domain]_project.sitebuilder".

On success you get empty response (in case of local storage) or response with a file for downloading. HTTP response code should be 200.
On error you will get JSON encoded object as response. HTTP response code should be something other than 200.

  • Object - error description object (only on error). Error object structure:
    • Number - error code
    • String - text describing the error
POST /api/create-site-backup HTTP/1.1
Host: your-builder-domain.com
Authorization: Basic W0FQSSBVc2VybmFtZSBmcm9tIGJyYW5kXTpbQVBJIFBhc3N3b3JkIGZyb20gYnJhbmRd
Content-Type: application/json

{
    "domain": "site-to-backup.com",
    "dir": "/mnt/backup_storage"
}
HTTP/1.1 200 OK
HTTP/1.1 200 OK
Content-Type: application/octet-stream
Content-disposition: attachment; filename="site-to-backup.com_project.sitebuilder"

[some binary data]
HTTP/1.1 500 Internal Error
Content-Type: application/json

{"error": {"code": 1, "message": "some kind of error message"}}

Restore website backup available since version 4.0.0 / 3.7.316 (on-premises only)

Restores site backup from local file or remote URL.

http://your-builder-domain.com/api/restore-site-backup
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json

  • String - domain name used to identify web-site witch will be restored from backup (required).
  • String - absolute path inside builder server or absolute external URL to backup file to restore from (required).

On success you will get JSON encoded object as response. HTTP response code should be 200.

  • Boolean - it will be equal to true to indicate success.

On error you will get JSON encoded object as response. HTTP response code should be something other than 200.

  • Object - error description object (only on error). Error object structure:
    • Number - error code
    • String - text describing the error
POST /api/restore-site-backup HTTP/1.1
Host: your-builder-domain.com
Authorization: Basic W0FQSSBVc2VybmFtZSBmcm9tIGJyYW5kXTpbQVBJIFBhc3N3b3JkIGZyb20gYnJhbmRd
Content-Type: application/json

{
    "domain": "site-to-restore.com",
    "file": "/mnt/backup_storage/site-to-restore.com_project.sitebuilder"
}
HTTP/1.1 200 OK
Content-Type: application/json

{"ok": true}
HTTP/1.1 500 Internal Error
Content-Type: application/json

{"error": {"code": 1, "message": "some kind of error message"}}

Get website template available since version 4.0.0 / 3.7.344 (on-premises only)

This API action requires a loginHash, that can be received by using "Create session" API call with additional parameter more = true. Furthermore http://your-builder-domain.com/api/ in Call API URL should be replaced with builderApiUrl received from "Create session" API call, so new API url for this action would be builderApiUrl + website/get-template.

http://your-builder-domain.com/api/website/get-template (builderApiUrl + "website/get-template")
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • String - login hash you received from "Create session" API call;
JSON response Object Properties:
  • Boolean - (optional) returned on success, contains value true, indicates successfully executed action;
  • String - (optional) returned on success, contains template ID [category/template] used to create website;

Get website pages available since version 4.0.0 / 3.7.344 (on-premises only)

This API action requires a loginHash, that can be received by using "Create session" API call with additional parameter more = true. Furthermore http://your-builder-domain.com/api/ in Call API URL should be replaced with builderApiUrl received from "Create session" API call, so new API url for this action would be builderApiUrl + website/get-pages.

http://your-builder-domain.com/api/website/get-pages (builderApiUrl + "website/get-pages")
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • String - login hash you received from "Create session" API call;
  • Boolean - if set to true response will not contain menu items that have isInternal set to true;
JSON response Object Properties:
  • Boolean - (optional) returned on success, contains value true, indicates successfully executed action;
  • Array of Object - (optional) returned on success, contains list of website pages. Each page object has following structure:
    • String - page type.
    • Object - part of page definition containing the following structure:
      • String - page ID.
      • String - page title (defined in SEO settings).
      • String - page user friendly URL (defined in SEO settings).
      • Boolean - indicates if page is popup.
      • Number - popup page width (set only if page is popup).
      • Number - popup page height (set only if page is popup).
    • Object - part of page definition containing the following structure:
      • String - menu item name.
      • Boolean - indicates if menu item is hidden in Menu element.
      • Boolean - indicates if menu item is a link to a page in another menu.

Get website variables available since version 4.0.0 / 3.7.388 (on-premises only)

This API action requires a loginHash, that can be received by using "Create session" API call with additional parameter more = true. Furthermore http://your-builder-domain.com/api/ in Call API URL should be replaced with builderApiUrl received from "Create session" API call, so new API url for this action would be builderApiUrl + website/get-variables.

http://your-builder-domain.com/api/website/get-variables (builderApiUrl + "website/get-variables")
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • String - login hash you received from "Create session" API call;
JSON response Object Properties:
  • Boolean - (optional) returned on success, contains value true, indicates successfully executed action;
  • Object - (optional) key value pair list of variables (reference IDs in template) and their values used when creating website using "Create website" API call;
  • String - (optional) returned on error, contains error message, indicates failure to execute action;

Get website settings available since version 4.0.0 / 3.7.374 (on-premises only)

This API action requires a loginHash, that can be received by using "Create session" API call with additional parameter more = true. Furthermore http://your-builder-domain.com/api/ in Call API URL should be replaced with builderApiUrl received from "Create session" API call, so new API url for this action would be builderApiUrl + website/get-settings.

http://your-builder-domain.com/api/website/get-settings (builderApiUrl + "website/get-settings")
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • String - login hash you received from "Create session" API call;
JSON response Object Properties:
  • Boolean - returned on success, contains value true, indicates successfully executed action;
  • Object - object containing the following properties:
    • Boolean - if true then published website will forcefully be redirected to HTTPS protocol; if false then no forced redirection will be applied;
    • Boolean - possible values:
      • Number - forced redirection will be not be applied to published website;
      • Number - published website will forcefully be redirected to non-WWW domain version;
      • Number - published website will forcefully be redirected to WWW domain version;
    • Boolean - if true then context menu will not appear on published website when right-clicking website area with a mouse;
    • Boolean - if true then published website will forcefully be redirected to URL with trailing slashes at the end (for example URL "http://website.com/about" will redirect to "http://website.com/about/"); if false then no forced redirection will be applied;
    • String - custom code for field "Before </head>" for "Common" item;
    • String - custom code for field "Before </body>" for "Common" item;
    • String - custom code for field "After </body>" for "Common" item;
    • Page Scripts Object - custom code for field "Before </head>" for specific pages;
    • Page Scripts Object - custom code for field "Before </body>" for specific pages;
    • Page Scripts Object - custom code for field "After </body>" for specific pages;

    where:
    • Page Scripts Object - associative array of custom code for specific pages. The object must be of structure:
      {
          "pageId1": "code1",
          "pageId2": "code2",
          ...
      }
      where pageId is ID of page which can be retrieved with Get website pages API method, and code is custom code for fields specified above in description of properties.

Add pages to website available since version 4.0.0 / 3.7.229 (on-premises only)

This API action requires a loginHash, that can be received by using "Create session" API call with additional parameter more = true. Furthermore http://your-builder-domain.com/api/ in Call API URL should be replaced with builderApiUrl received from "Create session" API call, so new API url for this action would be builderApiUrl + website/add-pages.

http://your-builder-domain.com/api/website/add-pages (builderApiUrl + "website/add-pages")
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • String - login hash you received from "Create session" API call;
  • String - template id to add pages from;
  • Array of String - list of page types to indicate pages that need to be added from template. List of available page types can be received by using "Get page types available in template" API call;
JSON response Object Properties:
  • Boolean - (optional) returned on success, contains value true, indicates successfully executed action;
  • String - (optional) returned on success, contains template used to add pages from;
  • Object - (optional) returned on success, contains key value pair list of created pages where key is page ID and value is page type;
  • String - (optional) returned on error, contains error message, indicates failure to execute action;

Duplicate pages in website available since version 4.0.0 / 3.7.229 (on-premises only)

This API action requires a loginHash, that can be received by using "Create session" API call with additional parameter more = true. Furthermore http://your-builder-domain.com/api/ in Call API URL should be replaced with builderApiUrl received from "Create session" API call, so new API url for this action would be builderApiUrl + website/duplicate-pages.

http://your-builder-domain.com/api/website/duplicate-pages (builderApiUrl + "website/duplicate-pages")
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • String - login hash you received from "Create session" API call;
  • Array of String - list of page IDs to indicate pages that need to be duplicated;
JSON response Object Properties:
  • Boolean - (optional) returned on success, contains value true, indicates successfully executed action;
  • Array of String - (optional) returned on success, contains ID list of created pages;
  • String - (optional) returned on error, contains error message, indicates failure to execute action;

Remove pages from website available since version 4.0.0 / 3.7.229 (on-premises only)

This API action requires a loginHash, that can be received by using "Create session" API call with additional parameter more = true. Furthermore http://your-builder-domain.com/api/ in Call API URL should be replaced with builderApiUrl received from "Create session" API call, so new API url for this action would be builderApiUrl + website/remove-pages.

http://your-builder-domain.com/api/website/remove-pages (builderApiUrl + "website/remove-pages")
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • String - login hash you received from "Create session" API call;
  • Array of String - list of page IDs to indicate pages that need to be removed;
JSON response Object Properties:
  • Boolean - (optional) returned on success, contains value true, indicates successfully executed action;
  • Array of String - (optional) returned on success, contains ID list of removed pages (will only contain pages that were actually removed, if they did not exist they will not be in this list);
  • String - (optional) returned on error, contains error message, indicates failure to execute action;

Import website available since version 4.0.0 / 3.7.312 (on-premises only)

This API action allows to import website to the builder without any user interaction.

Import limits specified in maxPages, maxFiles, maxGallerySize, maxImageSize, maxDocumentSize are capped at limits set by Site.Pro. For example setting maxPages to 1000 will still be reduced to 20 unless we had this limit increased.

Please be aware that once import is successfully complete old website is fully replaced with imported one.

This API action requires a loginHash, that can be received by using "Create session" API call with additional parameter more = true. Furthermore http://your-builder-domain.com/api/ in Call API URL should be replaced with builderApiUrl received from "Create session" API call, so new API url for this action would be builderApiUrl + website/import-begin.

http://your-builder-domain.com/api/website/import-begin (builderApiUrl + "website/import-begin")
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • String - login hash you received from "Create session" API call;
  • String - URL of a website to import;
  • Number - (optional) maximum number of pages that import service can try to import from the website (defaults to 20 unless increased by Site.Pro);
  • Number - (optional) maximum number of files that can be downloaded into media library (defaults to 1000 unless increased by Site.Pro);
  • Number - (optional) maximum bytes that are allowed to be imported into media library (defaults to 52428800 [50MB] unless increased by Site.Pro);
  • Number - (optional) maximum bytes allowed for image files (jpg, png, gif) (defaults to 3145728 [3MB] unless increased by Site.Pro);
  • Number - (optional) maximum bytes allowed for files other than images (defaults to 20971520 [20MB] unless increased by Site.Pro);
  • Boolean - (optional) tells import service whether "Auto Layout" mode should be enabled on imported website (defaults to true);
JSON response Object Properties:
  • Boolean - (optional) returned on success, contains value true, indicates successfully executed action;
  • String - (optional) returned on success, contains import task ID that must be used with "Get import status" API call;
  • String - (optional) returned on error, contains error message, indicates failure to execute action;

Get import status available since version 4.0.0 / 3.7.312 (on-premises only)

This API action returns status of import task created with "Import website" API call.

Once import task is finished further "Get import status" API calls will return error "Import task not found.". Import task is considered finished on two conditions:

  • complete property of returned status object is set to true (successful import),
  • or error property exists in returned status object (unsuccessful import).

Please be aware that once import is successfully complete old website is fully replaced with imported one.

Make sure to do periodic "Get import status" API calls after starting import (recommended period is 3 to 10 seconds) since otherwise after 30 seconds of "silence" import service may consider the task to be abandoned and abort it.

This API action requires a loginHash, that can be received by using "Create session" API call with additional parameter more = true. Furthermore http://your-builder-domain.com/api/ in Call API URL should be replaced with builderApiUrl received from "Create session" API call, so new API url for this action would be builderApiUrl + website/import-status.

http://your-builder-domain.com/api/website/import-status (builderApiUrl + "website/import-status")
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • String - login hash you received from "Create session" API call;
  • String - import task ID received from "Import website" API call;
  • Boolean - (optional) if set to true response will contain extra parameter "pages" after importing is done;
JSON response Object Properties:
  • Boolean - (optional) returned on success, contains value true, indicates successfully executed action;
  • TaskStatus - (optional) returned on success, contains status of import task;
  • String - (optional) returned on error, contains error message, indicates failure to execute action;
  • Object - (optional) total list of website pages after importing is done (the same which can be retrieved from "Get website pages" API call); returned only when importing task is complete and if request has "getPages" property set to true;
TaskStatus object properties:
  • Boolean - value of true indicates that import task was completed successfully and website was replaced with imported one;
  • Object - (optional) returned only if there is an error related to import task. This object has following properties:
    • Boolean - value of true indicates that potentially the error is only temporary and trying to import same URL again has a chance to succeed;
    • String - error message from import service related to the import task. This message is displayed in builder to users, may be translated and may contain HTML code;
    • Number - numeric code of error message from import service (see table below);
  • String - (optional) current import task status text as displayed to users in builder (may be translated and contain HTML). This property will be available only if there are no errors and builder is still connected to import service;
  • Number - (optional) overall import task progress percentage (0 to 100). This property will be available only if there are no errors and builder is still connected to import service;
  • Object - (optional) import task progress information divided into steps (processes). This property will be available only if there are no errors and builder is still connected to import service. This object has following properties:
    • StepProgress - progress of waiting in import service queue;
    • StepProgress - progress of reading (crawling) website;
    • StepProgress - progress of processing found HTML pages;
    • StepProgress - progress of downloading resources (images, documents, etc.) into media library;
    • StepProgress - progress of loading imported website into builder;
StepProgress object properties:
  • String - status of step (process). Possible values are:
    • pending - not yet started,
    • active - currently in progress,
    • done - finished and will no longer be returned to.
  • String - step name as displayed in builder (may be translated and contain HTML code);
  • Number - step progress percentage (0 to 100);
  • String - step progress in form of text as displayed in builder over progress bar (may be translated and contain HTML code);
Possible values of TaskStatus.error.code:
Code Name Description
1 Service unavailable Import service is currently unavailable due to maintenance or network connectivity issues.
2 Refusal to serve Import service is not enabled for your account.
3 Internal error There was an internal import service error.
4 Invalid URL Invalid URL provided with "Import website" API call.
5 Cross-domain redirect Website redirects to a domain that differs from the one in URL provided with "Import website" API call. Redirects between www and non-www subdomains is not considered a cross-domain redirect.
6 Timeout There was a timeout in one of import service processes. Timeout usually happens due to slow website connection or due to very high website complexity.
7 Bad website There is a number of reasons, why this error may happen:
  • provided URL is valid, but domain name cannot be resolved;
  • import service is unable to connect to domain due to firewall or network connectivity issues;
  • requesting provided URL returns a HTTP status code that indicates an error;
  • URL points to a resource with Content-Type different than text/html;
  • URL points to a resource that is not a valid HTML page;
  • URL points to an attachment (Content-Disposition header received);
8 Bad website resources This is an extremely rare error when website cannot be imported into builder due to corruption in imported data (usually bad files imported into media library).
9 Website too complex This error happens when service is unable to handle import of website due to extremely high requirements to computational resources.
10 Website protected Imported website is located on a server belonging to one of our clients that has import protection enabled.
11 Task cancelled Import process was cancelled due to abandonment (no status requests received for 30 seconds). This error may also happen on rare occasions when import service detects that there is no progress for several minutes and import task gets cancelled to perform an automatic service maintenance (can be considered as timeout or too complex website).
12 Owner does not match This error may happen only if loginHash in current request differs from the one used in "Import website" API call.

Create empty website available since version 4.0.61 (on-premises only)

This API action requires a loginHash, that can be received by using "Create session" API call with additional parameter more = true. Furthermore http://your-builder-domain.com/api/ in Call API URL should be replaced with builderApiUrl received from "Create session" API call, so new API url for this action would be builderApiUrl + website-blocks/create-site.

http://your-builder-domain.com/api/website-blocks/create-site (builderApiUrl + "website-blocks/create-site")
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • String - login hash you received from "Create session" API call;
  • Array of String - (optional) list of language locale codes to add to website (ex. en_US);
  • String - (optional) language locale code to mark as default language (ex. en_US);
  • String or Object - (optional) websites default title, for multi-language websites pass an object where field name is language code (ex. en) and value is translation for that language;
  • String or Object - (optional) websites default meta description (used for SEO), for multi-language websites pass an object where field name is language code (ex. en) and value is translation for that language;
  • String or Object - (optional) websites default meta keywords (used for SEO), for multi-language websites pass an object where field name is language code (ex. en) and value is translation for that language;
JSON response Object Properties:
  • Boolean - if true then action executed successfully else failed;
  • String - (optional) if action failed then this will contain error message;

Modify website available since version 4.0.61 (on-premises only)

This API action requires a loginHash, that can be received by using "Create session" API call with additional parameter more = true. Furthermore http://your-builder-domain.com/api/ in Call API URL should be replaced with builderApiUrl received from "Create session" API call, so new API url for this action would be builderApiUrl + website-blocks/modify-site.

http://your-builder-domain.com/api/website-blocks/modify-site (builderApiUrl + "website-blocks/modify-site")
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • String - login hash you received from "Create session" API call;
  • Array of String - (optional) list of language locale codes to replace current languages (ex. en_US);
  • String - (optional) language locale code to mark as default language (ex. en_US);
  • String or Object - (optional) websites default title, for multi-language websites pass an object where field name is language code (ex. en) and value is translation for that language;
  • String or Object - (optional) websites default meta description (used for SEO), for multi-language websites pass an object where field name is language code (ex. en) and value is translation for that language;
  • String or Object - (optional) websites default meta keywords (used for SEO), for multi-language websites pass an object where field name is language code (ex. en) and value is translation for that language;
JSON response Object Properties:
  • Boolean - if true then action executed successfully else failed;
  • String - (optional) if action failed then this will contain error message;

Inspect website available since version 4.0.61 (on-premises only)

This API action requires a loginHash, that can be received by using "Create session" API call with additional parameter more = true. Furthermore http://your-builder-domain.com/api/ in Call API URL should be replaced with builderApiUrl received from "Create session" API call, so new API url for this action would be builderApiUrl + website-blocks/inspect-site.

http://your-builder-domain.com/api/website-blocks/inspect-site (builderApiUrl + "website-blocks/inspect-site")
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • String - login hash you received from "Create session" API call;
JSON response Object Properties:
  • Boolean - if true then action executed successfully else failed;
  • Object - (optional) website descriptor:
    • Array of String - list of language locale codes (ex. en_US);
    • String - language locale code for default language (ex. en_US);
    • Object or String - websites default title, for multi-language websites is an object where field name is language code (ex. en) and value is translation for that language;
    • Object or String - websites default meta description (used for SEO), for multi-language websites pass an object where field name is language code (ex. en) and value is translation for that language;
    • Object or String - websites default meta keywords (used for SEO), for multi-language websites pass an object where field name is language code (ex. en) and value is translation for that language;
    • Array of Object - page descriptor:
      • Number - page id;
      • Object or String - page title, for multi-language websites is an object where field name is language code (ex. en) and value is translation for that language;
      • Object or String - page meta description (used for SEO), for multi-language websites pass an object where field name is language code (ex. en) and value is translation for that language;
      • Object or String - page meta keywords (used for SEO), for multi-language websites pass an object where field name is language code (ex. en) and value is translation for that language;
  • String - (optional) if action failed then this will contain error message;

Add empty page available since version 4.0.62 (on-premises only)

This API action requires a loginHash, that can be received by using "Create session" API call with additional parameter more = true. Furthermore http://your-builder-domain.com/api/ in Call API URL should be replaced with builderApiUrl received from "Create session" API call, so new API url for this action would be builderApiUrl + website-blocks/add-page.

http://your-builder-domain.com/api/website-blocks/add-page (builderApiUrl + "website-blocks/add-page")
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • String - login hash you received from "Create session" API call;
  • String or Object - page title, for multi-language websites pass an object where field name is language code (ex. en) and value is translation for that language;
  • String or Object - (optional) page meta description (used for SEO), for multi-language websites pass an object where field name is language code (ex. en) and value is translation for that language;
  • String or Object - (optional) page meta keywords (used for SEO), for multi-language websites pass an object where field name is language code (ex. en) and value is translation for that language;
  • Boolean - (optional) if true then this page is popup page and can be used as popup;
  • Number - (optional) popup width (in pixels);
  • Number - (optional) popup height (in pixels);
  • Number - (optional) popup page ID to be opened when this page is opened;
  • Array of String - list of page sections that need to be created (available array items: header, body, footer);
JSON response Object Properties:
  • Boolean - if true then action executed successfully else failed;
  • Number - (optional) created page ID;
  • String - (optional) if action failed then this will contain error message;

Modify page available since version 4.0.62 (on-premises only)

This API action requires a loginHash, that can be received by using "Create session" API call with additional parameter more = true. Furthermore http://your-builder-domain.com/api/ in Call API URL should be replaced with builderApiUrl received from "Create session" API call, so new API url for this action would be builderApiUrl + website-blocks/modify-page.

http://your-builder-domain.com/api/website-blocks/modify-page (builderApiUrl + "website-blocks/modify-page")
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • String - login hash you received from "Create session" API call;
  • Number - page ID to modify;
  • String or Object - (optional) page title, for multi-language websites pass an object where field name is language code (ex. en) and value is translation for that language;
  • String or Object - (optional) page meta description (used for SEO), for multi-language websites pass an object where field name is language code (ex. en) and value is translation for that language;
  • String or Object - (optional) page meta keywords (used for SEO), for multi-language websites pass an object where field name is language code (ex. en) and value is translation for that language;
  • Boolean - (optional) if true then this page is popup page and can be used as popup;
  • Number - (optional) popup width (in pixels);
  • Number - (optional) popup height (in pixels);
  • Number - (optional) popup page ID to be opened when this page is opened;
JSON response Object Properties:
  • Boolean - if true then action executed successfully else failed;
  • String - (optional) if action failed then this will contain error message;

Remove page available since version 4.0.59 (on-premises only)

This API action requires a loginHash, that can be received by using "Create session" API call with additional parameter more = true. Furthermore http://your-builder-domain.com/api/ in Call API URL should be replaced with builderApiUrl received from "Create session" API call, so new API url for this action would be builderApiUrl + website-blocks/remove-page.

http://your-builder-domain.com/api/website-blocks/remove-page (builderApiUrl + "website-blocks/remove-page")
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • String - login hash you received from "Create session" API call;
  • Array of Number - list of page IDs to remove;
JSON response Object Properties:
  • Boolean - if true then action executed successfully else failed;
  • String - (optional) if action failed then this will contain error message;

Inspect page available since version 4.0.62 (on-premises only)

This API action requires a loginHash, that can be received by using "Create session" API call with additional parameter more = true. Furthermore http://your-builder-domain.com/api/ in Call API URL should be replaced with builderApiUrl received from "Create session" API call, so new API url for this action would be builderApiUrl + website-blocks/inspect-page.

http://your-builder-domain.com/api/website-blocks/inspect-page (builderApiUrl + "website-blocks/inspect-page")
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • String - login hash you received from "Create session" API call;
  • Number - page ID to inspect;
JSON response Object Properties:
  • Boolean - if true then action executed successfully else failed;
  • Object - (optional) page descriptor:
    • Number - page id;
    • Object or String - page title, for multi-language websites is an object where field name is language code (ex. en) and value is translation for that language;
    • Object or String - page meta description (used for SEO), for multi-language websites pass an object where field name is language code (ex. en) and value is translation for that language;
    • Object or String - page meta keywords (used for SEO), for multi-language websites pass an object where field name is language code (ex. en) and value is translation for that language;
    • Boolean - if true then this page is popup page and can be used as popup;
    • Number - (optional) popup width (in pixels);
    • Number - (optional) popup height (in pixels);
    • Number - (optional) popup page ID to be opened when this page is opened;
    • Object - block distribution in sections:
      • Array of String - (optional) header blocks creation composition ID list (ex. default/232), only available for blocks created with this API;
      • Array of String - (optional) body blocks creation composition ID list (ex. default/232), only available for blocks created with this API;
      • Array of String - (optional) footer blocks creation composition ID list (ex. default/232), only available for blocks created with this API;
  • String - (optional) if action failed then this will contain error message;

Inspect composition available since version 4.0.59 (on-premises only)

This API action requires a loginHash, that can be received by using "Create session" API call with additional parameter more = true. Furthermore http://your-builder-domain.com/api/ in Call API URL should be replaced with builderApiUrl received from "Create session" API call, so new API url for this action would be builderApiUrl + website-blocks/inspect-composition.

http://your-builder-domain.com/api/website-blocks/inspect-composition (builderApiUrl + "website-blocks/inspect-composition")
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • String - login hash you received from "Create session" API call;
  • String - composition ID to inspect (ex. default/232);
JSON response Object Properties:
  • Boolean - if true then action executed successfully else failed;
  • Array of Object - (optional) list of element descriptors, descriptor structure:
    • String - elements reference ID;
    • String - elements type;
  • String - (optional) if action failed then this will contain error message;

Modification descriptor structure by element type

JSON LayoutElement Object Properties:
  • Object (optional)
    • Number
    • Number
    • Number
    • Number
    • Number
    • Number
    • Number
    • Number
  • Object - (optional) background descriptor:
    • String - (optional) background CSS color;
    • String - (optional) background CSS image;
    • String - (optional) background CSS position;
    • String - (optional) background CSS attachment;
    • String - (optional) background CSS repeat;
    • String - (optional) background CSS size;
  • Object - (optional) border descriptor:
    • Boolean - (optional) if true then basic border properties (color, style and weight) are different and each should contain 4 components;
    • Array of String - hex encoded color values (ex. #ff0000 - for red color), 1 or 4 components depending on differ value;
    • Array of String - style values (any of solid, dotted, dashed or double), 1 or 4 components depending on differ value;
    • Array of Number - border weight values (in pixels), 1 or 4 components depending on differ value;
  • Object - (optional) corner rounding descriptor:
    • Number - left top corner roundness;
    • Number - right top corner roundness;
    • Number - right bottom corner roundness;
    • Number - left bottom corner roundness;
    • Boolean - (optional) if false only lt value will be used for all corners;
  • Boolean - (optional) if true element will not move with page when scrolled;
  • String - (optional) sticky alignment (one of left top, center top, right top, left middle, right middle, left bottom, center bottom or right bottom);
JSON TextArea Object Properties:
  • String - (optional) text elements HTML content;
JSON Picture Object Properties:
  • String - (optional) image URL;
  • String - (optional) alternative text;
  • Object - (optional) border descriptor:
    • Boolean - (optional) if true then basic border properties (color, style and weight) are different and each should contain 4 components;
    • Array of String - hex encoded color values (ex. #ff0000 - for red color), 1 or 4 components depending on differ value;
    • Array of String - style values (any of solid, dotted, dashed or double), 1 or 4 components depending on differ value;
    • Array of Number - border weight values (in pixels), 1 or 4 components depending on differ value;
  • Object - (optional) corner rounding descriptor:
    • Number - left top corner roundness;
    • Number - right top corner roundness;
    • Number - right bottom corner roundness;
    • Number - left bottom corner roundness;
    • Boolean - (optional) if false only lt value will be used for all corners;
  • Number - (optional) image opacity in percentage (range: 0 - 100);
  • Object - (optional) link that will be opened when clicked:
    • String - link type (one of url - link to external website, page - link to page (page needs to be added to menu) on this website, email - mailto:link or phone - tel:link);
    • String or Number - link subject (different depending on type): url - URL to open (ex.: https://site.pro/), page - menu item ID in menu specified by menuUID property to open (ex.: 1), email - email address (ex.: someones@email.com), phone - phone number (ex.: +12345678912);
    • String - (optional) menu elements unique ID (only for page type) (ex.: 81a1a609);
    • String - (optional) link target (only for url and page types) (ex. _blank to open link in a new window);
    • String - (optional) anchor name to link to specific section (only for page type) (ex.: someplace);
    • String - (optional) link title (will be shown as tooltip on mouse over);
    • Boolean - (optional) if true add rel="nofollow" to the link;
    • Boolean - (optional) if true then this link will open as popup (only for url and page types);
    • Number - (optional) popup width (in pixels);
    • Number - (optional) popup height (in pixels);
JSON Gallery Object Properties:
  • String - (optional) gallery type;
  • Number - (optional) slide show interval (in seconds);
  • Number - (optional) slide show speed (in seconds);
  • String - (optional) gallery background CSS color;
  • Array of String - (optional) image list;
  • Object - (optional) border descriptor:
    • Boolean - (optional) if true then basic border properties (color, style and weight) are different and each should contain 4 components;
    • Array of String - hex encoded color values (ex. #ff0000 - for red color), 1 or 4 components depending on differ value;
    • Array of String - style values (any of solid, dotted, dashed or double), 1 or 4 components depending on differ value;
    • Array of Number - border weight values (in pixels), 1 or 4 components depending on differ value;
  • Number (optional)
  • Number - (optional) thumbnail width;
  • Number - (optional) thumbnail height;
  • String - (optional) thumbnail alignment (one of left, center or right);
  • Number - (optional) thumbnail padding;
  • Boolean - (optional) if true auto crop;
  • Boolean - (optional) if true do not enlarge picture on click;
  • Boolean - (optional) if true hide slideshow arrows;
  • String - (optional) caption visibility (one of always or hover);
  • String - (optional) caption background CSS color;
  • Object - (optional) caption title style:
    • String - (optional) text CSS color;
    • Number - (optional) CSS font size (in pixels);
    • String - (optional) CSS font face;
    • Object - (optional) text style:
      • Boolean - (optional) if true then text will be italic;
      • Boolean - (optional) if true then text will be bold;
      • Boolean - (optional) if true then text will be underlined;
    • String - (optional) CSS text alignment (one of left, center or right);
    • Number - (optional) CSS line height (in pixels);
    • Number - (optional) CSS letter spacing (in pixels);
    • String - (optional) CSS text transform;
  • Object - (optional) caption description style:
    • String - (optional) text CSS color;
    • Number - (optional) CSS font size (in pixels);
    • String - (optional) CSS font face;
    • Object - (optional) text style:
      • Boolean - (optional) if true then text will be italic;
      • Boolean - (optional) if true then text will be bold;
      • Boolean - (optional) if true then text will be underlined;
    • String - (optional) CSS text alignment (one of left, center or right);
    • Number - (optional) CSS line height (in pixels);
    • Number - (optional) CSS letter spacing (in pixels);
    • String - (optional) CSS text transform;
JSON Youtube Object Properties:
  • String - Youtube video ID;
  • String - (optional) start video from time (ex.: 00:12);
  • Boolean - (optional) if false hide video player controls;
  • Boolean - (optional) if true video player will use no/less cookies;
JSON Vimeo Object Properties:
  • String - video ID;
  • String - same value as groupId;
  • String - (optional) portrait mode (1 - Yes, 0 - No);
  • String - (optional) show title (1 - Yes, 0 - No);
  • String - (optional) auto-play (1 - Yes, 0 - No);
  • String - (optional) CSS color code;
JSON Spotify Object Properties:
  • String - (optional) type (one of play or follow);
  • String - (optional) size (one of basic or detail);
  • String - (optional) color theme (one of dark or light);
  • Number - (optional) show count (1 - show, 0 - hide);
  • String - (optional) URL to spotify playlist (for type play) or artist (for type follow);
JSON MusicPlayer Object Properties:
  • Array of String - (optional) list of music file URLs;
  • Boolean - (optional) if true will start playing on load;
JSON GoogleMaps Object Properties:
  • String - (optional) Textual address;
  • String - (optional) coordinates (latitude, longitude) (ex. 1.234567,1.234567);
  • Number - (optional) zoom level;
  • String - (optional) map type (one of hybrid, roadmap, satellite, terrain);
  • String - (optional) Google Maps API key;
  • String - (optional) color theme (one of default, light, dark or monochrome);
  • String - (optional) CSS color for monochrome color theme;
  • Boolean - (optional) if true show map type changer;
  • Boolean - (optional) if true show zoom control;
  • Boolean - (optional) if true show street view control;
  • Boolean - (optional) if true show full screen control;
  • Boolean - (optional) if true allow dragging;
  • Boolean - (optional) if true show roads overlay;
  • Boolean - (optional) if true show roads overlay;
  • Boolean - (optional) if true show labels;
JSON yandex_maps Object Properties:
  • String - (optional) Yandex Maps API key;
  • String - (optional) textual address;
  • Number - (optional) zoom level;
  • String - (optional) map type (one of yandex#map, yandex#satellite or yandex#hybrid);
  • Array of Number - (optional) coordinates (latitude, longitude);
JSON bing_maps Object Properties:
  • String - (optional) Bing Maps API key;
  • String - (optional) textual address;
  • Number - (optional) zoom level;
  • String - (optional) coordinates (latitude, longitude) (ex. 1.234567,1.234567);
  • Number - (optional) latitude coordinate (same as in coord);
  • Number - (optional) longitude coordinate (same as in coord);
JSON baidu_maps Object Properties:
  • String - (optional) group ID;
  • String - (optional) coordinates (latitude, longitude) (ex.: 116.404, 39.915);
  • String - (optional) same as int coords;
  • Number - (optional) zoom level;
  • Boolean - (optional) if true show marker;
  • Boolean - (optional) if true animate marker;
JSON Form Object Properties:
  • Object - (optional) fields descriptor where field name is field number and field value is field descriptor object with fields:
    • Boolean - if true then will be used else not;
    • String - field type (one of input, textarea, select, checkbox or file);
    • String - name of the field;
    • String - option list for select type fields;
    • Boolean - if true then field will be required;
  • String - (optional) receiver email;
  • String - (optional) sender email;
  • String - (optional) email subject;
  • String - (optional) message that is shown to user when form is sent;
  • String - (optional) form submit button text;
  • Boolean - (optional) if true SMTP sending is enabled;
  • String - (optional) SMTP server host;
  • String - (optional) SMTP server port;
  • String - (optional) SMTP server encryption (one of tls or ssl);
  • String - (optional) SMTP server username;
  • String - (optional) SMTP server password;
  • String - (optional) ReCaptcha site key;
  • String - (optional) ReCaptcha secret key;
  • String - (optional) max attachment file size;
JSON Button Object Properties:
  • String - (optional) button text;
  • Object - (optional) link that will be opened when clicked:
    • String - link type (one of url - link to external website, page - link to page (page needs to be added to menu) on this website, email - mailto:link or phone - tel:link);
    • String or Number - link subject (different depending on type): url - URL to open (ex.: https://site.pro/), page - menu item ID in menu specified by menuUID property to open (ex.: 1), email - email address (ex.: someones@email.com), phone - phone number (ex.: +12345678912);
    • String - (optional) menu elements unique ID (only for page type) (ex.: 81a1a609);
    • String - (optional) link target (only for url and page types) (ex. _blank to open link in a new window);
    • String - (optional) anchor name to link to specific section (only for page type) (ex.: someplace);
    • String - (optional) link title (will be shown as tooltip on mouse over);
    • Boolean - (optional) if true add rel="nofollow" to the link;
    • Boolean - (optional) if true then this link will open as popup (only for url and page types);
    • Number - (optional) popup width (in pixels);
    • Number - (optional) popup height (in pixels);
  • Object - (optional) border descriptor:
    • Boolean - (optional) if true then basic border properties (color, style and weight) are different and each should contain 4 components;
    • Array of String - hex encoded color values (ex. #ff0000 - for red color), 1 or 4 components depending on differ value;
    • Array of String - style values (any of solid, dotted, dashed or double), 1 or 4 components depending on differ value;
    • Array of Number - border weight values (in pixels), 1 or 4 components depending on differ value;
  • Object - (optional) corner rounding descriptor:
    • Number - left top corner roundness;
    • Number - right top corner roundness;
    • Number - right bottom corner roundness;
    • Number - left bottom corner roundness;
    • Boolean - (optional) if false only lt value will be used for all corners;
  • Object - (optional) text font descriptor:
    • String - CSS font face;
    • Number - CSS font size (in pixels);
    • Number - CSS line height (in pixels);
    • Number - CSS letter spacing (in pixels);
    • String - CSS text alignment (one of left, center or right);
  • Object - (optional) text style for normal button state:
    • Object - (optional) text style:
      • Boolean - (optional) if true then text will be italic;
      • Boolean - (optional) if true then text will be bold;
      • Boolean - (optional) if true then text will be underlined;
    • String - (optional) text CSS color;
  • Object - (optional) background for normal button state:
    • String - (optional) background CSS color;
    • String - (optional) background CSS image;
    • String - (optional) background CSS position;
    • String - (optional) background CSS attachment;
    • String - (optional) background CSS repeat;
    • String - (optional) background CSS size;
  • Object - (optional) text style for hover button state:
    • Object - (optional) text style:
      • Boolean - (optional) if true then text will be italic;
      • Boolean - (optional) if true then text will be bold;
      • Boolean - (optional) if true then text will be underlined;
    • String - (optional) text CSS color;
  • Object - (optional) background for hover button state:
    • String - (optional) background CSS color;
    • String - (optional) background CSS image;
    • String - (optional) background CSS position;
    • String - (optional) background CSS attachment;
    • String - (optional) background CSS repeat;
    • String - (optional) background CSS size;
  • Object - (optional) text style for active button state:
    • Object - (optional) text style:
      • Boolean - (optional) if true then text will be italic;
      • Boolean - (optional) if true then text will be bold;
      • Boolean - (optional) if true then text will be underlined;
    • String - (optional) text CSS color;
  • Object - (optional) background for active button state:
    • String - (optional) background CSS color;
    • String - (optional) background CSS image;
    • String - (optional) background CSS position;
    • String - (optional) background CSS attachment;
    • String - (optional) background CSS repeat;
    • String - (optional) background CSS size;
JSON Menu Object Properties:
  • String - (read-only) unique ID;
  • Array of Object
    • String - item type (one of page - ordinary page, external - URL to external website, anchor - link to specific section of this websites page);
    • Number - page ID for page and anchor types (optional for anchor type and not required for external type);
    • Object or String - (optional) name of this item, for multi-language websites is an object where field name is language code (ex. en) and value is translation for that language;
    • Object or String - (optional) URL (only required for external type), for multi-language websites is an object where field name is language code (ex. en) and value is URL for that language;
    • String - (optional) anchor name (only required for anchor type);
    • Boolean - (optional) if true will be hidden from menu;
  • String - (optional) menu type (one of hmenu - horizontal menu or vmenu - vertical menu);
  • Boolean - (optional) if true menu will not collapse on mobile;
  • String - (optional) menu item CSS text transform (ex.: uppercase);
  • Array of Number - menu item padding, list of 4 values (that represent top, right, bottom and left);
  • Array of Number - menu item padding, list of 4 values (that represent top, right, bottom and left);
  • String - (optional) menu item alignment (one of left, center, right or justify);
  • Object - (optional) normal menu item text:
    • String - (optional) text CSS color;
    • Number - (optional) CSS font size (in pixels);
    • String - (optional) CSS font face;
    • Object - (optional) text style:
      • Boolean - (optional) if true then text will be italic;
      • Boolean - (optional) if true then text will be bold;
      • Boolean - (optional) if true then text will be underlined;
    • Number - (optional) CSS letter spacing (in pixels);
  • Object - (optional) hover menu item text:
    • String - (optional) text CSS color;
    • Number - (optional) CSS font size (in pixels);
    • String - (optional) CSS font face;
    • Object - (optional) text style:
      • Boolean - (optional) if true then text will be italic;
      • Boolean - (optional) if true then text will be bold;
      • Boolean - (optional) if true then text will be underlined;
    • Number - (optional) CSS letter spacing (in pixels);
  • Object - (optional) active menu item text:
    • String - (optional) text CSS color;
    • Number - (optional) CSS font size (in pixels);
    • String - (optional) CSS font face;
    • Object - (optional) text style:
      • Boolean - (optional) if true then text will be italic;
      • Boolean - (optional) if true then text will be bold;
      • Boolean - (optional) if true then text will be underlined;
    • Number - (optional) CSS letter spacing (in pixels);
  • Object - (optional) normal menu item background:
    • String - (optional) background CSS color;
    • String - (optional) background CSS image;
    • String - (optional) background CSS position;
    • String - (optional) background CSS attachment;
    • String - (optional) background CSS repeat;
    • String - (optional) background CSS size;
  • Object - (optional) hover menu item background:
    • String - (optional) background CSS color;
    • String - (optional) background CSS image;
    • String - (optional) background CSS position;
    • String - (optional) background CSS attachment;
    • String - (optional) background CSS repeat;
    • String - (optional) background CSS size;
  • Object - (optional) active menu item background:
    • String - (optional) background CSS color;
    • String - (optional) background CSS image;
    • String - (optional) background CSS position;
    • String - (optional) background CSS attachment;
    • String - (optional) background CSS repeat;
    • String - (optional) background CSS size;
  • Object - (optional) menu background:
    • String - (optional) background CSS color;
    • String - (optional) background CSS image;
    • String - (optional) background CSS position;
    • String - (optional) background CSS attachment;
    • String - (optional) background CSS repeat;
    • String - (optional) background CSS size;
  • Object - (optional) sub-menu background:
    • String - (optional) background CSS color;
    • String - (optional) background CSS image;
    • String - (optional) background CSS position;
    • String - (optional) background CSS attachment;
    • String - (optional) background CSS repeat;
    • String - (optional) background CSS size;
  • Object - (optional) mobile menu background:
    • String - (optional) background CSS color;
    • String - (optional) background CSS image;
    • String - (optional) background CSS position;
    • String - (optional) background CSS attachment;
    • String - (optional) background CSS repeat;
    • String - (optional) background CSS size;
  • Object - (optional) menu border:
    • Boolean - (optional) if true then basic border properties (color, style and weight) are different and each should contain 4 components;
    • Array of String - hex encoded color values (ex. #ff0000 - for red color), 1 or 4 components depending on differ value;
    • Array of String - style values (any of solid, dotted, dashed or double), 1 or 4 components depending on differ value;
    • Array of Number - border weight values (in pixels), 1 or 4 components depending on differ value;
  • Object - (optional) normal menu item border:
    • Boolean - (optional) if true then basic border properties (color, style and weight) are different and each should contain 4 components;
    • Array of String - hex encoded color values (ex. #ff0000 - for red color), 1 or 4 components depending on differ value;
    • Array of String - style values (any of solid, dotted, dashed or double), 1 or 4 components depending on differ value;
    • Array of Number - border weight values (in pixels), 1 or 4 components depending on differ value;
  • Object - (optional) hover menu item border:
    • Boolean - (optional) if true then basic border properties (color, style and weight) are different and each should contain 4 components;
    • Array of String - hex encoded color values (ex. #ff0000 - for red color), 1 or 4 components depending on differ value;
    • Array of String - style values (any of solid, dotted, dashed or double), 1 or 4 components depending on differ value;
    • Array of Number - border weight values (in pixels), 1 or 4 components depending on differ value;
  • Object - (optional) active menu item border:
    • Boolean - (optional) if true then basic border properties (color, style and weight) are different and each should contain 4 components;
    • Array of String - hex encoded color values (ex. #ff0000 - for red color), 1 or 4 components depending on differ value;
    • Array of String - style values (any of solid, dotted, dashed or double), 1 or 4 components depending on differ value;
    • Array of Number - border weight values (in pixels), 1 or 4 components depending on differ value;
JSON Languages Object Properties:
  • String - (optional) type of language selector (one of select or flags);
  • Number - (optional) language selector flag size;
  • Boolean - (optional) if true then flags will be square instead of rectangular;
  • Number - (optional) spacing between flags;
  • Object - (optional) normal flag border:
    • Boolean - (optional) if true then border radius is different and should contain 4 components;
    • Array of Number - (optional) border radius values, 1 or 4 components depending on differRadius value;
    • Boolean - (optional) if true then basic border properties (color, style and weight) are different and each should contain 4 components;
    • Array of String - hex encoded color values (ex. #ff0000 - for red color), 1 or 4 components depending on differ value;
    • Array of String - style values (any of solid, dotted, dashed or double), 1 or 4 components depending on differ value;
    • Array of Number - border weight values (in pixels), 1 or 4 components depending on differ value;
  • Object - (optional) hover flag border:
    • Boolean - (optional) if true then border radius is different and should contain 4 components;
    • Array of Number - (optional) border radius values, 1 or 4 components depending on differRadius value;
    • Boolean - (optional) if true then basic border properties (color, style and weight) are different and each should contain 4 components;
    • Array of String - hex encoded color values (ex. #ff0000 - for red color), 1 or 4 components depending on differ value;
    • Array of String - style values (any of solid, dotted, dashed or double), 1 or 4 components depending on differ value;
    • Array of Number - border weight values (in pixels), 1 or 4 components depending on differ value;

Add blocks from compositions available since version 4.0.58 (on-premises only)

This API action requires a loginHash, that can be received by using "Create session" API call with additional parameter more = true. Furthermore http://your-builder-domain.com/api/ in Call API URL should be replaced with builderApiUrl received from "Create session" API call, so new API url for this action would be builderApiUrl + website-blocks/add.

http://your-builder-domain.com/api/website-blocks/add (builderApiUrl + "website-blocks/add")
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • String - login hash you received from "Create session" API call;
  • Number or String - page ID to add block to;
  • Array of Object - list of block definitions, definition structure:
    • String - composition ID to use for block creation (composition IDs can be found in a tooltip when opening builder in template editing mode and mouse hovering composition in add composition dialog) (ex. default/232);
    • String - position specifier for where to insert new block, it consists of section name (one of header, body or footer) and position in square brackets (ex. body[0] - insert before 0-th block (at the beginning), body[3] - insert before 3-rd block, body[] - append to the end);
    • Object - (optional) descriptor of how composition elements should be modified before being inserted as block, where field name is composition elements referenceId and value is modification descriptor object (modification descriptor object will be different depending on element type);
JSON response Object Properties:
  • Boolean - if true then action executed successfully else failed;
  • String - (optional) if action failed then this will contain error message;

Remove blocks available since version 4.0.58 (on-premises only)

This API action requires a loginHash, that can be received by using "Create session" API call with additional parameter more = true. Furthermore http://your-builder-domain.com/api/ in Call API URL should be replaced with builderApiUrl received from "Create session" API call, so new API url for this action would be builderApiUrl + website-blocks/remove.

http://your-builder-domain.com/api/website-blocks/remove (builderApiUrl + "website-blocks/remove")
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • String - login hash you received from "Create session" API call;
  • Number - page ID to remove blocks from;
  • Array of String - list of position specifiers for what blocks to remove, specifier consists of section name (one of header, body or footer) and position in square brackets (ex. body[0] - remove 0-th block, body[3] - remove 3-rd block);
JSON response Object Properties:
  • Boolean - if true then action executed successfully else failed;
  • String - (optional) if action failed then this will contain error message;

Move blocks available since version 4.0.58 (on-premises only)

This API action requires a loginHash, that can be received by using "Create session" API call with additional parameter more = true. Furthermore http://your-builder-domain.com/api/ in Call API URL should be replaced with builderApiUrl received from "Create session" API call, so new API url for this action would be builderApiUrl + website-blocks/move.

http://your-builder-domain.com/api/website-blocks/move (builderApiUrl + "website-blocks/move")
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • String - login hash you received from "Create session" API call;
  • Number - page ID to move blocks in;
  • Array of Object - list of move descriptors, descriptor structure:
    • String - position specifier for which block to move, specifier consists of section name (one of header, body or footer) and position in square brackets (ex. body[0] - move 0-th block, body[3] - move 3-rd block);
    • String - position specifier for where to move block, specifier consists of section name (one of header, body or footer) and position in square brackets (ex. body[0] - move before 0-th block, body[3] - move before 3-rd block, body[] - move to then end);
JSON response Object Properties:
  • Boolean - if true then action executed successfully else failed;
  • String - (optional) if action failed then this will contain error message;

Modify blocks available since version 4.0.58 (on-premises only)

This API action requires a loginHash, that can be received by using "Create session" API call with additional parameter more = true. Furthermore http://your-builder-domain.com/api/ in Call API URL should be replaced with builderApiUrl received from "Create session" API call, so new API url for this action would be builderApiUrl + website-blocks/modify.

http://your-builder-domain.com/api/website-blocks/modify (builderApiUrl + "website-blocks/modify")
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • String - login hash you received from "Create session" API call;
  • Number - page ID to modify blocks at;
  • Object - map of blocks to modify, where field name is block position specifier that consists of section name (one of header, body or footer) and position in square brackets (ex. body[0] - modify 0-th block, body[3] - modify 3-rd block) and field value is descriptor object of how block elements should be modified, where field name is composition elements referenceId and value is modification descriptor object (modification descriptor object will be different depending on element type);
JSON response Object Properties:
  • Boolean - if true then action executed successfully else failed;
  • String - (optional) if action failed then this will contain error message;

Inspect block available since version 4.0.62 (on-premises only)

This API action requires a loginHash, that can be received by using "Create session" API call with additional parameter more = true. Furthermore http://your-builder-domain.com/api/ in Call API URL should be replaced with builderApiUrl received from "Create session" API call, so new API url for this action would be builderApiUrl + website-blocks/inspect-block.

http://your-builder-domain.com/api/website-blocks/inspect-block (builderApiUrl + "website-blocks/inspect-block")
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • String - login hash you received from "Create session" API call;
  • Number - page ID to inspect;
  • String - position specifier for block to inspect, it consists of section name (one of header, body or footer) and position in square brackets (ex. body[0] - insert before 0-th block (at the beginning), body[3] - insert before 3-rd block);
JSON response Object Properties:
  • Boolean - if true then action executed successfully else failed;
  • Array of Object - (optional) list of element descriptors, descriptor structure:
    • String - elements reference ID;
    • String - elements type;
    • Object - modification descriptor object (modification descriptor object will be different depending on element type);
  • String - (optional) if action failed then this will contain error message;

Get list of published websites

Notes:
Statistics of on-premises builders are updated only several times a day. Please refrain from calling this method more than once per 3 hours.
Important:
When neither offset nor limit parameters are specified request must still contain an empty JSON object in the body. Otherwise you will receive a response with "Bad input data" error.
https://site.pro/api/hosting-accounts/get-domains
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • Number - (optional) starting offset in the list of domains;
  • Number - (optional) maximum number of domains to return;
  • Number - (optional) if is set then will search domains using specified brand;
  • Boolean - (optional) if is set then will filter only free domains (published with "Free" plan) or only non-free domains depending on value (true or false);
  • String - (optional) if is set then will return info about this domain only (will ignore limit and offset);
JSON response Object Properties:
  • Boolean - (optional) returned on success, contains value true, indicates successfully executed action;
  • Array of Object - (optional) returned on success, contains a list of domains. Each domain object has the following structure:
    • String - domain name;
    • Boolean - blocking state of the domain: false for not blocked and true for blocked domains;
    • Number - brand ID the domain is using;
    • Boolean - indicates whether domain is free (published with "Free" plan) or not;
  • String - (optional) returned on error, contains error message, indicates failure to execute action;

Get statistics of publications/openings

Notes:
Statistics of on-premises builders are updated only several times a day. Please refrain from calling this method more than once per 3 hours.
Important:
When neither offset nor limit parameters are specified request must still contain an empty JSON object in the body. Otherwise you will receive a response with "Bad input data" error.
https://site.pro/api/hosting-accounts/get-stats
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • Number - (optional) if is set then will search statistics of specified brand;
  • String - (optional) can be either "published" or "opened";
  • String - (optional) if is set then will search statistics of specified domain;
  • String - (optional) if is set then will search statistics from specified date (must have format of "YYYY-MM-DD HH:MM:SS");
  • String - (optional) if is set then will search statistics till specified date (must have format of "YYYY-MM-DD HH:MM:SS");
JSON response Object Properties:
  • Boolean - (optional) returned on success, contains value true, indicates successfully executed action;
  • Array of Object - (optional) returned on success, contains a list of statistics. Each object has the following structure:
    • String - domain name;
    • String - either "published" or "opened"
    • String - action date of format "YYYY-MM-DD HH:MM:SS";
    • String - set if action is "published" and ended with error, otherwise is null;
    • Number - brand ID the domain is using;
    • Boolean - indicates whether domain is free (published with "Free" plan) or not;
  • String - (optional) returned on error, contains error message, indicates failure to execute action;

Block/unblock published website

This API is for controlling accounts (published websites).

Notes:
Information about websites quantity in licenses is updated once per hour.


Download here.

https://site.pro/api/hosting-accounts/set-blocked
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • String - websites domain to block/unblock;
  • Boolean - if true will be blocked, if false will be unblocked.
JSON response Object Properties:
  • Boolean - (optional) returned on success, contains value true, indicates successfully executed action;
  • String - (optional) returned on success, contains domain;
  • Boolean - (optional) returned on success, contains blocked state;
  • String - (optional) returned on error, contains error message, indicates failure to execute action;

Controlling IP list

This API request has multiple functions accessible via same URL. Function that must be performed on the IP list must always be specified in the action parameter of each request.


Download here.

https://site.pro/api/ipList
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json

Getting simple IP list

JSON request Object Properties:
  • String = list.
  • Number - ID of a license to get IP list for.
JSON response Object Properties:
  • Boolean - (optional) returned on success, contains value true, indicates successfully executed action.
  • Number - (optional) max. number of IPs that can be added to this license.
  • Array of String - (optional) returned on success, contains list of IP's.
  • Object - (optional) returned on error, contains error message, indicates failure to execute action. Error object structure:
    • String - text describing the error

Getting extended IP list

JSON request Object Properties:
  • String = list-full.
  • Number - ID of a license to get IP list for.
JSON response Object Properties:
  • Boolean - (optional) returned on success, contains value true, indicates successfully executed action.
  • Number - (optional) max. number of IPs that can be added to this license.
  • Array of Objects - (optional) returned on success, contains list of IP's and assigned brands. Each IP object has following structure:
    • String - an IP address.
    • Number - ID of brand assigned to IP.
  • Object - (optional) returned on error, contains error message, indicates failure to execute action. Error object structure:
    • String - text describing the error

Adding a new IP

JSON request Object Properties:
  • String = add.
  • Number - ID of a license to add IP to.
  • String - IP you want to add.
  • Number - ID of a registered brand to assign.
JSON response Object Properties:
  • Boolean - (optional) returned on success, contains value true, indicates successfully executed action.
  • Object - (optional) returned on error, contains error message, indicates failure to execute action. Error object structure:
    • String - text describing the error

Updating an IP

JSON request Object Properties:
  • String = update.
  • Number - ID of a license to update IP in.
  • String - IP you want to update.
  • String - IP to update to (optional if brandId is specified).
  • Number - ID of a registered brand to assign (optional if newIp is specified).
JSON response Object Properties:
  • Boolean - (optional) returned on success, contains value true, indicates successfully executed action.
  • Object - (optional) returned on error, contains error message, indicates failure to execute action. Error object structure:
    • String - text describing the error

Deleting an existing IP

JSON request Object Properties:
  • String = delete.
  • Number - ID of a license to delete IP from.
  • String - IP you want to delete.
JSON response Object Properties:
  • Boolean - (optional) returned on success, contains value true, indicates successfully executed action.
  • Object - (optional) returned on error, contains error message, indicates failure to execute action. Error object structure:
    • String - text describing the error

IP controlling example


POST /api/ipList HTTP/1.1
Host: site.pro
Authorization: Basic W0FQSSBVc2VybmFtZSBmcm9tIGJyYW5kXTpbQVBJIFBhc3N3b3JkIGZyb20gYnJhbmRd
Content-Type: application/json

{
   "action": "list-full",
   "suborderId": 123456789
}


HTTP/1.1 200 OK
Content-Type: application/json

{
   "ok": true,
   "list": [
      {
         "ip": "192.66.66.1",
         "brandId": 12345
      },
      {
         "ip": "192.66.66.2",
         "brandId": 12345
      }
   ]
}


HTTP/1.1 400 Bad Request
Content-Type: application/json

{
   "error": { "message": "some kind of error message" }
}

Allow/disallow domain in builder available since version 4.0.55 / 3.7.435 (on-premises only)

This API is for allowing/disallowing usage of builder per domain.

http://your-builder-domain.com/api/website-config/set-allowed (builderApiUrl + "website-config/set-allowed")
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • Array of Strings - list of domains to allow/disallow;
  • Boolean - if true will be allowed, if false will be disallowed.
JSON response Object Properties:
  • Boolean - (optional) returned on success, contains value true, indicates successfully executed action;

Check if domains are allowed in builder available since version 4.0.55 / 3.7.435 (on-premises only)

This API is for checking whether specified domains are allowed to use in builder or not.
Note that this method also takes into account the value of builder configurable option builderStatusByDefault. (check this page for more details: Extra configuration).

http://your-builder-domain.com/api/website-config/is-allowed (builderApiUrl + "website-config/is-allowed")
HTTP Basic
[API Username from brand]
[API Password from brand]
POST
application/json
application/json
JSON request Object Properties:
  • Array of Strings - list of domains;
JSON response Object Properties:
  • Boolean - (optional) returned on success, contains value true, indicates successfully executed action;
  • Object - object with mapping (domain => value) of specified domains. Example:
    {
        "domainA.com": true,
        "domainB.com": false,
        "domainC.com": true,
        ...
    }

Check if imported website is owned by user available since version 4.0.0 / 3.7.312

Important:
This is a description of API endpoint that builder expects to exist when imported website ownership verification is enabled and set to use this API.

For builder to use this API it must be enabled and URL of API endpoint for this request (Call API URL) must be entered in the builder configuration. To do this you must:

  1. open brand properties dialog,
  2. open builder customization dialog ("Customize Builder" link),
  3. switch to configuration tab,
  4. make sure "Check website ownership" is checked,
  5. enter URL of your API endpoint in "Custom ownership checking API endpoint URL" field,
  6. apply changes.
http://your-domain.com/check-ownership.php
POST
application/json
application/json
JSON request Object Properties:
  • String - integration API secret key that is entered in brand configuration (since v3.7.314).
  • String - domain that must be checked if it is owned by the user.
  • String - domain that is currently open in website builder.
  • String - IP (for external publish type) or URL (for internal publish type) where current website is set to be published. See apiUrl property of "Create session" API request.
  • String - (optional) Copy of extReferenceId property passed to website builder with "Create session" API request. Available only when custom API is used to open website builder.
JSON response Object Properties:
  • Boolean - value must be set to true when requested domain is owned by the user and website may be imported;
Example

POST /check-ownership.php HTTP/1.1
Host: your-domain.com
Content-Type: application/json

{
    "key": "",
    "domain": "example.com",
    "id_domain": "my-new-website.com",
    "id_ip": "192.66.66.1"
}


HTTP/1.1 200 OK
Content-Type: application/json

{
   "ok": true
}


HTTP/1.1 200 OK
Content-Type: application/json

{
    "ok": false
}
© Site.pro Website Builder 2021. United States. Terms of Service