Skip to content

Hosting API

The hosting product type creates accounts on your hosting servers through a server manager. These calls manage a hosting order’s account, the servers, the hosting plans and the hosting panels (Enhance), and give clients their account’s usage, domains, email accounts and backups. See Connect Enhance servers, Maintain a hosting service as staff and Hosting pages in the client area.

Admin calls need Module access on the Servicehosting card of the staff group’s Permissions tab, plus each call’s own permission below (Super Administrators have all). See Authentication.

POST /api/admin/servicehosting/change_plan

Moves a hosting account to another hosting plan, on the server too unless the order is still pending setup, failed setup or canceled.

Permission: Manage hosting accounts (servicehosting.manage_accounts)

Parameter Type Description
order_id integer, required The hosting order’s id.
plan_id integer, required The new hosting plan’s id.

Returns: true.

Errors:

  • plan_id is missing (code 9999)
  • Order ID name is missing (code 9999)
  • Order not found (code 9999)
  • Order is not activated (code 9999) when the order has no hosting account yet.
  • Hosting plan not found (code 9999)
  • The server’s own error when it refuses.

This changes the plan only: the order’s product and price stay. To change those, use an upgrade.

POST /api/admin/servicehosting/change_username

Changes a hosting account’s username, on the server too while the order is active and not past its due date.

Permission: Manage hosting accounts (servicehosting.manage_accounts)

Parameter Type Description
order_id integer, required The hosting order’s id.
username string, required The new username; saved in lowercase.

Returns: true.

Errors:

  • Order ID name is missing (code 9999)
  • Order not found (code 9999)
  • Order is not activated (code 9999)
  • Account username is missing or is invalid (code 9999)
  • The server’s own error when it refuses (Enhance refuses username changes).

POST /api/admin/servicehosting/change_ip

Changes a hosting account’s IP address, on the server too while the order is active and not past its due date.

Permission: Manage hosting accounts (servicehosting.manage_accounts)

Parameter Type Description
order_id integer, required The hosting order’s id.
ip string, required The new IP address.

Returns: true.

Errors:

  • Order ID name is missing (code 9999)
  • Order not found (code 9999)
  • Order is not activated (code 9999)
  • Account IP address is missing or is invalid (code 9999)
  • The server’s own error when it refuses.

POST /api/admin/servicehosting/change_domain

Changes a hosting account’s main domain, on the server too while the order is active and not past its due date.

Permission: Manage hosting accounts (servicehosting.manage_accounts)

Parameter Type Description
order_id integer, required The hosting order’s id.
sld string, required The name without the TLD, such as example.
tld string, required The TLD with its dot, such as .com.

Returns: true.

Errors:

  • Order ID name is missing (code 9999)
  • Order not found (code 9999)
  • Order is not activated (code 9999)
  • Domain SLD or TLD is missing (code 9999)
  • The server’s own error when it refuses.

POST /api/admin/servicehosting/change_password

Sets a new password for a hosting account on the server. ClientFence does not keep the password.

Permission: Manage hosting accounts (servicehosting.manage_accounts)

Parameter Type Description
order_id integer, required The hosting order’s id.
password string, required The new password; the server’s own rules apply.
password_confirm string, required The same password again.

Returns: true.

Errors:

  • Order ID name is missing (code 9999)
  • Order not found (code 9999)
  • Order is not activated (code 9999)
  • Account password is missing or is invalid (code 9999) when it is missing or the two do not match.
  • The server’s own error when it refuses.

While the order is suspended, canceled, pending setup or past its due date nothing is sent to the server, yet the call returns true.

POST /api/admin/servicehosting/sync

Reads the account from the server and saves its username and IP address when they changed there.

Permission: Manage hosting accounts (servicehosting.manage_accounts)

Parameter Type Description
order_id integer, required The hosting order’s id.

Returns: true.

Errors:

  • Order ID name is missing (code 9999)
  • Order not found (code 9999)
  • Order is not activated (code 9999)
  • The server’s own error when it cannot answer.

POST /api/admin/servicehosting/panel_link

Links a hosting account on an Enhance server to its organization, subscription and panel login by hand, after checking them on the server; every later action uses them. Send both ids empty to remove the link.

Permission: Manage hosting accounts (servicehosting.manage_accounts)

