Developers
Sign inGet started free

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.readRead mail. List and read threads, messages, labels and attachments.
mail.sendSend mail. Send messages, upload attachments and manage drafts.
mail.modifyOrganize mail. Label, archive, trash and delete mail; manage labels.
adminAdminister. 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" } } }
400The request is wrong; the code says how (e.g. send.recipient_invalid).
401No key, or a revoked or unknown one.
402A plan limit, like plan.max_users or send.daily_limit. Upgrade or wait.
403The key lacks a permission, or the user may not do that.
404It doesn't exist, or isn't this key's to see.
409It conflicts with the current state, like an address that is taken.
429Too 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.receivedNew mail arrived in a mailbox. data
message.sentA mailbox sent mail, from the web, the API or a mail app. data
message.bouncedA recipient's server refused mail for good. data
domain.verifiedA domain's DNS checks passed. data
pingA 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.

GET/me

The key's mailbox

The user, their organization and plan, and the addresses they can send from.

Returns Me

addressrequiredstring
addressesrequiredstring[]
The user's address and aliases; any can be a from.
idrequireduuid
mail_hostrequiredstring
The IMAP and SMTP host.
namerequiredstring
orgrequiredOrgSummary
quota_bytesinteger or null
recovery_emailstring or null
rolerequiredstring
owner, admin or member.
signaturerequiredstring
HTML.
staffrequiredboolean
storage_usedrequiredinteger
two_factorrequiredboolean
two_factor_owedrequiredboolean
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_requiredrequiredboolean
The platform requires an authenticator on every mailbox.
undo_send_secondsrequiredinteger
Seconds the web app holds a sent message so it can be undone.
vacationVacationOn or null
viarequiredstring
api_key for API keys.
curl 'https://buffmailer.com/api/me' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"

Threads

Conversations, as the web app shows them.

GET/threadsmail.read

List threads

Parameters

labelquerystring
INBOX, SENT, STARRED, IMPORTANT, SPAM, TRASH, UNREAD, or a label id. Everything but spam and trash when absent.
qquerystring
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.
limitqueryinteger
1 to 100; 50 by default.
beforequerydatetime
From the previous page's next.
before_idqueryuuid
From the previous page's next.

Returns ThreadPage

nextCursor or null
threadsrequiredThreadSummary[]
curl 'https://buffmailer.com/api/threads' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
POST/threads/emptymail.modify

Empty trash or spam

Body application/json

labelrequiredstring
TRASH or SPAM.

Returns Emptied

messagesrequiredinteger
threadsrequiredinteger
curl -X POST 'https://buffmailer.com/api/threads/empty' \
  -H "Authorization: Bearer $BUFFMAILER_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "label": "TRASH"
}'
POST/threads/modifymail.modify

Label threads

Body application/json

addstring[]
idsrequireduuid[]
Up to 500 thread ids.
removestring[]

Returns Touched

threadsrequireduuid[]
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": []
}'
DELETE/threads/purgemail.modify

Delete threads for good

Body application/json

idsrequireduuid[]
Up to 500.

Returns Deleted

deletedrequiredinteger
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"
  ]
}'
POST/threads/snoozemail.modify

Snooze 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

idsrequireduuid[]
Up to 500 thread ids.
untilrequireddatetime
In the future, at most a year out.

Returns Touched

threadsrequireduuid[]
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"
}'
POST/threads/unsnoozemail.modify

Unsnooze threads

Back to the inbox now.

Body application/json

idsrequireduuid[]
Up to 500.

Returns Touched

threadsrequireduuid[]
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"
  ]
}'
GET/threads/{id}mail.read

Get a thread

Parameters

idpathuuid
labelquerystring
The view it was opened from; TRASH and SPAM show only the messages there.
imagesqueryboolean
Load remote images instead of blocking them.

Returns Thread

hiddenrequiredinteger
Messages left out: those in trash or spam, unless opened from there.
idrequireduuid
labelsrequiredstring[]
messagesrequiredMessage[]
snoozed_untildatetime or null
subjectrequiredstring
curl 'https://buffmailer.com/api/threads/{id}' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
DELETE/threads/{id}mail.modify

Trash a thread

Moves it to trash, which empties itself after 30 days.

Parameters

idpathuuid

Returns Ok

okrequiredboolean
curl -X DELETE 'https://buffmailer.com/api/threads/{id}' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
POST/threads/{id}/modifymail.modify

Label a thread

Applies to every message in it.

Parameters

idpathuuid

Body application/json

addstring[]
removestring[]

Returns Touched

threadsrequireduuid[]
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.

GET/messagesmail.read

List messages

Parameters

labelquerystring
INBOX, SENT, STARRED, IMPORTANT, SPAM, TRASH, UNREAD, or a label id. Everything but spam and trash when absent.
qquerystring
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.
limitqueryinteger
1 to 100; 50 by default.
beforequerydatetime
From the previous page's next.
before_idqueryuuid
From the previous page's next.

Returns MessagePage

messagesrequiredMessageSummary[]
nextCursor or null
curl 'https://buffmailer.com/api/messages' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
GET/messages/{id}mail.read

Get a message

Parameters

idpathuuid
imagesqueryboolean
Load remote images (through the image proxy) instead of blocking them.

Returns Message

attachmentsrequiredAttachment[]
authobject or null
SPF, DKIM and DMARC results for received mail, e.g. {"spf": "pass", "dkim": "pass", "dmarc": "pass"}.
bccrequiredMailbox[]
Only on mail this mailbox sent.
blocked_imagesrequiredboolean
Remote images were left out; ask again with images=true.
ccrequiredMailbox[]
daterequireddatetime
fromrequiredMailbox
has_attachmentsrequiredboolean
htmlstring or null
Sanitized HTML, safe to show in a sandboxed frame. null on older messages of a long thread; fetch the message.
idrequireduuid
in_reply_tostring or null
labelsrequiredstring[]
list_unsubscribestring or null
An https: or mailto: unsubscribe link.
message_idstring or null
The Message-ID header.
received_atrequireddatetime
referencesrequiredstring[]
reply_torequiredMailbox[]
sizerequiredinteger
snippetrequiredstring
spam_scorenumber or null
subjectrequiredstring
textstring or null
The plain-text body, on GET /messages/{id}.
thread_idrequireduuid
torequiredMailbox[]
curl 'https://buffmailer.com/api/messages/{id}' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
DELETE/messages/{id}mail.modify

