Messages

Listing and reading messages, attachments, flags, moving, deleting, and answering meeting invitations in mail.

MethodPathSummary
GET/api/messagesList messages in a folder
GET/api/messageRead a message
GET/api/inviteA meeting invitation in a message
POST/api/inviteAnswer a meeting invitation
GET/api/attachmentDownload an attachment
POST/api/flagsMark messages read, unread or flagged
POST/api/moveMove messages
POST/api/deleteDelete 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_id cookies from Bramble sign-in).
Licence: Mail.

Query parameters

NameTypeDescription
mbanyThe mailbox.
folderanyThe folder's path, e.g. INBOX.
pagenumberPage number.
qanyText to search for.

Response 200

FieldTypeDescription
pageinteger
pageSizeinteger
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/message

The 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_id cookies from Bramble sign-in).
Licence: Mail.

Query parameters

NameTypeDescription
mbanyThe mailbox.
folderanyThe folder.
uidanyThe message's uid.
remotestring1 to load remote images.

Response 200

FieldTypeDescription
uidany
subjectstring
fromany
toany
ccany
replyToany
datestring (date)
messageIdany
referencesarray of any
htmlany
textstring
blockedImagesarray of any
flaggedboolean
attachmentsarray of any
inviteboolean
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_id cookies from Bramble sign-in).
Licence: Mail.

Query parameters

NameTypeDescription
mbany
folderany
uidany

Response 200

Errors

StatusMessage
404There's no invitation in this message
400This 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_id cookies from Bramble sign-in).
Licence: Mail.

Request body JSON

NameTypeDescription
mbany
folderany
uidany
actionanyaccept, tentative or decline.

Response 200

Errors

StatusMessage
404There'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_id cookies from Bramble sign-in).
Licence: Mail.

Query parameters

NameTypeDescription
mbany
folderany
uidany
indexnumberThe attachment's position in the message.

Response

A body.

Errors

StatusMessage
404That 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_id cookies from Bramble sign-in).
Licence: Mail.

Request body JSON

NameTypeDescription
mbany
folderany
uidsarray of anyThe messages.
keystring
seenanytrue read, false unread.
flaggedanytrue to flag, false to unflag.

Response 200

FieldTypeDescription
okboolean
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_id cookies from Bramble sign-in).
Licence: Mail.

Request body JSON

NameTypeDescription
mbany
folderany
toanyThe folder to move them to.
uidsarray of anyThe messages.

Response 200

FieldTypeDescription
okboolean
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/delete

To 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_id cookies from Bramble sign-in).
Licence: Mail.

Request body JSON

NameTypeDescription
mbany
folderany
uidsarray of any

Response 200

FieldTypeDescription
okboolean
permanentlyboolean
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();