Parameter Type Description
order_id integer, required The hosting order’s id.
panel_org_id string The Enhance organization ID (letters, digits and dashes). Empty with panel_subscription_id empty: removes the link.
panel_subscription_id integer The Enhance subscription ID.
username string The panel login (an email address) to save as the account’s username.

Returns: true.

Errors:

  • Order ID name is missing (code 9999)
  • Order not found (code 9999)
  • Order is not activated (code 9999)
  • The control panel login must be an email address. (code 9999)
  • Enter both the organization ID and the subscription ID from the Enhance panel, or leave both empty to remove the link. (code 9999)
  • Another hosting order is already linked to this subscription. (code 9999)
  • Only hosting accounts on an Enhance server can be linked by hand. (code 9999)
  • No Enhance login for … was found. (code 9999) and other checks the server makes.

POST /api/admin/servicehosting/update

Corrects the stored username or IP address of a hosting account, without sending anything to the server.

Permission: Manage hosting accounts (servicehosting.manage_accounts)

Parameter Type Description
order_id integer, required The hosting order’s id.
username string The username; empty keeps it.
ip string The IP address; empty keeps it.

Returns: true.

Errors:

  • Order ID name is missing (code 9999)
  • Order not found (code 9999)
  • Order is not activated (code 9999)

POST /api/admin/servicehosting/manager_get_pairs

Lists the server managers you can use for a server: the built-in ones and those of active modules, each with its settings form.

Permission: View hosting servers (servicehosting.view_servers)

No parameters.

Returns: An object of manager code (such as Enhance) to its definition: label (such as “Enhance (ClientFence)”) and form (the settings fields the server page shows).

POST /api/admin/servicehosting/server_get_pairs

Returns the hosting servers as id and name pairs.

Permission: View hosting servers (servicehosting.view_servers)

No parameters.

Returns: An object of server id to name, by id.

POST /api/admin/servicehosting/server_get_list

Lists the hosting servers, by id.

Permission: View hosting servers (servicehosting.view_servers)

Parameter Type Description
page integer Page number, from 1. Default 1.
per_page integer Rows per page, 1 to 500. Default 100.

Returns: A paged list. Each row has the fields of admin/server_get.

POST /api/admin/servicehosting/account_get_list

Lists the hosting accounts, by id, with their order and client.

Permission: View hosting servers (servicehosting.view_servers)

Parameter Type Description
server_id integer Only the accounts on this server.
page integer Page number, from 1. Default 1.
per_page integer Rows per page, 1 to 500. Default 100.

Returns: A paged list. Each row has id, sld, tld, client_id, server_id, plan_id, reseller, ip, username, created_at, updated_at, order (the order with the fields of order/admin/get_list, or null when none is linked) and client (the client summary, only when there is an order).

POST /api/admin/servicehosting/server_create

Adds a hosting server. Credentials are stored encrypted.

Permission: Manage hosting servers (servicehosting.manage_servers)

Parameter Type Description
name string, required A name for staff.
ip string, required The server’s IP address.
manager string, required A server manager code from admin/manager_get_pairs, such as Enhance.
hostname string The server’s host name.
port integer The API port.
secure boolean Use HTTPS. Default true.
tls_verify boolean Check the server’s TLS certificate. Default true.
username string The API user (for Enhance, the organization ID).
password string The API password.
accesshash string The API key or token.
userprefix string A prefix for new account usernames.
assigned_ips string IP addresses for accounts, one per line; invalid lines are dropped.
ns1 string Nameserver 1 for its accounts; also ns2, ns3, ns4.
active boolean Used for new accounts. Default true.
status_url string A status page URL.
max_accounts integer The most accounts it should hold.
passwordLength integer Length of generated account passwords.

Returns: The new server’s id.

Errors:

  • Server name was not passed (code 9999)
  • Server IP was not passed (code 9999)
  • Server manager was not specified (code 9999)
  • Server manager … is not a valid server manager (code 9999)

The connection is not tested: call admin/server_test_connection next.

Example

Request parameters:

{
"name": "Enhance control panel",
"ip": "203.0.113.10",
"hostname": "cp.example.com",
"manager": "Enhance",
"username": "6f1c2a9e-0000-4000-8000-000000000001",
"accesshash": "an-api-token"
}

result:

1

POST /api/admin/servicehosting/server_get

Returns one hosting server. Credentials are never returned.

Permission: View hosting servers (servicehosting.view_servers)