Trash a message

Parameters

idpathuuid

Returns Ok

okrequiredboolean
curl -X DELETE 'https://buffmailer.com/api/messages/{id}' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
GET/messages/{id}/attachments/{part}mail.read

Download an attachment

Parameters

idpathuuid
partpathinteger
The attachment's part.
inlinequeryboolean
Content-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"
GET/messages/{id}/attachments/{part}/thumbmail.read

An 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

idpathuuid
partpathinteger

Returns image/jpeg Binary

curl 'https://buffmailer.com/api/messages/{id}/attachments/{part}/thumb' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
POST/messages/{id}/modifymail.modify

Label a message

Parameters

idpathuuid

Body application/json

addstring[]
removestring[]

Returns MessageLabels

idrequireduuid
labelsrequiredstring[]
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"
  ]
}'
GET/messages/{id}/rawmail.read

Raw message

The message as it was received or sent (RFC 5322).

Parameters

idpathuuid

Returns message/rfc822 Binary

curl 'https://buffmailer.com/api/messages/{id}/raw' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"

Labels

System labels (INBOX, SENT, TRASH, …) and the user's own.

GET/labelsmail.read

List labels

System and user labels, with thread counts.

Returns LabelList

draftsrequiredinteger
Drafts not scheduled to send.
labelsrequiredLabelCount[]
scheduledrequiredinteger
Drafts waiting to send.
curl 'https://buffmailer.com/api/labels' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
POST/labelsmail.modify

Create a label

Body application/json

colorstring or null
A hex color like #1a73e8.
namerequiredstring
Up to 100 characters; / nests, e.g. Clients/Acme.

Returns Label

colorstring or null
created_atrequireddatetime
idrequireduuid
namerequiredstring
curl -X POST 'https://buffmailer.com/api/labels' \
  -H "Authorization: Bearer $BUFFMAILER_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Clients/Acme",
  "color": "#1a73e8"
}'
PATCH/labels/{id}mail.modify

Rename or recolor a label

Parameters

idpathuuid

Body application/json

colorstring or null
null clears it.
namestring or null

Returns Label

colorstring or null
created_atrequireddatetime
idrequireduuid
namerequiredstring
curl -X PATCH 'https://buffmailer.com/api/labels/{id}' \
  -H "Authorization: Bearer $BUFFMAILER_KEY" \
  -H 'Content-Type: application/json' \
  -d '{}'
DELETE/labels/{id}mail.modify

Delete a label

The mail stays; only the label goes.

Parameters

idpathuuid

Returns Ok

okrequiredboolean
curl -X DELETE 'https://buffmailer.com/api/labels/{id}' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"

Sending

Send mail and stage attachments.

GET/contacts/suggestmail.read

Suggest recipients

People in the directory and those the user has written to.

Parameters

qqueryrequiredstring
What has been typed so far.

Returns Contacts

contactsrequiredContact[]
curl 'https://buffmailer.com/api/contacts/suggest' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
POST/sendmail.send

Send 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

attachmentsAttachmentInput[]
bccRecipient[]
ccRecipient[]
draft_iduuid or null
A draft to delete once sent.
fromstring or null
One of the user's addresses (see GET /me); their own by default.
htmlstring or null
HTML body; it is sanitized. A text part is made from it unless text is given.
in_reply_touuid or null
A message in this mailbox being answered: sets In-Reply-To, References and the thread.
reply_toRecipient[]
subjectstring
textstring or null
toRecipient[]

Body multipart/form-data

fileBinary[] or null
Any other file fields become attachments, named after the file.
messagerequiredstring
The SendRequest as JSON.

Returns Submitted

deliveredrequiredinteger
Recipients in this organization, delivered at once.
failedrequiredstring[]
Recipients refused, e.g. suppressed or unknown.
message_idrequireduuid
queuedrequiredinteger
Recipients elsewhere, queued for delivery.
thread_idrequireduuid
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="
    }
  ]
}'
POST/uploadsmail.send

Upload an attachment

Stage a file to attach by upload_id. Unused uploads are deleted after a day.

Body multipart/form-data

filerequiredBinary

Returns Upload

content_typerequiredstring
created_atrequireddatetime
filenamerequiredstring
idrequireduuid
sizerequiredinteger
curl -X POST 'https://buffmailer.com/api/uploads' \
  -H "Authorization: Bearer $BUFFMAILER_KEY" \
  -F [email protected]
POST/uploads/from-messagemail.send

Reuse a message's attachments

Copies attachments of a message into uploads, for forwarding.

Body application/json

message_idrequireduuid
partsinteger[] or null
Attachment part numbers; all non-inline attachments when absent.

Returns Upload[]

content_typerequiredstring
created_atrequireddatetime
filenamerequiredstring
idrequireduuid
sizerequiredinteger
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"
}'
DELETE/uploads/{id}mail.send

Delete an upload

Parameters

idpathuuid

Returns Ok

okrequiredboolean
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.

GET/draftsmail.send

List drafts

Parameters

scheduledqueryboolean
List the drafts waiting to send, soonest first, instead of the others.

Returns DraftList

draftsrequiredDraftSummary[]
curl 'https://buffmailer.com/api/drafts' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
POST/draftsmail.send

Create a draft

Body application/json

attachmentsuuid[]
Upload ids.
bccstring[]
ccstring[]
fromstring or null
htmlstring
in_reply_touuid or null
subjectstring
tostring[]

Returns Draft

attachmentsrequiredUpload[]
bccrequiredstring[]
ccrequiredstring[]
created_atrequireddatetime
fromstring or null
htmlrequiredstring
idrequireduuid
in_reply_touuid or null
send_atdatetime or null
When it's scheduled to send.
send_errorSendError or null
sendingrequiredboolean
Going out right now.
snippetrequiredstring
subjectrequiredstring
thread_iduuid or null
torequiredstring[]
updated_atrequireddatetime
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": []
}'
GET/drafts/{id}mail.send

