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: 012275ea-528c-4287-a54e-22fe6f888db7
Request
Body
{
"title": "title",
"order": 1,
"content": "content",
"parent": null,
"icon": "π§"
}Response
200Body
{
"code": "OK",
"data": {
"id": "d7fe4557-1db1-4f36-94f6-c1c78de6c3ff",
"type": "page",
"created_at": 1783014932.418318,
"updated_at": 1783014932.425836,
"parent": null,
"order": 1,
"created_by": "1b114481-f58c-4336-84f0-a85474b8e73f",
"title": "title",
"content": "content",
"icon": "π§",
"page_id": "d7fe4557-1db1-4f36-94f6-c1c78de6c3ff",
"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: 012275ea-528c-4287-a54e-22fe6f888db7
Request
Body
[
{
"id": "38c14506-2fff-4ec4-a0b4-ee8fff0d3378",
"order": 95
},
{
"id": "384372b9-4be7-4477-b690-0b447f1993b1",
"order": 85
},
{
"id": "ade50e55-f731-4c20-8ae0-671c4d6baff7",
"order": 90,
"parent": "2bba9ea7-415f-4cc6-87d8-aeafcb60c587"
}
]Response
200Body
{
"code": "OK",
"data": [
{
"id": "38c14506-2fff-4ec4-a0b4-ee8fff0d3378",
"order": 95,
"parent": null
},
{
"id": "384372b9-4be7-4477-b690-0b447f1993b1",
"order": 85,
"parent": null
},
{
"id": "ade50e55-f731-4c20-8ae0-671c4d6baff7",
"order": 90,
"parent": "2bba9ea7-415f-4cc6-87d8-aeafcb60c587"
}
],
"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: 012275ea-528c-4287-a54e-22fe6f888db7- id
string(required) Example: d7fe4557-1db1-4f36-94f6-c1c78de6c3ff
Request
Body
{
"title": "title",
"content": "content",
"icon": "π§"
}Response
200Body
{
"code": "OK",
"data": {
"id": "d7fe4557-1db1-4f36-94f6-c1c78de6c3ff",
"type": "page",
"created_at": 1783014932.418318,
"updated_at": 1783014932.854757,
"parent": null,
"order": 1,
"created_by": "1b114481-f58c-4336-84f0-a85474b8e73f",
"title": "title",
"content": "content",
"icon": "π§",
"page_id": "d7fe4557-1db1-4f36-94f6-c1c78de6c3ff",
"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: 012275ea-528c-4287-a54e-22fe6f888db7- id
string(required) Example: d7fe4557-1db1-4f36-94f6-c1c78de6c3ff
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: 012275ea-528c-4287-a54e-22fe6f888db7- q
string(required) Example: "π§"
Response
200Body
{
"code": "OK",
"data": [
{
"id": "d7fe4557-1db1-4f36-94f6-c1c78de6c3ff",
"type": "page",
"created_at": 1783014932.418318,
"updated_at": 1783014932.854757,
"parent": null,
"order": 1,
"created_by": "1b114481-f58c-4336-84f0-a85474b8e73f",
"title": "title",
"content": "content",
"icon": "π§",
"children": null,
"attachments": [
{
"id": "1026dbcf-be6a-435f-8dbe-8a210d2db6ab",
"created_at": 1783014933.13655,
"updated_at": 1783014933.13655,
"deleted_at": null,
"created_by": "1b114481-f58c-4336-84f0-a85474b8e73f",
"path": "pages/d7fe4557-1db1-4f36-94f6-c1c78de6c3ff/attachments/38b0bcc0-763f-11f1-94b5-7519f45a456b.jpg",
"name": "sample.jpg",
"public": false,
"type": "file",
"url": "https://private-cdn.irish.rechat.com/pages/d7fe4557-1db1-4f36-94f6-c1c78de6c3ff/attachments/38b0bcc0-763f-11f1-94b5-7519f45a456b.jpg?Expires=1783101333139&Key-Pair-Id=APKAIIRG223GKFAC4MHA&Signature=DfGWqXszoML2ERMMXD-Lu7ud4yIPvSHD4obJKTrhm0eecPRY3Y6JLkkt6nPEsE1xBwFNSDtsYqOjigkMWm13cdBxmRrckukhDuCo9dhahLbwbTDtik-yjIauC85If0lxTg2xnKJIsYBKAyfFPvZmvXzJolnyxyVv~AAhmhr74M8QoVTUJHthl3kaYuq2I7UdpO94lWxoisL~gVlDqm5-BpnEsIB3C3~lwlOF2lxpjNMAZqvSJ5aUwXSKDjZQlNWMud44Z7V7tGnBOiMAUNyig9KksEXIhPDTKTcB87JwV5Xo0UoYds6~i-FwUn9widDDXys-GrZX-T-uvfAmwrUnqA__",
"preview_url": "https://private-cdn.irish.rechat.com/pages/d7fe4557-1db1-4f36-94f6-c1c78de6c3ff/attachments/38b0bcc0-763f-11f1-94b5-7519f45a456b.jpg?Expires=1783101333139&Key-Pair-Id=APKAIIRG223GKFAC4MHA&Signature=DfGWqXszoML2ERMMXD-Lu7ud4yIPvSHD4obJKTrhm0eecPRY3Y6JLkkt6nPEsE1xBwFNSDtsYqOjigkMWm13cdBxmRrckukhDuCo9dhahLbwbTDtik-yjIauC85If0lxTg2xnKJIsYBKAyfFPvZmvXzJolnyxyVv~AAhmhr74M8QoVTUJHthl3kaYuq2I7UdpO94lWxoisL~gVlDqm5-BpnEsIB3C3~lwlOF2lxpjNMAZqvSJ5aUwXSKDjZQlNWMud44Z7V7tGnBOiMAUNyig9KksEXIhPDTKTcB87JwV5Xo0UoYds6~i-FwUn9widDDXys-GrZX-T-uvfAmwrUnqA__",
"mime": "image/jpeg"
}
],
"page_id": "d7fe4557-1db1-4f36-94f6-c1c78de6c3ff",
"ord": "1"
}
],
"info": {
"count": 1,
"total": 0
}
}Response
200Body
{
"code": "OK",
"data": [
{
"id": "57eaa3b5-dc9b-4fe6-93d9-7487fd1d5e5b",
"type": "page",
"created_at": 1783014934.688092,
"updated_at": 1783014934.688132,
"parent": null,
"order": 20,
"created_by": "1b114481-f58c-4336-84f0-a85474b8e73f",
"title": "Parent One",
"content": "content for Parent One",
"icon": null,
"page_id": "57eaa3b5-dc9b-4fe6-93d9-7487fd1d5e5b",
"ord": "1"
},
{
"id": "8141edab-f821-4ab6-98b2-f3da9cb06f71",
"type": "page",
"created_at": 1783014935.04176,
"updated_at": 1783014935.041802,
"parent": null,
"order": 10,
"created_by": "1b114481-f58c-4336-84f0-a85474b8e73f",
"title": "Parent Two",
"content": "content for Parent Two",
"icon": null,
"page_id": "8141edab-f821-4ab6-98b2-f3da9cb06f71",
"ord": "2"
},
{
"id": "4e14c286-1821-40ca-ad0e-bfb670b239d7",
"type": "page",
"created_at": 1783014936.656546,
"updated_at": 1783014936.656589,
"parent": "57eaa3b5-dc9b-4fe6-93d9-7487fd1d5e5b",
"order": 10,
"created_by": "1b114481-f58c-4336-84f0-a85474b8e73f",
"title": "Parent One Child Two",
"content": "content for Parent One Child Two",
"icon": null,
"page_id": "4e14c286-1821-40ca-ad0e-bfb670b239d7",
"ord": "3"
},
{
"id": "ade50e55-f731-4c20-8ae0-671c4d6baff7",
"type": "page",
"created_at": 1783014935.382351,
"updated_at": 1783014935.382392,
"parent": "2bba9ea7-415f-4cc6-87d8-aeafcb60c587",
"order": 90,
"created_by": "1b114481-f58c-4336-84f0-a85474b8e73f",
"title": "Parent One Child One",
"content": "content for Parent One Child One",
"icon": null,
"page_id": "ade50e55-f731-4c20-8ae0-671c4d6baff7",
"ord": "4"
},
{
"id": "5b921d12-d138-40a3-b85e-cbf333de86e4",
"type": "page",
"created_at": 1783014936.890689,
"updated_at": 1783014936.890744,
"parent": "8141edab-f821-4ab6-98b2-f3da9cb06f71",
"order": 15,
"created_by": "1b114481-f58c-4336-84f0-a85474b8e73f",
"title": "Parent Two Child One",
"content": "content for Parent Two Child One",
"icon": null,
"page_id": "5b921d12-d138-40a3-b85e-cbf333de86e4",
"ord": "5"
}
],
"info": {
"count": 5,
"total": 0
}
}Response
200Body
{
"code": "OK",
"data": [
{
"id": "38c14506-2fff-4ec4-a0b4-ee8fff0d3378",
"type": "page",
"created_at": 1783014933.197284,
"updated_at": 1783014933.197315,
"parent": null,
"order": 10,
"created_by": "1b114481-f58c-4336-84f0-a85474b8e73f",
"title": "First Page",
"content": "content for order 10",
"icon": null,
"page_id": "38c14506-2fff-4ec4-a0b4-ee8fff0d3378",
"ord": "1"
},
{
"id": "384372b9-4be7-4477-b690-0b447f1993b1",
"type": "page",
"created_at": 1783014934.058482,
"updated_at": 1783014934.058522,
"parent": null,
"order": 85,
"created_by": "1b114481-f58c-4336-84f0-a85474b8e73f",
"title": "Second Page",
"content": "content for order 5",
"icon": null,
"page_id": "384372b9-4be7-4477-b690-0b447f1993b1",
"ord": "2"
},
{
"id": "57eaa3b5-dc9b-4fe6-93d9-7487fd1d5e5b",
"type": "page",
"created_at": 1783014934.688092,
"updated_at": 1783014934.688132,
"parent": null,
"order": 20,
"created_by": "1b114481-f58c-4336-84f0-a85474b8e73f",
"title": "Parent One",
"content": "content for Parent One",
"icon": null,
"page_id": "57eaa3b5-dc9b-4fe6-93d9-7487fd1d5e5b",
"ord": "3"
}
],
"info": {
"count": 3,
"total": 0
}
}Response
200Body
{
"code": "OK",
"data": [
{
"id": "d7fe4557-1db1-4f36-94f6-c1c78de6c3ff",
"type": "page",
"created_at": 1783014932.418318,
"updated_at": 1783014932.854757,
"parent": null,
"order": 15,
"created_by": "1b114481-f58c-4336-84f0-a85474b8e73f",
"title": "title",
"content": "content",
"icon": "π§",
"page_id": "d7fe4557-1db1-4f36-94f6-c1c78de6c3ff",
"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: 012275ea-528c-4287-a54e-22fe6f888db7- id
string(required) Example: d7fe4557-1db1-4f36-94f6-c1c78de6c3ff
Response
200Body
{
"code": "OK",
"data": {
"id": "d7fe4557-1db1-4f36-94f6-c1c78de6c3ff",
"type": "page",
"created_at": 1783014932.418318,
"updated_at": 1783014932.854757,
"parent": null,
"order": 1,
"created_by": "1b114481-f58c-4336-84f0-a85474b8e73f",
"title": "title",
"content": "content",
"icon": "π§",
"page_id": "d7fe4557-1db1-4f36-94f6-c1c78de6c3ff",
"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: 012275ea-528c-4287-a54e-22fe6f888db7- id
string(required) Example: d7fe4557-1db1-4f36-94f6-c1c78de6c3ff
Response
200Body
{
"code": "OK",
"data": {
"id": "1026dbcf-be6a-435f-8dbe-8a210d2db6ab",
"created_at": 1783014933.13655,
"updated_at": 1783014933.13655,
"deleted_at": null,
"created_by": "1b114481-f58c-4336-84f0-a85474b8e73f",
"path": "pages/d7fe4557-1db1-4f36-94f6-c1c78de6c3ff/attachments/38b0bcc0-763f-11f1-94b5-7519f45a456b.jpg",
"name": "sample.jpg",
"public": false,
"type": "file",
"url": "https://private-cdn.irish.rechat.com/pages/d7fe4557-1db1-4f36-94f6-c1c78de6c3ff/attachments/38b0bcc0-763f-11f1-94b5-7519f45a456b.jpg?Expires=1783101333139&Key-Pair-Id=APKAIIRG223GKFAC4MHA&Signature=DfGWqXszoML2ERMMXD-Lu7ud4yIPvSHD4obJKTrhm0eecPRY3Y6JLkkt6nPEsE1xBwFNSDtsYqOjigkMWm13cdBxmRrckukhDuCo9dhahLbwbTDtik-yjIauC85If0lxTg2xnKJIsYBKAyfFPvZmvXzJolnyxyVv~AAhmhr74M8QoVTUJHthl3kaYuq2I7UdpO94lWxoisL~gVlDqm5-BpnEsIB3C3~lwlOF2lxpjNMAZqvSJ5aUwXSKDjZQlNWMud44Z7V7tGnBOiMAUNyig9KksEXIhPDTKTcB87JwV5Xo0UoYds6~i-FwUn9widDDXys-GrZX-T-uvfAmwrUnqA__",
"preview_url": "https://private-cdn.irish.rechat.com/pages/d7fe4557-1db1-4f36-94f6-c1c78de6c3ff/attachments/38b0bcc0-763f-11f1-94b5-7519f45a456b.jpg?Expires=1783101333139&Key-Pair-Id=APKAIIRG223GKFAC4MHA&Signature=DfGWqXszoML2ERMMXD-Lu7ud4yIPvSHD4obJKTrhm0eecPRY3Y6JLkkt6nPEsE1xBwFNSDtsYqOjigkMWm13cdBxmRrckukhDuCo9dhahLbwbTDtik-yjIauC85If0lxTg2xnKJIsYBKAyfFPvZmvXzJolnyxyVv~AAhmhr74M8QoVTUJHthl3kaYuq2I7UdpO94lWxoisL~gVlDqm5-BpnEsIB3C3~lwlOF2lxpjNMAZqvSJ5aUwXSKDjZQlNWMud44Z7V7tGnBOiMAUNyig9KksEXIhPDTKTcB87JwV5Xo0UoYds6~i-FwUn9widDDXys-GrZX-T-uvfAmwrUnqA__",
"mime": "image/jpeg"
}
}