Messages
Listing and reading messages, attachments, flags, moving, deleting, and answering meeting invitations in mail.
| Method | Path | Summary |
|---|---|---|
| GET | /api/messages | List messages in a folder |
| GET | /api/message | Read a message |
| GET | /api/invite | A meeting invitation in a message |
| POST | /api/invite | Answer a meeting invitation |
| GET | /api/attachment | Download an attachment |
| POST | /api/flags | Mark messages read, unread or flagged |
| POST | /api/move | Move messages |
| POST | /api/delete | Delete messages |
#List messages in a folder
GET
/api/messages- Address
https://<your-org>.brambleit.cloud/mail/api/messages- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Mail.
Query parameters
| Name | Type | Description |
|---|---|---|
mb | any | The mailbox. |
folder | any | The folder's path, e.g. INBOX. |
page | number | Page number. |
q | any | Text to search for. |
Response 200
| Field | Type | Description |
|---|---|---|
page | integer | |
pageSize | integer |
Example response
JSON
{
"…result": "…",
"page": 1,
"pageSize": 1
}Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/mail/api/messages', {
method: 'GET',
credentials: 'include',
});
const data = await res.json();#Read a message
GET
/api/messageThe message with its HTML cleaned for safe display. Remote images are blocked unless remote=1.
- Address
https://<your-org>.brambleit.cloud/mail/api/message- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Mail.
Query parameters
| Name | Type | Description |
|---|---|---|
mb | any | The mailbox. |
folder | any | The folder. |
uid | any | The message's uid. |
remote | string | 1 to load remote images. |
Response 200
| Field | Type | Description |
|---|---|---|
uid | any | |
subject | string | |
from | any | |
to | any | |
cc | any | |
replyTo | any | |
date | string (date) | |
messageId | any | |
references | array of any | |
html | any | |
text | string | |
blockedImages | array of any | |
flagged | boolean | |
attachments | array of any | |
invite | boolean |
Example response
JSON
{
"uid": null,
"subject": "Example subject",
"from": null,
"to": null,
"cc": null,
"replyTo": null,
"date": "2026-11-12",
"messageId": null,
"references": [],
"html": null,
"text": "string",
"blockedImages": [],
"flagged": false,
"attachments": [],
"invite": false
}Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/mail/api/message', {
method: 'GET',
credentials: 'include',
});
const data = await res.json();#A meeting invitation in a message
GET
/api/invite→ what the invitation is and where you stand.
- Address
https://<your-org>.brambleit.cloud/mail/api/invite- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Mail.
Query parameters
| Name | Type | Description |
|---|---|---|
mb | any | |
folder | any | |
uid | any |
Response 200
Errors
| Status | Message |
|---|---|
| 404 | There's no invitation in this message |
| 400 | This invitation couldn't be read |
Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/mail/api/invite', {
method: 'GET',
credentials: 'include',
});
const data = await res.json();#Answer a meeting invitation
POST
/api/invite- Address
https://<your-org>.brambleit.cloud/mail/api/invite- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Mail.
Request body JSON
| Name | Type | Description |
|---|---|---|
mb | any | |
folder | any | |
uid | any | |
action | any | accept, tentative or decline. |
Response 200
Errors
| Status | Message |
|---|---|
| 404 | There's no invitation in this message |
Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/mail/api/invite', {
method: 'POST',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({"mb":"…","folder":"…","uid":"…","action":"…"}),
});
const data = await res.json();#Download an attachment
GET
/api/attachment- Address
https://<your-org>.brambleit.cloud/mail/api/attachment- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Mail.
Query parameters
| Name | Type | Description |
|---|---|---|
mb | any | |
folder | any | |
uid | any | |
index | number | The attachment's position in the message. |
Response
A body.
Errors
| Status | Message |
|---|---|
| 404 | That attachment has gone |
Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/mail/api/attachment', {
method: 'GET',
credentials: 'include',
});
const data = await res.json();#Mark messages read, unread or flagged
POST
/api/flags- Address
https://<your-org>.brambleit.cloud/mail/api/flags- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Mail.
Request body JSON
| Name | Type | Description |
|---|---|---|
mb | any | |
folder | any | |
uids | array of any | The messages. |
key | string | |
seen | any | true read, false unread. |
flagged | any | true to flag, false to unflag. |
Response 200
| Field | Type | Description |
|---|---|---|
ok | boolean |
Example response
JSON
{
"ok": true
}Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/mail/api/flags', {
method: 'POST',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({"mb":"…","folder":"…","uids":[],"key":"…","seen":"…","flagged":"…"}),
});
const data = await res.json();#Move messages
POST
/api/move- Address
https://<your-org>.brambleit.cloud/mail/api/move- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Mail.
Request body JSON
| Name | Type | Description |
|---|---|---|
mb | any | |
folder | any | |
to | any | The folder to move them to. |
uids | array of any | The messages. |
Response 200
| Field | Type | Description |
|---|---|---|
ok | boolean |
Example response
JSON
{
"ok": true
}Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/mail/api/move', {
method: 'POST',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({"mb":"…","folder":"…","to":"…","uids":[]}),
});
const data = await res.json();#Delete messages
POST
/api/deleteTo Trash, or for good if they're already in Trash.
- Address
https://<your-org>.brambleit.cloud/mail/api/delete- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Mail.
Request body JSON
| Name | Type | Description |
|---|---|---|
mb | any | |
folder | any | |
uids | array of any |
Response 200
| Field | Type | Description |
|---|---|---|
ok | boolean | |
permanently | boolean |
Example response
JSON
{
"ok": true,
"permanently": false
}Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/mail/api/delete', {
method: 'POST',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({"mb":"…","folder":"…","uids":[]}),
});
const data = await res.json();Was this page helpful?
Thanks for your feedback.