Get a draft

Parameters

idpathuuid

Returns Draft

attachmentsrequiredUpload[]
bccrequiredstring[]
ccrequiredstring[]
created_atrequireddatetime
fromstring or null
htmlrequiredstring
idrequireduuid
in_reply_touuid or null
send_atdatetime or null
When it's scheduled to send.
send_errorSendError or null
sendingrequiredboolean
Going out right now.
snippetrequiredstring
subjectrequiredstring
thread_iduuid or null
torequiredstring[]
updated_atrequireddatetime
curl 'https://buffmailer.com/api/drafts/{id}' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
PUT/drafts/{id}mail.send

Replace a draft

Not while it's scheduled; cancel the send first.

Parameters

idpathuuid

Body application/json

attachmentsuuid[]
Upload ids.
bccstring[]
ccstring[]
fromstring or null
htmlstring
in_reply_touuid or null
subjectstring
tostring[]

Returns Draft

attachmentsrequiredUpload[]
bccrequiredstring[]
ccrequiredstring[]
created_atrequireddatetime
fromstring or null
htmlrequiredstring
idrequireduuid
in_reply_touuid or null
send_atdatetime or null
When it's scheduled to send.
send_errorSendError or null
sendingrequiredboolean
Going out right now.
snippetrequiredstring
subjectrequiredstring
thread_iduuid or null
torequiredstring[]
updated_atrequireddatetime
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": []
}'
DELETE/drafts/{id}mail.send

Delete a draft

Parameters

idpathuuid

Returns Ok

okrequiredboolean
curl -X DELETE 'https://buffmailer.com/api/drafts/{id}' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
POST/drafts/{id}/cancelmail.send

Cancel a scheduled send

The draft stays, unscheduled. Fails with draft.sending once it's going out.

Parameters

idpathuuid

Returns Draft

attachmentsrequiredUpload[]
bccrequiredstring[]
ccrequiredstring[]
created_atrequireddatetime
fromstring or null
htmlrequiredstring
idrequireduuid
in_reply_touuid or null
send_atdatetime or null
When it's scheduled to send.
send_errorSendError or null
sendingrequiredboolean
Going out right now.
snippetrequiredstring
subjectrequiredstring
thread_iduuid or null
torequiredstring[]
updated_atrequireddatetime
curl -X POST 'https://buffmailer.com/api/drafts/{id}/cancel' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
POST/drafts/{id}/sendmail.send

Send 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

idpathuuid

Body application/json

SendLater or null

Returns DraftSent

One of:

deliveredrequiredinteger
Recipients in this organization, delivered at once.
failedrequiredstring[]
Recipients refused, e.g. suppressed or unknown.
message_idrequireduuid
queuedrequiredinteger
Recipients elsewhere, queued for delivery.
thread_idrequireduuid
draft_idrequireduuid
scheduledrequiredboolean
send_atrequireddatetime
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.

GET/filtersmail.read

List filters

Returns FilterList

filtersrequiredFilter[]
curl 'https://buffmailer.com/api/filters' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
POST/filtersmail.modify

Create 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

actionsrequiredFilterActions
apply_existingboolean
Also apply it to the mail already here (spam and trash aside), up to 10,000 messages.
criteriarequiredFilterCriteria

Returns FilterSaved

actionsrequiredFilterActions
appliedrequiredinteger
Threads changed by apply_existing.
created_atrequireddatetime
criteriarequiredFilterCriteria
idrequireduuid
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
}'
POST/filters/previewmail.read

Preview a filter

How many conversations already here the criteria match.

Body application/json

criteriarequiredFilterCriteria

Returns FilterPreview

morerequiredboolean
There are more than 1,000.
threadsrequiredinteger
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": {}
}'
GET/filters/{id}mail.read

Get a filter

Parameters

idpathuuid

Returns Filter

actionsrequiredFilterActions
created_atrequireddatetime
criteriarequiredFilterCriteria
idrequireduuid
curl 'https://buffmailer.com/api/filters/{id}' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
PUT/filters/{id}mail.modify

Replace a filter

Parameters

idpathuuid

Body application/json

actionsrequiredFilterActions
apply_existingboolean
Also apply it to the mail already here (spam and trash aside), up to 10,000 messages.
criteriarequiredFilterCriteria

Returns FilterSaved

actionsrequiredFilterActions
appliedrequiredinteger
Threads changed by apply_existing.
created_atrequireddatetime
criteriarequiredFilterCriteria
idrequireduuid
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
}'
DELETE/filters/{id}mail.modify

Delete a filter

Parameters

idpathuuid

Returns Ok

okrequiredboolean
curl -X DELETE 'https://buffmailer.com/api/filters/{id}' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"

Domains

Needs the admin scope.

GET/domainsadmin

List domains

Returns DomainSummary[]

checked_atdatetime or null
checksrequiredobject
created_atrequireddatetime
groupsrequiredinteger
idrequireduuid
mailboxMailboxRef or null
namerequiredstring
statusrequiredstring
pending, verified or suspended.
usersrequiredinteger
verified_atdatetime or null
curl 'https://buffmailer.com/api/domains' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
POST/domainsadmin

Add 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

namerequiredstring
e.g. acme.com.

Returns Created

idrequireduuid
namerequiredstring
curl -X POST 'https://buffmailer.com/api/domains' \
  -H "Authorization: Bearer $BUFFMAILER_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "acme.com"
}'
GET/domains/{id}admin

Get a domain

The domain, the DNS records it needs and how the last check went.

Parameters

idpathuuid

Returns DomainDetail

cloudflarerequiredobject
dash_url: the zone's DNS records in the Cloudflare dashboard.
countsrequiredobject
domainrequiredDomain
domain_connectrequiredobject
expires_atdatetime or null
When an unverified domain is released.
recordsrequiredDnsRecord[]
What to add at the DNS host.
curl 'https://buffmailer.com/api/domains/{id}' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
PATCH/domains/{id}admin

