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: 5bd58e57-62e8-4909-b7f4-ed855a968902
Request
Body
{
"title": "title",
"order": 1,
"content": "content",
"parent": null,
"icon": "π§"
}Response
200Body
{
"code": "OK",
"data": {
"id": "1b996d94-810b-4a70-b5d9-f0b37192029f",
"type": "page",
"created_at": 1781428485.297222,
"updated_at": 1781428485.304417,
"parent": null,
"order": 1,
"created_by": "8b81af20-c7a3-4121-ae79-7b13e34ec242",
"title": "title",
"content": "content",
"icon": "π§",
"page_id": "1b996d94-810b-4a70-b5d9-f0b37192029f",
"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: 5bd58e57-62e8-4909-b7f4-ed855a968902
Request
Body
[
{
"id": "0a21c335-76fe-4237-9964-c6d649164a41",
"order": 95
},
{
"id": "3347135c-7299-4ed9-87d7-ae4d1afbabc1",
"order": 85
},
{
"id": "8f0deef5-7fcb-4a61-8f84-c4096f9fd14e",
"order": 90,
"parent": "ff60ac2e-8ffd-4c0a-9d76-f3abd5ec3df7"
}
]Response
200Body
{
"code": "OK",
"data": [
{
"id": "0a21c335-76fe-4237-9964-c6d649164a41",
"order": 95,
"parent": null
},
{
"id": "3347135c-7299-4ed9-87d7-ae4d1afbabc1",
"order": 85,
"parent": null
},
{
"id": "8f0deef5-7fcb-4a61-8f84-c4096f9fd14e",
"order": 90,
"parent": "ff60ac2e-8ffd-4c0a-9d76-f3abd5ec3df7"
}
],
"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: 5bd58e57-62e8-4909-b7f4-ed855a968902- id
string(required) Example: 1b996d94-810b-4a70-b5d9-f0b37192029f
Request
Body
{
"title": "title",
"content": "content",
"icon": "π§"
}Response
200Body
{
"code": "OK",
"data": {
"id": "1b996d94-810b-4a70-b5d9-f0b37192029f",
"type": "page",
"created_at": 1781428485.297222,
"updated_at": 1781428485.767618,
"parent": null,
"order": 1,
"created_by": "8b81af20-c7a3-4121-ae79-7b13e34ec242",
"title": "title",
"content": "content",
"icon": "π§",
"page_id": "1b996d94-810b-4a70-b5d9-f0b37192029f",
"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: 5bd58e57-62e8-4909-b7f4-ed855a968902- id
string(required) Example: 1b996d94-810b-4a70-b5d9-f0b37192029f
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: 5bd58e57-62e8-4909-b7f4-ed855a968902- q
string(required) Example: "π§"
Response
200Body
{
"code": "OK",
"data": [
{
"id": "1b996d94-810b-4a70-b5d9-f0b37192029f",
"type": "page",
"created_at": 1781428485.297222,
"updated_at": 1781428485.767618,
"parent": null,
"order": 1,
"created_by": "8b81af20-c7a3-4121-ae79-7b13e34ec242",
"title": "title",
"content": "content",
"icon": "π§",
"children": null,
"attachments": [
{
"id": "509b1731-fbf6-4cc4-93be-0a1b7b2c8d5a",
"created_at": 1781428486.128998,
"updated_at": 1781428486.128998,
"deleted_at": null,
"created_by": "8b81af20-c7a3-4121-ae79-7b13e34ec242",
"path": "pages/1b996d94-810b-4a70-b5d9-f0b37192029f/attachments/7c9632c0-67d1-11f1-a1d7-dd403535d6d8.jpg",
"name": "sample.jpg",
"public": false,
"type": "file",
"url": "https://private-cdn.irish.rechat.com/pages/1b996d94-810b-4a70-b5d9-f0b37192029f/attachments/7c9632c0-67d1-11f1-a1d7-dd403535d6d8.jpg?Expires=1781514886134&Key-Pair-Id=APKAIIRG223GKFAC4MHA&Signature=SRCseY3TBCiyXy~qwkgf9StjavVl7-b3nFaZpXaWvsOYXVFnN7QOQLyPd-JYiWmS9HX3f64vr-FWvcgSM48WUgPYPbXhIv9F1Jz8CCoZq4U4najcdLXLTKLy3KftV7ygyzILTqMm2eSofWgJWSi49u7PK-N90hpvkIsCWEg6W8WcjLT4J0J5nr2swkozbQJBxTBpGPq4p0KHqvR-mTXHOLCnb1F376GpT~vZNT0VZMLrE7xeLv4ujr0iFv0RP2QhdbPMke0OjyTUSdEK6FOpM~PYke5D2zDRcoUoafrKlWWFD0YmyTpQwyijYVHSPYBJf3vP1qYDKK1wt-4W4MOTqw__",
"preview_url": "https://private-cdn.irish.rechat.com/pages/1b996d94-810b-4a70-b5d9-f0b37192029f/attachments/7c9632c0-67d1-11f1-a1d7-dd403535d6d8.jpg?Expires=1781514886134&Key-Pair-Id=APKAIIRG223GKFAC4MHA&Signature=SRCseY3TBCiyXy~qwkgf9StjavVl7-b3nFaZpXaWvsOYXVFnN7QOQLyPd-JYiWmS9HX3f64vr-FWvcgSM48WUgPYPbXhIv9F1Jz8CCoZq4U4najcdLXLTKLy3KftV7ygyzILTqMm2eSofWgJWSi49u7PK-N90hpvkIsCWEg6W8WcjLT4J0J5nr2swkozbQJBxTBpGPq4p0KHqvR-mTXHOLCnb1F376GpT~vZNT0VZMLrE7xeLv4ujr0iFv0RP2QhdbPMke0OjyTUSdEK6FOpM~PYke5D2zDRcoUoafrKlWWFD0YmyTpQwyijYVHSPYBJf3vP1qYDKK1wt-4W4MOTqw__",
"mime": "image/jpeg"
}
],
"page_id": "1b996d94-810b-4a70-b5d9-f0b37192029f",
"ord": "1"
}
],
"info": {
"count": 1,
"total": 0
}
}Response
200Body
{
"code": "OK",
"data": [
{
"id": "ad9e4493-ffef-4882-940f-46d12daf55fc",
"type": "page",
"created_at": 1781428487.146738,
"updated_at": 1781428487.146762,
"parent": null,
"order": 20,
"created_by": "8b81af20-c7a3-4121-ae79-7b13e34ec242",
"title": "Parent One",
"content": "content for Parent One",
"icon": null,
"page_id": "ad9e4493-ffef-4882-940f-46d12daf55fc",
"ord": "1"
},
{
"id": "86a776be-b51c-45e0-888a-df461202c7d6",
"type": "page",
"created_at": 1781428487.417215,
"updated_at": 1781428487.417239,
"parent": null,
"order": 10,
"created_by": "8b81af20-c7a3-4121-ae79-7b13e34ec242",
"title": "Parent Two",
"content": "content for Parent Two",
"icon": null,
"page_id": "86a776be-b51c-45e0-888a-df461202c7d6",
"ord": "2"
},
{
"id": "86dc0a66-033c-47e0-a70e-5132586c6a5b",
"type": "page",
"created_at": 1781428487.931569,
"updated_at": 1781428487.931599,
"parent": "ad9e4493-ffef-4882-940f-46d12daf55fc",
"order": 10,
"created_by": "8b81af20-c7a3-4121-ae79-7b13e34ec242",
"title": "Parent One Child Two",
"content": "content for Parent One Child Two",
"icon": null,
"page_id": "86dc0a66-033c-47e0-a70e-5132586c6a5b",
"ord": "3"
},
{
"id": "8f0deef5-7fcb-4a61-8f84-c4096f9fd14e",
"type": "page",
"created_at": 1781428487.677245,
"updated_at": 1781428487.67727,
"parent": "ff60ac2e-8ffd-4c0a-9d76-f3abd5ec3df7",
"order": 90,
"created_by": "8b81af20-c7a3-4121-ae79-7b13e34ec242",
"title": "Parent One Child One",
"content": "content for Parent One Child One",
"icon": null,
"page_id": "8f0deef5-7fcb-4a61-8f84-c4096f9fd14e",
"ord": "4"
},
{
"id": "0411e1b2-df35-4875-a685-ed5b1b6b2241",
"type": "page",
"created_at": 1781428488.199352,
"updated_at": 1781428488.199388,
"parent": "86a776be-b51c-45e0-888a-df461202c7d6",
"order": 15,
"created_by": "8b81af20-c7a3-4121-ae79-7b13e34ec242",
"title": "Parent Two Child One",
"content": "content for Parent Two Child One",
"icon": null,
"page_id": "0411e1b2-df35-4875-a685-ed5b1b6b2241",
"ord": "5"
}
],
"info": {
"count": 5,
"total": 0
}
}Response
200Body
{
"code": "OK",
"data": [
{
"id": "0a21c335-76fe-4237-9964-c6d649164a41",
"type": "page",
"created_at": 1781428486.21763,
"updated_at": 1781428486.217665,
"parent": null,
"order": 10,
"created_by": "8b81af20-c7a3-4121-ae79-7b13e34ec242",
"title": "First Page",
"content": "content for order 10",
"icon": null,
"page_id": "0a21c335-76fe-4237-9964-c6d649164a41",
"ord": "1"
},
{
"id": "3347135c-7299-4ed9-87d7-ae4d1afbabc1",
"type": "page",
"created_at": 1781428486.501407,
"updated_at": 1781428486.501445,
"parent": null,
"order": 85,
"created_by": "8b81af20-c7a3-4121-ae79-7b13e34ec242",
"title": "Second Page",
"content": "content for order 5",
"icon": null,
"page_id": "3347135c-7299-4ed9-87d7-ae4d1afbabc1",
"ord": "2"
},
{
"id": "ad9e4493-ffef-4882-940f-46d12daf55fc",
"type": "page",
"created_at": 1781428487.146738,
"updated_at": 1781428487.146762,
"parent": null,
"order": 20,
"created_by": "8b81af20-c7a3-4121-ae79-7b13e34ec242",
"title": "Parent One",
"content": "content for Parent One",
"icon": null,
"page_id": "ad9e4493-ffef-4882-940f-46d12daf55fc",
"ord": "3"
}
],
"info": {
"count": 3,
"total": 0
}
}Response
200Body
{
"code": "OK",
"data": [
{
"id": "1b996d94-810b-4a70-b5d9-f0b37192029f",
"type": "page",
"created_at": 1781428485.297222,
"updated_at": 1781428485.767618,
"parent": null,
"order": 15,
"created_by": "8b81af20-c7a3-4121-ae79-7b13e34ec242",
"title": "title",
"content": "content",
"icon": "π§",
"page_id": "1b996d94-810b-4a70-b5d9-f0b37192029f",
"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: 5bd58e57-62e8-4909-b7f4-ed855a968902- id
string(required) Example: 1b996d94-810b-4a70-b5d9-f0b37192029f
Response
200Body
{
"code": "OK",
"data": {
"id": "1b996d94-810b-4a70-b5d9-f0b37192029f",
"type": "page",
"created_at": 1781428485.297222,
"updated_at": 1781428485.767618,
"parent": null,
"order": 1,
"created_by": "8b81af20-c7a3-4121-ae79-7b13e34ec242",
"title": "title",
"content": "content",
"icon": "π§",
"page_id": "1b996d94-810b-4a70-b5d9-f0b37192029f",
"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: 5bd58e57-62e8-4909-b7f4-ed855a968902- id
string(required) Example: 1b996d94-810b-4a70-b5d9-f0b37192029f
Response
200Body
{
"code": "OK",
"data": {
"id": "509b1731-fbf6-4cc4-93be-0a1b7b2c8d5a",
"created_at": 1781428486.128998,
"updated_at": 1781428486.128998,
"deleted_at": null,
"created_by": "8b81af20-c7a3-4121-ae79-7b13e34ec242",
"path": "pages/1b996d94-810b-4a70-b5d9-f0b37192029f/attachments/7c9632c0-67d1-11f1-a1d7-dd403535d6d8.jpg",
"name": "sample.jpg",
"public": false,
"type": "file",
"url": "https://private-cdn.irish.rechat.com/pages/1b996d94-810b-4a70-b5d9-f0b37192029f/attachments/7c9632c0-67d1-11f1-a1d7-dd403535d6d8.jpg?Expires=1781514886134&Key-Pair-Id=APKAIIRG223GKFAC4MHA&Signature=SRCseY3TBCiyXy~qwkgf9StjavVl7-b3nFaZpXaWvsOYXVFnN7QOQLyPd-JYiWmS9HX3f64vr-FWvcgSM48WUgPYPbXhIv9F1Jz8CCoZq4U4najcdLXLTKLy3KftV7ygyzILTqMm2eSofWgJWSi49u7PK-N90hpvkIsCWEg6W8WcjLT4J0J5nr2swkozbQJBxTBpGPq4p0KHqvR-mTXHOLCnb1F376GpT~vZNT0VZMLrE7xeLv4ujr0iFv0RP2QhdbPMke0OjyTUSdEK6FOpM~PYke5D2zDRcoUoafrKlWWFD0YmyTpQwyijYVHSPYBJf3vP1qYDKK1wt-4W4MOTqw__",
"preview_url": "https://private-cdn.irish.rechat.com/pages/1b996d94-810b-4a70-b5d9-f0b37192029f/attachments/7c9632c0-67d1-11f1-a1d7-dd403535d6d8.jpg?Expires=1781514886134&Key-Pair-Id=APKAIIRG223GKFAC4MHA&Signature=SRCseY3TBCiyXy~qwkgf9StjavVl7-b3nFaZpXaWvsOYXVFnN7QOQLyPd-JYiWmS9HX3f64vr-FWvcgSM48WUgPYPbXhIv9F1Jz8CCoZq4U4najcdLXLTKLy3KftV7ygyzILTqMm2eSofWgJWSi49u7PK-N90hpvkIsCWEg6W8WcjLT4J0J5nr2swkozbQJBxTBpGPq4p0KHqvR-mTXHOLCnb1F376GpT~vZNT0VZMLrE7xeLv4ujr0iFv0RP2QhdbPMke0OjyTUSdEK6FOpM~PYke5D2zDRcoUoafrKlWWFD0YmyTpQwyijYVHSPYBJf3vP1qYDKK1wt-4W4MOTqw__",
"mime": "image/jpeg"
}
}