Mail, Calendar & Contacts API

Bramble Mail's web app API: mailboxes, folders, messages, sending, rules and live updates; Bramble Calendar (calendars, events, sharing, meetings, rooms, categories, .ics links and CalDAV); and Contacts (address books, the organisation directory and CardDAV).

Address
https://<your-org>.brambleit.cloud/mail
Sign-in
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Address
https://<your-org>.brambleit.cloud/api
Sign-in
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).
Endpoints
66
OpenAPI
mail.json
Guides
How Mail & Calendar works

Mailboxes. Most mail endpoints take mb, the mailbox to work in (your own, or a shared mailbox you have access to — see GET /api/me), and folder, the folder's path (e.g. INBOX, Sent). Messages are identified by their IMAP uid within that folder.

From your own systems, use the standard protocols rather than these endpoints: IMAP and SMTP for mail, CalDAV at /mail/dav/ for calendars and CardDAV at /mail/dav/addressbooks/ for contacts, with your email address and an app password.

Calendar sharing levels: freebusy (only when you're busy), read and write.

Resources

Mailboxes

Your mailboxes and addresses, and the Android app download.

MethodPathSummary
GET/api/app/versionLatest Android app version
GET/api/app/bramble-mail.apkDownload the Android app
GET/api/meYour mailboxes and addresses

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

Sending

Sending new messages, replies and forwards with attachments.

MethodPathSummary
POST/api/sendSend a message

Folders & rules

Creating, renaming, moving and ordering folders, and mail rules (filters run on the server).

MethodPathSummary
GET/api/foldersList a mailbox's folders
POST/api/foldersCreate a folder
PATCH/api/foldersRename or move a folder
DELETE/api/foldersDelete a folder
PUT/api/folders/orderSave the folder order
GET/api/rulesList mail rules
PUT/api/rulesSave mail rules

Live updates

Server-sent events when a mailbox changes, and keeping the connection alive.

MethodPathSummary
GET/api/eventsLive mailbox changes (server-sent events)
GET/api/pushKeep the live connection alive

Calendar

Calendars and events (with recurrence, attendees and replies), sharing, free/busy for people and rooms, categories, preferences, import and export, and private .ics links.

MethodPathSummary
GET/api/cal/bootstrapEverything the calendar page needs to start
PATCH/api/cal/prefsSave calendar preferences
POST/api/cal/calendarsCreate a calendar
PATCH/api/cal/calendars/:idUpdate a calendar
DELETE/api/cal/calendars/:idDelete a calendar
POST/api/cal/calendars/:id/subscriptionMake a private .ics link
DELETE/api/cal/calendars/:id/subscriptionStop a calendar's .ics link
GET/api/cal/calendars/:id/sharesWho a calendar is shared with
POST/api/cal/calendars/:id/sharesShare a calendar
DELETE/api/cal/calendars/:id/shares/:shareStop sharing a calendar with someone
GET/api/cal/peoplePeople (and groups) in your organisation, plus your own contacts
GET/api/cal/roomsList meeting rooms
POST/api/cal/freebusyBusy times for people in your organisation and rooms
POST/api/cal/calendars/:id/importImport an .ics file into a calendar (each event becomes its own entry)
GET/api/cal/calendars/:id/export.icsExport a calendar as .ics
GET/api/cal/eventsEvents in a time range
POST/api/cal/calendars/:id/eventsCreate an event
PATCH/api/cal/calendars/:id/events/:uriChange an event
DELETE/api/cal/calendars/:id/events/:uriDelete an event
GET/api/cal/categoriesList categories
POST/api/cal/categoriesCreate a category
PATCH/api/cal/categories/:idUpdate a category
DELETE/api/cal/categories/:idDelete a category

Contacts

Personal address books and contacts, the organisation directory, and vCard import and export.

MethodPathSummary
GET/api/contacts/bootstrapEverything the contacts page needs to start
GET/api/contacts/directoryThe organisation directory
POST/api/contacts/booksCreate a book
PATCH/api/contacts/books/:idRename an address book
DELETE/api/contacts/books/:idDelete an address book
GET/api/contacts/books/:id/contactsList contacts of a book
POST/api/contacts/books/:id/contactsAdd a contact
PATCH/api/contacts/books/:id/contacts/:uriUpdate a contact
DELETE/api/contacts/books/:id/contacts/:uriDelete a contact
POST/api/contacts/books/:id/importImport a .vcf file (one or many cards)
GET/api/contacts/books/:id/export.vcfExport an address book (.vcf)

Rooms (admin)

Meeting rooms and their bookings. Rooms accept bookings automatically when they're free. Needs Global Administrator.

MethodPathSummary
GET/api/admin/roomsList rooms
POST/api/admin/roomsCreate a room
PATCH/api/admin/rooms/:idUpdate a room
DELETE/api/admin/rooms/:idDeleting a room drops its bookings; meetings keep it on their list
GET/api/admin/rooms/:id/bookingsA room's bookings (next 60 days) for the admin page

CalDAV & CardDAV

The standard protocols for phones and desktop apps (/mail/dav/, HTTP Basic with an app password) and the read-only .ics subscription links (/mail/ics/<token>.ics, the token is the key).

MethodPathSummary
OPTIONS/dav/*CalDAV/CardDAV capabilities
ALL/dav/*CalDAV and CardDAV
GET/ics/:fileRead a calendar from its .ics link
ALL/.well-known/caldavCalDAV discovery
ALL/.well-known/carddavCardDAV discovery

New-mail push (BRM-API)

The mail server tells BRM-API about new mail so it can send push notifications. Needs X-Mail-Hook-Key.

MethodPathSummary
POST/v1/maildelivery/newTell Bramble about new mail (mail server only)

Web pages

These return pages for the browser rather than data.

  • GET /calendar
  • GET /contacts
  • GET /
  • GET /sw.js