Set a domain's catch-all address

Parameters

idpathuuid

Body application/json

catch_allstring 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

cloudflarerequiredobject
dash_url: the zone's DNS records in the Cloudflare dashboard.
countsrequiredobject
domainrequiredDomain
domain_connectrequiredobject
expires_atdatetime or null
When an unverified domain is released.
recordsrequiredDnsRecord[]
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 '{}'
DELETE/domains/{id}admin

Remove a domain

Only once it has no users, groups or aliases.

Parameters

idpathuuid

Returns Ok

okrequiredboolean
curl -X DELETE 'https://buffmailer.com/api/domains/{id}' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
POST/domains/{id}/verifyadmin

Check a domain's DNS now

Parameters

idpathuuid

Returns DomainDetail

cloudflarerequiredobject
dash_url: the zone's DNS records in the Cloudflare dashboard.
countsrequiredobject
domainrequiredDomain
domain_connectrequiredobject
expires_atdatetime or null
When an unverified domain is released.
recordsrequiredDnsRecord[]
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.

GET/usersadmin

List users

Returns User[]

addressrequiredstring
aliasesrequiredstring[]
created_atrequireddatetime
domain_idrequireduuid
idrequireduuid
last_seen_atdatetime or null
namerequiredstring
quota_bytesinteger or null
null uses the organization's storage.
recovery_emailstring or null
rolerequiredstring
storage_usedrequiredinteger
suspendedrequiredboolean
two_factorrequiredboolean
curl 'https://buffmailer.com/api/users' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
POST/usersadmin

Create a user

Body application/json

domain_idrequireduuid
A verified domain.
local_partrequiredstring
namerequiredstring
passwordrequiredstring
At least 10 characters.
quota_bytesinteger or null
recovery_emailstring or null
rolestring or null
member (default), admin or owner.

Returns User

addressrequiredstring
aliasesrequiredstring[]
created_atrequireddatetime
domain_idrequireduuid
idrequireduuid
last_seen_atdatetime or null
namerequiredstring
quota_bytesinteger or null
null uses the organization's storage.
recovery_emailstring or null
rolerequiredstring
storage_usedrequiredinteger
suspendedrequiredboolean
two_factorrequiredboolean
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"
}'
GET/users/{id}admin

Get a user

Parameters

idpathuuid

Returns User

addressrequiredstring
aliasesrequiredstring[]
created_atrequireddatetime
domain_idrequireduuid
idrequireduuid
last_seen_atdatetime or null
namerequiredstring
quota_bytesinteger or null
null uses the organization's storage.
recovery_emailstring or null
rolerequiredstring
storage_usedrequiredinteger
suspendedrequiredboolean
two_factorrequiredboolean
curl 'https://buffmailer.com/api/users/{id}' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
PATCH/users/{id}admin

Update a user

Parameters

idpathuuid

Body application/json

namestring or null
passwordstring or null
Sets a new password and signs them out everywhere.
quota_bytesinteger or null
null removes the cap.
recovery_emailstring or null
reset_two_factorboolean or null
Removes their authenticator and signs them out everywhere; they set up a new one at their next sign-in. Browser sessions only.
rolestring or null
suspendedboolean or null
Suspended users can't sign in and get no mail.

Returns User

addressrequiredstring
aliasesrequiredstring[]
created_atrequireddatetime
domain_idrequireduuid
idrequireduuid
last_seen_atdatetime or null
namerequiredstring
quota_bytesinteger or null
null uses the organization's storage.
recovery_emailstring or null
rolerequiredstring
storage_usedrequiredinteger
suspendedrequiredboolean
two_factorrequiredboolean
curl -X PATCH 'https://buffmailer.com/api/users/{id}' \
  -H "Authorization: Bearer $BUFFMAILER_KEY" \
  -H 'Content-Type: application/json' \
  -d '{}'
DELETE/users/{id}admin

Delete a user

Deletes their mail too. The organization's last owner can't be deleted.

Parameters

idpathuuid

Returns Ok

okrequiredboolean
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.

GET/groupsadmin

List groups

Returns Group[]

addressrequiredstring
created_atrequireddatetime
descriptionrequiredstring
domain_idrequireduuid
idrequireduuid
membersrequiredinteger
namerequiredstring
who_can_postrequiredstring
anyone, org or members.
curl 'https://buffmailer.com/api/groups' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
POST/groupsadmin

Create a group

Body application/json

descriptionstring or null
domain_idrequireduuid
local_partrequiredstring
membersstring[] or null
Addresses inside or outside the organization.
namerequiredstring
who_can_poststring or null
org by default.

Returns GroupCreated

addressrequiredstring
idrequireduuid
members_addedrequiredinteger
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]"
  ]
}'
GET/groups/{id}admin

Get a group and its members

Parameters

idpathuuid

Returns GroupDetail

grouprequiredGroup
membersrequiredMember[]
curl 'https://buffmailer.com/api/groups/{id}' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
PATCH/groups/{id}admin

Update a group

Parameters

idpathuuid

Body application/json

descriptionstring or null
namestring or null
who_can_poststring or null

Returns GroupDetail

grouprequiredGroup
membersrequiredMember[]
curl -X PATCH 'https://buffmailer.com/api/groups/{id}' \
  -H "Authorization: Bearer $BUFFMAILER_KEY" \
  -H 'Content-Type: application/json' \
  -d '{}'
DELETE/groups/{id}admin

Delete a group

Parameters

idpathuuid

Returns Ok

okrequiredboolean
curl -X DELETE 'https://buffmailer.com/api/groups/{id}' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
POST/groups/{id}/membersadmin

Add members

Parameters

idpathuuid

Body application/json

addressesrequiredstring[]

Returns Added

addedrequiredinteger
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]"
  ]
}'
DELETE/groups/{id}/members/{address}admin

Remove a member

Parameters

idpathuuid
addresspathstring

Returns Ok

okrequiredboolean
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.

GET/aliasesadmin

List aliases

Returns Alias[]

