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: 9ac1dc32-13c2-49cd-bb9e-1a73ea60f253
Request
Body
{
"title": "title",
"order": 1,
"content": "content",
"parent": null,
"icon": "π§"
}Response
200Body
{
"code": "OK",
"data": {
"id": "2e494752-b055-44b5-a3e8-1f6055ba3e33",
"type": "page",
"created_at": 1787792154.879805,
"updated_at": 1787792154.887644,
"parent": null,
"order": 1,
"created_by": "d47464fa-4d01-411a-8036-690c7b7904ec",
"title": "title",
"content": "content",
"icon": "π§",
"page_id": "2e494752-b055-44b5-a3e8-1f6055ba3e33",
"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: 9ac1dc32-13c2-49cd-bb9e-1a73ea60f253
Request
Body
[
{
"id": "e077d048-130a-438e-9f88-8f2c98f6f7e6",
"order": 95
},
{
"id": "a125e6ea-a2c7-4f25-9a79-ce9087fb086f",
"order": 85
},
{
"id": "1242ddc2-9fea-4cfa-832d-904fcb197f17",
"order": 90,
"parent": "9f9ebd8f-56a7-40ec-b3ac-adbab07d5316"
}
]Response
200Body
{
"code": "OK",
"data": [
{
"id": "e077d048-130a-438e-9f88-8f2c98f6f7e6",
"order": 95,
"parent": null
},
{
"id": "a125e6ea-a2c7-4f25-9a79-ce9087fb086f",
"order": 85,
"parent": null
},
{
"id": "1242ddc2-9fea-4cfa-832d-904fcb197f17",
"order": 90,
"parent": "9f9ebd8f-56a7-40ec-b3ac-adbab07d5316"
}
],
"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: 9ac1dc32-13c2-49cd-bb9e-1a73ea60f253- id
string(required) Example: 2e494752-b055-44b5-a3e8-1f6055ba3e33
Request
Body
{
"title": "title",
"content": "content",
"icon": "π§"
}Response
200Body
{
"code": "OK",
"data": {
"id": "2e494752-b055-44b5-a3e8-1f6055ba3e33",
"type": "page",
"created_at": 1787792154.879805,
"updated_at": 1787792155.264359,
"parent": null,
"order": 1,
"created_by": "d47464fa-4d01-411a-8036-690c7b7904ec",
"title": "title",
"content": "content",
"icon": "π§",
"page_id": "2e494752-b055-44b5-a3e8-1f6055ba3e33",
"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: 9ac1dc32-13c2-49cd-bb9e-1a73ea60f253- id
string(required) Example: 2e494752-b055-44b5-a3e8-1f6055ba3e33
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: 9ac1dc32-13c2-49cd-bb9e-1a73ea60f253- q
string(required) Example: "π§"
Response
200Body
{
"code": "OK",
"data": [
{
"id": "2e494752-b055-44b5-a3e8-1f6055ba3e33",
"type": "page",
"created_at": 1787792154.879805,
"updated_at": 1787792155.264359,
"parent": null,
"order": 1,
"created_by": "d47464fa-4d01-411a-8036-690c7b7904ec",
"title": "title",
"content": "content",
"icon": "π§",
"children": null,
"attachments": [
{
"id": "27ba8726-8bdf-4a59-a19c-d6194eccc44a",
"created_at": 1787792155.53162,
"updated_at": 1787792155.53162,
"deleted_at": null,
"created_by": "d47464fa-4d01-411a-8036-690c7b7904ec",
"path": "pages/2e494752-b055-44b5-a3e8-1f6055ba3e33/attachments/0f213080-a1b2-11f1-811e-f93126d9eb55.jpg",
"name": "sample.jpg",
"public": false,
"type": "file",
"url": "https://private-cdn.irish.rechat.com/pages/2e494752-b055-44b5-a3e8-1f6055ba3e33/attachments/0f213080-a1b2-11f1-811e-f93126d9eb55.jpg?Expires=1787878555537&Key-Pair-Id=APKAIIRG223GKFAC4MHA&Signature=K00N1AGDLv-FQSREnBlRD3qOivH98O0zCob7Oipz5fGDpdm~S0ALVsTDu4gYIPWyNkUxnTZXa1snZ1SQcizb2Zg7WwMhLcKNtVTn2FaFBSYZtKmo580SDMKPrT24FB-an8rqjumoNr3-1LLkXsAD~FU5S03DJ~YKlogN6R0XGQukJhJGcRAomCj-qWhwoyyxpWN1Cfa3hdXYcb5w~lpSBpVGa179U175LxEK56qfgg-k3jQgtZ1mbWmQz1nWwCGxSNyq5x46CHWdjyGfN1GtXroHwrWEgicz65mSi7b-Nz6R-Ltb30VNxoBQLZoSBEz7cjhAal58acHCOrrOKROusg__",
"preview_url": "https://private-cdn.irish.rechat.com/pages/2e494752-b055-44b5-a3e8-1f6055ba3e33/attachments/0f213080-a1b2-11f1-811e-f93126d9eb55.jpg?Expires=1787878555537&Key-Pair-Id=APKAIIRG223GKFAC4MHA&Signature=K00N1AGDLv-FQSREnBlRD3qOivH98O0zCob7Oipz5fGDpdm~S0ALVsTDu4gYIPWyNkUxnTZXa1snZ1SQcizb2Zg7WwMhLcKNtVTn2FaFBSYZtKmo580SDMKPrT24FB-an8rqjumoNr3-1LLkXsAD~FU5S03DJ~YKlogN6R0XGQukJhJGcRAomCj-qWhwoyyxpWN1Cfa3hdXYcb5w~lpSBpVGa179U175LxEK56qfgg-k3jQgtZ1mbWmQz1nWwCGxSNyq5x46CHWdjyGfN1GtXroHwrWEgicz65mSi7b-Nz6R-Ltb30VNxoBQLZoSBEz7cjhAal58acHCOrrOKROusg__",
"mime": "image/jpeg"
}
],
"page_id": "2e494752-b055-44b5-a3e8-1f6055ba3e33",
"ord": "1"
}
],
"info": {
"count": 1,
"total": 0
}
}Response
200Body
{
"code": "OK",
"data": [
{
"id": "f3c1a5e9-5291-411e-9537-c51c275c311a",
"type": "page",
"created_at": 1787792156.712069,
"updated_at": 1787792156.712107,
"parent": null,
"order": 20,
"created_by": "d47464fa-4d01-411a-8036-690c7b7904ec",
"title": "Parent One",
"content": "content for Parent One",
"icon": null,
"page_id": "f3c1a5e9-5291-411e-9537-c51c275c311a",
"ord": "1"
},
{
"id": "7040e0f6-7527-42a5-97c0-80288b95f3ce",
"type": "page",
"created_at": 1787792156.979181,
"updated_at": 1787792156.979219,
"parent": null,
"order": 10,
"created_by": "d47464fa-4d01-411a-8036-690c7b7904ec",
"title": "Parent Two",
"content": "content for Parent Two",
"icon": null,
"page_id": "7040e0f6-7527-42a5-97c0-80288b95f3ce",
"ord": "2"
},
{
"id": "2ba74bc8-37d3-4aae-8b49-66dba7187698",
"type": "page",
"created_at": 1787792157.468645,
"updated_at": 1787792157.468684,
"parent": "f3c1a5e9-5291-411e-9537-c51c275c311a",
"order": 10,
"created_by": "d47464fa-4d01-411a-8036-690c7b7904ec",
"title": "Parent One Child Two",
"content": "content for Parent One Child Two",
"icon": null,
"page_id": "2ba74bc8-37d3-4aae-8b49-66dba7187698",
"ord": "3"
},
{
"id": "1242ddc2-9fea-4cfa-832d-904fcb197f17",
"type": "page",
"created_at": 1787792157.245328,
"updated_at": 1787792157.245388,
"parent": "9f9ebd8f-56a7-40ec-b3ac-adbab07d5316",
"order": 90,
"created_by": "d47464fa-4d01-411a-8036-690c7b7904ec",
"title": "Parent One Child One",
"content": "content for Parent One Child One",
"icon": null,
"page_id": "1242ddc2-9fea-4cfa-832d-904fcb197f17",
"ord": "4"
},
{
"id": "0aa4f3cb-5e65-44e8-8598-739784290e9b",
"type": "page",
"created_at": 1787792157.748785,
"updated_at": 1787792157.748811,
"parent": "7040e0f6-7527-42a5-97c0-80288b95f3ce",
"order": 15,
"created_by": "d47464fa-4d01-411a-8036-690c7b7904ec",
"title": "Parent Two Child One",
"content": "content for Parent Two Child One",
"icon": null,
"page_id": "0aa4f3cb-5e65-44e8-8598-739784290e9b",
"ord": "5"
}
],
"info": {
"count": 5,
"total": 0
}
}Response
200Body
{
"code": "OK",
"data": [
{
"id": "e077d048-130a-438e-9f88-8f2c98f6f7e6",
"type": "page",
"created_at": 1787792155.640261,
"updated_at": 1787792155.6403,
"parent": null,
"order": 10,
"created_by": "d47464fa-4d01-411a-8036-690c7b7904ec",
"title": "First Page",
"content": "content for order 10",
"icon": null,
"page_id": "e077d048-130a-438e-9f88-8f2c98f6f7e6",
"ord": "1"
},
{
"id": "a125e6ea-a2c7-4f25-9a79-ce9087fb086f",
"type": "page",
"created_at": 1787792155.867408,
"updated_at": 1787792155.867445,
"parent": null,
"order": 85,
"created_by": "d47464fa-4d01-411a-8036-690c7b7904ec",
"title": "Second Page",
"content": "content for order 5",
"icon": null,
"page_id": "a125e6ea-a2c7-4f25-9a79-ce9087fb086f",
"ord": "2"
},
{
"id": "f3c1a5e9-5291-411e-9537-c51c275c311a",
"type": "page",
"created_at": 1787792156.712069,
"updated_at": 1787792156.712107,
"parent": null,
"order": 20,
"created_by": "d47464fa-4d01-411a-8036-690c7b7904ec",
"title": "Parent One",
"content": "content for Parent One",
"icon": null,
"page_id": "f3c1a5e9-5291-411e-9537-c51c275c311a",
"ord": "3"
}
],
"info": {
"count": 3,
"total": 0
}
}Response
200Body
{
"code": "OK",
"data": [
{
"id": "2e494752-b055-44b5-a3e8-1f6055ba3e33",
"type": "page",
"created_at": 1787792154.879805,
"updated_at": 1787792155.264359,
"parent": null,
"order": 15,
"created_by": "d47464fa-4d01-411a-8036-690c7b7904ec",
"title": "title",
"content": "content",
"icon": "π§",
"page_id": "2e494752-b055-44b5-a3e8-1f6055ba3e33",
"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: 9ac1dc32-13c2-49cd-bb9e-1a73ea60f253- id
string(required) Example: 2e494752-b055-44b5-a3e8-1f6055ba3e33
Response
200Body
{
"code": "OK",
"data": {
"id": "2e494752-b055-44b5-a3e8-1f6055ba3e33",
"type": "page",
"created_at": 1787792154.879805,
"updated_at": 1787792155.264359,
"parent": null,
"order": 1,
"created_by": "d47464fa-4d01-411a-8036-690c7b7904ec",
"title": "title",
"content": "content",
"icon": "π§",
"page_id": "2e494752-b055-44b5-a3e8-1f6055ba3e33",
"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: 9ac1dc32-13c2-49cd-bb9e-1a73ea60f253- id
string(required) Example: 2e494752-b055-44b5-a3e8-1f6055ba3e33
Response
200Body
{
"code": "OK",
"data": {
"id": "27ba8726-8bdf-4a59-a19c-d6194eccc44a",
"created_at": 1787792155.53162,
"updated_at": 1787792155.53162,
"deleted_at": null,
"created_by": "d47464fa-4d01-411a-8036-690c7b7904ec",
"path": "pages/2e494752-b055-44b5-a3e8-1f6055ba3e33/attachments/0f213080-a1b2-11f1-811e-f93126d9eb55.jpg",
"name": "sample.jpg",
"public": false,
"type": "file",
"url": "https://private-cdn.irish.rechat.com/pages/2e494752-b055-44b5-a3e8-1f6055ba3e33/attachments/0f213080-a1b2-11f1-811e-f93126d9eb55.jpg?Expires=1787878555537&Key-Pair-Id=APKAIIRG223GKFAC4MHA&Signature=K00N1AGDLv-FQSREnBlRD3qOivH98O0zCob7Oipz5fGDpdm~S0ALVsTDu4gYIPWyNkUxnTZXa1snZ1SQcizb2Zg7WwMhLcKNtVTn2FaFBSYZtKmo580SDMKPrT24FB-an8rqjumoNr3-1LLkXsAD~FU5S03DJ~YKlogN6R0XGQukJhJGcRAomCj-qWhwoyyxpWN1Cfa3hdXYcb5w~lpSBpVGa179U175LxEK56qfgg-k3jQgtZ1mbWmQz1nWwCGxSNyq5x46CHWdjyGfN1GtXroHwrWEgicz65mSi7b-Nz6R-Ltb30VNxoBQLZoSBEz7cjhAal58acHCOrrOKROusg__",
"preview_url": "https://private-cdn.irish.rechat.com/pages/2e494752-b055-44b5-a3e8-1f6055ba3e33/attachments/0f213080-a1b2-11f1-811e-f93126d9eb55.jpg?Expires=1787878555537&Key-Pair-Id=APKAIIRG223GKFAC4MHA&Signature=K00N1AGDLv-FQSREnBlRD3qOivH98O0zCob7Oipz5fGDpdm~S0ALVsTDu4gYIPWyNkUxnTZXa1snZ1SQcizb2Zg7WwMhLcKNtVTn2FaFBSYZtKmo580SDMKPrT24FB-an8rqjumoNr3-1LLkXsAD~FU5S03DJ~YKlogN6R0XGQukJhJGcRAomCj-qWhwoyyxpWN1Cfa3hdXYcb5w~lpSBpVGa179U175LxEK56qfgg-k3jQgtZ1mbWmQz1nWwCGxSNyq5x46CHWdjyGfN1GtXroHwrWEgicz65mSi7b-Nz6R-Ltb30VNxoBQLZoSBEz7cjhAal58acHCOrrOKROusg__",
"mime": "image/jpeg"
}
}