The PagibleAI JSON:REST API is designed to give you all data you need to generate a page in one request. This document provides everything you need to understand how to retrieve, filter, and utilize page data efficiently.
Table of Contents:
The PagibleAI JSON:REST API is designed to give you all data you need to generate a page in one request. This document provides everything you need to understand how to retrieve, filter, and utilize page data efficiently.
Table of Contents:
To limit the returned items exactly to the ones you want, the JSON API supports one or more filter
parameters:
path
: Selects the page for the given URL path (without schema, domain, port and query parameters)domain
: Filters the pages by domain name (only available in multi-domain setups)tag
: Returns only pages (or one page) where the passed value is set in the tag
property of the page itemlang
: In case of multi-language page trees, this parameter limits the pages to the specified language set in the lang
property of the page itemTo get the page tagged with root
in English, use:
https://pagible.com/cms/pages?filter[tag]=root&filter[lang]=en
When including related resources, you can get all data you need to render the page including the navigation in one request. The available related resources are:
To get the page tagged with blog
including its ancestors use:
https://pagible.com/cms/pages?filter[path]=blog&include=ancestors
There are detailed examples for the most often used requests available:
You can paginate through the results by adding the page
parameter to the /cms/pages
URL. The supported values are:
To get item 25 to 50 from the pages
endpoint use:
https://pagible.com/cms/pages?page[number]=2&page[size]=25
This can be combined with filter
and include
parameters too:
https://pagible.com/cms/pages?filter[lang]=en&include=ancestors&page[number]=2&page[size]=25
In the last case, use the links instead of constructing the URL yourself!
Most often, you don't need all page properties and you can reduce the amount of data returned in the response by using the fields
parameter. The requested fields can be limited for pages when the property names are concatenated by comma.
To retrieve the name and lang
of the root pages only, use:
https://pagible.com/cms/pages?fields[pages]=path,name
Then, the attributes of the returned pages in the data section will contain only:
"data": [
{
"type": "pages",
"id": "1",
"attributes": {
"lang": "en",
"name": "Home"
},
"links": {
"self": "https://pagible.com/cms/pages/1"
}
}
]
The type
and id
of each item is always returned outside the attributes
and can't be skipped!
To include related resources, you always have to add the name of the relation to the fields
list:
https://pagible.com/cms/pages/3?include=parent&fields[pages]=path,name,parent&fields[navs]=path,name
Then, the included
section contains the parent which is of type navs (a page without content
, config
and meta
properties):
{
"meta": {
"baseurl": "https://pagible.com/storage/"
},
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "https://pagible.com/cms/pages/3"
},
"data": {
"type": "pages",
"id": "3",
"attributes": {
"path": "pagibleai-cms-powerful-simple-scalable-ai-content-management",
"name": "The Future of Content Management"
},
"relationships": {
"parent": {
"data": {
"type": "navs",
"id": "2"
}
}
},
"links": {
"self": "https://pagible.com/cms/pages/3"
}
},
"included": [
{
"type": "navs",
"id": "2",
"attributes": {
"path": "blog",
"name": "Blog"
},
"links": {
"self": "https://pagible.com/cms/pages/2"
}
}
]
}
Caution: If you forget to include parent
in the fields list, the included
section will be empty even if the you add include=parent
!
The meta
section always contains the baseurl
key, which is the base URL for all files/images referenced by the page or shared content elements. Typically, you'll see this in most responses:
"meta": {
"baseurl": "https:\/\/pagible.com\/storage\/"
}
In Laravel, you can change the base URL in the ./config/filesystems.php
file. Modify the url
setting for the disk
that PagibleAI CMS is using (public
by default).
Responses that return a collection of pages (/cms/pages
) will also include a page
key in the meta
section, containing pagination information:
"meta": {
"page": {
"currentPage": 1,
"from": 1,
"lastPage": 1,
"perPage": 15,
"to": 1,
"total": 1
}
}
Important key/value pairs:
currentPage
: Page number of the current page (starts with "1")lastPage
: Page number of the last page available when using the same perPage
value. Minimum value is "1", maximum value is "100"perPage
: Maximum number of items returned in one response, which is the passed page[size]
value. The minimum value is "1", the maximum value is "100", and the default values are "15" for pages and "50" for elements.total
: Total number of available pages when using the same size
valueThe links
section in the JSON API response is always included and contains the self
link, which returns the same response again:
"links": {
"self": "https:\/\/pagible.com\/cms\/pages\/1"
},
Therefore, you can always use these links to fetch data without constructing them yourself!
The data
section of the JSON:API response contains either a single resource (in case of e.g. /cms/pages/1
) or a collection of resources (for /cms/pages
).
Using a request which returns a single page, then the response is like:
"data": {
"type": "pages",
"id": "1",
"attributes": {
"lang": "en",
"path": "",
"name": "Home",
"title": "PagibleAI CMS",
"to": "",
"domain": "",
"cache": 5,
"has": true,
"content": {
"main": [
{
"id": "Ah3jsZ",
"group": "main",
"type": "hero",
"data": {
"title": "PagibleAI: The future of CMS",
"text": "The first CMS build on AI with the ease of Wordpress and the power of Contentful!"
}
}
]
},
"meta": {
"meta-tags": {
"type": "meta-tags",
"data": {
"description": "Experience the future of content management with PagibleAI, the AI-powered CMS that combines WordPress's ease of use with Contentful's power"
}
}
},
"config": null,
"createdAt": "2023-05-01T09:36:30.000000Z",
"updatedAt": "2023-05-01T09:36:30.000000Z"
},
"links": {
"self": "https:\/\/pagible.com\/cms\/pages\/1"
}
}
The data
section contains exactly one object with type
and id
properties which uniquely identifies the resource. Within the attributes
part, the page properties are listed like shown above but could be also less if you've requested only specific fields. In the links
part, the self
URL to retrieve the same page data is included. The relationships
part is described in the relationships section of this document.
For request returning multiple items, the data
section will be similar to:
"data": [
{
"type": "pages",
"id": "1",
"attributes": {
"lang": "en",
"path": "",
"name": "Home",
"title": "PagibleAI CMS",
"to": "",
"domain": "",
"cache": 5,
"has": true,
"content": {
"main": [
{
"id": "Ah3jsZ",
"group": "main",
"type": "hero",
"data": {
"title": "PagibleAI: The future of CMS",
"text": "The first CMS build on AI with the ease of Wordpress and the power of Contentful!"
}
}
]
},
"meta": {
"meta-tags": {
"type": "meta-tags",
"data": {
"description": "Experience the future of content management with PagibleAI, the AI-powered CMS that combines WordPress's ease of use with Contentful's power"
}
}
},
"config": null,
"createdAt": "2023-05-01T09:36:30.000000Z",
"updatedAt": "2023-05-01T09:36:30.000000Z"
},
"links": {
"self": "https:\/\/pagible.com\/cms\/pages\/1"
}
},
// ...
]
It's the same like for responses returning single resources but the data
section contains a list of page items.
The JSON:API returns the public properties of the pages. This example is from the PagibleAI website API:
{
"type": "pages",
"id": "1",
"attributes": {
"parent_id": null,
"lang": "en",
"path": "",
"name": "Home",
"title": "Pagible AI CMS - Next level content management!",
"theme": "",
"type": "",
"to": "",
"domain": "",
"has": true,
"cache": 5,
"createdAt": "2025-07-29T09:00:58.000000Z",
"updatedAt": "2025-08-20T22:46:15.000000Z",
"meta": {
"meta-tags": {
"type": "meta-tags",
"data": {
"description": "Experience the future of content management with PagibleAI, the AI-powered CMS that combines WordPress's ease of use with Contentful's power"
},
"files": []
}
},
"config": null,
"content": {
"main": [
{
"id": "Ah3jsZ",
"group": "main",
"type": "hero",
"data": {
"title": "PagibleAI: The future of CMS",
"text": "The first CMS build on AI with the ease of Wordpress and the power of Contentful!"
}
}
]
}
}
}
The single properties are:
lang
: ISO language code, either two letters in lower case (e.g. "en") or five characters for country specific languages (e.g. "en-US")path
: URL segment of the page (must not contain any slashes)name
: Short page name for navigationtitle
: Page title like shown in the browsertag
: Arbitrary name which can be used for filtering to get a specific pageto
: URL to the target page in case the page is redirecting to another pagedomain
: Domain name the (root) page is responsible forcache
: How long the returned response (and therefore the generated page can be cachedhas
: If the page has sub-pages as childrenmeta
: Set of arbitrary page meta data that should be part of the page headconfig
: Arbitrary key/value pairs with page configuationcontent
: Set of page content elements grouped by the section they should appear in.createdAt
: ISO date/time when the page was createdupdatedAt
: ISO date/time when the page was last modifiedThe content
attribute, part of the page properties, contains the complete set of content elements that construct a page. Think of these elements as the building blocks your page consists of. They are structured according to the section where they are displayed, which determines their order on the page.
Each content element is structured as follows:
id
: A unique identifier for the content element, specific to that page.type
: Specifies the content element's type (e.g., heading, text, or a more complex element).data
: An object of key-value pairs that store the content element's attributes. The schema configuration for the content element type defines its structure and the available keys.files
(optional): An object that links file IDs to their corresponding file objects, used when the content element includes media like images, audio, video, or documents.Basic elements look like:
{
"id": "Ahs232",
"type": "heading",
"group": "main",
"data": {
"title": "Key Features That Set PagibleAI CMS Apart",
"level": "3"
}
},
{
"id": "AiDOQC",
"type": "text",
"group": "main",
"data": {
"text": "With PagibleAI CMS, ..."
}
},
Complex elements can contain deeper nested data:
{
"id": "AiprYJ",
"group": "main",
"type": "cards",
"data": {
"title": "Features",
"cards": [
{
"title": "Generate content using AI",
"text": "Create engaging and optimized content ...",
"file": {
"id": "019874ac-46db-7074-bacd-e0ee7bf449c0",
"type": "file"
}
},
{
"title": "Create suitable AI images",
"text": "Effortlessly generate perfect, visually appealing ...",
"file": {
"id": "01987497-8c96-735f-a4a6-d20c2371f947",
"type": "file"
}
},
]
},
"files": {
"01987497-8c96-735f-a4a6-d20c2371f947": {
"mime": "image/png",
"lang": null,
"name": "...",
"path": "...",
"previews": {
"...": "..."
},
"description": null,
"transcription": null
},
"019874ac-46db-7074-bacd-e0ee7bf449c0": {
"mime": "image/png",
"lang": null,
"name": "...",
"path": "...",
"previews": {
"...": "..."
},
"description": null,
"transcription": null
}
}
}
If content element contains files, only references are stored in the data object and the files object contains the file properties:
{
"id": "AiYfEC",
"type": "image-text",
"group": "main",
"data": {
"text": "Developers, on the other hand ...",
"file": {
"id": "01986b6d-69fb-71ac-8243-f8ac984519a8",
"type": "file"
}
},
"files": {
"01986b6d-69fb-71ac-8243-f8ac984519a8": {
"mime": "image/png",
"lang": null,
"name": "three happy software developers",
"path": "cms/three-happy-software-developers_20250802153628354__2fc1.png",
"previews": {
"473": "cms/three-happy-software-developers_20250802153628354_480_45c9.webp",
"945": "cms/three-happy-software-developers_20250802153628354_960_efd5.webp",
"1792": "cms/three-happy-software-developers_20250802153628354_1920_61cf.webp"
},
"description": "Three happy software developers working together",
"transcription": null
}
}
},
All file paths are relative to the baseurl which is available in the meta section. For audio and video files, there may be a transcription in WEBVTT format available:
WEBVTT
00:00:00.000 --> 00:00:10.000
Yesterday
The meta
attribute, found within the page properties, is a flexible object designed to hold various meta data for a page, primarily used for elements within the <head>
section of an HTML document. This can include meta tags, Open Graph properties, or other custom SEO-related information.
Each entry within the meta
object typically follows a structured format:
**type**
: Specifies the type of meta-data being provided (e.g., "meta-tags"
for SEO-related meta elements).**data**
: An object containing key-value pairs specific to the type
. The keys and their corresponding values define the actual meta-data.**files**
(optional): An object linking file IDs to file objects, if the meta-data references media (e.g., Open Graph images).Here's an example of a meta
entry:
"meta": {
"meta-tags": {
"type": "meta-tags",
"data": {
"description": "Experience the future of content management with PagibleAI, the AI-powered CMS that combines WordPress's ease of use with Contentful's power"
}
}
},
The config
attribute, located within the page properties, is a versatile object designed to store arbitrary key-value pairs for page-specific configurations. This can include settings related to theming, layout adjustments, feature toggles, or any other custom parameters that influence how a page behaves or appears.
Each entry within the config
object typically follows a structured format:
type
: Specifies the type of configuration being provided (e.g., "theme"
for theme-related settings).data
: An object containing key-value pairs specific to the type
. The keys and their corresponding values define the actual configuration parameters.Here's an example of a config
entry, demonstrating how to set a primary theme color:
"config": {
"theme": {
"type": "theme",
"data": {
"--color-primary": "#103050"
}
}
},
If you use the include parameter to get related resources in the same request, there will be a key for each related resource below relationships
.
For a request that includes the parent page, ancestor pages, child pages, and the page subtree, like this:
https://pagible.com/cms/pages/1?include=parent,ancestors,children,subtree
Then, the relationships
section will contain:
{
"relationships": {
"parent": {
"data": null
},
"children": {
"data": [
{
"type": "navs",
"id": "2"
},
{
"type": "navs",
"id": "4"
},
{
"type": "navs",
"id": "5"
}
]
},
"ancestors": {
"data": []
},
"subtree": {
"data": [
{
"type": "navs",
"id": "2"
},
{
"type": "navs",
"id": "3"
},
{
"type": "navs",
"id": "4"
},
{
"type": "navs",
"id": "5"
}
]
}
}
}
Each key in the relationships
part will reference either a single item (like parent
) or multiple items in their data
sections. The items themselves will be part of the included
section of the returned response. In the case of the root page, the parent/data
key can also be NULL because there's no parent page for the root page:
{
"relationships": {
"parent": {
"data": null
}
}
}
The included
section of each JSON API response is only available if you've added the include
parameter to the URL (e.g., /cms/pages/1?include=children
). In that case, the relationships/children/data
part contains the list of references:
{
"type": "pages",
"id": "1",
"attributes": {
"name": "Home",
"title": "PagibleAI CMS",
"tag": "root",
"...": "..."
},
"relationships": {
"children": {
"data": [
{
"type": "navs",
"id": "2"
}
]
}
}
}
And the included
section for that response then contains:
"included": [
{
"type": "navs",
"id": "2",
"attributes": {
"parent_id": 1,
"lang": "en",
"name": "Blog",
"...": "..."
}
}
]
It consists of a flat list of page or shared content items identified by their type
and id
values. You must now match the type and ID within the relationships/children
section with the type and ID within the included
section.