addressrequiredstring
created_atrequireddatetime
domain_idrequireduuid
rolerequiredboolean
A role address like postmaster@.
user_addressrequiredstring
user_idrequireduuid
curl 'https://buffmailer.com/api/aliases' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
POST/aliasesadmin

Create an alias

Body application/json

domain_idrequireduuid
local_partrequiredstring
user_idrequireduuid

Returns AliasCreated

addressrequiredstring
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"
}'
PATCH/aliases/{address}admin

Point an alias at another user

Parameters

addresspathstring

Body application/json

user_idrequireduuid

Returns Ok

okrequiredboolean
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"
}'
DELETE/aliases/{address}admin

Delete an alias

Parameters

addresspathstring

Returns Ok

okrequiredboolean
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.

GET/outboundadmin

The outbound queue

One row per recipient, newest first, 100 a page.

Parameters

statusquerystring
queued, sending, sent, failed or cancelled.
qquerystring
Matches the sender or recipient.
beforequerydatetime
The last row's created_at, for the next page.
before_idqueryuuid
The last row's id.

Returns OutboundPage

deliveriesrequiredOutbound[]
morerequiredboolean
Another page follows.
curl 'https://buffmailer.com/api/outbound' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
POST/outbound/{id}/canceladmin

Cancel a queued delivery

Parameters

idpathuuid

Returns Ok

okrequiredboolean
curl -X POST 'https://buffmailer.com/api/outbound/{id}/cancel' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
POST/outbound/{id}/retryadmin

Retry a delivery now

Parameters

idpathuuid

Returns Ok

okrequiredboolean
curl -X POST 'https://buffmailer.com/api/outbound/{id}/retry' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
GET/suppressionsadmin

List suppressed addresses

Addresses that bounced hard or complained; mail to them isn't sent.

Returns Suppression[]

addressrequiredstring
created_atrequireddatetime
reasonrequiredstring
curl 'https://buffmailer.com/api/suppressions' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
POST/suppressionsadmin

Suppress an address

Body application/json

addressrequiredstring
reasonstring or null

Returns Ok

okrequiredboolean
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"
}'
DELETE/suppressions/{address}admin

Stop suppressing an address

Parameters

addresspathstring

Returns Ok

okrequiredboolean
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.

GET/webhooksadmin

List webhooks

Returns WebhookList

availablerequiredboolean
The plan includes webhooks.
eventsrequiredstring[]
Events there are to subscribe to.
webhooksrequiredWebhook[]
curl 'https://buffmailer.com/api/webhooks' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
POST/webhooksadmin

Create a webhook

The response has the signing secret; store it, it isn't shown again.

Body application/json

eventsrequiredstring[]
message.received, message.sent, message.bounced, domain.verified, or *.
urlrequiredstring
HTTPS, on a public host.

Returns WebhookCreated

activerequiredboolean
created_atrequireddatetime
delivered_24hrequiredinteger
eventsrequiredstring[]
Event names, or ["*"] for all.
failed_24hrequiredinteger
idrequireduuid
last_delivery_atdatetime or null
retryingrequiredinteger
Waiting for another attempt.
urlrequiredstring
secretrequiredstring
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"
  ]
}'
GET/webhooks/{id}admin

Get a webhook

Parameters

idpathuuid

Returns Webhook

activerequiredboolean
created_atrequireddatetime
delivered_24hrequiredinteger
eventsrequiredstring[]
Event names, or ["*"] for all.
failed_24hrequiredinteger
idrequireduuid
last_delivery_atdatetime or null
retryingrequiredinteger
Waiting for another attempt.
urlrequiredstring
curl 'https://buffmailer.com/api/webhooks/{id}' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
PATCH/webhooks/{id}admin

Update a webhook

Parameters

idpathuuid

Body application/json

activeboolean or null
eventsstring[] or null
urlstring or null

Returns Webhook

activerequiredboolean
created_atrequireddatetime
delivered_24hrequiredinteger
eventsrequiredstring[]
Event names, or ["*"] for all.
failed_24hrequiredinteger
idrequireduuid
last_delivery_atdatetime or null
retryingrequiredinteger
Waiting for another attempt.
urlrequiredstring
curl -X PATCH 'https://buffmailer.com/api/webhooks/{id}' \
  -H "Authorization: Bearer $BUFFMAILER_KEY" \
  -H 'Content-Type: application/json' \
  -d '{}'
DELETE/webhooks/{id}admin

Delete a webhook

Parameters

idpathuuid

Returns Ok

okrequiredboolean
curl -X DELETE 'https://buffmailer.com/api/webhooks/{id}' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
GET/webhooks/{id}/deliveriesadmin

List deliveries

Newest first, 50 a page, kept for 30 days.

Parameters

idpathuuid
statusquerystring
pending, delivered or failed.
beforequeryinteger
The previous page's next.

Returns DeliveryPage

deliveriesrequiredWebhookDelivery[]
nextinteger or null
curl 'https://buffmailer.com/api/webhooks/{id}/deliveries' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
POST/webhooks/{id}/deliveries/{delivery}/retryadmin

Redeliver

Sends a delivery again, with a fresh set of retries.

Parameters

idpathuuid
deliverypathinteger

Returns Ok

okrequiredboolean
curl -X POST 'https://buffmailer.com/api/webhooks/{id}/deliveries/{delivery}/retry' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
POST/webhooks/{id}/secretadmin

Roll the signing secret

The old secret stops working at once.

Parameters

idpathuuid

Returns Secret

secretrequiredstring
curl -X POST 'https://buffmailer.com/api/webhooks/{id}/secret' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"
POST/webhooks/{id}/testadmin

Send a test event

Queues a ping event to this endpoint.

Parameters

idpathuuid

Returns TestQueued

delivery_idrequiredinteger
curl -X POST 'https://buffmailer.com/api/webhooks/{id}/test' \
  -H "Authorization: Bearer $BUFFMAILER_KEY"

Schemas

Added

addedrequiredinteger

Alias

addressrequiredstring
created_atrequireddatetime
domain_idrequireduuid
rolerequiredboolean
A role address like postmaster@.
user_addressrequiredstring
user_idrequireduuid

