API documentation

Table of contents

Open builder

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 in your license at http://site.pro/licenses/ after you login to your account. All documentation on how to make requests to API and some request examples are below.


Download here.

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


  • String - publishing type 'external' (required)
  • String - client domain name (required)
  • String - language 2 letter code (ex. en, lt, ru, ...) to open builder in (optional)
  • String - client ftp connection username (required if type = external)
  • String - client ftp connection password (required if type = external)
  • String - client ftp public_html directory ex.: /public_html (required if type = external)
  • String - IP address of client ftp server (optional, recommended, it will be used instead of domain as host for connecting to ftp server in cases when domain DNS configuration is not ready)
  • String - hosting plan identifier, will be used for builder feature limitations by plan (optional)
  • String - URL to image to use as builder logo (if not set will be taken from license) (optional)
  • String - URL to image/icon to use as builder favicon (if not set will be taken from license) (optional)
  • String - Title to use for builder (if not set will be taken from license) (optional)
  • Boolean - Do not allow users to remove builder logo from their websites (if not set will be taken from license) (optional)
  • String - URL to place on builder logo in users website (optional)
  • String - custom identifier accessible in builder plugins (optional)
  • String - custom templates path (absolute or relative), if set then will be used for loading templates in stead of default path (optional, enterprise only since v3.7.230)
  • Boolean - (optional) if set to true response will contain additional two properties: loginHash and builderApiUrl

  • 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

POST /api/requestLogin HTTP/1.1
Host: your-builder-domain.com
Authorization: Basic PEFQSSBVc2VybmFtZSBmcm9tIGJyYW5kPjo8QVBJIFBhc3N3b3JkIGZyb20gYnJhbmQ+
Content-Type: application/json

{
   "type": "external",
   "domain": "test.com",
   "lang": "en",
   "username": "test.com FTP username",
   "password": "test.com FTP password",
   "uploadDir": "/public_html"
}


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

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


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

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

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;

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;

Get page types available in template available since version 3.7.229 (enterprise 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 to create website from;
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 3.7.229 (enterprise only)

This API action requires a loginHash, that can be received by using "Open builder" 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 "Open builder" 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 "Open builder" 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;
    • String - image URL/Data URL;
    • String - comma (,) separated coordinates;
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 3.7.229 (enterprise only)

This API action requires a loginHash, that can be received by using "Open builder" 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 "Open builder" 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 "Open builder" API call;
  • Object - (optional) key value pair list of variables (reference IDs in template) and their values, that will replace website elements contents; Possible values for different element types:
    • String - text or HTML;
    • String - image URL/Data URL;
    • String - comma (,) separated coordinates;
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 3.7.295 (enterprise 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 3.7.167 (enterprise only)

This API action requires a loginHash, that can be received by using "Open builder" 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 "Open builder" 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 "Open builder" 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 "Open builder" API call;
  • Boolean - if false then new publish process will be started, if true then progress of current publish process will be returned;
  • 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);

Delete website available since version 3.7.64 (enterprise only)

This API is for permanantly deleting web-site form enterprise builder. This will only delete it from builder it self.

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

  • String - web-site 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 PEFQSSBVc2VybmFtZSBmcm9tIGJyYW5kPjo8QVBJIFBhc3N3b3JkIGZyb20gYnJhbmQ+
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"}}

Add pages to website available since version 3.7.229 (enterprise only)

This API action requires a loginHash, that can be received by using "Open builder" 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 "Open builder" 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 "Open builder" 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 3.7.229 (enterprise only)

This API action requires a loginHash, that can be received by using "Open builder" 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 "Open builder" 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 "Open builder" 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 3.7.229 (enterprise only)

This API action requires a loginHash, that can be received by using "Open builder" 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 "Open builder" 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 "Open builder" 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;

Get list of published websites

Notes:
Statistics of enterprise servers 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.
http://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;
  • 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 following structure:
    • String - domain name;
    • Boolean - blocking state of the domain: false for not blocked and true for blocked domains;
  • String - (optional) returned on error, contains error message, indicates failure to execute action;

Block/unblock website

This API is for controlling accounts (websites).

Notes:
Information about websites quantity in licenses is updated once per hour.
http://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.

http://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 = full-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 Object - (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 PEFQSSBVc2VybmFtZSBmcm9tIGJyYW5kPjo8QVBJIFBhc3N3b3JkIGZyb20gYnJhbmQ+
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" }
}