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: 33f3c905-9853-42e5-9619-8b14a8df3001
Request
Body
{
"title": "title",
"order": 1,
"content": "content",
"parent": null,
"icon": "π§"
}Response
200Body
{
"code": "OK",
"data": {
"id": "d8a0152a-357a-4f02-a46b-86a655c3c61d",
"type": "page",
"created_at": 1778872269.133683,
"updated_at": 1778872269.138212,
"parent": null,
"order": 1,
"created_by": "000795ab-6b9c-4c80-8608-8d1d19630b08",
"title": "title",
"content": "content",
"icon": "π§",
"page_id": "d8a0152a-357a-4f02-a46b-86a655c3c61d",
"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: 33f3c905-9853-42e5-9619-8b14a8df3001
Request
Body
[
{
"id": "dd243096-455c-4259-8e39-ca09af70a46b",
"order": 95
},
{
"id": "363fe5c0-33d9-42c9-85ee-0fee1ff16fee",
"order": 85
},
{
"id": "c8f71eb6-322d-4083-a36a-16691d6aa451",
"order": 90,
"parent": "58713765-4cd6-46e3-ac14-15a913d06b11"
}
]Response
200Body
{
"code": "OK",
"data": [
{
"id": "dd243096-455c-4259-8e39-ca09af70a46b",
"order": 95,
"parent": null
},
{
"id": "363fe5c0-33d9-42c9-85ee-0fee1ff16fee",
"order": 85,
"parent": null
},
{
"id": "c8f71eb6-322d-4083-a36a-16691d6aa451",
"order": 90,
"parent": "58713765-4cd6-46e3-ac14-15a913d06b11"
}
],
"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: 33f3c905-9853-42e5-9619-8b14a8df3001- id
string(required) Example: d8a0152a-357a-4f02-a46b-86a655c3c61d
Request
Body
{
"title": "title",
"content": "content",
"icon": "π§"
}Response
200Body
{
"code": "OK",
"data": {
"id": "d8a0152a-357a-4f02-a46b-86a655c3c61d",
"type": "page",
"created_at": 1778872269.133683,
"updated_at": 1778872269.95973,
"parent": null,
"order": 1,
"created_by": "000795ab-6b9c-4c80-8608-8d1d19630b08",
"title": "title",
"content": "content",
"icon": "π§",
"page_id": "d8a0152a-357a-4f02-a46b-86a655c3c61d",
"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: 33f3c905-9853-42e5-9619-8b14a8df3001- id
string(required) Example: d8a0152a-357a-4f02-a46b-86a655c3c61d
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: 33f3c905-9853-42e5-9619-8b14a8df3001- q
string(required) Example: "π§"
Response
200Body
{
"code": "OK",
"data": [
{
"id": "d8a0152a-357a-4f02-a46b-86a655c3c61d",
"type": "page",
"created_at": 1778872269.133683,
"updated_at": 1778872269.95973,
"parent": null,
"order": 1,
"created_by": "000795ab-6b9c-4c80-8608-8d1d19630b08",
"title": "title",
"content": "content",
"icon": "π§",
"children": null,
"attachments": [
{
"id": "beb43a2c-8a87-40a7-aae7-dbf5d7c22e8e",
"created_at": 1778872270.61349,
"updated_at": 1778872270.61349,
"deleted_at": null,
"created_by": "000795ab-6b9c-4c80-8608-8d1d19630b08",
"path": "pages/d8a0152a-357a-4f02-a46b-86a655c3c61d/attachments/d568a100-5091-11f1-8248-cf8ab660e2ca.jpg",
"name": "sample.jpg",
"public": false,
"type": "file",
"url": "https://private-cdn.irish.rechat.com/pages/d8a0152a-357a-4f02-a46b-86a655c3c61d/attachments/d568a100-5091-11f1-8248-cf8ab660e2ca.jpg?Expires=1778958670617&Key-Pair-Id=APKAIIRG223GKFAC4MHA&Signature=ABv5jmCJ9F1K7L73QnMoe2dWqvQnbFHx5YGTodyavp5Pr4~j3DTR-Dj02hw-Th3hHg0cTedU3YUvJwhiBvQ84Bk8ry0Njc6S1GBQfcS77OoQ30OlENpBKFjepg6Nscw2W4Ii0fRaroBgaSPbFPwALvgurWW8fRyua3fYAi8~qYTGXhPxnKOhd8mHmCyzTHBkLtCAWA8I4kBJeavRR0X2zNXpOUWSuCl4frhTGGOkKerla3Kf7fPvObCtKIrcL~AZg-Q20bM3OJjl6E690PBmvGpKIL-x21VwixRq5P1rc7Bu7DVPVRau1va5agjk9iXBmrv6gIXXjqv1kwoNp2TmQg__",
"preview_url": "https://private-cdn.irish.rechat.com/pages/d8a0152a-357a-4f02-a46b-86a655c3c61d/attachments/d568a100-5091-11f1-8248-cf8ab660e2ca.jpg?Expires=1778958670617&Key-Pair-Id=APKAIIRG223GKFAC4MHA&Signature=ABv5jmCJ9F1K7L73QnMoe2dWqvQnbFHx5YGTodyavp5Pr4~j3DTR-Dj02hw-Th3hHg0cTedU3YUvJwhiBvQ84Bk8ry0Njc6S1GBQfcS77OoQ30OlENpBKFjepg6Nscw2W4Ii0fRaroBgaSPbFPwALvgurWW8fRyua3fYAi8~qYTGXhPxnKOhd8mHmCyzTHBkLtCAWA8I4kBJeavRR0X2zNXpOUWSuCl4frhTGGOkKerla3Kf7fPvObCtKIrcL~AZg-Q20bM3OJjl6E690PBmvGpKIL-x21VwixRq5P1rc7Bu7DVPVRau1va5agjk9iXBmrv6gIXXjqv1kwoNp2TmQg__",
"mime": "image/jpeg"
}
],
"page_id": "d8a0152a-357a-4f02-a46b-86a655c3c61d",
"ord": "1"
}
],
"info": {
"count": 1,
"total": 0
}
}Response
200Body
{
"code": "OK",
"data": [
{
"id": "47391314-18da-4e32-b11c-792ee3178050",
"type": "page",
"created_at": 1778872271.852654,
"updated_at": 1778872271.85271,
"parent": null,
"order": 20,
"created_by": "000795ab-6b9c-4c80-8608-8d1d19630b08",
"title": "Parent One",
"content": "content for Parent One",
"icon": null,
"page_id": "47391314-18da-4e32-b11c-792ee3178050",
"ord": "1"
},
{
"id": "b43e9074-b183-4c9e-9d7a-5ccd927e87a7",
"type": "page",
"created_at": 1778872272.183469,
"updated_at": 1778872272.183519,
"parent": null,
"order": 10,
"created_by": "000795ab-6b9c-4c80-8608-8d1d19630b08",
"title": "Parent Two",
"content": "content for Parent Two",
"icon": null,
"page_id": "b43e9074-b183-4c9e-9d7a-5ccd927e87a7",
"ord": "2"
},
{
"id": "b7a979bd-ce6d-4a09-80c5-df74c798fed2",
"type": "page",
"created_at": 1778872272.751414,
"updated_at": 1778872272.751455,
"parent": "47391314-18da-4e32-b11c-792ee3178050",
"order": 10,
"created_by": "000795ab-6b9c-4c80-8608-8d1d19630b08",
"title": "Parent One Child Two",
"content": "content for Parent One Child Two",
"icon": null,
"page_id": "b7a979bd-ce6d-4a09-80c5-df74c798fed2",
"ord": "3"
},
{
"id": "c8f71eb6-322d-4083-a36a-16691d6aa451",
"type": "page",
"created_at": 1778872272.494402,
"updated_at": 1778872272.494444,
"parent": "58713765-4cd6-46e3-ac14-15a913d06b11",
"order": 90,
"created_by": "000795ab-6b9c-4c80-8608-8d1d19630b08",
"title": "Parent One Child One",
"content": "content for Parent One Child One",
"icon": null,
"page_id": "c8f71eb6-322d-4083-a36a-16691d6aa451",
"ord": "4"
},
{
"id": "1115de6b-1bc5-4f3e-8072-80210ca44bf3",
"type": "page",
"created_at": 1778872273.031279,
"updated_at": 1778872273.031318,
"parent": "b43e9074-b183-4c9e-9d7a-5ccd927e87a7",
"order": 15,
"created_by": "000795ab-6b9c-4c80-8608-8d1d19630b08",
"title": "Parent Two Child One",
"content": "content for Parent Two Child One",
"icon": null,
"page_id": "1115de6b-1bc5-4f3e-8072-80210ca44bf3",
"ord": "5"
}
],
"info": {
"count": 5,
"total": 0
}
}Response
200Body
{
"code": "OK",
"data": [
{
"id": "dd243096-455c-4259-8e39-ca09af70a46b",
"type": "page",
"created_at": 1778872270.695933,
"updated_at": 1778872270.695981,
"parent": null,
"order": 10,
"created_by": "000795ab-6b9c-4c80-8608-8d1d19630b08",
"title": "First Page",
"content": "content for order 10",
"icon": null,
"page_id": "dd243096-455c-4259-8e39-ca09af70a46b",
"ord": "1"
},
{
"id": "363fe5c0-33d9-42c9-85ee-0fee1ff16fee",
"type": "page",
"created_at": 1778872271.060363,
"updated_at": 1778872271.060414,
"parent": null,
"order": 85,
"created_by": "000795ab-6b9c-4c80-8608-8d1d19630b08",
"title": "Second Page",
"content": "content for order 5",
"icon": null,
"page_id": "363fe5c0-33d9-42c9-85ee-0fee1ff16fee",
"ord": "2"
},
{
"id": "47391314-18da-4e32-b11c-792ee3178050",
"type": "page",
"created_at": 1778872271.852654,
"updated_at": 1778872271.85271,
"parent": null,
"order": 20,
"created_by": "000795ab-6b9c-4c80-8608-8d1d19630b08",
"title": "Parent One",
"content": "content for Parent One",
"icon": null,
"page_id": "47391314-18da-4e32-b11c-792ee3178050",
"ord": "3"
}
],
"info": {
"count": 3,
"total": 0
}
}Response
200Body
{
"code": "OK",
"data": [
{
"id": "d8a0152a-357a-4f02-a46b-86a655c3c61d",
"type": "page",
"created_at": 1778872269.133683,
"updated_at": 1778872269.95973,
"parent": null,
"order": 15,
"created_by": "000795ab-6b9c-4c80-8608-8d1d19630b08",
"title": "title",
"content": "content",
"icon": "π§",
"page_id": "d8a0152a-357a-4f02-a46b-86a655c3c61d",
"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: 33f3c905-9853-42e5-9619-8b14a8df3001- id
string(required) Example: d8a0152a-357a-4f02-a46b-86a655c3c61d
Response
200Body
{
"code": "OK",
"data": {
"id": "d8a0152a-357a-4f02-a46b-86a655c3c61d",
"type": "page",
"created_at": 1778872269.133683,
"updated_at": 1778872269.95973,
"parent": null,
"order": 1,
"created_by": "000795ab-6b9c-4c80-8608-8d1d19630b08",
"title": "title",
"content": "content",
"icon": "π§",
"page_id": "d8a0152a-357a-4f02-a46b-86a655c3c61d",
"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: 33f3c905-9853-42e5-9619-8b14a8df3001- id
string(required) Example: d8a0152a-357a-4f02-a46b-86a655c3c61d
Response
200Body
{
"code": "OK",
"data": {
"id": "beb43a2c-8a87-40a7-aae7-dbf5d7c22e8e",
"created_at": 1778872270.61349,
"updated_at": 1778872270.61349,
"deleted_at": null,
"created_by": "000795ab-6b9c-4c80-8608-8d1d19630b08",
"path": "pages/d8a0152a-357a-4f02-a46b-86a655c3c61d/attachments/d568a100-5091-11f1-8248-cf8ab660e2ca.jpg",
"name": "sample.jpg",
"public": false,
"type": "file",
"url": "https://private-cdn.irish.rechat.com/pages/d8a0152a-357a-4f02-a46b-86a655c3c61d/attachments/d568a100-5091-11f1-8248-cf8ab660e2ca.jpg?Expires=1778958670617&Key-Pair-Id=APKAIIRG223GKFAC4MHA&Signature=ABv5jmCJ9F1K7L73QnMoe2dWqvQnbFHx5YGTodyavp5Pr4~j3DTR-Dj02hw-Th3hHg0cTedU3YUvJwhiBvQ84Bk8ry0Njc6S1GBQfcS77OoQ30OlENpBKFjepg6Nscw2W4Ii0fRaroBgaSPbFPwALvgurWW8fRyua3fYAi8~qYTGXhPxnKOhd8mHmCyzTHBkLtCAWA8I4kBJeavRR0X2zNXpOUWSuCl4frhTGGOkKerla3Kf7fPvObCtKIrcL~AZg-Q20bM3OJjl6E690PBmvGpKIL-x21VwixRq5P1rc7Bu7DVPVRau1va5agjk9iXBmrv6gIXXjqv1kwoNp2TmQg__",
"preview_url": "https://private-cdn.irish.rechat.com/pages/d8a0152a-357a-4f02-a46b-86a655c3c61d/attachments/d568a100-5091-11f1-8248-cf8ab660e2ca.jpg?Expires=1778958670617&Key-Pair-Id=APKAIIRG223GKFAC4MHA&Signature=ABv5jmCJ9F1K7L73QnMoe2dWqvQnbFHx5YGTodyavp5Pr4~j3DTR-Dj02hw-Th3hHg0cTedU3YUvJwhiBvQ84Bk8ry0Njc6S1GBQfcS77OoQ30OlENpBKFjepg6Nscw2W4Ii0fRaroBgaSPbFPwALvgurWW8fRyua3fYAi8~qYTGXhPxnKOhd8mHmCyzTHBkLtCAWA8I4kBJeavRR0X2zNXpOUWSuCl4frhTGGOkKerla3Kf7fPvObCtKIrcL~AZg-Q20bM3OJjl6E690PBmvGpKIL-x21VwixRq5P1rc7Bu7DVPVRau1va5agjk9iXBmrv6gIXXjqv1kwoNp2TmQg__",
"mime": "image/jpeg"
}
}