AliasCreated

addressrequiredstring

Attachment

content_idstring or null
content_typerequiredstring
filenamerequiredstring
inlinerequiredboolean
Shown in the body (cid:) rather than listed.
partrequiredinteger
Its MIME part number.
sizerequiredinteger
thumb_urlstring or null
A small JPEG of an image attachment, when one can be made.
urlrequiredstring
Download link; needs the same authorization.

AttachmentInput

One of:

A file from POST /uploads.
upload_idrequireduuid
The file itself.
content_base64requiredstring
content_typestring or null
Guessed from the filename when absent.
filenamerequiredstring

Binary

Raw bytes.

binary

Contact

addressrequiredstring
internalrequiredboolean
In this organization's directory.
namerequiredstring

Contacts

contactsrequiredContact[]

Created

idrequireduuid
namerequiredstring

Cursor

Pass both values back to get the next page.

beforerequireddatetime
before_idrequireduuid

Deleted

deletedrequiredinteger

DeliveryPage

deliveriesrequiredWebhookDelivery[]
nextinteger or null

DnsRecord

fqdnrequiredstring
hostrequiredstring
Relative to the zone: @ or a label like bm1._domainkey.
kindrequiredstring
verify, mx, spf, dkim or dmarc.
priorityinteger or null
requiredrequiredboolean
typerequiredstring
TXT or MX.
valuerequiredstring

Domain

catch_allstring or null
Gets mail sent to addresses the domain doesn't have.
checked_atdatetime or null
checksrequiredobject
The last check: each record, whether it was found, and what was.
created_atrequireddatetime
dkim_public_keyrequiredstring
dkim_selectorrequiredstring
idrequireduuid
namerequiredstring
org_idrequireduuid
statusrequiredstring
verified_atdatetime or null
verify_tokenrequiredstring
Goes in the buffmailer-verification= TXT record.

DomainDetail

cloudflarerequiredobject
dash_url: the zone's DNS records in the Cloudflare dashboard.
countsrequiredobject
domainrequiredDomain
domain_connectrequiredobject
expires_atdatetime or null
When an unverified domain is released.
recordsrequiredDnsRecord[]
What to add at the DNS host.

DomainSummary

checked_atdatetime or null
checksrequiredobject
created_atrequireddatetime
groupsrequiredinteger
idrequireduuid
mailboxMailboxRef or null
namerequiredstring
statusrequiredstring
pending, verified or suspended.
usersrequiredinteger
verified_atdatetime or null

DomainUpdate

catch_allstring 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_idrequireduuid
namerequiredstring

Draft

attachmentsrequiredUpload[]
bccrequiredstring[]
ccrequiredstring[]
created_atrequireddatetime
fromstring or null
htmlrequiredstring
idrequireduuid
in_reply_touuid or null
send_atdatetime or null
When it's scheduled to send.
send_errorSendError or null
sendingrequiredboolean
Going out right now.
snippetrequiredstring
subjectrequiredstring
thread_iduuid or null
torequiredstring[]
updated_atrequireddatetime

DraftInput

attachmentsuuid[]
Upload ids.
bccstring[]
ccstring[]
fromstring or null
htmlstring
in_reply_touuid or null
subjectstring
tostring[]

DraftList

draftsrequiredDraftSummary[]

DraftSent

One of:

deliveredrequiredinteger
Recipients in this organization, delivered at once.
failedrequiredstring[]
Recipients refused, e.g. suppressed or unknown.
message_idrequireduuid
queuedrequiredinteger
Recipients elsewhere, queued for delivery.
thread_idrequireduuid
draft_idrequireduuid
scheduledrequiredboolean
send_atrequireddatetime

DraftSummary

attachmentsrequiredinteger
idrequireduuid
send_atdatetime or null
send_errorSendError or null
snippetrequiredstring
subjectrequiredstring
thread_iduuid or null
torequiredstring[]
updated_atrequireddatetime

Emptied

messagesrequiredinteger
threadsrequiredinteger

EmptyLabel

labelrequiredstring
TRASH or SPAM.

Error

errorrequiredErrorDetail

ErrorDetail

coderequiredstring
Stable and machine-readable, e.g. send.recipient_invalid.
paramsobject or null

Filter

actionsrequiredFilterActions
created_atrequireddatetime
criteriarequiredFilterCriteria
idrequireduuid

FilterActions

At least one is needed.

importantboolean
labeluuid or null
A user label id to add.
mark_readboolean
never_spamboolean
Take it out of spam.
skip_inboxboolean
Archive it.
starboolean
trashboolean

FilterCriteria

Every field given must match; at least one is needed. Text fields are case-insensitive.

fromstring
Part of the sender's address or name; [email protected], [email protected] or | or OR for any of several.
has_attachmentboolean
has_wordsstring
Words in the subject or body, all of them; "a phrase" and OR work.
not_wordsstring
Words that must not appear.
subjectstring
Part of the subject; | or OR for any of several.
tostring
Part of a To or Cc address or name, the same way.

FilterInput

actionsrequiredFilterActions
apply_existingboolean
Also apply it to the mail already here (spam and trash aside), up to 10,000 messages.
criteriarequiredFilterCriteria

FilterList

filtersrequiredFilter[]

FilterPreview

morerequiredboolean
There are more than 1,000.
threadsrequiredinteger
Conversations already here it matches, up to 1,000.

FilterPreviewRequest

criteriarequiredFilterCriteria

FilterSaved

actionsrequiredFilterActions
appliedrequiredinteger
Threads changed by apply_existing.
created_atrequireddatetime
criteriarequiredFilterCriteria
idrequireduuid

FromMessage

message_idrequireduuid
partsinteger[] or null
Attachment part numbers; all non-inline attachments when absent.

Group

addressrequiredstring
created_atrequireddatetime
descriptionrequiredstring
domain_idrequireduuid
idrequireduuid
membersrequiredinteger
namerequiredstring
who_can_postrequiredstring
anyone, org or members.

GroupCreated

addressrequiredstring
idrequireduuid
members_addedrequiredinteger

