Skip to main content

Emailing documents

Budget Thing can email a sent quote or an issued invoice to a contact of its client, with the PDF attached. Each attempt is recorded, so you can see whether it was accepted and whether it later bounced.

Emailing exists only in business workspaces; every operation below returns 409 WORKSPACE_NOT_BUSINESS in a personal workspace.

Operations​

RequestOperationWhat it does
POST /v1/workspaces/{workspaceID}/quotes/{quoteID}/emailssend-quote-emailEmails the quote (201).
GET /v1/workspaces/{workspaceID}/quotes/{quoteID}/emailslist-quote-emailsLists the newest 100 attempts for the quote.
POST /v1/workspaces/{workspaceID}/invoices/{invoiceID}/emailssend-invoice-emailEmails the invoice (201).
GET /v1/workspaces/{workspaceID}/invoices/{invoiceID}/emailslist-invoice-emailsLists the newest 100 attempts for the invoice.
GET /v1/workspaces/{workspaceID}/quotes/{quoteID}/email/draftget-quote-email-draftThe note and sign-off a quote email starts with, placeholders resolved.
GET /v1/workspaces/{workspaceID}/invoices/{invoiceID}/email/draftget-invoice-email-draftThe same for an invoice.

A business also controls how these emails look and who answers them; see Email settings.

Sending takes an optional body:

{ "to": "billing@client.example", "note": "Thanks for your time on the project." }
  • to must be the email address of a contact of the document's client. Leave it out to use the first contact that has an address.
  • note is a short plain-text message (up to 2,000 characters) shown above the document details. It may hold placeholders, which the server fills in from the document and the recipient. The 2,000-character limit applies to the note you send (422 otherwise), before placeholders are filled in; the filled-in text may be longer. The business's sign-off is added after it by the server; don't put it in the note.

The response is the delivery record:

{
"id": "demd_EXAMPLE",
"documentType": "invoice",
"documentId": "inv_EXAMPLE",
"to": "billing@client.example",
"replyTo": "you@yourstudio.example",
"subject": "Invoice INV-ACME-001 from Your Studio LLC",
"status": "sent",
"createdAt": "2026-11-13T10:00:00Z",
"sentAt": "2026-11-13T10:00:01Z"
}

What can be emailed​

DocumentCan be emailed when
QuoteIt is sent, accepted or declined
InvoiceIt is issued

A draft, a superseded quote or a void invoice can't be emailed (409 DOCUMENT_NOT_SENDABLE). The attachment is the same PDF the owner downloads from get-quote-pdf or get-invoice-pdf.

Payment reminders are document emails too: the server sends them for unpaid invoices on the days a business chose, and each one appears on the invoice's email list with no signed-in sender. See Payment reminders.

What the message contains​

An invoice message shows the due date and the payment terms label (for example "Net 30") from the terms frozen on the invoice when it was issued, never from the client's or project's current terms, and the due date as the owner last set it with set-invoice-due-date. When the invoice has no terms, the message shows neither. A quote message shows its valid-until date.

Who it comes from​

  • From. Always Budget Thing's own sending address. The sender's display name is, by default, the business's legal name (or the workspace name when none is set; up to 80 characters) followed by "via Budget Thing", for example Your Studio LLC via Budget Thing, so recipients can tell the message was sent through Budget Thing. A business can set a custom sender name, which replaces that. A business's own domain is never used as the sender, so SPF, DKIM and DMARC are unchanged.
  • Reply-To. The business's reply-to address once it is verified. Until then, the signed-in sender's own verified email address, so a client's reply reaches a person. If neither exists, the message has no Reply-To. It can't be set in the request.
  • To. Only a contact of the document's client, as the client is now: a corrected address is used for a document sent earlier. There is no field for other recipients or copies, so this isn't a general mail relay. An address that isn't a contact is refused (422 EMAIL_RECIPIENT_NOT_ALLOWED), and a client with no contact address gives 422 EMAIL_RECIPIENT_REQUIRED.

What the message looks like​

Document emails and payment reminders use the business's look, not Budget Thing's:

  • The header shows the business logo (the logo frozen on the document, the one its PDF shows), embedded in the message as an inline image, so it needs no public URL. With no logo, with showLogo off, or when the logo is over 1 MB, the header shows the business name as text.
  • The top border and accent use the email accent color, or else the document style's accent, after the same contrast check as the document style. A color that fails the check is replaced by a neutral dark gray (#1E1E1E).
  • The footer is one small line, "Sent with Budget Thing".

Account and system emails (sign-in, invitations, security notices, reply-to codes) keep the Budget Thing layout.

Email settings​

