Skip to content

Custom Pages API

Custom pages are pages you write for the client area, as drafts or published, with menu and footer links and a choice of who may see them. See Custom pages for the user guide.

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

POST /api/admin/custompages/get_list

Lists the custom pages, newest first, whatever their status or visibility.

Permission: View custom pages (custompages.view)

Parameter Type Description
id integer Only the page with this id.
slug string Text to find in the slug.
search string Text to find in the title, slug, description, keywords or content.
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/get_page.

Example

Request parameters:

{
"per_page": 1
}

result:

{
"pages": 4,
"page": 1,
"per_page": 1,
"total": 4,
"list": [
{
"id": 7,
"title": "Server locations",
"description": "Where Example Hosting runs its servers.",
"keywords": "servers, data centers",
"content": "<p>Our servers run in Frankfurt and Helsinki.</p>",
"slug": "server-locations",
"status": "published",
"visibility": "everyone",
"show_in_menu": false,
"show_in_footer": true,
"sort_order": 0,
"created_at": "2026-11-10 14:20:00",
"updated_at": "2026-11-12 09:05:31"
}
]
}

POST /api/admin/custompages/delete

Deletes a custom page for good. An id that does not exist is skipped without an error.

Permission: Manage custom pages (custompages.manage)

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

Returns: true.

Errors:

  • Custom page ID was not passed (code 9999)

This cannot be undone.

POST /api/admin/custompages/batch_delete

Deletes several custom pages at once.

Permission: Manage custom pages (custompages.manage)

Parameter Type Description
ids array, required The ids of the pages to delete. Ids that do not exist are skipped.

Returns: true.

Errors:

  • Custom page IDs were not passed (code 9999)

This cannot be undone.

POST /api/admin/custompages/create

Creates a custom page.

Permission: Manage custom pages (custompages.manage)

Parameter Type Description
title string, required The title, up to 255 characters.
content string, required The page’s HTML.
slug string The URL name, cleaned to lowercase letters, digits and hyphens; it must be unique. Leave it out to make one from the title (with -1, -2 added when it is taken).
description string The meta description, up to 555 characters.
keywords string The meta keywords, up to 555 characters.
status string published (default) or draft.
visibility string Who may open it: everyone (Everyone, default), clients (Signed-in clients) or active (Clients with an active service: at least one active order).
show_in_menu boolean Adds a link to the client area menu. Default false.
show_in_footer boolean Adds a link to the footer. Default false.
sort_order integer Order of the links, lowest first. Default 0.

Returns: The new page’s id.

Errors:

  • Title was not passed (code 9999)
  • Content was not passed (code 9999)
  • Enter a title of up to 255 characters. (code 9999)
  • Keep the description and keywords under 555 characters. (code 9999)
  • Unknown status or visibility. (code 9999)
  • Keep the slug under 255 characters. (code 9999)
  • You need to set unique slug. (code 9999)
Example

Request parameters:

{
"title": "Server locations",
"content": "<p>Our servers run in Frankfurt and Helsinki.</p>",
"show_in_footer": true
}

result:

7

POST /api/admin/custompages/update

Changes a custom page.

Permission: Manage custom pages (custompages.manage)

Parameter Type Description
id integer, required The page’s id.
title string, required The title, up to 255 characters.
slug string, required The URL name, cleaned to lowercase letters, digits and hyphens; it must be unique.
content string, required The page’s HTML.
description string The meta description, up to 555 characters. Left out: unchanged.
keywords string The meta keywords, up to 555 characters. Left out: unchanged.
status string published or draft. Left out: unchanged.
visibility string everyone, clients or active. Left out: unchanged.
show_in_menu boolean Link in the client area menu. Left out: unchanged.
show_in_footer boolean Link in the footer. Left out: unchanged.
sort_order integer Order of the links, lowest first. Left out: unchanged.

Returns: The page’s id.

Errors:

  • Custom page ID was not passed (code 9999), and the same for the title, slug and content.
  • Custom page not found (code 9999)
  • Enter a title of up to 255 characters. (code 9999)
  • Keep the description and keywords under 555 characters. (code 9999)
  • Unknown status or visibility. (code 9999)
  • You need to set unique slug. (code 9999)
Example

Request parameters:

{
"id": 7,
"title": "Server locations",
"slug": "server-locations",
"content": "<p>Our servers run in Frankfurt, Helsinki and Ashburn.</p>",
"description": "Where Example Hosting runs its servers.",
"keywords": "servers, data centers"
}

result:

7

POST /api/admin/custompages/get_page

Returns one custom page by id.

Permission: View custom pages (custompages.view)

Parameter Type Description
page_id integer, required The page’s id.

Returns: The page: id, title, description, keywords, content (HTML), slug, status (published or draft), visibility (everyone, clients or active), show_in_menu, show_in_footer (booleans), sort_order, created_at and updated_at.

Errors:

  • Custom page ID was not passed
  • Custom page not found
Example

Request parameters:

{
"page_id": 7
}

result:

{
"id": 7,
"title": "Server locations",
"description": "Where Example Hosting runs its servers.",
"keywords": "servers, data centers",
"content": "<p>Our servers run in Frankfurt and Helsinki.</p>",
"slug": "server-locations",
"status": "published",
"visibility": "everyone",
"show_in_menu": false,
"show_in_footer": true,
"sort_order": 0,
"created_at": "2026-11-10 14:20:00",
"updated_at": "2026-11-12 09:05:31"
}

POST /api/guest/custompages/links

Lists the menu and footer links the caller may see: published pages with a menu or footer link whose visibility lets the caller see them: Everyone pages for a visitor, also Signed-in clients pages for a signed-in client, and also Clients with an active service pages for a client with an active order.

No parameters.

Returns: A list, by sort order then title. Each item has title, slug, menu and footer (booleans: where the link shows).

The caller is the visitor of the browser session: a client signed in to the client area gets the links for clients.

Example

Request parameters:

{}

result:

[
{
"title": "Server locations",
"slug": "server-locations",
"menu": false,
"footer": true
}
]