Parameter Type Description
id integer, required The server’s id.

Returns: id, name, hostname, ip, ns1-ns4, cpanel_url and reseller_cpanel_url (the manager’s sign-in pages, or false), active, secure, assigned_ips (a list), status_url, max_accounts, manager, config (such as userprefix and tls_verify), port, passwordLength, created_at, updated_at, and for each secret field (listed in secret_fields, such as password and accesshash) null plus <field>_set (whether it has a value).

Errors:

  • Server ID was not passed (code 9999)
  • Server not found (code 9999)

POST /api/admin/servicehosting/server_delete

Deletes a hosting server that no hosting order uses.

Permission: Manage hosting servers (servicehosting.manage_servers)

Parameter Type Description
id integer, required The server’s id.
force boolean true also detaches accounts on it that have no order, then deletes it.

Returns: true.

Errors:

  • Server ID was not passed (code 9999)
  • Server not found (code 9999)
  • Hosting server is used by N service hostings (code 704)
  • Hosting server is used by N orphaned service hostings with no linked order. Re-run with force=true to detach them and delete the server. (code 704)

POST /api/admin/servicehosting/server_update

Changes a hosting server, then checks that its server manager loads with the new settings. A field you leave out keeps its value.

Permission: Manage hosting servers (servicehosting.manage_servers)

Parameter Type Description
id integer, required The server’s id.
name string The name. The other fields of admin/server_create work the same way.
manager string The server manager code.
password string A new API password. Empty or __KEEP__ keeps the saved one; the same for accesshash and username.
accesshash string A new API key. Empty or __KEEP__ keeps the saved one.
tls_verify boolean Check the server’s TLS certificate.
userprefix string A prefix for new account usernames.

Returns: true.

Errors:

  • Server ID was not passed (code 9999)
  • Server not found (code 9999)
  • Server manager … is not a valid server manager (code 9999)
  • The manager’s own error when its settings are wrong (code 719 or the manager’s code).

Changing the password or key is logged, without the value.

POST /api/admin/servicehosting/server_test_connection

Tests the connection to a hosting server with its saved settings.

Permission: Manage hosting servers (servicehosting.manage_servers)

Parameter Type Description
id integer, required The server’s id.

Returns: true when the server answered.

Errors:

  • Server ID was not passed (code 9999)
  • Server not found (code 9999)
  • Invalid server manager. Server was not configured properly. (code 654)
  • The server manager’s error when the connection fails.

POST /api/admin/servicehosting/hp_get_pairs

Returns every hosting plan as id and name pairs.

Permission: Manage hosting plans (servicehosting.manage_plans)

No parameters.

Returns: An object of hosting plan id to name.

POST /api/admin/servicehosting/hp_get_list

Lists the hosting plans, by id.

Permission: Manage hosting plans (servicehosting.manage_plans)

Parameter Type Description
page integer Page number, from 1. Default 1.
per_page integer Rows per page, 1 to 500. Default 100.

Returns: A paged list. Each row has the fields of admin/hp_get.

POST /api/admin/servicehosting/hp_delete

Deletes a hosting plan that no hosting order uses.

Permission: Manage hosting plans (servicehosting.manage_plans)

Parameter Type Description
id integer, required The hosting plan’s id.
force boolean true also detaches accounts on it that have no order, then deletes it.

Returns: true.

Errors:

  • Hosting plan ID was not passed (code 9999)
  • Hosting plan not found (code 9999)
  • Hosting plan is used by N service hostings (code 704)
  • Hosting plan is used by N orphaned service hostings with no linked order. Re-run with force=true to detach them and delete the plan. (code 704)

POST /api/admin/servicehosting/hp_get

Returns one hosting plan.

Permission: Manage hosting plans (servicehosting.manage_plans)

Parameter Type Description
id integer, required The hosting plan’s id.

Returns: id, name, bandwidth, quota, max_ftp, max_sql, max_pop (mailboxes), max_sub, max_park, max_addon, config (custom values the server manager reads, such as the panel’s plan ID), created_at and updated_at.

Errors:

  • Hosting plan ID was not passed (code 9999)
  • Hosting plan not found (code 9999)
Example

Request parameters:

{
"id": 2
}

result:

{
"id": 2,
"name": "Starter",
"bandwidth": "unlimited",
"quota": "10240",
"max_ftp": "1",
"max_sql": "5",
"max_pop": "10",
"max_sub": "5",
"max_park": "5",
"max_addon": "1",
"config": {},
"created_at": "2026-10-01 09:00:00",
"updated_at": "2026-11-10 12:00:00"
}

POST /api/admin/servicehosting/hp_update

Changes a hosting plan. A field you leave out keeps its value.

Permission: Manage hosting plans (servicehosting.manage_plans)

Parameter Type Description
id integer, required The hosting plan’s id.
name string The name. The limits of admin/hp_create work the same way.
config object Custom values to set; a key sent with an empty value is removed, the others stay.
new_config_name string The name of a custom value to add.
new_config_value string Its value; both must be non-empty.

Returns: true.

Errors:

  • Hosting plan ID was not passed (code 9999)
  • Hosting plan not found (code 9999)

Existing accounts keep their old limits on the server until you change their plan.

POST /api/admin/servicehosting/hp_create

Creates a hosting plan.

Permission: Manage hosting plans (servicehosting.manage_plans)

Parameter Type Description
name string, required The plan’s name.
quota string Disk space. Default 1048576.
bandwidth string Bandwidth. Default 1048576.
max_addon integer Addon domains. Default 1; the same default for max_park, max_sub, max_pop, max_sql and max_ftp.
max_park integer Parked domains (aliases).
max_sub integer Subdomains.
max_pop integer Mailboxes.
max_sql integer Databases.
max_ftp integer FTP accounts.
config object Custom values; keys with an empty value are left out.

Returns: The new plan’s id.

Errors:

  • Hosting plan name was not passed (code 9999)

POST /api/admin/servicehosting/panels_update

Switches the hosting panels and their options on or off.

Permission: Manage settings (servicehosting.manage_settings)

Parameter Type Description
panel_enhance boolean The Enhance panel. Left out: off.
enhance_global_webmail boolean The Webmail button opens the server’s global webmail sign-in page. Left out: off.

Returns: true.

Every switch you leave out is turned off: send them all. With a panel off, its client pages are gone and its server manager refuses to act.

POST /api/admin/servicehosting/panels_get_list

Lists the hosting panels ClientFence works with (Enhance), whether each is on, its servers and options.

No parameters.

Returns: A list. Each panel has id (such as enhance), label, setting (its switch’s setting name), on, servers (each id, name, hostname), options (option name to on or off, such as enhance_global_webmail) and webmail_check (on and has a server).

Example

Request parameters:

{}

result:

[
{
"id": "enhance",
"label": "Enhance",
"setting": "panel_enhance",
"on": true,
"servers": [
{
"id": 1,
"name": "Enhance control panel",
"hostname": "cp.example.com"
}
],
"options": {
"enhance_global_webmail": false
},
"webmail_check": true
}
]

POST /api/admin/servicehosting/panel_webmail_domain

Asks a panel’s first server for its global webmail domain.

Parameter Type Description
panel string, required The panel id, such as enhance.

Returns: { domain, error }: the domain (or null) and error: true when the server could not answer. null when the panel is off or has no server.

Errors:

  • Unknown hosting panel. (code 9999)

POST /api/admin/servicehosting/panel_plans

Lists a panel server’s own plans, each with the hosting plan it matches (by the hosting plan’s custom values, else by name).

Parameter Type Description
panel string, required The panel id, such as enhance; it must be on.
server_id integer, required One of the panel’s servers.

Returns: A list of the panel’s plans with the panel’s fields (id, name, limits, config) plus hosting_plan_id, hosting_plan_name and matched_by (config, name or null).

Errors:

  • Switch the hosting panel on first. (code 9999)
  • Server not found (code 9999)

POST /api/admin/servicehosting/panel_plans_import

Makes hosting plans from a panel server’s plans, and can update the ones that already match.

Permission: Manage hosting plans (servicehosting.manage_plans)

Parameter Type Description
panel string, required The panel id; it must be on.
server_id integer, required One of the panel’s servers.
plan_ids array The panel plan ids to import. Empty or left out: all.
update boolean true also updates hosting plans that already match a panel plan; otherwise they are skipped.

Returns: created, updated and skipped: how many plans each.

Errors:

  • Switch the hosting panel on first. (code 9999)
  • Server not found (code 9999)

POST /api/client/servicehosting/change_username

Always refused: staff change hosting usernames.