RequestOperationWho
GET /v1/workspaces/{workspaceID}/business-profile/emailget-business-email-settingsAny member (business:read)
PATCH /v1/workspaces/{workspaceID}/business-profile/emailupdate-business-email-settingsOwner or admin (business:write)
POST /v1/workspaces/{workspaceID}/business-profile/email/reply-to/coderequest-business-email-reply-to-codeOwner or admin (business:write)
POST /v1/workspaces/{workspaceID}/business-profile/email/reply-to/verifyverify-business-email-reply-toOwner or admin (business:write)
POST /v1/workspaces/{workspaceID}/business-profile/email/previewpreview-business-emailAny member (business:write)

The settings are also returned, read-only, as email on the business profile. Changing them needs the same plan feature as the rest of the profile (402 otherwise); reading always works.

{
"replyToAddress": "billing@yourstudio.example",
"replyToVerifiedAt": "2026-11-14T10:00:00Z",
"fromName": "Your Studio Billing",
"showLogo": true,
"accentColor": null,
"quoteMessage": "Hi {contact_first_name},\n\nHere is the quote for {project_name}.",
"invoiceMessage": "Hi {contact_first_name},\n\nThank you for your business!",
"reminderMessage": "Hi {contact_first_name}, a friendly reminder about {document_number}.",
"signOff": "Kind regards,\n{business_name}",
"defaultMessage": "Hi {contact_first_name},\n\nThank you for your business!"
}
FieldMeaning
replyToAddressOne bare email address (up to 254 characters, stored lower-case), or an empty string for none.
replyToVerifiedAtWhen the address was verified, or null. An address that isn't verified is not used.
fromNameThe sender name, or an empty string for the default <business> via Budget Thing.
showLogoShow the business logo in the header. Default true.
accentColor#RRGGBB, or null to use the document style's accent.
quoteMessage, invoiceMessage, reminderMessageUp to 2,000 characters of plain text each, with placeholders. The draft endpoints start a quote or invoice email with the matching one; automatic payment reminders carry reminderMessage. The API doesn't add a message to an email that is sent without a note.
signOffUp to 500 characters of plain text, with placeholders. Added after the note in every quote, invoice and reminder email.
defaultMessageDeprecated. Reading it returns invoiceMessage. Sending it alone in a PATCH sets quoteMessage and invoiceMessage to it and leaves reminderMessage as it is; sent next to either of those it is ignored. Use the three messages instead.

PATCH changes only the fields you send. For accentColor, send an empty string to go back to the document style's accent. A color that is too light is 422 ACCENT_LOW_CONTRAST with a suggestedHex.

Message and sign-off​

Each kind of email has its own default message, so a quote can say something different from an invoice or a payment reminder. A workspace that had a defaultMessage keeps it as its quote and invoice messages. Its reminder message is the reminder policy's old note, or the defaultMessage for a workspace that never had a reminder policy, so no automatic reminder changes text.

The sign-off is a separate block the server renders after the note in the HTML and the plain-text email of a quote, an invoice and a payment reminder, so it is the same whether the email is sent from the app, the API, an AI assistant or by a reminder. An empty sign-off renders nothing.

GET .../quotes/{quoteID}/email/draft and GET .../invoices/{invoiceID}/email/draft return the starting text for one document, resolved against it and the contact the email would go to. By default that is the first contact with an address. Pass the optional query parameter to, one of the document's contact addresses (matched without regard to case), to resolve {contact_name} and {contact_first_name} against that contact instead, for example when the person sending picks another recipient. An address that is not a contact address of the document returns 422 EMAIL_RECIPIENT_NOT_ALLOWED, as a send does. Send the same address as to of the send request, so the note and the email agree.

{ "message": "Hi Alex,\n\nHere is the quote for Website refresh.", "signOff": "Kind regards,\nYour Studio LLC" }

Show or edit message, and send it as the note. Filled-in placeholders can make the message longer than 2,000 characters; shorten it to 2,000 before sending, or the send returns 422. signOff is for display; the server adds it. Any member can read a draft. A draft quote, a superseded quote and a draft or void invoice have none (409 DOCUMENT_NOT_SENDABLE).

Placeholders​

A message, a sign-off and a note can hold placeholders. They are filled in when a draft is made, when an email is sent (so an API caller can send them in a note) and when a payment reminder goes out. Text that is already filled in is sent as it is.

PlaceholderValueKinds
{contact_first_name}The first word of the recipient contact's nameall
{contact_name}The recipient contact's nameall
{client_name}The client's nameall
{business_name}The business's nameall
{project_name}The project's nameall
{document_number}The quote or invoice numberall
{total}The document total, in its currency. Tax is included: it is the gross total the client paysall
{valid_until}The quote's valid-until datequote
{due_date}The invoice's due dateinvoice, reminder
{amount_due}The invoice's balance still to payreminder

