Company
Business details and settings.
Paths are relative to https://evenbooks.org/api/v1. How keys, errors, paging and versions work is in the guide; the whole reference is also an OpenAPI 3.1 document.
Administrator key marks endpoints that need a key with the admin role, Write access those a read-only key can’t call, and Idempotent those that accept an idempotency key.
Get the company
/companyBusiness details and settings of the company the credential belongs to.
Response 200
CompanyDto (fields under Schemas)
Errors 400 · 401 · 403 · 404 · 409 · 429
Change company details and settings
/companyOmitted fields stay as they are. Send version from your last read (409 version_conflict if it changed). nextInvoiceNumber can only go up, and fiscalYearStartMonth can only change while no accounting period is closed (409 invalid_state). Changing invoiceFooter also updates the invoice branding’s default footer.
Request body
UpdateCompanyInput
versionintegerrequirednamestringlegalNamestring or nullemailstring (email) or nullphonestring or nulladdressAddressInputShow 6 fields
line1stringline2stringcitystringregionstringpostalCodestringcountrystring
timeZonestringfiscalYearStartMonthintegerinvoicePrefixstringnextInvoiceNumberintegercreditNotePrefixstringdefaultTermsDaysintegerinvoiceFooterstring or nulltransactionDeletionEnabledbooleanbusinessTypestring · BusinessType or nullOne of:
sole_proprietorsingle_member_llcpartnerships_corpc_corpnonprofitothertaxBasisstring · TaxBasis or nullOne of:
cashaccrualbooksStartDatestring · PlainDateString or nullsetupDismissedboolean
Response 200
CompanyDto (fields under Schemas)
Errors 400 · 401 · 403 · 404 · 409 · 429
List email sender domains
/company/email-sendersDomains set up to send invoice emails from the company’s own address, with their verification status and the DNS records to add. active marks the one in use; when none is active, emails come from Evenbooks.
Response 200
array of SenderIdentityDto
Errors 400 · 401 · 403 · 404 · 409 · 429
Set up an email sender domain
/company/email-sendersStarts verification of a domain the company controls, so invoice emails can come from fromEmail (an address on that domain; personal mailbox providers are refused). Add the returned DNS records, then call POST /company/email-senders/{id}/verify, then select it with POST /company/email-senders/select.
Request body
SenderSetupInput
domainstringrequiredfromEmailstring (email)requiredfromNamestringrequired
Response 200
SenderIdentityDto (fields under Schemas)
Errors 400 · 401 · 403 · 404 · 409 · 429
Cancel an email sender setup
/company/email-senders/{id}/cancelDrops a domain that is not verified yet. A verified domain cannot be cancelled (409 invalid_state); select the Evenbooks sender instead. Returns the remaining domains.
Parameters
idstring (uuid)path · required
Response 200
array of SenderIdentityDto
Errors 400 · 401 · 403 · 404 · 409 · 429
Check an email sender domain
/company/email-senders/{id}/verifyChecks the domain’s DNS records now and returns its updated status: verified once the authorization TXT record and the DKIM records are in place, otherwise pending (or failed if it was verified before) with the reason in lastError.
Parameters
idstring (uuid)path · required
Response 200
SenderIdentityDto (fields under Schemas)
Errors 400 · 401 · 403 · 404 · 409 · 429
Choose the invoice email sender
/company/email-senders/selectSends invoice emails from the domain id, which is checked again first and must be verified (409 invalid_state), or from the Evenbooks address when id is null. Returns all domains with the new active flags.
Request body
PostCompanyEmailSendersSelectBody
idstring (uuid) or nullrequired
Response 200
array of SenderIdentityDto
Errors 400 · 401 · 403 · 404 · 409 · 429
Get invoice branding and email template
/company/invoice-presentationThe layout, colors, logo and default notes of invoice PDFs, and the subject, message and signature of invoice emails. version 0 means the defaults were never changed.
Response 200
InvoicePresentationDto (fields under Schemas)
Errors 400 · 401 · 403 · 404 · 409 · 429
Change invoice branding and email template
/company/invoice-presentationReplaces the whole branding and email template; send version from your last read (409 version_conflict if it changed). Applies to invoices issued from now on: issued invoices keep the design they were issued with. The logo must be a PNG or JPEG data URL.
Request body
UpdateInvoicePresentationInput
brandingInvoiceBrandingInputrequiredShow 10 fields
layoutstringrequiredOne of:
classicmodernaccentColorstringrequiredpaperSizestringrequiredOne of:
LETTERA4showQuantitybooleanshowUnitPricebooleanshowLineTaxbooleanlogostring or nullrequireddefaultFooterstring or nullrequireddefaultNotesstring or nullrequiredpaymentInstructionsstring or nullrequired
emailInvoiceEmailTemplateInputrequiredShow 4 fields
subjectstringrequiredmessagestringrequiredsignaturestringrequiredreplyTostring (email) or nullrequired
versionintegerrequired
Response 200
InvoicePresentationDto (fields under Schemas)
Errors 400 · 401 · 403 · 404 · 409 · 429
Preview an invoice email
/company/invoice-presentation/previewRenders the email without sending it: for invoiceId, or a sample invoice when omitted, with the saved template or the unsaved presentation you pass. Returns the sender, subject, and text and HTML bodies.
Request body
InvoiceEmailPreviewInput
invoiceIdstring (uuid)subjectstringmessagestring or nullpresentationInvoicePresentationInputShow 2 fields
brandingInvoiceBrandingInputrequiredemailInvoiceEmailTemplateInputrequired
usePlatformSenderboolean
Response 200
InvoiceEmailPreviewDto
fromstringreplyTostring or nullsubjectstringmessagestringtextstringhtmlstringtemplateVersioninteger
Errors 400 · 401 · 403 · 404 · 409 · 429
Make a sample invoice PDF
/company/invoice-presentation/sample-pdfRenders a sample invoice with the branding you pass, saved or not, and returns the PDF. Nothing is stored.
Request body
InvoicePresentationInput (fields under Schemas)
Response 200
Returns PDF file (application/pdf).
Errors 400 · 401 · 403 · 404 · 409 · 429
Send a test invoice email
/company/invoice-presentation/test-emailQueues a sample invoice email to to, using the branding and template you pass (saved or not). Counts toward the company’s email limits (429 rate_limited); an address on the suppression list is refused (409 invalid_state). idempotencyKey (or the Idempotency-Key header) is required.
Request body
TestInvoiceEmailInput
brandingInvoiceBrandingInputrequiredShow 10 fields
layoutstringrequiredOne of:
classicmodernaccentColorstringrequiredpaperSizestringrequiredOne of:
LETTERA4showQuantitybooleanshowUnitPricebooleanshowLineTaxbooleanlogostring or nullrequireddefaultFooterstring or nullrequireddefaultNotesstring or nullrequiredpaymentInstructionsstring or nullrequired
emailInvoiceEmailTemplateInputrequiredShow 4 fields
subjectstringrequiredmessagestringrequiredsignaturestringrequiredreplyTostring (email) or nullrequired
tostring (email)requiredidempotencyKeystringrequired
Response 200
EmailMessageDto (fields under Schemas)
Errors 400 · 401 · 403 · 404 · 409 · 429
Schemas
The types these endpoints take or return, by name. Type names above link here.
Address
line1stringoptionalline2stringoptionalcitystringoptionalregionstringoptionalpostalCodestringoptionalcountrystringoptional
AddressInput
line1stringline2stringcitystringregionstringpostalCodestringcountrystring
BusinessType
string
One of: sole_proprietor single_member_llc partnership s_corp c_corp nonprofit other
CompanyDto
idstringclerkOrgIdstringnamestringlegalNamestring or nullemailstring or nullphonestring or nulladdressAddressbaseCurrencystring · CurrencyCodetimeZonestringfiscalYearStartMonthintegerinvoicePrefixstringnextInvoiceNumberintegercreditNotePrefixstringdefaultTermsDaysintegerinvoiceFooterstring or nullhasPostedEntriesbooleanplanstringOne of:
freepaidtransactionDeletionEnabledbooleanbusinessTypestring · BusinessType or nullOne of:
sole_proprietorsingle_member_llcpartnerships_corpc_corpnonprofitothertaxBasisstring · TaxBasis or nullOne of:
cashaccrualbooksStartDatestring or nullsetupDismissedAtstring or nullversioninteger
CurrencyCode
string
EmailMessageDto
idstringkindstringinvoiceIdstring or nulltoEmailstringfromEmailstring or nulloptionalreplyTostring or nulloptionaltemplateVersionnumber or nulloptionalsubjectstringstatusstring · EmailStatusOne of:
queuedsendingsentdeliveredbouncedcomplainedfaileduncertainsuppressedproviderMessageIdstring or nullattemptsintegerlastErrorstring or nullisResendbooleanrequestedBystringqueuedAtstringsentAtstring or nulldeliveredAtstring or nullfailedAtstring or null
EmailStatus
string
One of: queued sending sent delivered bounced complained failed uncertain suppressed
InvoiceBrandingInput
layoutstringrequiredOne of:
classicmodernaccentColorstringrequiredpaperSizestringrequiredOne of:
LETTERA4showQuantitybooleanshowUnitPricebooleanshowLineTaxbooleanlogostring or nullrequireddefaultFooterstring or nullrequireddefaultNotesstring or nullrequiredpaymentInstructionsstring or nullrequired
InvoiceBrandingInputOutput
layoutstringOne of:
classicmodernaccentColorstringpaperSizestringOne of:
LETTERA4showQuantitybooleanshowUnitPricebooleanshowLineTaxbooleanlogostring or nulldefaultFooterstring or nulldefaultNotesstring or nullpaymentInstructionsstring or null
InvoiceEmailTemplateInput
subjectstringrequiredmessagestringrequiredsignaturestringrequiredreplyTostring (email) or nullrequired
InvoiceEmailTemplateInputOutput
subjectstringmessagestringsignaturestringreplyTostring (email) or null
InvoicePresentationDto
brandingInvoiceBrandingInputOutputemailInvoiceEmailTemplateInputOutputversioninteger
InvoicePresentationInput
brandingInvoiceBrandingInputrequiredemailInvoiceEmailTemplateInputrequired
PlainDateString
string
SenderIdentityDto
idstringdomainstringfromEmailstringfromNamestringstatusstringOne of:
pendingverifiedfaileddisabledactivebooleancheckedAtstring or nulllastErrorstring or nullrecordsarray of objectShow 4 fields of each item
namestringtypestringOne of:
TXTCNAMEvaluestringpurposestring
TaxBasis
string
One of: cash accrual