No parameters.

Returns: Never returns.

Errors:

  • Hosting usernames are changed by our staff. Please open a support ticket. (code 403)

POST /api/client/servicehosting/change_domain

Always refused: staff change hosting domains.

No parameters.

Returns: Never returns.

Errors:

  • Domain changes are handled by our staff. Please open a support ticket. (code 403)

POST /api/client/servicehosting/change_password

Sets a new control panel password for one of the client’s active hosting accounts.

Parameter Type Description
order_id integer, required The hosting order’s id.
password string, required The new password; the server’s own rules apply.
password_confirm string, required The same password again.

Returns: true.

Errors:

  • Order ID is required (code 9999)
  • Order not found (code 9999)
  • Subscription expired (code 9999)
  • Order is not activated (code 9999)
  • Account password is missing or is invalid (code 9999)
  • The server’s own error when it refuses.

An authorized user needs Manage services (manageproducts).

POST /api/client/servicehosting/hp_get_pairs

Returns the hosting plans used by enabled hosting products, as id and name pairs.

No parameters.

Returns: An object of hosting plan id to name.

An authorized user needs View services (products).

POST /api/client/servicehosting/get_login_url

Returns a sign-in link to the control panel for one of the client’s active hosting accounts (a one-time link when the server manager supports it).

Parameter Type Description
order_id integer, required The hosting order’s id.

Returns: A URL; the reseller sign-in link for a reseller account.

Errors:

  • Order ID is required (code 9999)
  • Order not found (code 9999)
  • Subscription expired (code 9999)
  • Order is not activated (code 9999)

An authorized user needs Sign in to control panels and webmail (productsso).

POST /api/client/servicehosting/accounts

Lists the client’s active and suspended hosting orders for the Hosting accounts page. Empty while no hosting panel is on.

No parameters.

Returns: A list, by order id. Each has order_id, title, domain, plan (the hosting plan’s name), status (active or suspended), expires_at (null: never) and email (the plan allows email accounts).

An authorized user needs View services (products).

Example

Request parameters:

{}

result:

[
{
"order_id": 31,
"title": "Starter Hosting example.com",
"domain": "example.com",
"plan": "Starter",
"status": "active",
"expires_at": "2026-12-17 10:00:00",
"email": true
}
]

POST /api/client/servicehosting/usage

Returns what one of the client’s hosting accounts uses, from the panel.

Parameter Type Description
order_id integer, required The hosting order’s id.

Returns: For Enhance: plan_name, suspended, disk_used_mb, disk_quota_mb, bandwidth_used_mb, bandwidth_limit_mb (null: unlimited), counts (websites, addon_domains, subdomains, domain_aliases, mailboxes, databases, ftp_users, each { used, limit }) and websites (each with domain, primary, aliases, kind, suspended, disk_used_bytes, php_version, server, last_backup_at and stats). { "error": true } when the order is not the client’s active or suspended hosting order, its panel is off, or the panel cannot answer.

An authorized user needs View services (products).

POST /api/client/servicehosting/backups

Lists the backups of the websites of one of the client’s hosting accounts.

Parameter Type Description
order_id integer, required The hosting order’s id.

Returns: websites (each with id, domain and backups, newest first: id, startedAt, finishedAt, size in bytes, and whether files, databases and mailboxes were saved) and can_restore (the order is active, the caller is the account owner and the product allows client restores). { "error": true } as for client/usage.

An authorized user needs View services (products), and never gets can_restore.

POST /api/client/servicehosting/restore

Starts restoring a website’s backup on one of the client’s hosting accounts: its files and databases, and its mailboxes when asked.

Parameter Type Description
order_id integer, required The hosting order’s id.
website_id string, required The website’s id from client/backups.
backup_id integer, required The backup’s id from client/backups.
include_emails boolean true also restores the mailboxes.
confirm boolean, required Must be true: the restore replaces the website’s current files.

Returns: true once the panel started the restore.

Errors:

  • Only the account owner can restore backups. (code 9999)
  • Hosting account not found (code 9999)
  • This hosting account does not offer this feature. (code 9999)
  • Backup restores are not enabled for this product. (code 9999)
  • This hosting account is suspended, so backups cannot be restored. (code 9999)
  • Confirm that you want to restore this backup. (code 9999)
  • The panel’s own error, such as a backup that is not found.