Rules:

  • Names are exact: lower case with underscores. {Foo}, { total } and other braces that don't match a name are left as written.
  • A placeholder that is unknown, or isn't valid for the kind of email (for example {due_date} in a quote), is empty.
  • A line that contains a placeholder with no value is removed whole. With no project, Here is the quote for {project_name}. disappears instead of reading "for .". Put optional placeholders on their own line. Lines without placeholders are never removed. This covers a missing contact, project or due date, and an unknown placeholder.
  • Runs of blank lines left by removals collapse to one, and the text is trimmed.

Reply-to address​

  1. PATCH the address. Saving a different address clears replyToVerifiedAt and any pending code; saving the same one changes nothing. 422 EMAIL_REPLY_TO_INVALID for anything but one bare address.
  2. POST .../reply-to/code emails a six-digit code to the saved address. The response (202) has expiresAt and resendAvailableAt. The email uses the standard Budget Thing layout.
  3. POST .../reply-to/verify with { "code": "123456" } checks it and returns the settings with replyToVerifiedAt set.

The code works for 15 minutes and for 5 wrong guesses. A new request voids the earlier code, a new code can be requested once a minute, and a workspace gets 5 codes an hour (429 EMAIL_REPLY_TO_CODE_RATE_LIMITED for the minute gap; the hour limit is a plain 429 from the workspace's rate limit). A wrong code is 422 EMAIL_REPLY_TO_CODE_INVALID with details.attemptsLeft; after the fifth the code is void (429 EMAIL_REPLY_TO_CODE_ATTEMPTS_EXCEEDED) and a new one must be requested; an old code is 422 EMAIL_REPLY_TO_CODE_EXPIRED. Asking for a code with no saved address is 422 EMAIL_REPLY_TO_REQUIRED, and for an address that is already verified 409 EMAIL_REPLY_TO_ALREADY_VERIFIED. If the code email can't be sent, the code is void and you can ask again at once (502 EMAIL_SEND_FAILED, 503 EMAIL_NOT_CONFIGURED).

Once verified, document emails and payment reminders carry the address as Reply-To and the delivery record's replyTo shows it.

Sender name​

A custom fromName replaces <business> via Budget Thing entirely. It is one line of at most 80 characters, and 422 EMAIL_FROM_NAME_INVALID rejects a name that contains @ or an email address, or that passes for Budget Thing (any name containing "Budget Thing", ignoring case, spacing, punctuation and look-alike characters). The sending address stays Budget Thing's own. The pause, bounce and complaint rules and the sending budget described below still apply.

Preview​

POST .../email/preview renders a sample email for the settings screen. It sends and saves nothing, and uses fabricated document data with the business's real name and logo.

{ "kind": "invoice", "fromName": "Your Studio Billing", "showLogo": true, "accentColor": "#2A4D9B", "note": "Thank you!" }

kind is invoice, quote or reminder. fromName, showLogo and accentColor are optional unsaved overrides of the saved values (accentColor as an empty string shows the document style's accent); a bad fromName is 422. message and signOff are optional unsaved texts for the message of that kind and the sign-off; without them the saved ones are shown. Their placeholders resolve to fabricated sample values (contact "Alex Morgan", client "Northwind Studio", project "Website refresh"). note, when sent, is shown as the message as it is. The response:

{
"subject": "Invoice INV-1001 from Your Studio LLC",
"fromName": "Your Studio Billing",
"replyTo": "billing@yourstudio.example",
"accent": "#2A4D9B",
"html": "<!doctype html>...",
"text": "Invoice INV-1001\n..."
}

accent is the color after the contrast check. In html the logo is a data: URL, where a real message carries it as an inline attachment. Previews draw on their own rate limit, not the sending budget.

Delivery status and bounces​

status is one of:

StatusMeaning
sendingThe request is in flight, or was cut short before an outcome was recorded.
sentThe mail server accepted the message. This is not a promise it reached the inbox.
failedThe mail server did not accept the message. The request returned 502 EMAIL_SEND_FAILED. Trying again is fine.
bouncedThe mail provider reported a bounce. bounceType is hard (the address can't receive mail) or soft (a temporary problem).
complainedThe recipient reported the message as unwanted.

After a hard bounce or a complaint, that address is not mailed again from the workspace: sending to it returns 409 EMAIL_RECIPIENT_SUPPRESSED. Correct the contact's address on the client and send again. A soft bounce is recorded but doesn't block sending.

Sending pause​

If too much of a workspace's recent mail bounces for good or is reported as unwanted, Budget Thing pauses sending for the whole workspace. Every send then returns 409 EMAIL_SENDING_PAUSED, and each refused attempt is recorded in the workspace's audit log (document_email.sending_paused, with the counts but no addresses). Listing still works.

Sending is paused while, among the messages the mail server accepted in the last 30 days:

ReasonPaused when
Hard bouncesAt least 5 hard bounces, and at least 10% of those messages
ComplaintsAt least 3 complaints, and at least 1% of those messages

Soft bounces and failed attempts don't count. There is no switch to turn the pause off: it lifts by itself once enough of those reports are more than 30 days old. Check and correct your clients' email addresses in the meantime, or contact support.

Bounce reports (deployment operators)​

The mail provider integration reports bounces to POST /v1/email-reports (receive-email-report). This route is not for API clients and takes no bearer token. It is enabled only when the deployment sets EMAIL_REPORT_SECRET (at least 32 characters); without it the route returns 404.

The request body is JSON:

{ "messageId": "<...@mail.example>", "type": "hard", "reason": "550 mailbox does not exist", "occurredAt": "2026-11-13T10:05:00Z" }

messageId is the Message-ID of the sent message, type is hard, soft or complaint, and reason and occurredAt are optional. Sign the request: put the Unix time in seconds in X-Budget-Thing-Timestamp and, in X-Budget-Thing-Signature, sha256= followed by the hex HMAC-SHA256 of <timestamp>.<raw body> with the secret. A timestamp more than five minutes from the server's clock, or a wrong signature, gets 401. A valid report gets 204 whether or not it names a known message, so the route can't be used to find out which Message-IDs exist. The same route takes reports about product (marketing) emails: a hard bounce or complaint switches the recipient's product emails off. Repeating a report changes nothing, and a soft report never overrides an earlier hard bounce or complaint.

Plan, roles and limits​

  • Sending needs a plan that includes business tools (402 otherwise) and a role that can edit data (403 for a viewer). Listing always works.
  • Each workspace has its own sending budget; see Rate limits.
  • Sending is paused for a workspace whose recent mail bounces or is reported too often; see Sending pause.
  • The PDF must fit the attachment limit (15 MB); otherwise 422 EMAIL_ATTACHMENT_TOO_LARGE.
  • 503 EMAIL_NOT_CONFIGURED means the deployment has no outgoing mail server.
  • Delivery records hold a client contact's address, so they are not included in backups, exports or workspace clones, and the internal events and audit entries for emailing carry IDs only, never the address.

Access tokens​

Sending and listing follow the access-token scopes: quotes:write and invoices:write to send, quotes:read and invoices:read to list. See Scopes.

Errors​

StatusCodeMeaning
404QUOTE_NOT_FOUND, INVOICE_NOT_FOUNDNo such document in the workspace.
409DOCUMENT_NOT_SENDABLEOnly a sent quote or an issued invoice can be emailed.
409EMAIL_RECIPIENT_SUPPRESSEDEarlier mail to this address bounced for good or was reported.
409EMAIL_SENDING_PAUSEDSending from the workspace is paused because too much recent mail bounced or was reported. See Sending pause.
422EMAIL_RECIPIENT_REQUIREDThe client has no contact with an email address.
422EMAIL_RECIPIENT_NOT_ALLOWEDThe address isn't a contact of the document's client.
422EMAIL_ATTACHMENT_TOO_LARGEThe PDF is too large to send by email.
409EMAIL_REPLY_TO_ALREADY_VERIFIEDThe reply-to address is already verified.
422EMAIL_REPLY_TO_INVALIDThe reply-to address isn't one valid email address.
422EMAIL_REPLY_TO_REQUIREDNo reply-to address is saved.
422EMAIL_REPLY_TO_CODE_INVALIDThe verification code is wrong. details.attemptsLeft says how many guesses are left.
422EMAIL_REPLY_TO_CODE_EXPIREDThe code is older than 15 minutes. Request a new one.
422EMAIL_FROM_NAME_INVALIDThe sender name has an address or @, passes for Budget Thing, or is over 80 characters.
422ACCENT_LOW_CONTRASTThe email accent color is too light; details.suggestedHex is a darker one.
429EMAIL_REPLY_TO_CODE_ATTEMPTS_EXCEEDEDFive wrong guesses used the code up. Request a new one.
429EMAIL_REPLY_TO_CODE_RATE_LIMITEDA code was requested less than a minute ago.
502EMAIL_SEND_FAILEDThe mail server did not accept the message. The attempt is listed as failed.
503EMAIL_NOT_CONFIGUREDThis deployment can't send email.