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: e2b8a7bb-6b1f-4954-a320-de50d4aad74a
Request
Body
{
"title": "title",
"order": 1,
"content": "content",
"parent": null,
"icon": "π§"
}Response
200Body
{
"code": "OK",
"data": {
"id": "9de5c33a-ee31-4910-ad3f-730f31808d34",
"type": "page",
"created_at": 1795716934.508001,
"updated_at": 1795716934.511295,
"parent": null,
"order": 1,
"created_by": "7f51614a-2b5b-41fe-b34f-2c71198b29ea",
"title": "title",
"content": "content",
"icon": "π§",
"page_id": "9de5c33a-ee31-4910-ad3f-730f31808d34",
"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: e2b8a7bb-6b1f-4954-a320-de50d4aad74a
Request
Body
[
{
"id": "0b500e30-3751-48bc-a1b0-c2900408e586",
"order": 95
},
{
"id": "946e7ae0-8452-4c21-98e6-547a2fbb4c55",
"order": 85
},
{
"id": "7e6e2212-3f00-4468-b1e8-87e83fc588c7",
"order": 90,
"parent": "7df608c9-74b2-4fae-9021-748bc3ecbc49"
}
]Response
200Body
{
"code": "OK",
"data": [
{
"id": "0b500e30-3751-48bc-a1b0-c2900408e586",
"order": 95,
"parent": null
},
{
"id": "946e7ae0-8452-4c21-98e6-547a2fbb4c55",
"order": 85,
"parent": null
},
{
"id": "7e6e2212-3f00-4468-b1e8-87e83fc588c7",
"order": 90,
"parent": "7df608c9-74b2-4fae-9021-748bc3ecbc49"
}
],
"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: e2b8a7bb-6b1f-4954-a320-de50d4aad74a- id
string(required) Example: 9de5c33a-ee31-4910-ad3f-730f31808d34
Request
Body
{
"title": "title",
"content": "content",
"icon": "π§"
}Response
200Body
{
"code": "OK",
"data": {
"id": "9de5c33a-ee31-4910-ad3f-730f31808d34",
"type": "page",
"created_at": 1795716934.508001,
"updated_at": 1795716934.741295,
"parent": null,
"order": 1,
"created_by": "7f51614a-2b5b-41fe-b34f-2c71198b29ea",
"title": "title",
"content": "content",
"icon": "π§",
"page_id": "9de5c33a-ee31-4910-ad3f-730f31808d34",
"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: e2b8a7bb-6b1f-4954-a320-de50d4aad74a- id
string(required) Example: 9de5c33a-ee31-4910-ad3f-730f31808d34
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: e2b8a7bb-6b1f-4954-a320-de50d4aad74a- q
string(required) Example: "π§"
Response
200Body
{
"code": "OK",
"data": [
{
"id": "9de5c33a-ee31-4910-ad3f-730f31808d34",
"type": "page",
"created_at": 1795716934.508001,
"updated_at": 1795716934.741295,
"parent": null,
"order": 1,
"created_by": "7f51614a-2b5b-41fe-b34f-2c71198b29ea",
"title": "title",
"content": "content",
"icon": "π§",
"children": null,
"attachments": [
{
"id": "c6b94c67-060b-4622-a964-65b94beb94f7",
"created_at": 1795716934.948494,
"updated_at": 1795716934.948494,
"deleted_at": null,
"created_by": "7f51614a-2b5b-41fe-b34f-2c71198b29ea",
"path": "pages/9de5c33a-ee31-4910-ad3f-730f31808d34/attachments/5fc06730-e9c5-11f1-8b13-dff257259151.jpg",
"name": "sample.jpg",
"public": false,
"type": "file",
"url": "https://private-cdn.irish.rechat.com/pages/9de5c33a-ee31-4910-ad3f-730f31808d34/attachments/5fc06730-e9c5-11f1-8b13-dff257259151.jpg?Expires=1795803334949&Key-Pair-Id=APKAIIRG223GKFAC4MHA&Signature=h~mpAGVwPypErqm-0Ex4fNACn7~yDEmnBPHYXyBY9Ywp24vju1KxhkA9EbkAiwqLEM8grAwJ8h9lcZj61oKM7-ra1UgJs-cSzrhXDgQ9QHGVTQBKx31PKKEKpSgZ9v98czteYwOoRtlf5TlAPttqh-oo5o9iedug2tLexyzUC4816FitHwAyZTj0OhgOnD3iMfXSw4aDBkLpSPQUPUfe6G5RZ5wWPmcCfvhWKbC1V3xjXbLOyHcKSYeb0FQGiqRn7KOi2VFnSnIA3Jb9jqjRKG53nU1Yyopqp2eTdvkkvz~n4f7Icsxh9bTfzK2ZTyCbS-uT46tDRUQ8R37s3ZGO2w__",
"preview_url": "https://private-cdn.irish.rechat.com/pages/9de5c33a-ee31-4910-ad3f-730f31808d34/attachments/5fc06730-e9c5-11f1-8b13-dff257259151.jpg?Expires=1795803334949&Key-Pair-Id=APKAIIRG223GKFAC4MHA&Signature=h~mpAGVwPypErqm-0Ex4fNACn7~yDEmnBPHYXyBY9Ywp24vju1KxhkA9EbkAiwqLEM8grAwJ8h9lcZj61oKM7-ra1UgJs-cSzrhXDgQ9QHGVTQBKx31PKKEKpSgZ9v98czteYwOoRtlf5TlAPttqh-oo5o9iedug2tLexyzUC4816FitHwAyZTj0OhgOnD3iMfXSw4aDBkLpSPQUPUfe6G5RZ5wWPmcCfvhWKbC1V3xjXbLOyHcKSYeb0FQGiqRn7KOi2VFnSnIA3Jb9jqjRKG53nU1Yyopqp2eTdvkkvz~n4f7Icsxh9bTfzK2ZTyCbS-uT46tDRUQ8R37s3ZGO2w__",
"mime": "image/jpeg"
}
],
"page_id": "9de5c33a-ee31-4910-ad3f-730f31808d34",
"ord": "1"
}
],
"info": {
"count": 1,
"total": 0
}
}Response
200Body
{
"code": "OK",
"data": [
{
"id": "8c82205a-38a1-415f-ace9-c63f97a16247",
"type": "page",
"created_at": 1795716935.615334,
"updated_at": 1795716935.615361,
"parent": null,
"order": 20,
"created_by": "7f51614a-2b5b-41fe-b34f-2c71198b29ea",
"title": "Parent One",
"content": "content for Parent One",
"icon": null,
"page_id": "8c82205a-38a1-415f-ace9-c63f97a16247",
"ord": "1"
},
{
"id": "268e22a7-9f7b-4488-bef4-e1e1f9cea56e",
"type": "page",
"created_at": 1795716935.799941,
"updated_at": 1795716935.799965,
"parent": null,
"order": 10,
"created_by": "7f51614a-2b5b-41fe-b34f-2c71198b29ea",
"title": "Parent Two",
"content": "content for Parent Two",
"icon": null,
"page_id": "268e22a7-9f7b-4488-bef4-e1e1f9cea56e",
"ord": "2"
},
{
"id": "cff0c339-e55f-463a-ad81-0f970cf572fd",
"type": "page",
"created_at": 1795716936.175941,
"updated_at": 1795716936.175962,
"parent": "8c82205a-38a1-415f-ace9-c63f97a16247",
"order": 10,
"created_by": "7f51614a-2b5b-41fe-b34f-2c71198b29ea",
"title": "Parent One Child Two",
"content": "content for Parent One Child Two",
"icon": null,
"page_id": "cff0c339-e55f-463a-ad81-0f970cf572fd",
"ord": "3"
},
{
"id": "7e6e2212-3f00-4468-b1e8-87e83fc588c7",
"type": "page",
"created_at": 1795716935.972654,
"updated_at": 1795716935.972676,
"parent": "7df608c9-74b2-4fae-9021-748bc3ecbc49",
"order": 90,
"created_by": "7f51614a-2b5b-41fe-b34f-2c71198b29ea",
"title": "Parent One Child One",
"content": "content for Parent One Child One",
"icon": null,
"page_id": "7e6e2212-3f00-4468-b1e8-87e83fc588c7",
"ord": "4"
},
{
"id": "dc39e9f1-9bc7-4a2b-919e-21379c6e5d0a",
"type": "page",
"created_at": 1795716936.370298,
"updated_at": 1795716936.37032,
"parent": "268e22a7-9f7b-4488-bef4-e1e1f9cea56e",
"order": 15,
"created_by": "7f51614a-2b5b-41fe-b34f-2c71198b29ea",
"title": "Parent Two Child One",
"content": "content for Parent Two Child One",
"icon": null,
"page_id": "dc39e9f1-9bc7-4a2b-919e-21379c6e5d0a",
"ord": "5"
}
],
"info": {
"count": 5,
"total": 0
}
}Response
200Body
{
"code": "OK",
"data": [
{
"id": "0b500e30-3751-48bc-a1b0-c2900408e586",
"type": "page",
"created_at": 1795716934.985296,
"updated_at": 1795716934.985316,
"parent": null,
"order": 10,
"created_by": "7f51614a-2b5b-41fe-b34f-2c71198b29ea",
"title": "First Page",
"content": "content for order 10",
"icon": null,
"page_id": "0b500e30-3751-48bc-a1b0-c2900408e586",
"ord": "1"
},
{
"id": "946e7ae0-8452-4c21-98e6-547a2fbb4c55",
"type": "page",
"created_at": 1795716935.189787,
"updated_at": 1795716935.189807,
"parent": null,
"order": 85,
"created_by": "7f51614a-2b5b-41fe-b34f-2c71198b29ea",
"title": "Second Page",
"content": "content for order 5",
"icon": null,
"page_id": "946e7ae0-8452-4c21-98e6-547a2fbb4c55",
"ord": "2"
},
{
"id": "8c82205a-38a1-415f-ace9-c63f97a16247",
"type": "page",
"created_at": 1795716935.615334,
"updated_at": 1795716935.615361,
"parent": null,
"order": 20,
"created_by": "7f51614a-2b5b-41fe-b34f-2c71198b29ea",
"title": "Parent One",
"content": "content for Parent One",
"icon": null,
"page_id": "8c82205a-38a1-415f-ace9-c63f97a16247",
"ord": "3"
}
],
"info": {
"count": 3,
"total": 0
}
}Response
200Body
{
"code": "OK",
"data": [
{
"id": "9de5c33a-ee31-4910-ad3f-730f31808d34",
"type": "page",
"created_at": 1795716934.508001,
"updated_at": 1795716934.741295,
"parent": null,
"order": 15,
"created_by": "7f51614a-2b5b-41fe-b34f-2c71198b29ea",
"title": "title",
"content": "content",
"icon": "π§",
"page_id": "9de5c33a-ee31-4910-ad3f-730f31808d34",
"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: e2b8a7bb-6b1f-4954-a320-de50d4aad74a- id
string(required) Example: 9de5c33a-ee31-4910-ad3f-730f31808d34
Response
200Body
{
"code": "OK",
"data": {
"id": "9de5c33a-ee31-4910-ad3f-730f31808d34",
"type": "page",
"created_at": 1795716934.508001,
"updated_at": 1795716934.741295,
"parent": null,
"order": 1,
"created_by": "7f51614a-2b5b-41fe-b34f-2c71198b29ea",
"title": "title",
"content": "content",
"icon": "π§",
"page_id": "9de5c33a-ee31-4910-ad3f-730f31808d34",
"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: e2b8a7bb-6b1f-4954-a320-de50d4aad74a- id
string(required) Example: 9de5c33a-ee31-4910-ad3f-730f31808d34
Response
200Body
{
"code": "OK",
"data": {
"id": "c6b94c67-060b-4622-a964-65b94beb94f7",
"created_at": 1795716934.948494,
"updated_at": 1795716934.948494,
"deleted_at": null,
"created_by": "7f51614a-2b5b-41fe-b34f-2c71198b29ea",
"path": "pages/9de5c33a-ee31-4910-ad3f-730f31808d34/attachments/5fc06730-e9c5-11f1-8b13-dff257259151.jpg",
"name": "sample.jpg",
"public": false,
"type": "file",
"url": "https://private-cdn.irish.rechat.com/pages/9de5c33a-ee31-4910-ad3f-730f31808d34/attachments/5fc06730-e9c5-11f1-8b13-dff257259151.jpg?Expires=1795803334949&Key-Pair-Id=APKAIIRG223GKFAC4MHA&Signature=h~mpAGVwPypErqm-0Ex4fNACn7~yDEmnBPHYXyBY9Ywp24vju1KxhkA9EbkAiwqLEM8grAwJ8h9lcZj61oKM7-ra1UgJs-cSzrhXDgQ9QHGVTQBKx31PKKEKpSgZ9v98czteYwOoRtlf5TlAPttqh-oo5o9iedug2tLexyzUC4816FitHwAyZTj0OhgOnD3iMfXSw4aDBkLpSPQUPUfe6G5RZ5wWPmcCfvhWKbC1V3xjXbLOyHcKSYeb0FQGiqRn7KOi2VFnSnIA3Jb9jqjRKG53nU1Yyopqp2eTdvkkvz~n4f7Icsxh9bTfzK2ZTyCbS-uT46tDRUQ8R37s3ZGO2w__",
"preview_url": "https://private-cdn.irish.rechat.com/pages/9de5c33a-ee31-4910-ad3f-730f31808d34/attachments/5fc06730-e9c5-11f1-8b13-dff257259151.jpg?Expires=1795803334949&Key-Pair-Id=APKAIIRG223GKFAC4MHA&Signature=h~mpAGVwPypErqm-0Ex4fNACn7~yDEmnBPHYXyBY9Ywp24vju1KxhkA9EbkAiwqLEM8grAwJ8h9lcZj61oKM7-ra1UgJs-cSzrhXDgQ9QHGVTQBKx31PKKEKpSgZ9v98czteYwOoRtlf5TlAPttqh-oo5o9iedug2tLexyzUC4816FitHwAyZTj0OhgOnD3iMfXSw4aDBkLpSPQUPUfe6G5RZ5wWPmcCfvhWKbC1V3xjXbLOyHcKSYeb0FQGiqRn7KOi2VFnSnIA3Jb9jqjRKG53nU1Yyopqp2eTdvkkvz~n4f7Icsxh9bTfzK2ZTyCbS-uT46tDRUQ8R37s3ZGO2w__",
"mime": "image/jpeg"
}
}