SDK reference
GET/
The mailboxes the caller is a member of, with their aliases and signature. Keys get an empty list.
Parameters and answerscurl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
The caller's Mail preferences in the organization: categories (the inbox's category bar on or off) and push per mailbox (all, primary or off; primary unless changed).
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/preferences' \
-H "Authorization: Bearer $CACTIVE_TOKEN"PATCH/
Changes the caller's Mail preferences: categories, and push for any of their mailboxes.
curl -X PATCH 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/preferences' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"categories": true,
"push": {}
}'GET/
All Mailboxes: one page of a view (inbox, starred, sent, drafts) across every mailbox the caller reads in the organization, newest first; each row names its mailboxId. In the inbox, category narrows it. With q, search results across those mailboxes (outside Spam and Trash, whatever the view), paged the same way. The cursor holds one position per mailbox, so pages merge without gaps or repeats; a page can be short while cursor is set.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/threads' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
Unread inbox conversations per category across the caller's mailboxes in the organization (counts) and for each (mailboxes), and badge: unread Primary conversations in the mailboxes they get push for, in every organization they belong to (what the Mail app shows on its icon).
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/counts' \
-H "Authorization: Bearer $CACTIVE_TOKEN"PATCH/
Sets the mailbox's signature.
Parameters and answerscurl -X PATCH 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/settings' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"signature": "example",
"reminderMail": true
}'GET/
The organization's sending limits: messages per day, message size and recipients per message.
Parameters and answerscurl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/limits' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
One page of conversations in a view (inbox, starred, sent, drafts, archive, all, spam, trash, or label with label), newest first, optionally matching q. In the inbox, category (primary, transactions, updates, promotions) narrows it to one category. Each row has its category and sender. Pass cursor to continue.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/threads' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
Unread conversations in the mailbox's inbox per category; complete is false when the inbox was too large to count whole.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/counts' \
-H "Authorization: Bearer $CACTIVE_TOKEN"PUT/
Moves a sender's mail to a category: remembered for the mailbox's later mail from them, and applied now to threadId and the sender's other conversations in the inbox. Returns how many moved.
curl -X PUT 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/senders/{address}/category' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"category": "primary"
}'POST/
Applies one action to up to 100 conversations: archive, move to inbox, trash, spam, not spam, delete (from trash or spam only), read, unread, star, unstar, label or unlabel.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/threads/actions' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"threadIds": [
{}
],
"action": "archive"
}'GET/
A conversation and its messages, without bodies.
Parameters and answerscurl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/threads/{threadId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
A message's text and HTML, with short-lived links for inline images. Reading a received message marks it read.
Parameters and answerscurl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/threads/{threadId}/messages/{messageId}/body' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
A short-lived download link for an attachment.
Parameters and answerscurl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/threads/{threadId}/messages/{messageId}/attachments/{index}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
A short-lived link to the original message (.eml).
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/threads/{threadId}/messages/{messageId}/raw' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Leaves the mailing list a message came from: one-click (RFC 8058) when the sender offers it, else an unsubscribe email from this mailbox; otherwise the link for the reader to open.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/threads/{threadId}/messages/{messageId}/unsubscribe' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
The meeting a message carries and the event it became in this mailbox's calendars.
Parameters and answerscurl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/threads/{threadId}/messages/{messageId}/invitation' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Compose attachments go straight to the bucket; the link only accepts the declared size and type.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/uploads' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"filename": "Example",
"size": 1
}'POST/
Sends a message from the mailbox and files it in Sent. The domain must be verified. With replyTo, it's threaded as a reply; with draftId, the draft is removed. The response lists recipients that bounced or complained before.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/send' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"to": [
{
"address": "example"
}
],
"cc": [
{
"address": "example"
}
],
"bcc": [
{
"address": "example"
}
]
}'POST/
Recipients that bounced or complained before, so compose can warn.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/recipients/check' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"addresses": [
"example"
]
}'GET/
Address suggestions for compose and guest fields: the organization's people (their own mailboxes, by name), then contacts, then recent correspondents.
Parameters and answerscurl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/recipients/suggest' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Saves a new draft.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/drafts' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"to": [
{
"address": "example"
}
],
"cc": [
{
"address": "example"
}
],
"bcc": [
{
"address": "example"
}
]
}'GET/
A draft, for editing.
Parameters and answerscurl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/drafts/{draftId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"PUT/
Replaces a draft.
Parameters and answerscurl -X PUT 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/drafts/{draftId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"to": [
{
"address": "example"
}
],
"cc": [
{
"address": "example"
}
],
"bcc": [
{
"address": "example"
}
]
}'DELETE/
Takes a scheduled draft off the schedule (it stays a draft).
Parameters and answerscurl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/drafts/{draftId}/schedule' \
-H "Authorization: Bearer $CACTIVE_TOKEN"DELETE/
Discards a draft.
Parameters and answerscurl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/drafts/{draftId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
Inbound filters: conditions on received mail, actions on its conversation.
Parameters and answerscurl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/filters' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Creates an inbound filter: conditions on received mail (all must match), actions on its conversation. At most 100 per mailbox.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/filters' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"match": {
"from": "example",
"to": "example",
"subject": "Example"
},
"actions": {
"labelId": {},
"archive": true,
"read": true
}
}'PUT/
Replaces a filter's conditions and actions, or turns it on or off.
Parameters and answerscurl -X PUT 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/filters/{filterId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"match": {
"from": "example",
"to": "example",
"subject": "Example"
},
"actions": {
"labelId": {},
"archive": true,
"read": true
}
}'POST/
Runs a filter over conversations already in the mailbox (a few seconds here, the rest in the background).
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/filters/{filterId}/apply' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
Forwarding addresses (filter action): added pending, confirmed with the code mailed to them.
Parameters and answerscurl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/forwarding' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Adds a forwarding address (or sends a new code to a pending one): the address gets a 6-digit code by email, valid 24 hours. Needs the mailbox's domain to be active; counts toward the daily sending limit.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/forwarding' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"address": "example"
}'POST/
Confirms a forwarding address with the code it received; filters can then forward to it. Five wrong codes need a new one.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/forwarding/verify' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"address": "example",
"code": "example"
}'DELETE/
Removes a forwarding address; filters forwarding to it stop forwarding.
Parameters and answerscurl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/forwarding/{address}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"DELETE/
Deletes a filter. Mail already filed stays where it is.
Parameters and answerscurl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/filters/{filterId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
The mailbox's labels, by name.
Parameters and answerscurl 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/labels' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Creates a label. Names are unique in the mailbox, ignoring case.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/labels' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"name": "Example"
}'DELETE/
Deletes a label. Conversations stop showing it.
Parameters and answerscurl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/mail/mailboxes/{mailboxId}/labels/{labelId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
The caller's mailboxes in every organization where they read mail, each with its orgId and aliases, and those organizations (orgs: orgId, slug, name).
curl 'https://api.cactive.com.au/v1/me/mail/mailboxes' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
All Inboxes across organizations: one page of a view (inbox, starred, sent, drafts) across every mailbox the caller reads in every organization, newest first; each row names its mailboxId and orgId, and actions on it go to that organization's mailbox routes. In the inbox, category narrows it; with q, search results across them (outside Spam and Trash). Access is checked on every page: a mailbox the caller loses stops appearing, and one they gain starts below the rows already returned. The cursor holds one position per mailbox and the last row returned.
curl 'https://api.cactive.com.au/v1/me/mail/threads' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
Unread inbox conversations per category across the caller's mailboxes in every organization (counts) and for each (mailboxes), and badge: unread Primary conversations in the mailboxes they get push for.
curl 'https://api.cactive.com.au/v1/me/mail/counts' \
-H "Authorization: Bearer $CACTIVE_TOKEN"