GroupDetail

grouprequiredGroup
membersrequiredMember[]

GroupPatch

descriptionstring or null
namestring or null
who_can_poststring or null

Ids

idsrequireduuid[]
Up to 500.

Label

colorstring or null
created_atrequireddatetime
idrequireduuid
namerequiredstring

LabelChanges

Label names to add and remove: system labels (UNREAD, STARRED, INBOX, TRASH, SPAM, …) or label ids. Archiving removes INBOX; trashing adds TRASH.

addstring[]
removestring[]

LabelCount

colorstring or null
idrequiredstring
INBOX, SENT, … for system labels, a UUID for the user's.
namerequiredstring
systemrequiredboolean
threadsrequiredinteger
unreadrequiredinteger
Unread threads.

LabelList

draftsrequiredinteger
Drafts not scheduled to send.
labelsrequiredLabelCount[]
scheduledrequiredinteger
Drafts waiting to send.

LabelPatch

colorstring or null
null clears it.
namestring or null

Mailbox

addressrequiredstring
namerequiredstring
"" when the address has no display name.

MailboxRef

addressrequiredstring
idrequireduuid

Me

addressrequiredstring
addressesrequiredstring[]
The user's address and aliases; any can be a from.
idrequireduuid
mail_hostrequiredstring
The IMAP and SMTP host.
namerequiredstring
orgrequiredOrgSummary
quota_bytesinteger or null
recovery_emailstring or null
rolerequiredstring
owner, admin or member.
signaturerequiredstring
HTML.
staffrequiredboolean
storage_usedrequiredinteger
two_factorrequiredboolean
two_factor_owedrequiredboolean
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_requiredrequiredboolean
The platform requires an authenticator on every mailbox.
undo_send_secondsrequiredinteger
Seconds the web app holds a sent message so it can be undone.
vacationVacationOn or null
viarequiredstring
api_key for API keys.

Member

added_atrequireddatetime
addressrequiredstring
kindrequiredstring
user, group, alias or external.
namestring or null

Members

addressesrequiredstring[]

Message

attachmentsrequiredAttachment[]
authobject or null
SPF, DKIM and DMARC results for received mail, e.g. {"spf": "pass", "dkim": "pass", "dmarc": "pass"}.
bccrequiredMailbox[]
Only on mail this mailbox sent.
blocked_imagesrequiredboolean
Remote images were left out; ask again with images=true.
ccrequiredMailbox[]
daterequireddatetime
fromrequiredMailbox
has_attachmentsrequiredboolean
htmlstring or null
Sanitized HTML, safe to show in a sandboxed frame. null on older messages of a long thread; fetch the message.
idrequireduuid
in_reply_tostring or null
labelsrequiredstring[]
list_unsubscribestring or null
An https: or mailto: unsubscribe link.
message_idstring or null
The Message-ID header.
received_atrequireddatetime
referencesrequiredstring[]
reply_torequiredMailbox[]
sizerequiredinteger
snippetrequiredstring
spam_scorenumber or null
subjectrequiredstring
textstring or null
The plain-text body, on GET /messages/{id}.
thread_idrequireduuid
torequiredMailbox[]

MessageBounced

message.bounced: a recipient's server refused it for good.

codeinteger or null
errorstring or null
fromrequiredstring
message_iduuid or null
recipientrequiredstring
remote_hoststring or null

MessageLabels

idrequireduuid
labelsrequiredstring[]

MessagePage

messagesrequiredMessageSummary[]
nextCursor or null

MessageReceived

