Buffmailer API
Read and send mail as a mailbox, and run an organization's domains, users, groups and aliases.
Authenticate with an API key from Settings → API keys: Authorization: Bearer bm_live_…. A key acts as the user who made it and carries scopes: mail.read, mail.send, mail.modify, and admin for organization resources (the user must be an owner or admin). Requests are limited per key by the plan's requests-per-minute; over it you get 429 with Retry-After.
Errors are JSON: {"error": {"code": "send.recipient_invalid", "params": {"address": "…"}}}. The code is stable; params fills in the details.
Base URL
https://buffmailer.com/api
The OpenAPI 3.1 description is at https://buffmailer.com/api/openapi.json, for client generators and API tools.
Keys and permissions
Make keys in Settings → API keys. A key belongs to its user and reaches only their mailbox, plus the organization if it has Administer. Send it on every request as Authorization: Bearer bm_live_…. Revoking it takes effect at once.
mail.read | Read mail. List and read threads, messages, labels and attachments. |
mail.send | Send mail. Send messages, upload attachments and manage drafts. |
mail.modify | Organize mail. Label, archive, trash and delete mail; manage labels. |
admin | Administer. Manage domains, users, groups, aliases, delivery and webhooks. Only owners and admins can grant it. |
Errors and limits
Failures come with a status and a JSON body whose code doesn't change between releases; params fill in the details.
HTTP/1.1 403 Forbidden
{ "error": { "code": "auth.scope_missing", "params": { "scope": "mail.send" } } }400 | The request is wrong; the code says how (e.g. send.recipient_invalid). |
401 | No key, or a revoked or unknown one. |
402 | A plan limit, like plan.max_users or send.daily_limit. Upgrade or wait. |
403 | The key lacks a permission, or the user may not do that. |
404 | It doesn't exist, or isn't this key's to see. |
409 | It conflicts with the current state, like an address that is taken. |
429 | Too many requests. Wait the seconds in Retry-After. |
Each key may make as many requests per minute as the plan allows (60 on Free, up to 3,000 on Business), and sending counts toward the plan's daily limit per recipient.
Paging
Lists come newest first. When there is more, the response has next, e.g. {"before": "2026-10-20T09:30:00Z", "before_id": "…"}; pass both values as query parameters for the next page. At the end, next is null.
Attachments
Put small files right in the JSON as content_base64, attach earlier uploads by upload_id, or send multipart/form-data: the message JSON in a message field and each file in a field of its own.
curl https://buffmailer.com/api/send \
-H "Authorization: Bearer $BUFFMAILER_KEY" \
-F message='{"to":["[email protected]"],"subject":"Report","text":"Attached."}' \
-F [email protected]Webhooks
An admin can point webhooks at an HTTPS endpoint (in the console under Developers, or with the Webhooks endpoints below; Pro and Business plans). Each event is a POST of JSON like this:
{
"event": "message.received",
"org_id": "0190c9a4-1f2e-7b3c-8d4e-5f6a7b8c9d0e",
"created_at": "2026-10-20T09:30:00Z",
"data": {
"user_id": "…",
"message_id": "…",
"thread_id": "…",
"subject": "Quarterly report",
"from": {
"name": "Bob",
"address": "[email protected]"
},
"to": [],
"snippet": "…"
}
}message.received | New mail arrived in a mailbox. data |
message.sent | A mailbox sent mail, from the web, the API or a mail app. data |
message.bounced | A recipient's server refused mail for good. data |
domain.verified | A domain's DNS checks passed. data |
ping | A test from the console or POST /webhooks/{id}/test. |
Headers: X-Buffmailer-Event, X-Buffmailer-Delivery (the same on every retry, to skip repeats) and X-Buffmailer-Signature: t=…,v1=…, where v1 is the hex HMAC-SHA256 of <t>.<raw body> keyed with the webhook's secret. Check it before trusting the body, and refuse old timestamps:
import crypto from 'node:crypto';
// body: the raw request body (Buffer or string), before JSON.parse.
// header: the X-Buffmailer-Signature value, "t=<unix time>,v1=<hex>".
export function verify(body, header, secret, toleranceSec = 300) {
const parts = Object.fromEntries(header.split(',').map((p) => p.split('=')));
const t = Number(parts.t);
if (!t || Math.abs(Date.now() / 1000 - t) > toleranceSec) return false;
const want = crypto.createHmac('sha256', secret).update(`${t}.`).update(body).digest();
const got = Buffer.from(parts.v1 ?? '', 'hex');
return got.length === want.length && crypto.timingSafeEqual(got, want);
}Answer with a 2xx within 10 seconds. Anything else, redirects included, is retried after 1 and 5 minutes, then 30 minutes, 2, 6, 12 and 24 hours; after that the delivery is marked failed. The console shows every delivery for 30 days and can send any of them again.
Account
The mailbox the key belongs to.
/meThe key's mailbox
The user, their organization and plan, and the addresses they can send from.
Returns Me
addressrequired | string |
addressesrequired | string[] The user's address and aliases; any can be a from. |
idrequired | uuid |
mail_hostrequired | string The IMAP and SMTP host. |
namerequired | string |
orgrequired | OrgSummary |
quota_bytes | integer or null |
recovery_email | string or null |
rolerequired | stringowner, admin or member. |
signaturerequired | string HTML. |
staffrequired | boolean |
storage_usedrequired | integer |
two_factorrequired | boolean |
two_factor_owedrequired | boolean This browser session gets 403 2fa.required everywhere but /me until two_factor is on. Never for sessions an org admin opened from the admin console. |
two_factor_requiredrequired | boolean The platform requires an authenticator on every mailbox. |
undo_send_secondsrequired | integer Seconds the web app holds a sent message so it can be undone. |
vacation | VacationOn or null |
viarequired | stringapi_key for API keys. |
curl 'https://buffmailer.com/api/me' \ -H "Authorization: Bearer $BUFFMAILER_KEY"
Threads
Conversations, as the web app shows them.
/threadsmail.readList threads
Parameters
labelquery | stringINBOX, SENT, STARRED, IMPORTANT, SPAM, TRASH, UNREAD, or a label id. Everything but spam and trash when absent. |
qquery | string A search, Gmail-style: from:ann to:bob subject:invoice has:attachment is:unread is:starred label:clients in:sent before:2026-01-31 after:2025-12-01 "exact phrase"; other words match the text. |
limitquery | integer 1 to 100; 50 by default. |
beforequery | datetime From the previous page's next. |
before_idquery | uuid From the previous page's next. |
Returns ThreadPage
next | Cursor or null |
threadsrequired | ThreadSummary[] |
curl 'https://buffmailer.com/api/threads' \ -H "Authorization: Bearer $BUFFMAILER_KEY"
/threads/emptymail.modifyEmpty trash or spam
Body application/json
labelrequired | stringTRASH or SPAM. |
Returns Emptied
messagesrequired | integer |
threadsrequired | integer |
curl -X POST 'https://buffmailer.com/api/threads/empty' \
-H "Authorization: Bearer $BUFFMAILER_KEY" \
-H 'Content-Type: application/json' \
-d '{
"label": "TRASH"
}'/threads/modifymail.modifyLabel threads
Body application/json
add | string[] |
idsrequired | uuid[] Up to 500 thread ids. |
remove | string[] |
Returns Touched
threadsrequired | uuid[] |
curl -X POST 'https://buffmailer.com/api/threads/modify' \
-H "Authorization: Bearer $BUFFMAILER_KEY" \
-H 'Content-Type: application/json' \
-d '{
"ids": [
"0190c9a4-5b2e-7c41-9a3d-2f6e8b1c4d7a"
],
"add": [
"TRASH"
],
"remove": []
}'/threads/purgemail.modifyDelete threads for good
curl -X DELETE 'https://buffmailer.com/api/threads/purge' \
-H "Authorization: Bearer $BUFFMAILER_KEY" \
-H 'Content-Type: application/json' \
-d '{
"ids": [
"0190c9a4-5b2e-7c41-9a3d-2f6e8b1c4d7a"
]
}'/threads/snoozemail.modifySnooze threads
Takes them out of the inbox (they get the SNOOZED label) until until, when they come back unread at the top. A reply arriving brings a thread back early.
Body application/json
idsrequired | uuid[] Up to 500 thread ids. |
untilrequired | datetime In the future, at most a year out. |
Returns Touched
threadsrequired | uuid[] |
curl -X POST 'https://buffmailer.com/api/threads/snooze' \
-H "Authorization: Bearer $BUFFMAILER_KEY" \
-H 'Content-Type: application/json' \
-d '{
"ids": [
"0190c9a4-5b2e-7c41-9a3d-2f6e8b1c4d7a"
],
"until": "2026-11-02T08:00:00Z"
}'/threads/unsnoozemail.modifyUnsnooze threads
Back to the inbox now.
Body application/json
idsrequired | uuid[] Up to 500. |
Returns Touched
threadsrequired | uuid[] |
curl -X POST 'https://buffmailer.com/api/threads/unsnooze' \
-H "Authorization: Bearer $BUFFMAILER_KEY" \
-H 'Content-Type: application/json' \
-d '{
"ids": [
"0190c9a4-5b2e-7c41-9a3d-2f6e8b1c4d7a"
]
}'/threads/{id}mail.readGet a thread
Parameters
idpath | uuid |
labelquery | string The view it was opened from; TRASH and SPAM show only the messages there. |
imagesquery | boolean Load remote images instead of blocking them. |
Returns Thread
hiddenrequired | integer Messages left out: those in trash or spam, unless opened from there. |
idrequired | uuid |
labelsrequired | string[] |
messagesrequired | Message[] |
snoozed_until | datetime or null |
subjectrequired | string |
curl 'https://buffmailer.com/api/threads/{id}' \
-H "Authorization: Bearer $BUFFMAILER_KEY"/threads/{id}mail.modifyTrash a thread
Moves it to trash, which empties itself after 30 days.
Parameters
idpath | uuid |
Returns Ok
okrequired | boolean |
curl -X DELETE 'https://buffmailer.com/api/threads/{id}' \
-H "Authorization: Bearer $BUFFMAILER_KEY"/threads/{id}/modifymail.modifyLabel a thread
Applies to every message in it.
Parameters
idpath | uuid |
Body application/json
add | string[] |
remove | string[] |
Returns Touched
threadsrequired | uuid[] |
curl -X POST 'https://buffmailer.com/api/threads/{id}/modify' \
-H "Authorization: Bearer $BUFFMAILER_KEY" \
-H 'Content-Type: application/json' \
-d '{
"add": [
"STARRED"
],
"remove": [
"INBOX",
"UNREAD"
]
}'Messages
Single messages, their raw source and attachments.
/messagesmail.readList messages
Parameters
labelquery | stringINBOX, SENT, STARRED, IMPORTANT, SPAM, TRASH, UNREAD, or a label id. Everything but spam and trash when absent. |
qquery | string A search, Gmail-style: from:ann to:bob subject:invoice has:attachment is:unread is:starred label:clients in:sent before:2026-01-31 after:2025-12-01 "exact phrase"; other words match the text. |
limitquery | integer 1 to 100; 50 by default. |
beforequery | datetime From the previous page's next. |
before_idquery | uuid From the previous page's next. |
Returns MessagePage
messagesrequired | MessageSummary[] |
next | Cursor or null |
curl 'https://buffmailer.com/api/messages' \ -H "Authorization: Bearer $BUFFMAILER_KEY"
/messages/{id}mail.readGet a message
Parameters
idpath | uuid |
imagesquery | boolean Load remote images (through the image proxy) instead of blocking them. |
Returns Message
attachmentsrequired | Attachment[] |
auth | object or null SPF, DKIM and DMARC results for received mail, e.g. {"spf": "pass", "dkim": "pass", "dmarc": "pass"}. |
bccrequired | Mailbox[] Only on mail this mailbox sent. |
blocked_imagesrequired | boolean Remote images were left out; ask again with images=true. |
ccrequired | Mailbox[] |
daterequired | datetime |
fromrequired | Mailbox |
has_attachmentsrequired | boolean |
html | string or null Sanitized HTML, safe to show in a sandboxed frame. null on older messages of a long thread; fetch the message. |
idrequired | uuid |
in_reply_to | string or null |
labelsrequired | string[] |
list_unsubscribe | string or null An https: or mailto: unsubscribe link. |
message_id | string or null The Message-ID header. |
received_atrequired | datetime |
referencesrequired | string[] |
reply_torequired | Mailbox[] |
sizerequired | integer |
snippetrequired | string |
spam_score | number or null |
subjectrequired | string |
text | string or null The plain-text body, on GET /messages/{id}. |
thread_idrequired | uuid |
torequired | Mailbox[] |
curl 'https://buffmailer.com/api/messages/{id}' \
-H "Authorization: Bearer $BUFFMAILER_KEY"/messages/{id}mail.modifyTrash a message
curl -X DELETE 'https://buffmailer.com/api/messages/{id}' \
-H "Authorization: Bearer $BUFFMAILER_KEY"/messages/{id}/attachments/{part}mail.readDownload an attachment
Parameters
idpath | uuid |
partpath | integer The attachment's part. |
inlinequery | booleanContent-Disposition: inline for types safe to show. |
Returns application/octet-stream Binary
curl 'https://buffmailer.com/api/messages/{id}/attachments/{part}' \
-H "Authorization: Bearer $BUFFMAILER_KEY"/messages/{id}/attachments/{part}/thumbmail.readAn image attachment's thumbnail
A JPEG at most 480 pixels on its longer side. 404 when the attachment isn't an image one can be made of.
Parameters
idpath | uuid |
partpath | integer |
Returns image/jpeg Binary
curl 'https://buffmailer.com/api/messages/{id}/attachments/{part}/thumb' \
-H "Authorization: Bearer $BUFFMAILER_KEY"/messages/{id}/modifymail.modifyLabel a message
Parameters
idpath | uuid |
Body application/json
add | string[] |
remove | string[] |
Returns MessageLabels
idrequired | uuid |
labelsrequired | string[] |
curl -X POST 'https://buffmailer.com/api/messages/{id}/modify' \
-H "Authorization: Bearer $BUFFMAILER_KEY" \
-H 'Content-Type: application/json' \
-d '{
"add": [
"STARRED"
],
"remove": [
"INBOX",
"UNREAD"
]
}'/messages/{id}/rawmail.readRaw message
curl 'https://buffmailer.com/api/messages/{id}/raw' \
-H "Authorization: Bearer $BUFFMAILER_KEY"Labels
System labels (INBOX, SENT, TRASH, …) and the user's own.
/labelsmail.readList labels
System and user labels, with thread counts.
Returns LabelList
draftsrequired | integer Drafts not scheduled to send. |
labelsrequired | LabelCount[] |
scheduledrequired | integer Drafts waiting to send. |
curl 'https://buffmailer.com/api/labels' \ -H "Authorization: Bearer $BUFFMAILER_KEY"
/labelsmail.modifyCreate a label
Body application/json
color | string or null A hex color like #1a73e8. |
namerequired | string Up to 100 characters; / nests, e.g. Clients/Acme. |
Returns Label
color | string or null |
created_atrequired | datetime |
idrequired | uuid |
namerequired | string |
curl -X POST 'https://buffmailer.com/api/labels' \
-H "Authorization: Bearer $BUFFMAILER_KEY" \
-H 'Content-Type: application/json' \
-d '{
"name": "Clients/Acme",
"color": "#1a73e8"
}'/labels/{id}mail.modifyRename or recolor a label
Parameters
idpath | uuid |
Body application/json
color | string or nullnull clears it. |
name | string or null |
Returns Label
color | string or null |
created_atrequired | datetime |
idrequired | uuid |
namerequired | string |
curl -X PATCH 'https://buffmailer.com/api/labels/{id}' \
-H "Authorization: Bearer $BUFFMAILER_KEY" \
-H 'Content-Type: application/json' \
-d '{}'/labels/{id}mail.modifyDelete a label
curl -X DELETE 'https://buffmailer.com/api/labels/{id}' \
-H "Authorization: Bearer $BUFFMAILER_KEY"Sending
Send mail and stage attachments.
/contacts/suggestmail.readSuggest recipients
/sendmail.sendSend a message
JSON with attachments as upload ids or base64, or multipart/form-data with the JSON in a message field and the files alongside: curl -F message='{"to":["[email protected]"],"subject":"Hi","text":"Hello"}' -F [email protected]. Counts toward the plan's daily sending limit, per recipient.
Body application/json
attachments | AttachmentInput[] |
bcc | Recipient[] |
cc | Recipient[] |
draft_id | uuid or null A draft to delete once sent. |
from | string or null One of the user's addresses (see GET /me); their own by default. |
html | string or null HTML body; it is sanitized. A text part is made from it unless text is given. |
in_reply_to | uuid or null A message in this mailbox being answered: sets In-Reply-To, References and the thread. |
reply_to | Recipient[] |
subject | string |
text | string or null |
to | Recipient[] |
Body multipart/form-data
file | Binary[] or null Any other file fields become attachments, named after the file. |
messagerequired | string The SendRequest as JSON. |
Returns Submitted
deliveredrequired | integer Recipients in this organization, delivered at once. |
failedrequired | string[] Recipients refused, e.g. suppressed or unknown. |
message_idrequired | uuid |
queuedrequired | integer Recipients elsewhere, queued for delivery. |
thread_idrequired | uuid |
curl -X POST 'https://buffmailer.com/api/send' \
-H "Authorization: Bearer $BUFFMAILER_KEY" \
-H 'Content-Type: application/json' \
-d '{
"to": [
"Bob Jones <[email protected]>"
],
"cc": [
{
"name": "Ann",
"address": "[email protected]"
}
],
"subject": "Quarterly report",
"html": "<p>Hi Bob, the report is attached.</p>",
"attachments": [
{
"filename": "notes.txt",
"content_base64": "aGVsbG8="
}
]
}'/uploadsmail.sendUpload an attachment
Stage a file to attach by upload_id. Unused uploads are deleted after a day.
Body multipart/form-data
filerequired | Binary |
Returns Upload
content_typerequired | string |
created_atrequired | datetime |
filenamerequired | string |
idrequired | uuid |
sizerequired | integer |
curl -X POST 'https://buffmailer.com/api/uploads' \ -H "Authorization: Bearer $BUFFMAILER_KEY" \ -F [email protected]
/uploads/from-messagemail.sendReuse a message's attachments
Copies attachments of a message into uploads, for forwarding.
Body application/json
message_idrequired | uuid |
parts | integer[] or null Attachment part numbers; all non-inline attachments when absent. |
Returns Upload[]
content_typerequired | string |
created_atrequired | datetime |
filenamerequired | string |
idrequired | uuid |
sizerequired | integer |
curl -X POST 'https://buffmailer.com/api/uploads/from-message' \
-H "Authorization: Bearer $BUFFMAILER_KEY" \
-H 'Content-Type: application/json' \
-d '{
"message_id": "0190c9a4-5b2e-7c41-9a3d-2f6e8b1c4d7a"
}'/uploads/{id}mail.sendDelete an upload
curl -X DELETE 'https://buffmailer.com/api/uploads/{id}' \
-H "Authorization: Bearer $BUFFMAILER_KEY"Drafts
Unsent messages. A draft can be sent now or at a set time.
/draftsmail.sendList drafts
Parameters
scheduledquery | boolean List the drafts waiting to send, soonest first, instead of the others. |
Returns DraftList
draftsrequired | DraftSummary[] |
curl 'https://buffmailer.com/api/drafts' \ -H "Authorization: Bearer $BUFFMAILER_KEY"
/draftsmail.sendCreate a draft
Body application/json
attachments | uuid[] Upload ids. |
bcc | string[] |
cc | string[] |
from | string or null |
html | string |
in_reply_to | uuid or null |
subject | string |
to | string[] |
Returns Draft
attachmentsrequired | Upload[] |
bccrequired | string[] |
ccrequired | string[] |
created_atrequired | datetime |
from | string or null |
htmlrequired | string |
idrequired | uuid |
in_reply_to | uuid or null |
send_at | datetime or null When it's scheduled to send. |
send_error | SendError or null |
sendingrequired | boolean Going out right now. |
snippetrequired | string |
subjectrequired | string |
thread_id | uuid or null |
torequired | string[] |
updated_atrequired | datetime |
curl -X POST 'https://buffmailer.com/api/drafts' \
-H "Authorization: Bearer $BUFFMAILER_KEY" \
-H 'Content-Type: application/json' \
-d '{
"to": [
"[email protected]"
],
"subject": "Draft",
"html": "<p>Not done yet</p>",
"attachments": []
}'/drafts/{id}mail.sendGet a draft
Parameters
idpath | uuid |
Returns Draft
attachmentsrequired | Upload[] |
bccrequired | string[] |
ccrequired | string[] |
created_atrequired | datetime |
from | string or null |
htmlrequired | string |
idrequired | uuid |
in_reply_to | uuid or null |
send_at | datetime or null When it's scheduled to send. |
send_error | SendError or null |
sendingrequired | boolean Going out right now. |
snippetrequired | string |
subjectrequired | string |
thread_id | uuid or null |
torequired | string[] |
updated_atrequired | datetime |
curl 'https://buffmailer.com/api/drafts/{id}' \
-H "Authorization: Bearer $BUFFMAILER_KEY"/drafts/{id}mail.sendReplace a draft
Not while it's scheduled; cancel the send first.
Parameters
idpath | uuid |
Body application/json
attachments | uuid[] Upload ids. |
bcc | string[] |
cc | string[] |
from | string or null |
html | string |
in_reply_to | uuid or null |
subject | string |
to | string[] |
Returns Draft
attachmentsrequired | Upload[] |
bccrequired | string[] |
ccrequired | string[] |
created_atrequired | datetime |
from | string or null |
htmlrequired | string |
idrequired | uuid |
in_reply_to | uuid or null |
send_at | datetime or null When it's scheduled to send. |
send_error | SendError or null |
sendingrequired | boolean Going out right now. |
snippetrequired | string |
subjectrequired | string |
thread_id | uuid or null |
torequired | string[] |
updated_atrequired | datetime |
curl -X PUT 'https://buffmailer.com/api/drafts/{id}' \
-H "Authorization: Bearer $BUFFMAILER_KEY" \
-H 'Content-Type: application/json' \
-d '{
"to": [
"[email protected]"
],
"subject": "Draft",
"html": "<p>Not done yet</p>",
"attachments": []
}'/drafts/{id}mail.sendDelete a draft
curl -X DELETE 'https://buffmailer.com/api/drafts/{id}' \
-H "Authorization: Bearer $BUFFMAILER_KEY"/drafts/{id}/cancelmail.sendCancel a scheduled send
The draft stays, unscheduled. Fails with draft.sending once it's going out.
Parameters
idpath | uuid |
Returns Draft
attachmentsrequired | Upload[] |
bccrequired | string[] |
ccrequired | string[] |
created_atrequired | datetime |
from | string or null |
htmlrequired | string |
idrequired | uuid |
in_reply_to | uuid or null |
send_at | datetime or null When it's scheduled to send. |
send_error | SendError or null |
sendingrequired | boolean Going out right now. |
snippetrequired | string |
subjectrequired | string |
thread_id | uuid or null |
torequired | string[] |
updated_atrequired | datetime |
curl -X POST 'https://buffmailer.com/api/drafts/{id}/cancel' \
-H "Authorization: Bearer $BUFFMAILER_KEY"/drafts/{id}/sendmail.sendSend a draft
Now with no body, or later with send_at or delay. A scheduled send that fails at its time puts the draft back with send_error, and a notice lands in the inbox.
Parameters
idpath | uuid |
Body application/json
Returns DraftSent
One of:
deliveredrequired | integer Recipients in this organization, delivered at once. |
failedrequired | string[] Recipients refused, e.g. suppressed or unknown. |
message_idrequired | uuid |
queuedrequired | integer Recipients elsewhere, queued for delivery. |
thread_idrequired | uuid |
draft_idrequired | uuid |
scheduledrequired | boolean |
send_atrequired | datetime |
curl -X POST 'https://buffmailer.com/api/drafts/{id}/send' \
-H "Authorization: Bearer $BUFFMAILER_KEY" \
-H 'Content-Type: application/json' \
-d '{
"send_at": "2026-11-02T08:00:00Z"
}'Filters
Rules applied to incoming mail.
/filtersmail.readList filters
Returns FilterList
filtersrequired | Filter[] |
curl 'https://buffmailer.com/api/filters' \ -H "Authorization: Bearer $BUFFMAILER_KEY"
/filtersmail.modifyCreate a filter
Up to 200. It applies to mail arriving from now on, and to the mail already here with apply_existing.
Body application/json
actionsrequired | FilterActions |
apply_existing | boolean Also apply it to the mail already here (spam and trash aside), up to 10,000 messages. |
criteriarequired | FilterCriteria |
Returns FilterSaved
actionsrequired | FilterActions |
appliedrequired | integer Threads changed by apply_existing. |
created_atrequired | datetime |
criteriarequired | FilterCriteria |
idrequired | uuid |
curl -X POST 'https://buffmailer.com/api/filters' \
-H "Authorization: Bearer $BUFFMAILER_KEY" \
-H 'Content-Type: application/json' \
-d '{
"criteria": {
"from": "[email protected]"
},
"actions": {
"skip_inbox": true,
"mark_read": true
},
"apply_existing": true
}'/filters/previewmail.readPreview a filter
How many conversations already here the criteria match.
Body application/json
criteriarequired | FilterCriteria |
Returns FilterPreview
morerequired | boolean There are more than 1,000. |
threadsrequired | integer Conversations already here it matches, up to 1,000. |
curl -X POST 'https://buffmailer.com/api/filters/preview' \
-H "Authorization: Bearer $BUFFMAILER_KEY" \
-H 'Content-Type: application/json' \
-d '{
"criteria": {}
}'/filters/{id}mail.readGet a filter
Parameters
idpath | uuid |
Returns Filter
actionsrequired | FilterActions |
created_atrequired | datetime |
criteriarequired | FilterCriteria |
idrequired | uuid |
curl 'https://buffmailer.com/api/filters/{id}' \
-H "Authorization: Bearer $BUFFMAILER_KEY"/filters/{id}mail.modifyReplace a filter
Parameters
idpath | uuid |
Body application/json
actionsrequired | FilterActions |
apply_existing | boolean Also apply it to the mail already here (spam and trash aside), up to 10,000 messages. |
criteriarequired | FilterCriteria |
Returns FilterSaved
actionsrequired | FilterActions |
appliedrequired | integer Threads changed by apply_existing. |
created_atrequired | datetime |
criteriarequired | FilterCriteria |
idrequired | uuid |
curl -X PUT 'https://buffmailer.com/api/filters/{id}' \
-H "Authorization: Bearer $BUFFMAILER_KEY" \
-H 'Content-Type: application/json' \
-d '{
"criteria": {
"from": "[email protected]"
},
"actions": {
"skip_inbox": true,
"mark_read": true
},
"apply_existing": true
}'/filters/{id}mail.modifyDelete a filter
curl -X DELETE 'https://buffmailer.com/api/filters/{id}' \
-H "Authorization: Bearer $BUFFMAILER_KEY"Domains
Needs the admin scope.
/domainsadminList domains
Returns DomainSummary[]
checked_at | datetime or null |
checksrequired | object |
created_atrequired | datetime |
groupsrequired | integer |
idrequired | uuid |
mailbox | MailboxRef or null |
namerequired | string |
statusrequired | stringpending, verified or suspended. |
usersrequired | integer |
verified_at | datetime or null |
curl 'https://buffmailer.com/api/domains' \ -H "Authorization: Bearer $BUFFMAILER_KEY"
/domainsadminAdd a domain
Then add its records at the DNS host; it is checked every few minutes, or on POST /domains/{id}/verify.
Body application/json
namerequired | string e.g. acme.com. |
Returns Created
idrequired | uuid |
namerequired | string |
curl -X POST 'https://buffmailer.com/api/domains' \
-H "Authorization: Bearer $BUFFMAILER_KEY" \
-H 'Content-Type: application/json' \
-d '{
"name": "acme.com"
}'/domains/{id}adminGet a domain
The domain, the DNS records it needs and how the last check went.
Parameters
idpath | uuid |
Returns DomainDetail
cloudflarerequired | objectdash_url: the zone's DNS records in the Cloudflare dashboard. |
countsrequired | object |
domainrequired | Domain |
domain_connectrequired | object |
expires_at | datetime or null When an unverified domain is released. |
recordsrequired | DnsRecord[] What to add at the DNS host. |
curl 'https://buffmailer.com/api/domains/{id}' \
-H "Authorization: Bearer $BUFFMAILER_KEY"/domains/{id}adminSet a domain's catch-all address
Parameters
idpath | uuid |
Body application/json
catch_all | string or null A mailbox, alias or group of the domain ( info or [email protected]) that gets mail sent to addresses the domain doesn't have. null turns it off: such mail bounces. |
Returns DomainDetail
cloudflarerequired | objectdash_url: the zone's DNS records in the Cloudflare dashboard. |
countsrequired | object |
domainrequired | Domain |
domain_connectrequired | object |
expires_at | datetime or null When an unverified domain is released. |
recordsrequired | DnsRecord[] What to add at the DNS host. |
curl -X PATCH 'https://buffmailer.com/api/domains/{id}' \
-H "Authorization: Bearer $BUFFMAILER_KEY" \
-H 'Content-Type: application/json' \
-d '{}'/domains/{id}adminRemove a domain
curl -X DELETE 'https://buffmailer.com/api/domains/{id}' \
-H "Authorization: Bearer $BUFFMAILER_KEY"/domains/{id}/verifyadminCheck a domain's DNS now
Parameters
idpath | uuid |
Returns DomainDetail
cloudflarerequired | objectdash_url: the zone's DNS records in the Cloudflare dashboard. |
countsrequired | object |
domainrequired | Domain |
domain_connectrequired | object |
expires_at | datetime or null When an unverified domain is released. |
recordsrequired | DnsRecord[] What to add at the DNS host. |
curl -X POST 'https://buffmailer.com/api/domains/{id}/verify' \
-H "Authorization: Bearer $BUFFMAILER_KEY"Users
Mailboxes in the organization. Needs the admin scope.
/usersadminList users
Returns User[]
addressrequired | string |
aliasesrequired | string[] |
created_atrequired | datetime |
domain_idrequired | uuid |
idrequired | uuid |
last_seen_at | datetime or null |
namerequired | string |
quota_bytes | integer or nullnull uses the organization's storage. |
recovery_email | string or null |
rolerequired | string |
storage_usedrequired | integer |
suspendedrequired | boolean |
two_factorrequired | boolean |
curl 'https://buffmailer.com/api/users' \ -H "Authorization: Bearer $BUFFMAILER_KEY"
/usersadminCreate a user
Body application/json
domain_idrequired | uuid A verified domain. |
local_partrequired | string |
namerequired | string |
passwordrequired | string At least 10 characters. |
quota_bytes | integer or null |
recovery_email | string or null |
role | string or nullmember (default), admin or owner. |
Returns User
addressrequired | string |
aliasesrequired | string[] |
created_atrequired | datetime |
domain_idrequired | uuid |
idrequired | uuid |
last_seen_at | datetime or null |
namerequired | string |
quota_bytes | integer or nullnull uses the organization's storage. |
recovery_email | string or null |
rolerequired | string |
storage_usedrequired | integer |
suspendedrequired | boolean |
two_factorrequired | boolean |
curl -X POST 'https://buffmailer.com/api/users' \
-H "Authorization: Bearer $BUFFMAILER_KEY" \
-H 'Content-Type: application/json' \
-d '{
"local_part": "bob",
"domain_id": "0190c9a4-5b2e-7c41-9a3d-2f6e8b1c4d7a",
"name": "Bob Jones",
"password": "a long enough password"
}'/users/{id}adminGet a user
Parameters
idpath | uuid |
Returns User
addressrequired | string |
aliasesrequired | string[] |
created_atrequired | datetime |
domain_idrequired | uuid |
idrequired | uuid |
last_seen_at | datetime or null |
namerequired | string |
quota_bytes | integer or nullnull uses the organization's storage. |
recovery_email | string or null |
rolerequired | string |
storage_usedrequired | integer |
suspendedrequired | boolean |
two_factorrequired | boolean |
curl 'https://buffmailer.com/api/users/{id}' \
-H "Authorization: Bearer $BUFFMAILER_KEY"/users/{id}adminUpdate a user
Parameters
idpath | uuid |
Body application/json
name | string or null |
password | string or null Sets a new password and signs them out everywhere. |
quota_bytes | integer or nullnull removes the cap. |
recovery_email | string or null |
reset_two_factor | boolean or null Removes their authenticator and signs them out everywhere; they set up a new one at their next sign-in. Browser sessions only. |
role | string or null |
suspended | boolean or null Suspended users can't sign in and get no mail. |
Returns User
addressrequired | string |
aliasesrequired | string[] |
created_atrequired | datetime |
domain_idrequired | uuid |
idrequired | uuid |
last_seen_at | datetime or null |
namerequired | string |
quota_bytes | integer or nullnull uses the organization's storage. |
recovery_email | string or null |
rolerequired | string |
storage_usedrequired | integer |
suspendedrequired | boolean |
two_factorrequired | boolean |
curl -X PATCH 'https://buffmailer.com/api/users/{id}' \
-H "Authorization: Bearer $BUFFMAILER_KEY" \
-H 'Content-Type: application/json' \
-d '{}'/users/{id}adminDelete a user
Deletes their mail too. The organization's last owner can't be deleted.
Parameters
idpath | uuid |
Returns Ok
okrequired | boolean |
curl -X DELETE 'https://buffmailer.com/api/users/{id}' \
-H "Authorization: Bearer $BUFFMAILER_KEY"Groups
Addresses that deliver to their members. Needs the admin scope.
/groupsadminList groups
Returns Group[]
addressrequired | string |
created_atrequired | datetime |
descriptionrequired | string |
domain_idrequired | uuid |
idrequired | uuid |
membersrequired | integer |
namerequired | string |
who_can_postrequired | stringanyone, org or members. |
curl 'https://buffmailer.com/api/groups' \ -H "Authorization: Bearer $BUFFMAILER_KEY"
/groupsadminCreate a group
Body application/json
description | string or null |
domain_idrequired | uuid |
local_partrequired | string |
members | string[] or null Addresses inside or outside the organization. |
namerequired | string |
who_can_post | string or nullorg by default. |
Returns GroupCreated
addressrequired | string |
idrequired | uuid |
members_addedrequired | integer |
curl -X POST 'https://buffmailer.com/api/groups' \
-H "Authorization: Bearer $BUFFMAILER_KEY" \
-H 'Content-Type: application/json' \
-d '{
"local_part": "sales",
"domain_id": "0190c9a4-5b2e-7c41-9a3d-2f6e8b1c4d7a",
"name": "Sales",
"who_can_post": "anyone",
"members": [
"[email protected]",
"[email protected]"
]
}'/groups/{id}adminGet a group and its members
curl 'https://buffmailer.com/api/groups/{id}' \
-H "Authorization: Bearer $BUFFMAILER_KEY"/groups/{id}adminUpdate a group
Parameters
idpath | uuid |
Body application/json
description | string or null |
name | string or null |
who_can_post | string or null |
Returns GroupDetail
grouprequired | Group |
membersrequired | Member[] |
curl -X PATCH 'https://buffmailer.com/api/groups/{id}' \
-H "Authorization: Bearer $BUFFMAILER_KEY" \
-H 'Content-Type: application/json' \
-d '{}'/groups/{id}adminDelete a group
curl -X DELETE 'https://buffmailer.com/api/groups/{id}' \
-H "Authorization: Bearer $BUFFMAILER_KEY"/groups/{id}/membersadminAdd members
curl -X POST 'https://buffmailer.com/api/groups/{id}/members' \
-H "Authorization: Bearer $BUFFMAILER_KEY" \
-H 'Content-Type: application/json' \
-d '{
"addresses": [
"[email protected]",
"[email protected]"
]
}'/groups/{id}/members/{address}adminRemove a member
curl -X DELETE 'https://buffmailer.com/api/groups/{id}/members/{address}' \
-H "Authorization: Bearer $BUFFMAILER_KEY"Aliases
Extra addresses for a user. Needs the admin scope.
/aliasesadminList aliases
Returns Alias[]
addressrequired | string |
created_atrequired | datetime |
domain_idrequired | uuid |
rolerequired | boolean A role address like postmaster@. |
user_addressrequired | string |
user_idrequired | uuid |
curl 'https://buffmailer.com/api/aliases' \ -H "Authorization: Bearer $BUFFMAILER_KEY"
/aliasesadminCreate an alias
Body application/json
domain_idrequired | uuid |
local_partrequired | string |
user_idrequired | uuid |
Returns AliasCreated
addressrequired | string |
curl -X POST 'https://buffmailer.com/api/aliases' \
-H "Authorization: Bearer $BUFFMAILER_KEY" \
-H 'Content-Type: application/json' \
-d '{
"local_part": "billing",
"domain_id": "0190c9a4-5b2e-7c41-9a3d-2f6e8b1c4d7a",
"user_id": "0190c9a4-6d1f-7a02-8b4e-3c5d9e0f1a2b"
}'/aliases/{address}adminPoint an alias at another user
curl -X PATCH 'https://buffmailer.com/api/aliases/{address}' \
-H "Authorization: Bearer $BUFFMAILER_KEY" \
-H 'Content-Type: application/json' \
-d '{
"user_id": "0190c9a4-5b2e-7c41-9a3d-2f6e8b1c4d7a"
}'/aliases/{address}adminDelete an alias
curl -X DELETE 'https://buffmailer.com/api/aliases/{address}' \
-H "Authorization: Bearer $BUFFMAILER_KEY"Delivery
The outbound queue and the suppression list. Needs the admin scope.
/outboundadminThe outbound queue
One row per recipient, newest first, 100 a page.
Parameters
statusquery | stringqueued, sending, sent, failed or cancelled. |
qquery | string Matches the sender or recipient. |
beforequery | datetime The last row's created_at, for the next page. |
before_idquery | uuid The last row's id. |
Returns OutboundPage
deliveriesrequired | Outbound[] |
morerequired | boolean Another page follows. |
curl 'https://buffmailer.com/api/outbound' \ -H "Authorization: Bearer $BUFFMAILER_KEY"
/outbound/{id}/canceladminCancel a queued delivery
curl -X POST 'https://buffmailer.com/api/outbound/{id}/cancel' \
-H "Authorization: Bearer $BUFFMAILER_KEY"/outbound/{id}/retryadminRetry a delivery now
curl -X POST 'https://buffmailer.com/api/outbound/{id}/retry' \
-H "Authorization: Bearer $BUFFMAILER_KEY"/suppressionsadminList suppressed addresses
Addresses that bounced hard or complained; mail to them isn't sent.
Returns Suppression[]
addressrequired | string |
created_atrequired | datetime |
reasonrequired | string |
curl 'https://buffmailer.com/api/suppressions' \ -H "Authorization: Bearer $BUFFMAILER_KEY"
/suppressionsadminSuppress an address
curl -X POST 'https://buffmailer.com/api/suppressions' \
-H "Authorization: Bearer $BUFFMAILER_KEY" \
-H 'Content-Type: application/json' \
-d '{
"address": "[email protected]",
"reason": "Asked to stop"
}'/suppressions/{address}adminStop suppressing an address
curl -X DELETE 'https://buffmailer.com/api/suppressions/{address}' \
-H "Authorization: Bearer $BUFFMAILER_KEY"Webhooks
Signed HTTPS callbacks for mail events. Needs the admin scope and a plan with webhooks.
/webhooksadminList webhooks
Returns WebhookList
availablerequired | boolean The plan includes webhooks. |
eventsrequired | string[] Events there are to subscribe to. |
webhooksrequired | Webhook[] |
curl 'https://buffmailer.com/api/webhooks' \ -H "Authorization: Bearer $BUFFMAILER_KEY"
/webhooksadminCreate a webhook
The response has the signing secret; store it, it isn't shown again.
Body application/json
eventsrequired | string[]message.received, message.sent, message.bounced, domain.verified, or *. |
urlrequired | string HTTPS, on a public host. |
Returns WebhookCreated
activerequired | boolean |
created_atrequired | datetime |
delivered_24hrequired | integer |
eventsrequired | string[] Event names, or ["*"] for all. |
failed_24hrequired | integer |
idrequired | uuid |
last_delivery_at | datetime or null |
retryingrequired | integer Waiting for another attempt. |
urlrequired | string |
secretrequired | string The signing secret. Shown only here and when rolled. |
curl -X POST 'https://buffmailer.com/api/webhooks' \
-H "Authorization: Bearer $BUFFMAILER_KEY" \
-H 'Content-Type: application/json' \
-d '{
"url": "https://hooks.acme.com/buffmailer",
"events": [
"message.received",
"message.bounced"
]
}'/webhooks/{id}adminGet a webhook
Parameters
idpath | uuid |
Returns Webhook
activerequired | boolean |
created_atrequired | datetime |
delivered_24hrequired | integer |
eventsrequired | string[] Event names, or ["*"] for all. |
failed_24hrequired | integer |
idrequired | uuid |
last_delivery_at | datetime or null |
retryingrequired | integer Waiting for another attempt. |
urlrequired | string |
curl 'https://buffmailer.com/api/webhooks/{id}' \
-H "Authorization: Bearer $BUFFMAILER_KEY"/webhooks/{id}adminUpdate a webhook
Parameters
idpath | uuid |
Body application/json
active | boolean or null |
events | string[] or null |
url | string or null |
Returns Webhook
activerequired | boolean |
created_atrequired | datetime |
delivered_24hrequired | integer |
eventsrequired | string[] Event names, or ["*"] for all. |
failed_24hrequired | integer |
idrequired | uuid |
last_delivery_at | datetime or null |
retryingrequired | integer Waiting for another attempt. |
urlrequired | string |
curl -X PATCH 'https://buffmailer.com/api/webhooks/{id}' \
-H "Authorization: Bearer $BUFFMAILER_KEY" \
-H 'Content-Type: application/json' \
-d '{}'/webhooks/{id}adminDelete a webhook
curl -X DELETE 'https://buffmailer.com/api/webhooks/{id}' \
-H "Authorization: Bearer $BUFFMAILER_KEY"/webhooks/{id}/deliveriesadminList deliveries
Newest first, 50 a page, kept for 30 days.
Parameters
idpath | uuid |
statusquery | stringpending, delivered or failed. |
beforequery | integer The previous page's next. |
Returns DeliveryPage
deliveriesrequired | WebhookDelivery[] |
next | integer or null |
curl 'https://buffmailer.com/api/webhooks/{id}/deliveries' \
-H "Authorization: Bearer $BUFFMAILER_KEY"/webhooks/{id}/deliveries/{delivery}/retryadminRedeliver
Sends a delivery again, with a fresh set of retries.
Parameters
idpath | uuid |
deliverypath | integer |
Returns Ok
okrequired | boolean |
curl -X POST 'https://buffmailer.com/api/webhooks/{id}/deliveries/{delivery}/retry' \
-H "Authorization: Bearer $BUFFMAILER_KEY"/webhooks/{id}/secretadminRoll the signing secret
curl -X POST 'https://buffmailer.com/api/webhooks/{id}/secret' \
-H "Authorization: Bearer $BUFFMAILER_KEY"/webhooks/{id}/testadminSend a test event
Queues a ping event to this endpoint.
Parameters
idpath | uuid |
Returns TestQueued
delivery_idrequired | integer |
curl -X POST 'https://buffmailer.com/api/webhooks/{id}/test' \
-H "Authorization: Bearer $BUFFMAILER_KEY"Schemas
Added
addedrequired | integer |
Alias
addressrequired | string |
created_atrequired | datetime |
domain_idrequired | uuid |
rolerequired | boolean A role address like postmaster@. |
user_addressrequired | string |
user_idrequired | uuid |
AliasCreated
addressrequired | string |
Attachment
content_id | string or null |
content_typerequired | string |
filenamerequired | string |
inlinerequired | boolean Shown in the body ( cid:) rather than listed. |
partrequired | integer Its MIME part number. |
sizerequired | integer |
thumb_url | string or null A small JPEG of an image attachment, when one can be made. |
urlrequired | string Download link; needs the same authorization. |
AttachmentInput
One of:
POST /uploads.upload_idrequired | uuid |
content_base64required | string |
content_type | string or null Guessed from the filename when absent. |
filenamerequired | string |
Binary
Raw bytes.
binaryContact
addressrequired | string |
internalrequired | boolean In this organization's directory. |
namerequired | string |
Contacts
contactsrequired | Contact[] |
Created
idrequired | uuid |
namerequired | string |
Cursor
Pass both values back to get the next page.
beforerequired | datetime |
before_idrequired | uuid |
Deleted
deletedrequired | integer |
DeliveryPage
deliveriesrequired | WebhookDelivery[] |
next | integer or null |
DnsRecord
fqdnrequired | string |
hostrequired | string Relative to the zone: @ or a label like bm1._domainkey. |
kindrequired | stringverify, mx, spf, dkim or dmarc. |
priority | integer or null |
requiredrequired | boolean |
typerequired | stringTXT or MX. |
valuerequired | string |
Domain
catch_all | string or null Gets mail sent to addresses the domain doesn't have. |
checked_at | datetime or null |
checksrequired | object The last check: each record, whether it was found, and what was. |
created_atrequired | datetime |
dkim_public_keyrequired | string |
dkim_selectorrequired | string |
idrequired | uuid |
namerequired | string |
org_idrequired | uuid |
statusrequired | string |
verified_at | datetime or null |
verify_tokenrequired | string Goes in the buffmailer-verification= TXT record. |
DomainDetail
cloudflarerequired | objectdash_url: the zone's DNS records in the Cloudflare dashboard. |
countsrequired | object |
domainrequired | Domain |
domain_connectrequired | object |
expires_at | datetime or null When an unverified domain is released. |
recordsrequired | DnsRecord[] What to add at the DNS host. |
DomainSummary
checked_at | datetime or null |
checksrequired | object |
created_atrequired | datetime |
groupsrequired | integer |
idrequired | uuid |
mailbox | MailboxRef or null |
namerequired | string |
statusrequired | stringpending, verified or suspended. |
usersrequired | integer |
verified_at | datetime or null |
DomainUpdate
catch_all | string or null A mailbox, alias or group of the domain ( info or [email protected]) that gets mail sent to addresses the domain doesn't have. null turns it off: such mail bounces. |
DomainVerified
domain.verified: a domain's DNS checks passed.
domain_idrequired | uuid |
namerequired | string |
Draft
attachmentsrequired | Upload[] |
bccrequired | string[] |
ccrequired | string[] |
created_atrequired | datetime |
from | string or null |
htmlrequired | string |
idrequired | uuid |
in_reply_to | uuid or null |
send_at | datetime or null When it's scheduled to send. |
send_error | SendError or null |
sendingrequired | boolean Going out right now. |
snippetrequired | string |
subjectrequired | string |
thread_id | uuid or null |
torequired | string[] |
updated_atrequired | datetime |
DraftInput
attachments | uuid[] Upload ids. |
bcc | string[] |
cc | string[] |
from | string or null |
html | string |
in_reply_to | uuid or null |
subject | string |
to | string[] |
DraftList
draftsrequired | DraftSummary[] |
DraftSent
One of:
deliveredrequired | integer Recipients in this organization, delivered at once. |
failedrequired | string[] Recipients refused, e.g. suppressed or unknown. |
message_idrequired | uuid |
queuedrequired | integer Recipients elsewhere, queued for delivery. |
thread_idrequired | uuid |
draft_idrequired | uuid |
scheduledrequired | boolean |
send_atrequired | datetime |
DraftSummary
attachmentsrequired | integer |
idrequired | uuid |
send_at | datetime or null |
send_error | SendError or null |
snippetrequired | string |
subjectrequired | string |
thread_id | uuid or null |
torequired | string[] |
updated_atrequired | datetime |
Emptied
messagesrequired | integer |
threadsrequired | integer |
EmptyLabel
labelrequired | stringTRASH or SPAM. |
Error
errorrequired | ErrorDetail |
ErrorDetail
coderequired | string Stable and machine-readable, e.g. send.recipient_invalid. |
params | object or null |
Filter
actionsrequired | FilterActions |
created_atrequired | datetime |
criteriarequired | FilterCriteria |
idrequired | uuid |
FilterActions
At least one is needed.
important | boolean |
label | uuid or null A user label id to add. |
mark_read | boolean |
never_spam | boolean Take it out of spam. |
skip_inbox | boolean Archive it. |
star | boolean |
trash | boolean |
FilterCriteria
Every field given must match; at least one is needed. Text fields are case-insensitive.
from | string Part of the sender's address or name; [email protected], [email protected] or | or OR for any of several. |
has_attachment | boolean |
has_words | string Words in the subject or body, all of them; "a phrase" and OR work. |
not_words | string Words that must not appear. |
subject | string Part of the subject; | or OR for any of several. |
to | string Part of a To or Cc address or name, the same way. |
FilterInput
actionsrequired | FilterActions |
apply_existing | boolean Also apply it to the mail already here (spam and trash aside), up to 10,000 messages. |
criteriarequired | FilterCriteria |
FilterList
filtersrequired | Filter[] |
FilterPreview
morerequired | boolean There are more than 1,000. |
threadsrequired | integer Conversations already here it matches, up to 1,000. |
FilterPreviewRequest
criteriarequired | FilterCriteria |
FilterSaved
actionsrequired | FilterActions |
appliedrequired | integer Threads changed by apply_existing. |
created_atrequired | datetime |
criteriarequired | FilterCriteria |
idrequired | uuid |
FromMessage
message_idrequired | uuid |
parts | integer[] or null Attachment part numbers; all non-inline attachments when absent. |
Group
addressrequired | string |
created_atrequired | datetime |
descriptionrequired | string |
domain_idrequired | uuid |
idrequired | uuid |
membersrequired | integer |
namerequired | string |
who_can_postrequired | stringanyone, org or members. |
GroupCreated
addressrequired | string |
idrequired | uuid |
members_addedrequired | integer |
GroupPatch
description | string or null |
name | string or null |
who_can_post | string or null |
Ids
idsrequired | uuid[] Up to 500. |
Label
color | string or null |
created_atrequired | datetime |
idrequired | uuid |
namerequired | string |
LabelChanges
Label names to add and remove: system labels (UNREAD, STARRED, INBOX, TRASH, SPAM, …) or label ids. Archiving removes INBOX; trashing adds TRASH.
add | string[] |
remove | string[] |
LabelCount
color | string or null |
idrequired | stringINBOX, SENT, … for system labels, a UUID for the user's. |
namerequired | string |
systemrequired | boolean |
threadsrequired | integer |
unreadrequired | integer Unread threads. |
LabelList
draftsrequired | integer Drafts not scheduled to send. |
labelsrequired | LabelCount[] |
scheduledrequired | integer Drafts waiting to send. |
LabelPatch
color | string or nullnull clears it. |
name | string or null |
Mailbox
addressrequired | string |
namerequired | string"" when the address has no display name. |
MailboxRef
addressrequired | string |
idrequired | uuid |
Me
addressrequired | string |
addressesrequired | string[] The user's address and aliases; any can be a from. |
idrequired | uuid |
mail_hostrequired | string The IMAP and SMTP host. |
namerequired | string |
orgrequired | OrgSummary |
quota_bytes | integer or null |
recovery_email | string or null |
rolerequired | stringowner, admin or member. |
signaturerequired | string HTML. |
staffrequired | boolean |
storage_usedrequired | integer |
two_factorrequired | boolean |
two_factor_owedrequired | boolean This browser session gets 403 2fa.required everywhere but /me until two_factor is on. Never for sessions an org admin opened from the admin console. |
two_factor_requiredrequired | boolean The platform requires an authenticator on every mailbox. |
undo_send_secondsrequired | integer Seconds the web app holds a sent message so it can be undone. |
vacation | VacationOn or null |
viarequired | stringapi_key for API keys. |
Member
added_atrequired | datetime |
addressrequired | string |
kindrequired | stringuser, group, alias or external. |
name | string or null |
Members
addressesrequired | string[] |
Message
attachmentsrequired | Attachment[] |
auth | object or null SPF, DKIM and DMARC results for received mail, e.g. {"spf": "pass", "dkim": "pass", "dmarc": "pass"}. |
bccrequired | Mailbox[] Only on mail this mailbox sent. |
blocked_imagesrequired | boolean Remote images were left out; ask again with images=true. |
ccrequired | Mailbox[] |
daterequired | datetime |
fromrequired | Mailbox |
has_attachmentsrequired | boolean |
html | string or null Sanitized HTML, safe to show in a sandboxed frame. null on older messages of a long thread; fetch the message. |
idrequired | uuid |
in_reply_to | string or null |
labelsrequired | string[] |
list_unsubscribe | string or null An https: or mailto: unsubscribe link. |
message_id | string or null The Message-ID header. |
received_atrequired | datetime |
referencesrequired | string[] |
reply_torequired | Mailbox[] |
sizerequired | integer |
snippetrequired | string |
spam_score | number or null |
subjectrequired | string |
text | string or null The plain-text body, on GET /messages/{id}. |
thread_idrequired | uuid |
torequired | Mailbox[] |
MessageBounced
message.bounced: a recipient's server refused it for good.
code | integer or null |
error | string or null |
fromrequired | string |
message_id | uuid or null |
recipientrequired | string |
remote_host | string or null |
MessageLabels
idrequired | uuid |
labelsrequired | string[] |
MessagePage
messagesrequired | MessageSummary[] |
next | Cursor or null |
MessageReceived
message.received: new mail arrived in a mailbox, including mail a filter archived (spam and trash don't count).
fromrequired | Mailbox |
message_idrequired | uuid |
snippetrequired | string |
subjectrequired | string |
thread_idrequired | uuid |
torequired | Mailbox[] |
user_idrequired | uuid |
MessageSent
message.sent: a mailbox sent mail, by API, web or SMTP.
failedrequired | string[] Recipients refused outright. |
fromrequired | string |
message_idrequired | uuid |
recipientsrequired | string[] |
subjectrequired | string |
thread_idrequired | uuid |
user_idrequired | uuid |
MessageSummary
ccrequired | Mailbox[] |
daterequired | datetime The Date header, or when it arrived. |
fromrequired | Mailbox |
has_attachmentsrequired | boolean |
idrequired | uuid |
labelsrequired | string[] |
received_atrequired | datetime |
sizerequired | integer |
snippetrequired | string |
subjectrequired | string |
thread_idrequired | uuid |
torequired | Mailbox[] |
NewAlias
domain_idrequired | uuid |
local_partrequired | string |
user_idrequired | uuid |
NewDomain
namerequired | string e.g. acme.com. |
NewGroup
description | string or null |
domain_idrequired | uuid |
local_partrequired | string |
members | string[] or null Addresses inside or outside the organization. |
namerequired | string |
who_can_post | string or nullorg by default. |
NewLabel
color | string or null A hex color like #1a73e8. |
namerequired | string Up to 100 characters; / nests, e.g. Clients/Acme. |
NewSuppression
addressrequired | string |
reason | string or null |
NewUser
domain_idrequired | uuid A verified domain. |
local_partrequired | string |
namerequired | string |
passwordrequired | string At least 10 characters. |
quota_bytes | integer or null |
recovery_email | string or null |
role | string or nullmember (default), admin or owner. |
NewWebhook
eventsrequired | string[]message.received, message.sent, message.bounced, domain.verified, or *. |
urlrequired | string HTTPS, on a public host. |
Ok
okrequired | boolean |
OrgSummary
idrequired | uuid |
namerequired | string |
planrequired | Plan |
storage_usedrequired | integer |
suspendedrequired | boolean |
Outbound
attemptsrequired | integer |
created_atrequired | datetime |
expires_atrequired | datetime It gives up then. |
idrequired | uuid |
last_code | integer or null The last SMTP reply code. |
last_error | string or null |
mail_fromrequired | string |
message_id | uuid or null |
next_attempt_atrequired | datetime |
rcptrequired | string |
remote_host | string or null |
statusrequired | string |
subject | string or null |
updated_atrequired | datetime |
OutboundPage
deliveriesrequired | Outbound[] |
morerequired | boolean Another page follows. |
Participant
addressrequired | string |
namerequired | string |
unreadrequired | boolean Has an unread message from them. |
Plan
api_rpmrequired | integer API requests per minute, per key. |
daily_send_limitrequired | integer |
idrequired | string |
max_attachment_bytesrequired | integer |
max_domains | integer or null |
max_groups | integer or null |
max_link_bytesrequired | integer The largest file one link can carry. |
max_users | integer or null |
namerequired | string |
price_usdrequired | string Per month, as a decimal string. |
storage_bytesrequired | integer |
webhooksrequired | boolean |
Recipient
"[email protected]", "Ann <[email protected]>" or {"name": "Ann", "address": "[email protected]"}.
One of:
addressrequired | string |
namerequired | string"" when the address has no display name. |
Retarget
user_idrequired | uuid |
Scheduled
draft_idrequired | uuid |
scheduledrequired | boolean |
send_atrequired | datetime |
Secret
secretrequired | string |
SendError
Why a scheduled send didn't go; the draft is back in Drafts.
coderequired | string |
paramsrequired | object |
SendForm
file | Binary[] or null Any other file fields become attachments, named after the file. |
messagerequired | string The SendRequest as JSON. |
SendLater
Empty, or one of send_at and delay, to send later.
delay | integer or null Seconds to hold it, up to 30, so it can be called back with POST /drafts/{id}/cancel. |
send_at | datetime or null At most a year out. |
SendRequest
attachments | AttachmentInput[] |
bcc | Recipient[] |
cc | Recipient[] |
draft_id | uuid or null A draft to delete once sent. |
from | string or null One of the user's addresses (see GET /me); their own by default. |
html | string or null HTML body; it is sanitized. A text part is made from it unless text is given. |
in_reply_to | uuid or null A message in this mailbox being answered: sets In-Reply-To, References and the thread. |
reply_to | Recipient[] |
subject | string |
text | string or null |
to | Recipient[] |
SnoozeRequest
idsrequired | uuid[] Up to 500 thread ids. |
untilrequired | datetime In the future, at most a year out. |
Submitted
deliveredrequired | integer Recipients in this organization, delivered at once. |
failedrequired | string[] Recipients refused, e.g. suppressed or unknown. |
message_idrequired | uuid |
queuedrequired | integer Recipients elsewhere, queued for delivery. |
thread_idrequired | uuid |
Suppression
addressrequired | string |
created_atrequired | datetime |
reasonrequired | string |
TestQueued
delivery_idrequired | integer |
Thread
hiddenrequired | integer Messages left out: those in trash or spam, unless opened from there. |
idrequired | uuid |
labelsrequired | string[] |
messagesrequired | Message[] |
snoozed_until | datetime or null |
subjectrequired | string |
ThreadLabelChanges
add | string[] |
idsrequired | uuid[] Up to 500 thread ids. |
remove | string[] |
ThreadPage
next | Cursor or null |
threadsrequired | ThreadSummary[] |
ThreadSummary
has_attachmentsrequired | boolean |
idrequired | uuid |
importantrequired | boolean |
labelsrequired | string[] Labels on any of its messages. |
last_message_atrequired | datetime The newest message in the view; in the inbox, also when it came back from a snooze. |
messagesrequired | integer Messages in the view. |
participantsrequired | Participant[] |
snippetrequired | string |
snoozed_until | datetime or null Out of the inbox until then. |
starredrequired | boolean |
subjectrequired | string |
torequired | Mailbox[] |
unreadrequired | boolean |
Touched
threadsrequired | uuid[] |
Upload
content_typerequired | string |
created_atrequired | datetime |
filenamerequired | string |
idrequired | uuid |
sizerequired | integer |
UploadForm
filerequired | Binary |
User
addressrequired | string |
aliasesrequired | string[] |
created_atrequired | datetime |
domain_idrequired | uuid |
idrequired | uuid |
last_seen_at | datetime or null |
namerequired | string |
quota_bytes | integer or nullnull uses the organization's storage. |
recovery_email | string or null |
rolerequired | string |
storage_usedrequired | integer |
suspendedrequired | boolean |
two_factorrequired | boolean |
UserPatch
name | string or null |
password | string or null Sets a new password and signs them out everywhere. |
quota_bytes | integer or nullnull removes the cap. |
recovery_email | string or null |
reset_two_factor | boolean or null Removes their authenticator and signs them out everywhere; they set up a new one at their next sign-in. Browser sessions only. |
role | string or null |
suspended | boolean or null Suspended users can't sign in and get no mail. |
VacationOn
ends_at | datetime or null When it stops; null when it runs until turned off. |
Webhook
activerequired | boolean |
created_atrequired | datetime |
delivered_24hrequired | integer |
eventsrequired | string[] Event names, or ["*"] for all. |
failed_24hrequired | integer |
idrequired | uuid |
last_delivery_at | datetime or null |
retryingrequired | integer Waiting for another attempt. |
urlrequired | string |
WebhookCreated
activerequired | boolean |
created_atrequired | datetime |
delivered_24hrequired | integer |
eventsrequired | string[] Event names, or ["*"] for all. |
failed_24hrequired | integer |
idrequired | uuid |
last_delivery_at | datetime or null |
retryingrequired | integer Waiting for another attempt. |
urlrequired | string |
secretrequired | string The signing secret. Shown only here and when rolled. |
WebhookDelivery
attemptsrequired | integer |
created_atrequired | datetime |
delivered_at | datetime or null |
eventrequired | string |
idrequired | integer |
last_error | string or null |
last_status | integer or null The endpoint's last HTTP status. |
next_attempt_atrequired | datetime |
payloadrequired | WebhookEvent |
statusrequired | stringpending, delivered or failed. |
WebhookEvent
The body of each webhook POST. Headers: X-Buffmailer-Event, X-Buffmailer-Delivery (an id; the same on retries) and X-Buffmailer-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of "<t>.<body>" keyed with the secret>.
created_atrequired | datetime |
datarequired | object One of MessageReceived, MessageSent, MessageBounced, DomainVerified. |
eventrequired | stringmessage.received, message.sent, message.bounced, domain.verified, or ping from a test. |
org_idrequired | uuid |
WebhookList
availablerequired | boolean The plan includes webhooks. |
eventsrequired | string[] Events there are to subscribe to. |
webhooksrequired | Webhook[] |
WebhookPatch
active | boolean or null |
events | string[] or null |
url | string or null |