Page
Overview
Pages help to organize and share information within a brand.
Each page has the following attributes:
-
Brand the page belongs to
-
Content that contains HTML
-
Title of the page
-
Order of the page
-
Page icon (optional)
Brand admins can create, modify, reorder and delete pages while agents can read them. Child brand admins cannot manage pages created by the parent brand.
Resource Group ¶
Create a page ¶
Create a pagePOST/brands/:brand/pages
Example URI
POST /brands/:brand/pages
URI Parameters
- brand
string(required) Example: cc788926-8e64-409c-b445-30efdf76f033
Request
Body
{
"title": "title",
"order": 1,
"content": "content",
"parent": null,
"icon": "π§"
}Response
200Body
{
"code": "OK",
"data": {
"id": "a884d171-2549-45f8-b0f1-bd04d640d2b0",
"type": "page",
"created_at": 1791656528.201231,
"updated_at": 1791656528.204349,
"parent": null,
"order": 1,
"created_by": "57f1516a-a7a1-4c78-a2cf-e65663a228ec",
"title": "title",
"content": "content",
"icon": "π§",
"page_id": "a884d171-2549-45f8-b0f1-bd04d640d2b0",
"ord": "1"
}
}Update sorting orders for one or more pages ¶
Update sorting orders for one or more pagesPUT/brands/:brand/pages/sort
Example URI
PUT /brands/:brand/pages/sort
URI Parameters
- brand
string(required) Example: cc788926-8e64-409c-b445-30efdf76f033
Request
Body
[
{
"id": "ba0bfd38-b7f5-4515-8ca4-044674dfe7f3",
"order": 95
},
{
"id": "c30f51bf-edc1-4d5f-91be-b03d38f1c9c6",
"order": 85
},
{
"id": "e3159f21-14b7-459a-9c3b-7d5ef2ea3fa4",
"order": 90,
"parent": "13a3caf7-393e-4c55-a0b9-dce139948b72"
}
]Response
200Body
{
"code": "OK",
"data": [
{
"id": "ba0bfd38-b7f5-4515-8ca4-044674dfe7f3",
"order": 95,
"parent": null
},
{
"id": "c30f51bf-edc1-4d5f-91be-b03d38f1c9c6",
"order": 85,
"parent": null
},
{
"id": "e3159f21-14b7-459a-9c3b-7d5ef2ea3fa4",
"order": 90,
"parent": "13a3caf7-393e-4c55-a0b9-dce139948b72"
}
],
"info": {
"count": 3,
"total": 0
}
}Update a page ¶
Update a pagePUT/brands/:brand/pages/:id
Example URI
PUT /brands/:brand/pages/:id
URI Parameters
- brand
string(required) Example: cc788926-8e64-409c-b445-30efdf76f033- id
string(required) Example: a884d171-2549-45f8-b0f1-bd04d640d2b0
Request
Body
{
"title": "title",
"content": "content",
"icon": "π§"
}Response
200Body
{
"code": "OK",
"data": {
"id": "a884d171-2549-45f8-b0f1-bd04d640d2b0",
"type": "page",
"created_at": 1791656528.201231,
"updated_at": 1791656528.475689,
"parent": null,
"order": 1,
"created_by": "57f1516a-a7a1-4c78-a2cf-e65663a228ec",
"title": "title",
"content": "content",
"icon": "π§",
"page_id": "a884d171-2549-45f8-b0f1-bd04d640d2b0",
"ord": "1"
}
}Delete a page ¶
Delete a pageDELETE/brands/:brand/pages/:id
Example URI
DELETE /brands/:brand/pages/:id
URI Parameters
- brand
string(required) Example: cc788926-8e64-409c-b445-30efdf76f033- id
string(required) Example: a884d171-2549-45f8-b0f1-bd04d640d2b0
Response
204Get pages of a brand ¶
Get pages of a brandGET/brands/:brand/pages{?q}
The q query parameter enables a text search through all the pages available on the brand.
It supports searching the term in the pagesβ titles, contents and icons.
Example URI
GET /brands/:brand/pages?q="π§"
URI Parameters
- associations
string(required) Example: page.children,page.attachments- brand
string(required) Example: cc788926-8e64-409c-b445-30efdf76f033- q
string(required) Example: "π§"
Response
200Body
{
"code": "OK",
"data": [
{
"id": "a884d171-2549-45f8-b0f1-bd04d640d2b0",
"type": "page",
"created_at": 1791656528.201231,
"updated_at": 1791656528.475689,
"parent": null,
"order": 1,
"created_by": "57f1516a-a7a1-4c78-a2cf-e65663a228ec",
"title": "title",
"content": "content",
"icon": "π§",
"children": null,
"attachments": [
{
"id": "1fc9c205-3c95-445d-89a7-32b7b8e43860",
"created_at": 1791656528.662189,
"updated_at": 1791656528.662189,
"deleted_at": null,
"created_by": "57f1516a-a7a1-4c78-a2cf-e65663a228ec",
"path": "pages/a884d171-2549-45f8-b0f1-bd04d640d2b0/attachments/8101fd40-c4d7-11f1-89da-fb554657817f.jpg",
"name": "sample.jpg",
"public": false,
"type": "file",
"url": "https://private-cdn.irish.rechat.com/pages/a884d171-2549-45f8-b0f1-bd04d640d2b0/attachments/8101fd40-c4d7-11f1-89da-fb554657817f.jpg?Expires=1791742928663&Key-Pair-Id=APKAIIRG223GKFAC4MHA&Signature=TnnMJP3bABUlV7eI458TIqmjvp-zsnMtIG906YEXS4mUORfjo0NOE-nZ--oUvD24smOYjios9MVDfSndLNn7oUff0bAauJMa6YcivnGA7AzfkYdHKfDAi51hFpQQqUybMEL5Opxom1D0qeYU53ErqvVs7JpsbmFTz6V2TtaDKGdx-6W9utgyhrOLgP2LOy2JDjRJr141XJlbrg39tNHfikeNLOiec3532DYzUKMgT79Fz8R~mbfOmwHQYzqRiCZ695jFevqfLqP5B4VDc0s0Spc60B2sZ-O1X0-kbYTMsF0SPjU53eamEPrhw2nJkgY48afnI4bYwQaZBVXNFCrWkg__",
"preview_url": "https://private-cdn.irish.rechat.com/pages/a884d171-2549-45f8-b0f1-bd04d640d2b0/attachments/8101fd40-c4d7-11f1-89da-fb554657817f.jpg?Expires=1791742928663&Key-Pair-Id=APKAIIRG223GKFAC4MHA&Signature=TnnMJP3bABUlV7eI458TIqmjvp-zsnMtIG906YEXS4mUORfjo0NOE-nZ--oUvD24smOYjios9MVDfSndLNn7oUff0bAauJMa6YcivnGA7AzfkYdHKfDAi51hFpQQqUybMEL5Opxom1D0qeYU53ErqvVs7JpsbmFTz6V2TtaDKGdx-6W9utgyhrOLgP2LOy2JDjRJr141XJlbrg39tNHfikeNLOiec3532DYzUKMgT79Fz8R~mbfOmwHQYzqRiCZ695jFevqfLqP5B4VDc0s0Spc60B2sZ-O1X0-kbYTMsF0SPjU53eamEPrhw2nJkgY48afnI4bYwQaZBVXNFCrWkg__",
"mime": "image/jpeg"
}
],
"page_id": "a884d171-2549-45f8-b0f1-bd04d640d2b0",
"ord": "1"
}
],
"info": {
"count": 1,
"total": 0
}
}Response
200Body
{
"code": "OK",
"data": [
{
"id": "d9e50bb7-b264-498e-a30e-015ea621a752",
"type": "page",
"created_at": 1791656529.380149,
"updated_at": 1791656529.380169,
"parent": null,
"order": 20,
"created_by": "57f1516a-a7a1-4c78-a2cf-e65663a228ec",
"title": "Parent One",
"content": "content for Parent One",
"icon": null,
"page_id": "d9e50bb7-b264-498e-a30e-015ea621a752",
"ord": "1"
},
{
"id": "2983366a-28b4-4999-8335-e2163e15032c",
"type": "page",
"created_at": 1791656529.55317,
"updated_at": 1791656529.553187,
"parent": null,
"order": 10,
"created_by": "57f1516a-a7a1-4c78-a2cf-e65663a228ec",
"title": "Parent Two",
"content": "content for Parent Two",
"icon": null,
"page_id": "2983366a-28b4-4999-8335-e2163e15032c",
"ord": "2"
},
{
"id": "f4f73efa-e033-4f1a-98f2-a23f0a426a08",
"type": "page",
"created_at": 1791656529.891306,
"updated_at": 1791656529.891327,
"parent": "d9e50bb7-b264-498e-a30e-015ea621a752",
"order": 10,
"created_by": "57f1516a-a7a1-4c78-a2cf-e65663a228ec",
"title": "Parent One Child Two",
"content": "content for Parent One Child Two",
"icon": null,
"page_id": "f4f73efa-e033-4f1a-98f2-a23f0a426a08",
"ord": "3"
},
{
"id": "e3159f21-14b7-459a-9c3b-7d5ef2ea3fa4",
"type": "page",
"created_at": 1791656529.717251,
"updated_at": 1791656529.717268,
"parent": "13a3caf7-393e-4c55-a0b9-dce139948b72",
"order": 90,
"created_by": "57f1516a-a7a1-4c78-a2cf-e65663a228ec",
"title": "Parent One Child One",
"content": "content for Parent One Child One",
"icon": null,
"page_id": "e3159f21-14b7-459a-9c3b-7d5ef2ea3fa4",
"ord": "4"
},
{
"id": "f79d6a24-37ae-428b-b1f4-fe4c570e278c",
"type": "page",
"created_at": 1791656530.206373,
"updated_at": 1791656530.206394,
"parent": "2983366a-28b4-4999-8335-e2163e15032c",
"order": 15,
"created_by": "57f1516a-a7a1-4c78-a2cf-e65663a228ec",
"title": "Parent Two Child One",
"content": "content for Parent Two Child One",
"icon": null,
"page_id": "f79d6a24-37ae-428b-b1f4-fe4c570e278c",
"ord": "5"
}
],
"info": {
"count": 5,
"total": 0
}
}Response
200Body
{
"code": "OK",
"data": [
{
"id": "ba0bfd38-b7f5-4515-8ca4-044674dfe7f3",
"type": "page",
"created_at": 1791656528.699756,
"updated_at": 1791656528.699773,
"parent": null,
"order": 10,
"created_by": "57f1516a-a7a1-4c78-a2cf-e65663a228ec",
"title": "First Page",
"content": "content for order 10",
"icon": null,
"page_id": "ba0bfd38-b7f5-4515-8ca4-044674dfe7f3",
"ord": "1"
},
{
"id": "c30f51bf-edc1-4d5f-91be-b03d38f1c9c6",
"type": "page",
"created_at": 1791656528.884281,
"updated_at": 1791656528.884298,
"parent": null,
"order": 85,
"created_by": "57f1516a-a7a1-4c78-a2cf-e65663a228ec",
"title": "Second Page",
"content": "content for order 5",
"icon": null,
"page_id": "c30f51bf-edc1-4d5f-91be-b03d38f1c9c6",
"ord": "2"
},
{
"id": "d9e50bb7-b264-498e-a30e-015ea621a752",
"type": "page",
"created_at": 1791656529.380149,
"updated_at": 1791656529.380169,
"parent": null,
"order": 20,
"created_by": "57f1516a-a7a1-4c78-a2cf-e65663a228ec",
"title": "Parent One",
"content": "content for Parent One",
"icon": null,
"page_id": "d9e50bb7-b264-498e-a30e-015ea621a752",
"ord": "3"
}
],
"info": {
"count": 3,
"total": 0
}
}Response
200Body
{
"code": "OK",
"data": [
{
"id": "a884d171-2549-45f8-b0f1-bd04d640d2b0",
"type": "page",
"created_at": 1791656528.201231,
"updated_at": 1791656528.475689,
"parent": null,
"order": 15,
"created_by": "57f1516a-a7a1-4c78-a2cf-e65663a228ec",
"title": "title",
"content": "content",
"icon": "π§",
"page_id": "a884d171-2549-45f8-b0f1-bd04d640d2b0",
"ord": "1"
}
],
"info": {
"count": 1,
"total": 0
}
}Get a page ¶
Get a pageGET/brands/:brand/pages/:id
Example URI
GET /brands/:brand/pages/:id
URI Parameters
- brand
string(required) Example: cc788926-8e64-409c-b445-30efdf76f033- id
string(required) Example: a884d171-2549-45f8-b0f1-bd04d640d2b0
Response
200Body
{
"code": "OK",
"data": {
"id": "a884d171-2549-45f8-b0f1-bd04d640d2b0",
"type": "page",
"created_at": 1791656528.201231,
"updated_at": 1791656528.475689,
"parent": null,
"order": 1,
"created_by": "57f1516a-a7a1-4c78-a2cf-e65663a228ec",
"title": "title",
"content": "content",
"icon": "π§",
"page_id": "a884d171-2549-45f8-b0f1-bd04d640d2b0",
"ord": "1"
}
}Upload attachment to the brand for pages ¶
Upload attachment to the brand for pagesPOST/brands/:brand/pages/attachments
Example URI
POST /brands/:brand/pages/attachments
URI Parameters
- brand
string(required) Example: cc788926-8e64-409c-b445-30efdf76f033- id
string(required) Example: a884d171-2549-45f8-b0f1-bd04d640d2b0
Response
200Body
{
"code": "OK",
"data": {
"id": "1fc9c205-3c95-445d-89a7-32b7b8e43860",
"created_at": 1791656528.662189,
"updated_at": 1791656528.662189,
"deleted_at": null,
"created_by": "57f1516a-a7a1-4c78-a2cf-e65663a228ec",
"path": "pages/a884d171-2549-45f8-b0f1-bd04d640d2b0/attachments/8101fd40-c4d7-11f1-89da-fb554657817f.jpg",
"name": "sample.jpg",
"public": false,
"type": "file",
"url": "https://private-cdn.irish.rechat.com/pages/a884d171-2549-45f8-b0f1-bd04d640d2b0/attachments/8101fd40-c4d7-11f1-89da-fb554657817f.jpg?Expires=1791742928663&Key-Pair-Id=APKAIIRG223GKFAC4MHA&Signature=TnnMJP3bABUlV7eI458TIqmjvp-zsnMtIG906YEXS4mUORfjo0NOE-nZ--oUvD24smOYjios9MVDfSndLNn7oUff0bAauJMa6YcivnGA7AzfkYdHKfDAi51hFpQQqUybMEL5Opxom1D0qeYU53ErqvVs7JpsbmFTz6V2TtaDKGdx-6W9utgyhrOLgP2LOy2JDjRJr141XJlbrg39tNHfikeNLOiec3532DYzUKMgT79Fz8R~mbfOmwHQYzqRiCZ695jFevqfLqP5B4VDc0s0Spc60B2sZ-O1X0-kbYTMsF0SPjU53eamEPrhw2nJkgY48afnI4bYwQaZBVXNFCrWkg__",
"preview_url": "https://private-cdn.irish.rechat.com/pages/a884d171-2549-45f8-b0f1-bd04d640d2b0/attachments/8101fd40-c4d7-11f1-89da-fb554657817f.jpg?Expires=1791742928663&Key-Pair-Id=APKAIIRG223GKFAC4MHA&Signature=TnnMJP3bABUlV7eI458TIqmjvp-zsnMtIG906YEXS4mUORfjo0NOE-nZ--oUvD24smOYjios9MVDfSndLNn7oUff0bAauJMa6YcivnGA7AzfkYdHKfDAi51hFpQQqUybMEL5Opxom1D0qeYU53ErqvVs7JpsbmFTz6V2TtaDKGdx-6W9utgyhrOLgP2LOy2JDjRJr141XJlbrg39tNHfikeNLOiec3532DYzUKMgT79Fz8R~mbfOmwHQYzqRiCZ695jFevqfLqP5B4VDc0s0Spc60B2sZ-O1X0-kbYTMsF0SPjU53eamEPrhw2nJkgY48afnI4bYwQaZBVXNFCrWkg__",
"mime": "image/jpeg"
}
}