message.received: new mail arrived in a mailbox, including mail a filter archived (spam and trash don't count).

fromrequiredMailbox
message_idrequireduuid
snippetrequiredstring
subjectrequiredstring
thread_idrequireduuid
torequiredMailbox[]
user_idrequireduuid

MessageSent

message.sent: a mailbox sent mail, by API, web or SMTP.

failedrequiredstring[]
Recipients refused outright.
fromrequiredstring
message_idrequireduuid
recipientsrequiredstring[]
subjectrequiredstring
thread_idrequireduuid
user_idrequireduuid

MessageSummary

ccrequiredMailbox[]
daterequireddatetime
The Date header, or when it arrived.
fromrequiredMailbox
has_attachmentsrequiredboolean
idrequireduuid
labelsrequiredstring[]
received_atrequireddatetime
sizerequiredinteger
snippetrequiredstring
subjectrequiredstring
thread_idrequireduuid
torequiredMailbox[]

NewAlias

domain_idrequireduuid
local_partrequiredstring
user_idrequireduuid

NewDomain

namerequiredstring
e.g. acme.com.

NewGroup

descriptionstring or null
domain_idrequireduuid
local_partrequiredstring
membersstring[] or null
Addresses inside or outside the organization.
namerequiredstring
who_can_poststring or null
org by default.

NewLabel

colorstring or null
A hex color like #1a73e8.
namerequiredstring
Up to 100 characters; / nests, e.g. Clients/Acme.

NewSuppression

addressrequiredstring
reasonstring or null

NewUser

domain_idrequireduuid
A verified domain.
local_partrequiredstring
namerequiredstring
passwordrequiredstring
At least 10 characters.
quota_bytesinteger or null
recovery_emailstring or null
rolestring or null
member (default), admin or owner.

NewWebhook

eventsrequiredstring[]
message.received, message.sent, message.bounced, domain.verified, or *.
urlrequiredstring
HTTPS, on a public host.

Ok

okrequiredboolean

OrgSummary

idrequireduuid
namerequiredstring
planrequiredPlan
storage_usedrequiredinteger
suspendedrequiredboolean

Outbound

attemptsrequiredinteger
created_atrequireddatetime
expires_atrequireddatetime
It gives up then.
idrequireduuid
last_codeinteger or null
The last SMTP reply code.
last_errorstring or null
mail_fromrequiredstring
message_iduuid or null
next_attempt_atrequireddatetime
rcptrequiredstring
remote_hoststring or null
statusrequiredstring
subjectstring or null
updated_atrequireddatetime

OutboundPage

deliveriesrequiredOutbound[]
morerequiredboolean
Another page follows.

Participant

addressrequiredstring
namerequiredstring
unreadrequiredboolean
Has an unread message from them.

Plan

api_rpmrequiredinteger
API requests per minute, per key.
daily_send_limitrequiredinteger
idrequiredstring
max_attachment_bytesrequiredinteger
max_domainsinteger or null
max_groupsinteger or null
max_link_bytesrequiredinteger
The largest file one link can carry.
max_usersinteger or null
namerequiredstring
price_usdrequiredstring
Per month, as a decimal string.
storage_bytesrequiredinteger
webhooksrequiredboolean

Recipient

"[email protected]", "Ann <[email protected]>" or {"name": "Ann", "address": "[email protected]"}.

One of:

string
addressrequiredstring
namerequiredstring
"" when the address has no display name.

Retarget

user_idrequireduuid

Scheduled

draft_idrequireduuid
scheduledrequiredboolean
send_atrequireddatetime

Secret

secretrequiredstring

SendError

Why a scheduled send didn't go; the draft is back in Drafts.

coderequiredstring
paramsrequiredobject

SendForm

fileBinary[] or null
Any other file fields become attachments, named after the file.
messagerequiredstring
The SendRequest as JSON.

SendLater

Empty, or one of send_at and delay, to send later.

delayinteger or null
Seconds to hold it, up to 30, so it can be called back with POST /drafts/{id}/cancel.
send_atdatetime or null
At most a year out.

SendRequest

attachmentsAttachmentInput[]
bccRecipient[]
ccRecipient[]
draft_iduuid or null
A draft to delete once sent.
fromstring or null
One of the user's addresses (see GET /me); their own by default.
htmlstring or null
HTML body; it is sanitized. A text part is made from it unless text is given.
in_reply_touuid or null
A message in this mailbox being answered: sets In-Reply-To, References and the thread.
reply_toRecipient[]
subjectstring
textstring or null
toRecipient[]

SnoozeRequest

idsrequireduuid[]
Up to 500 thread ids.
untilrequireddatetime
In the future, at most a year out.

Submitted

deliveredrequiredinteger
Recipients in this organization, delivered at once.
failedrequiredstring[]
Recipients refused, e.g. suppressed or unknown.
message_idrequireduuid
queuedrequiredinteger
Recipients elsewhere, queued for delivery.
thread_idrequireduuid

Suppression

addressrequiredstring
created_atrequireddatetime
reasonrequiredstring

TestQueued

delivery_idrequiredinteger

Thread

hiddenrequiredinteger
Messages left out: those in trash or spam, unless opened from there.
idrequireduuid
labelsrequiredstring[]
messagesrequiredMessage[]
snoozed_untildatetime or null
subjectrequiredstring

ThreadLabelChanges

addstring[]
idsrequireduuid[]
Up to 500 thread ids.
removestring[]

ThreadPage

nextCursor or null
threadsrequiredThreadSummary[]

ThreadSummary

has_attachmentsrequiredboolean
idrequireduuid
importantrequiredboolean
labelsrequiredstring[]
Labels on any of its messages.
last_message_atrequireddatetime
The newest message in the view; in the inbox, also when it came back from a snooze.
messagesrequiredinteger
Messages in the view.
participantsrequiredParticipant[]
snippetrequiredstring
snoozed_untildatetime or null
Out of the inbox until then.
starredrequiredboolean
subjectrequiredstring
torequiredMailbox[]
unreadrequiredboolean

Touched

threadsrequireduuid[]

Upload

content_typerequiredstring
created_atrequireddatetime
filenamerequiredstring
idrequireduuid
sizerequiredinteger

UploadForm

filerequiredBinary

User

addressrequiredstring
aliasesrequiredstring[]
created_atrequireddatetime
domain_idrequireduuid
idrequireduuid
last_seen_atdatetime or null
namerequiredstring
quota_bytesinteger or null
null uses the organization's storage.
recovery_emailstring or null
rolerequiredstring
storage_usedrequiredinteger
suspendedrequiredboolean
two_factorrequiredboolean

UserPatch

namestring or null
passwordstring or null
Sets a new password and signs them out everywhere.
quota_bytesinteger or null
null removes the cap.
recovery_emailstring or null
reset_two_factorboolean or null
Removes their authenticator and signs them out everywhere; they set up a new one at their next sign-in. Browser sessions only.
rolestring or null
suspendedboolean or null
Suspended users can't sign in and get no mail.

VacationOn

ends_atdatetime or null
When it stops; null when it runs until turned off.

Webhook

activerequiredboolean
created_atrequireddatetime
delivered_24hrequiredinteger
eventsrequiredstring[]
Event names, or ["*"] for all.
failed_24hrequiredinteger
idrequireduuid
last_delivery_atdatetime or null
retryingrequiredinteger
Waiting for another attempt.
urlrequiredstring

WebhookCreated

activerequiredboolean
created_atrequireddatetime
delivered_24hrequiredinteger
eventsrequiredstring[]
Event names, or ["*"] for all.
failed_24hrequiredinteger
idrequireduuid
last_delivery_atdatetime or null
retryingrequiredinteger
Waiting for another attempt.
urlrequiredstring
secretrequiredstring
The signing secret. Shown only here and when rolled.

WebhookDelivery

attemptsrequiredinteger
created_atrequireddatetime
delivered_atdatetime or null
eventrequiredstring
idrequiredinteger
last_errorstring or null
last_statusinteger or null
The endpoint's last HTTP status.
next_attempt_atrequireddatetime
payloadrequiredWebhookEvent
statusrequiredstring
pending, 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_atrequireddatetime
datarequiredobject
One of MessageReceived, MessageSent, MessageBounced, DomainVerified.
eventrequiredstring
message.received, message.sent, message.bounced, domain.verified, or ping from a test.
org_idrequireduuid

WebhookList

availablerequiredboolean
The plan includes webhooks.
eventsrequiredstring[]
Events there are to subscribe to.
webhooksrequiredWebhook[]

WebhookPatch

activeboolean or null
eventsstring[] or null
urlstring or null