Only the account owner may call it, never an authorized user. The restore is logged in the client’s activity. It cannot be undone.

POST /api/client/servicehosting/server

Returns the server one of the client’s hosting accounts really runs on, kept for an hour.

Parameter Type Description
order_id integer, required The hosting order’s id.

Returns: hostname and ip (or null); { "error": true } as for client/usage.

An authorized user needs View services (products).

POST /api/client/servicehosting/domains

Checks in public DNS whether the domains of one of the client’s hosting accounts point to its server, for the website and for mail. The answer is kept for 5 minutes.

Parameter Type Description
order_id integer, required The hosting order’s id.
website string One of the account’s websites by its domain (from websites). Default: the account’s own website.
refresh boolean true checks again now (at most 20 times an hour).

Returns: checked_at (Unix time), websites (the domains of the account’s websites, its own first), domains (each with domain, kind (such as primary), web (status: ok, cloudflare, elsewhere or none, and addresses) and mail (status: ok, elsewhere or none, and hosts)), expected (web_ips, mail_ips, mail_host) and refresh_refused (true when a refresh was asked too often and the kept answer is shown). { "error": true, "refresh_refused": … } as for client/usage.

An authorized user needs View services (products).

POST /api/client/servicehosting/emails

Lists the email accounts of one website of one of the client’s hosting accounts, the domains they can be made on and the mailbox allowance.

Parameter Type Description
order_id integer, required The hosting order’s id.
website string One of the account’s websites by its domain (from websites). Default: the account’s own website. Every email_* call takes the same website.

Returns: websites (the domains of the account’s websites, its own first), accounts (each address, mailbox (false for a forwarder only), status, used_mb, quota_mb (null: unlimited), forwarders (how many), catch_all, webmail and sso), domains (each id, domain) and allowance (used, limit; null limit: unlimited).

Errors:

  • Hosting account not found (code 9999)
  • This hosting account does not offer this feature. (code 9999)
  • The website example.org is not part of this hosting account. (code 9999)
  • The panel’s own error.

An authorized user needs View services (products).

Example

Request parameters:

{
"order_id": 31
}

result:

{
"accounts": [
{
"address": "info@example.com",
"mailbox": true,
"status": "active",
"used_mb": 120,
"quota_mb": 1024,
"forwarders": 0,
"catch_all": false,
"webmail": true,
"sso": true
}
],
"domains": [
{
"id": "d1",
"domain": "example.com"
}
],
"allowance": {
"used": 1,
"limit": 10
}
}

POST /api/client/servicehosting/email_get

Returns one email account with its forwarders and automatic reply.

Parameter Type Description
order_id integer, required The hosting order’s id.
address string, required The email address.

Returns: The fields of a client/emails account, with forwarders as a list of addresses, and autoresponder (enabled, start_date, end_date, subject, body, or null).

Errors:

  • Choose an email address. (code 9999)
  • The email address was not found on this hosting account. (code 9999)
  • Hosting account not found (code 9999)

An authorized user needs View services (products).

POST /api/client/servicehosting/email_create

Creates an email account on one of the account’s domains: a mailbox when a password is given, else a forwarder only.

Parameter Type Description
order_id integer, required The hosting order’s id; it must be active.
domain_id string, required The domain’s id from client/emails.
username string, required The name before @: letters, numbers, dots, dashes and underscores, starting and ending with a letter or number, up to 64.
password string For a mailbox: at least 10 characters with lowercase and uppercase letters, numbers and special characters, up to 128.
forwarders array Up to 20 addresses to forward to, as a list or one string separated by spaces, commas or semicolons.
quota_mb integer Mailbox size in MB; empty or 0 for no limit.

Returns: address: the new email address.

Errors:

  • The name before @ may use letters, numbers, dots, dashes and underscores, and must start and end with a letter or number. (code 9999)
  • Give a password for a mailbox, or at least one address to forward to. (code 9999)
  • At least 10 characters, with lowercase and uppercase letters, numbers and special characters. (code 9999)
  • Your plan allows N mailboxes, and all are in use. (code 9999)
  • This hosting account is suspended, so its email accounts cannot be changed. (code 9999)
  • Too many changes in a short time. Please wait a while and try again. (code 429): at most 20 an hour.

An authorized user needs Manage services (manageproducts).

Example

Request parameters:

{
"order_id": 31,
"domain_id": "d1",
"username": "sales",
"password": "Example-Pass-2026!",
"quota_mb": 1024
}

result:

{
"address": "sales@example.com"
}

POST /api/client/servicehosting/email_update

Changes an email account’s mailbox size and forwarders.

Parameter Type Description
order_id integer, required The hosting order’s id; it must be active.
address string, required The email address.
quota_mb integer Mailbox size in MB; empty or 0 for no limit.
forwarders array The full list of addresses to forward to (up to 20); empty removes them.

Returns: true.

Errors:

  • Choose an email address. (code 9999)
  • … is not a valid email address to forward to. (code 9999)
  • An email account can forward to at most 20 addresses. (code 9999)
  • Too many changes in a short time. Please wait a while and try again. (code 429): at most 60 an hour.

An authorized user needs Manage services (manageproducts).

POST /api/client/servicehosting/email_password

Sets a new password for a mailbox.

Parameter Type Description
order_id integer, required The hosting order’s id; it must be active.
address string, required The email address.
password string, required At least 10 characters with lowercase and uppercase letters, numbers and special characters, up to 128.

Returns: true.

Errors:

  • At least 10 characters, with lowercase and uppercase letters, numbers and special characters. (code 9999)
  • Choose an email address. (code 9999)
  • Too many changes in a short time. Please wait a while and try again. (code 429): at most 10 an hour.

An authorized user needs Manage services (manageproducts).

POST /api/client/servicehosting/email_delete

Deletes an email account with its mail.

Parameter Type Description
order_id integer, required The hosting order’s id; it must be active.
address string, required The email address.

Returns: true.

Errors:

  • Choose an email address. (code 9999)
  • Too many changes in a short time. Please wait a while and try again. (code 429): at most 30 an hour.

This cannot be undone. An authorized user needs Manage services (manageproducts).

POST /api/client/servicehosting/email_webmail

Returns where the Webmail button goes for a mailbox: a one-time sign-in link, or the global webmail sign-in page when that option is on.

Parameter Type Description
order_id integer, required The hosting order’s id; it must be active.
address string, required The email address.

Returns: A URL.

Errors:

  • Choose an email address. (code 9999)
  • Too many changes in a short time. Please wait a while and try again. (code 429): at most 30 an hour.

An authorized user needs Sign in to control panels and webmail (productsso).

POST /api/client/servicehosting/email_settings

Returns what a mail app needs to use one email account.

Parameter Type Description
order_id integer, required The hosting order’s id.
address string, required The email address.

Returns: username, incoming and outgoing: lists of { protocol, host, port, security }.

Errors:

  • Choose an email address. (code 9999)
  • Hosting account not found (code 9999)

An authorized user needs View services (products).

POST /api/client/servicehosting/email_autoresponder

Sets or removes the automatic reply of a mailbox.

Parameter Type Description
order_id integer, required The hosting order’s id; it must be active.
address string, required The email address.
remove boolean true removes the automatic reply; the fields below are then not needed.
enabled boolean Whether it is on.
start_date string Y-m-d: the day it starts. Needed unless remove.
end_date string Y-m-d: the day it ends; empty for none.
subject string Up to 200 characters. Needed unless remove.
body string Up to 5000 characters. Needed unless remove.

Returns: true.

Errors:

  • Choose the date the automatic reply starts. (code 9999)
  • The end date is not a valid date. (code 9999)
  • The automatic reply must end on or after the day it starts. (code 9999)
  • Give a subject (up to 200 characters) and a message (up to 5000 characters). (code 9999)
  • Too many changes in a short time. Please wait a while and try again. (code 429): at most 30 an hour.

An authorized user needs Manage services (manageproducts).

POST /api/guest/servicehosting/free_tlds

Lists the TLDs a hosting product gives a free domain with: the product’s own list, or every TLD open to registration when it has none.

Parameter Type Description
product_id integer, required A hosting product’s id.

Returns: A list: { tld } items from the product’s list, or TLDs with the fields of servicedomain/guest/tlds.

Errors:

  • Product ID is missing (code 9999)
  • Product not found (code 9999)
  • Product type is invalid (code 9999) for a product that is not hosting.

A store call: when the store is closed to the caller it returns an empty list.

POST /api/guest/servicehosting/panel_on

Says whether any hosting panel is switched on.

No parameters.

Returns: true or false.