TypeScript
Changelog
Every release of the package, newest first.
0.1.0
- To-dos: a to-do list is a calendar of kind
todos(CALENDAR_KINDS.TODOS), and its items are RFC 5545 to-dos that calendar apps such as Reminders, Thunderbird and tasks.org sync over CalDAV.calendar.listTodos,listAllTodosanditerateTodosread them throughGET /calendar/todos, filtered bycalendarIds,state(TODO_STATES, typedTodoState:open,doneorall),dueBeforeanddueAfter(TodoListOptions).getTodo,createTodo(TodoCreate),updateTodo(TodoPatch) anddeleteTodo(DeletedTodoResource, with how many to-dos itremoved) work on one. ATodoResourcehas atitle,notes, astatusfromTODO_STATUSES(typedTodoStatus),startanddueas a day or a moment withallDayandtimezone,completedAt,priority,percentComplete,categories, theparentIdof the to-do it is a step of and therecurrenceit repeats by. Checking off a repeating to-do moves it to its next date. They needcalendar:readandcalendar:write. calendar.listCalendarstakeskind(CalendarListOptions) and lists your to-do lists withkind: 'todos', andcalendar.createCalendartakeskindto make one. Members, colours, order and deleting work on to-do lists as they do on calendars.calendar.deleteCalendartakesnotifyGuests(CalendarDeleteOptions): left out ortrue, the guests of every upcoming meeting you organised in the calendar are sent a cancellation, ascancelEventdoes, andfalsedeletes it without telling anyone.DeletedCalendarResourcecarriescancelledMeetings. Sending the cancellations needsemails:sendas well.calendar.listCalendarLogins,calendar.createCalendarLogin,calendar.revokeCalendarLoginandcalendar.createCalendarLoginProfileLinkmanage calendar sign-ins, through/calendar/logins. A calendar sign-in belongs to a person, not to an address: its username iscal-and ten letters and digits, never an address, and it signs calendar and contacts apps in over CalDAV and CardDAV to that person’s calendars, the calendars and address books shared with them and their contacts, even when they hold no address at all. Mail apps refuse it and it never sends. Creating one returnsCreatedCalendarLoginResourcewith the password shown once,servers(CalendarLoginServers) and an Apple configuration profile with CalDAV and CardDAV only; the profile link (CalendarLoginProfileLinkResource) makes one on an Apple device. Your own takeaccount:readandaccount:write, andmember(CalendarLoginCreate,CalendarLoginProfileLinkCreate,CalendarLoginListOptions) reaches a member’s withmembers:write.- The security log has two more kinds,
calendar-login-createdandcalendar-login-revoked, andSecurityEventDetailgainslogin, the username of the sign-in an entry is about. threads.listAutomationsreads which automations ran on a thread and what they did, throughGET /threads/{id}/automations: anArray<ThreadAutomationRunResource>, newest first, each with theautomationit was (ThreadAutomationRef), itsstatus,trigger, the case the email matched (ThreadAutomationMatch: the address or domain that received it, the sender entry and the filters that held), themessagesof the thread it started from or sent (ThreadAutomationMessage, itsrolefromAUTOMATION_THREAD_ROLES, typedThreadAutomationRole) and every step it ran (ThreadAutomationStep, with the step as the version defines it). It needsthreads:readandautomations:read.liveEvents.streamfollows the mailbox as it changes: an async generator overGET /live-events, read as server-sent events, that yields eachmessage.received,message.sent,thread.changed,thread.deletedandmessage.status_changedevent (LIVE_EVENT_TYPES, typedLiveEventType) as aLiveEventResourcefor as long as you read it. It takestypes,addressandlastEventId(LiveEventStreamOptions), opens the stream again and resumes throughLast-Event-IDwhen the server ends it or the connection drops, retries network failures, 429 and 5xx answers with backoff from 1 to 30 seconds (or longer whenRetry-Afterasks), drops and reopens a connection that stays silent for 60 seconds, and throws theNextmailApiErroron 400, 401, 403, 404 and 422. When it cannot resume it yields aresetevent (LiveResetEvent, itsreasonfromLIVE_RESET_REASONS). Break out of the loop or abortsignalto close it.message.status_changedcarries the email’sstatus(LIVE_SEND_STATUSES, typedLiveSendStatus), itsemailIdand therecipientsit is about (LiveMessageStatusChangedData).threads.waitForEmailholds a request open until a message that matches arrives, throughGET /threads/wait: it takesaddress,from,subject,sinceandtimeout(ThreadWaitOptions) and resolvesMessageWaitResource, with the firstMessageArrivalResourceornullwhen the wait ran out. Its deadline is the wait plus 15 seconds, whatevertimeoutMsthe client has.- The transport (
client.raw) gainsstream(path, options), which opens a streaming GET with the same credential and plain http checks asrequest, a deadline that lasts only until the headers arrive, and the sameNextmailApiErrorfor an error answer. ADDRESS_FORWARD_STATUSESgainsBOUNCED('bounced'): a forwarding destination whose server refused forwarded mail for good, so nothing is forwarded to it until it confirms again. It shows on address forwards, group members and theforwardStatusof a route, and a route that forwards to one readsforward_bounced(ADDRESS_ROUTE_INACTIVE_REASONS.FORWARD_BOUNCED). Asking a bounced destination again sends it a new confirmation.TrafficVerdictsandWebhookRoutedVerdictscarryarc: the ARC verdict for the servers that forwarded the message on its way in,pass,fail,noneortemperror, and null on an entry written before ARC was checked.calendar.listCalendars,getCalendar,createCalendar,updateCalendaranddeleteCalendarmanage your calendars (CalendarResource,CalendarCreate,CalendarPatch): the ones you keep, with your default one among them, and the ones other members of the workspace gave you access to, each with its owncolorandposition. Deleting a calendar deletes its events, and your default calendar cannot be deleted.calendar.setCalendarMemberandremoveCalendarMembergive a memberreadorwriteaccess to a calendar you keep (MemberAccessSet,COLLECTION_ACCESS_LEVELS, typedCollectionAccess), andaccesson a calendar says what you may do with it (COLLECTION_RIGHTS, typedCollectionRight).CalendarEventResourceandCalendarOccurrenceResourcecarrycalendarId.createEventtakescalendarIdto put the event in a calendar,updateEventtakes it to move one,listEvents,listAllEventsanditerateEventstakecalendarIdsto keep only some calendars,createFeedtakescalendarIdto publish one calendar (andCalendarFeedResourcesays which), andimportIcstakescalendarId(CalendarImportOptions) for the calendar the events go into.contacts.listAddressBookslists your address book and the ones other members gave you access to (ContactAddressBookResource).contacts.setAddressBookMemberandremoveAddressBookMembergive a memberreadorwriteaccess to yours.listCards,listAllCardsanditerateCardstakeaddressBookto read one you are a member of, andcreateCardtakes it to add to one you may write.traffic.list,listAllanditerateread the traffic log: one entry for each message and recipient at each step it took in or out of the workspace, newest first, kept for 30 days. They takedomainId,direction(TRAFFIC_DIRECTIONS, typedTrafficDirection),outcomes(TRAFFIC_OUTCOMES, typedTrafficOutcome),address,recipient,sinceanduntil(TrafficListOptions), and eachTrafficEventResourcecarries the reply of the receiving server, the servers on each side and, inbound, the verdicts the message arrived with. Outbound entries needemails:readand inbound onesthreads:read.emails.sendRawsends an RFC 5322 message you built yourself, as written:rawis its bytes (Uint8Array,ArrayBufferorBlob, encoded for you) or a base64 string (RawMessage), up to 10 MB. The sender is its From header and the recipients its To, Cc and Bcc headers, unlessto,ccorbccgive the envelope. It takesscheduledAt,followUpAt,cancellableForSeconds,tracking,signature,signatureId,tagsandstream, honoursidempotencyKey, and never sends a Bcc header. Editing the wording of a scheduled raw message is a 422raw_message_locked.AutomationEmailTriggertakessenders, the addresses or domains its mail has to come from, where a domain covers its subdomains. Left out or empty, mail from anybody starts it, as before.settings.updatetakeslabelAlerts, andsettings.getreturns it: label ids under each workspace id whose mail still alerts you while labelled mail stays out of your inbox.MAILBOX_PROVIDERSandMAIL_SERVICESgainOPENEMAIL('openemail'). An address whose mail OpenEmail receives finds its servers by itself, and a connected mailbox or an import on it reports thatprovider. A message signed by OpenEmail reports it assentWith.sentWithstays empty, rather than naming Outlook or Gmail, when another mail service signed the message and the only hint is that it passed through Microsoft’s or Google’s servers on the way or was written in the Outlook app.shareLinks.list,listAllanditerateread the templates, forms and automations the workspace shares at a public link (ShareLinkResource), the newest first, with how often each page was opened and each item copied, and takekind(SHARE_KINDS, typedShareKind).shareLinks.get(kind, itemId)reads the link of one item,shareLinks.set(kind, itemId, body?)makes it public or changescopyable(ShareLinkSet), andshareLinks.delete(kind, itemId)makes it private again (DeletedShareLinkResource). A private item answers 404share_link_not_found.shared.get(token)reads what the public page of a link shows, from any workspace (SharedItemResource, withSharedTemplate,SharedFormorSharedAutomationfor its kind), andshared.copy(token)copies the item into this workspace as a draft (SharedCopyResource). An item its owner shares to look at only answers 403share_not_copyable, and a link that no longer works answers 404shared_item_not_found.tasks.list,listAllanditeratetakechatId(TaskListOptions) to read only the tasks made in one assistant chat, the ones the chat shows above its messages, as the Tasks page does when a chat’s task is opened. A chat belongs to one person, so the id of a chat you cannot open lists no tasks.
0.0.3
emails.listEventsByMessageId,listAllEventsByMessageIdanditerateEventsByMessageIdread the event trail of a sent email found by the Message-ID header it went out with, for a caller that holds that header and not themsg_id, such as a reply or a bounce report that quotes it. They takelimit,cursorandaddress(EmailEventByMessageIdListOptions), and a Message-ID that no message the key reaches went out with is a 404.providerImports.list,listAllanditeratetakesource(PROVIDER_IMPORT_PROVIDERS, typedProviderImportProvider),status(IMPORT_HISTORY_STATUSES, typedImportHistoryStatus) andsearch, up to 320 characters, the filtersimports.listalready takes. An import from a provider never pauses, sostatus: 'paused'answers an empty page.emails.listEvents,listAllEventsanditerateEventstakemessageId, 1 to 998 characters: the trail answers only when the send went out with that Message-ID header, with or without its angle brackets, and is a 404 otherwise. The send id is still required.files.createLinktakesreuse(FileLinkCreateOptions):truehands back the working public link the file already has, with its own domain and download count, instead of making another, and a file with none gets a new one. A link handed back answers 200 and a new one 201.keys.create,updateanddelete,keys.rotatefor any key but the caller, andworkspaces.offerOwnership,withdrawOwnershipOffer,account.acceptOwnershipOfferanddeclineOwnershipOfferrefuse an API key with 403console_only. The console confirms these changes with a verification code, which a key cannot give, so they are made there. A key still rotates its own secret withkeys.rotateorme.rotate, and revokes keys withkeys.revoke.AppHostResource, fromappHost.get,setandverify, gainssender(AppHostSender): where the emails sent to the people of the workspace come from,{ address, domain, waitingOn }.waitingOnislogoorsigning(APP_HOST_SENDER_WAITS, typedAppHostSenderWait) until they come fromnoreply@the domain of the live web app address, then null.senderis null on the free plan and until an address on a verified domain of the workspace is live.AddressResource, fromaddresses.list,listAllanditerate, gainsrole(ADDRESS_ROLES, typedAddressRole):owneron every address for an API key, andmemberorviewerfor an app a member connected. A key narrowed to particular addresses or domains now lists only the addresses and domains it covers, instead of every address withcanSend: falseon the rest, and the free address of the person the key acts for is listed, withrole: 'owner', by a key of the workspace it belongs to.chats.listMessages,listAllMessagesanditerateMessagesread the messages of a chat (ChatMessageResource), from the first unlessorderisdesc(CHAT_MESSAGE_ORDERS). Each message has itstextand itsparts(ChatMessagePart, kinds inCHAT_MESSAGE_PART_TYPES): the words, the tools the assistant called with their arguments, results and status (CHAT_TOOL_CALL_STATUSES), and the files. A tool result the caller may not read comes back redacted.chats.sendMessagesays something in a chat, or starts one under a new id, and resolves with theChatTurnResourceonce the assistant has answered.status(CHAT_TURN_STATUSES) isawaiting_approvalwhen a call that changes something waits inpendingToolCalls, whichchats.approveToolCall, with optionalargs, orchats.denyToolCallanswers.regenerateanswers the last message again.chats.stopTurnstops the assistant and answersChatTurnStopResource(CHAT_STOP_STATUSES), and a stopped turn says why instopReason(CHAT_STOP_REASONS). A turn runs for at most 240 seconds, so these three calls wait up to 5 minutes by default, oroptions.timeoutMs. The refusals arechat_busy,approval_pending,tool_not_offered,ai_quota_exceeded,ai_not_configuredandassistant_unavailable.members.getDirectorySyncreads directory sync (SCIM) (DirectorySyncResource), andmembers.connectDirectorySyncturns it on and returns the token once (DirectorySyncTokenResource).members.disconnectDirectorySyncturns it off,members.listDirectoryPeoplereads who the directory synced (DirectoryPersonListResource, states inDIRECTORY_PERSON_STATES), andmembers.setDirectoryDefaultRoleandsetDirectoryGroupRolechoose the roles it gives. Only the owner or a role holdingworkspace:managereaches them, every change asks an OAuth access token for a verification code, and the refusals areplan_required,role_not_foundanddirectory_sync_not_connected.security.getPolicyreads whether the workspace requires two-factor sign-in and whether the person behind the client meets it (SecurityPolicyResource), with no scope.security.updatePolicysetsrequireTwoFactor, withmembers:writeand a verification code.workspaces.getOwnershipOffer,offerOwnershipandwithdrawOwnershipOfferlet the owner offer the workspace to one of its members (OwnershipOfferResource,WithdrawnOwnershipOfferResource).account.listOwnershipOffers,acceptOwnershipOfferanddeclineOwnershipOfferanswer the offers made to the person (IncomingOwnershipOfferResource,OwnershipTransferResource,DeclinedOwnershipOfferResource). Offering and accepting ask for a verification code. The refusals areownership_offer_not_found,ownership_not_eligible,ownership_changed,domain_moving,two_factor_requiredandworkspace_allowance_reached.account.setNamechanges the name of the person (AccountResource).account.endConnectedAppElevationmakes a connected app ask for verification codes again (EndedConnectedAppElevationResource).dnsConnections.startanswers the link that connects a Cloudflare account to the workspace in a browser (DnsConnectionStartResource). It asks an OAuth access token for a verification code, and a server that cannot connect a provider answersdns_unavailable.domains.createMailAppProfileLinkmakes a one-time link that sets an address up on an Apple device (MailAppProfileLinkCreate,MailAppProfileLinkResource). It needsmembers:writeand a verification code, and past 10 links an hour it isprofile_link_rate_limited.domains.startGravatarPublishanswers the link that publishes the photo of an address to Gravatar (GravatarPublishResource), refused withphoto_requiredandgravatar_not_configured.threads.setReplyingandclearReplyingshow the team who is writing a reply (ThreadReplyingResource).threads.listTrackingreads the tracking report of every tracked message sent in a thread, andthreads.getDeliverycounts what bounced, was refused or was held back (ThreadDeliveryResource), both narrowed byaddress.threads.listFileLinks,listAllFileLinksanditerateFileLinksread the download links one message carried, withincludeRevoked(MessageFileLinkListOptions).threads.countstakeshideLabelled.senders.getAvatarfetches the picture of a sender as bytes, andSenderProfileResourcegainsavatarUrlandavatarKind(SENDER_AVATAR_KINDS).emails.sendandsendBatchtakeisForward,originalMessage, the quoted history of a forward or a reply, andencryption(SealedMessageInput),{ format: 'pgp-mime', sealedAt, sealedTo }for a message you sealed yourself with OpenPGP.emails.translatetakesskipQuoted, andTranslationResourcereportsquotedHistoryKept.emails.listEvents,listAllEventsanditerateEvents(EmailEventListOptions),getTracking(EmailTrackingOptions) and thetrackingopens and clicks methods takeaddress. Thetracking.listmethods takeoffsetMinutes, andTrackingStatsResourcegainsdownloads(TrackingDownloads), the files that went out as download links and how often they were fetched.templates.update,replaceContentandpublishtakeexpectedUpdatedAt, theupdatedAtof the version you read, and refuse a change saved in between withversion_conflict.TemplateVersionResourcegainsupdatedAt.drafts.createandupdatetakeattachments(DraftAttachmentInput), up to 20 files inline or byfileId, andDraftAttachmentResourcegainsfileId.- New filters:
ruleIdson therules.listRunsmethods,audienceIdon thecontacts.listmethods,fromandtooncontacts.activity,inactiveDayson theaudiences.listContactsmethods,sinceanduntilonaudiences.growth,forms.analyticsandbookings.analytics,sinceonbroadcasts.analyticsandbroadcasts.stats,source,status(IMPORT_HISTORY_STATUSES) andsearchon theimports.listmethods, andfromon thesignatures.listmethods. contacts.setAudiencesandaudiences.addContacttakecreateContact, which saves an address that is not a contact yet as one first and then needscontacts:write. Through an app a member connected, an address another member saved is a 409contact_existsthere and oncontacts.save.- Scopes:
addresses.list,listAllanditerateneedemails:read, oremails:sendin its place. Theaudiences.listContactsmethods needcontacts:readas well asaudiences:read.domains.getMailAppSettingsandlistAppPasswordsneedthreads:read, anddomains.updateMailAppSettingsneedsthreads:readanddomains:write.domains.createAddressasks an OAuth access token for a verification code when it chooses where the mail goes or deletion on expiry. domains.createAddressanddomains.updateAddresstakeexpiresAtandonExpiry(ADDRESS_EXPIRY_ACTIONS, typedAddressExpiryAction), and everyDomainAddressResourcereports them withexpiredAt. From itsexpiresAtan address takes no mail and sends none, a send from it is refused with 403address_expired, and within a minute it is switched off, or deleted with the conversations delivered to it whenonExpiryisdelete. A laterexpiresAt, null orenabled: trueturns a stopped address back on.WEBHOOK_EVENTS.ADDRESS_EXPIREDis the new eventaddress.expired, typed asAddressExpiredEventData.DOMAIN_ADDRESS_DESTINATIONSgainsWEBHOOKandGROUP. The same two methods takewebhookIdfor a webhook destination,tapWebhookIdsto copy every message to up to 5 endpoints, andgroupPosting(ADDRESS_GROUP_POSTING_POLICIES, typedAddressGroupPosting) andgroupKeepCopyfor a group, and every address reports them. The refusals arewebhook_not_foundandtoo_many_taps.WEBHOOK_EVENTS.EMAIL_ROUTEDis the eventemail.routed, typed asEmailRoutedEventData: a message that arrived at an address whose destination iswebhook, or that a route of its domain sent to a webhook, was kept for 30 days instead of being filed. It goes only to the endpoint the address or route names and to the taps of the address, and always carriescontentandraw.routedBy(WebhookRoutedBy, kinds inWEBHOOK_ROUTED_SOURCES) says which sent it,recipientkeeps the plus tag andverdicts(WebhookRoutedVerdicts) are what the receiving server found.EmailReceivedEventDatagainstap, true when an endpoint gets the message as a tap of the address rather than through its subscription.domains.listRoutes,listAllRoutesanditerateRoutesread the pattern routes of a domain (AddressRouteResource) in the order they are tried.domains.createRoute,getRoute,updateRouteanddeleteRoutemanage them: a route catches mail to addresses nobody created whose local part matches itspattern, such assupport-*, and delivers it to an address, forwards it once the destination confirms, posts it to a webhook asemail.routedor reads it on another domain (ADDRESS_ROUTE_ACTIONS).activeandinactiveReason(ADDRESS_ROUTE_INACTIVE_REASONS) say whether a route takes mail now. A domain holds at most 100 routes, and the refusals areinvalid_route_pattern,route_pattern_taken,route_target_not_foundandroute_limit_reached.domains.testRouteanswers which step decides mail to an address (ADDRESS_ROUTE_TEST_STEPS), the route and where the mail goes (AddressRouteTestResource), without sending anything.domains.listGroupMembers,listAllGroupMembersanditerateGroupMembersread the group members of a group address (GroupMemberResource), anddomains.addGroupMembersandremoveGroupMemberchange them. A group member is an address of the workspace or an address at another provider, which confirms by email first (GROUP_MEMBER_KINDS). A group holds at most 1,000 group members and groups nest at most 3 deep, and the refusals arenot_a_group,group_member_limit,group_member_not_foundandgroup_nesting_too_deep.domains.updatetakesaliasOf, which makes the domain an alias of another domain of the workspace, and everyDomainResourcereportsaliasOfandaliases(DomainAlias). The refusals arealias_not_allowed,alias_chainandalias_has_addresses, and creating an address on an alias is refused withalias_has_addresses.domains.updateAddressLimitstakesreceiving.storageBytes, a storage quota for one address from 1 MiB to 1 TiB, andAddressReceivingLimitsreports it. A message that would take the address past its quota gets a permanent bounce (5.2.2), and deleting mail for good makes room again.domains.getAddressLimitsreports what the address keeps inusage.storage(AddressStorageUsage, withbytesandmessages): every message filed in its mailbox since storage counting began, with its kept original when it keeps originals. Mail stored before then and mail routed to a webhook are not counted.webhooks.listDeadLetters,listAllDeadLettersanditerateDeadLettersread the events an endpoint gave up on (WebhookDeadLetterResource): each event whose last automatic attempt failed, with how many times it was tried, the last answer and that attempt.statusreads theopenones by default, orreplayed,discardedorall(WEBHOOK_DEAD_LETTER_FILTERS). A dead letter is kept 30 days.webhooks.replayDeadLetterssends up to 100 open dead letters again in one call, the named ones or the oldest, and answers with anoutcomefor each (WEBHOOK_DEAD_LETTER_REPLAY_OUTCOMES). A delivered one is closed asreplayed.webhooks.discardDeadLettercloses one without sending it, and one already replayed is 409dead_letter_resolved.webhooks.createandwebhooks.updatetakeretryPolicy(WEBHOOK_RETRY_POLICIES):standardtries a failed delivery up to 8 times over about 27 and a half hours, as before, andextendedup to 16 times over about 3 days. They also takeincludeRaw, which needsthreads:read, and everyWebhookResourcereports both.threads.getRawMessagedownloads the source of one message asmessage/rfc822bytes, ready to save as an.emlfile. It is the message byte for byte as it arrived when the address hadkeepOriginalon, and otherwise a source rebuilt from the stored message, the same bytes the IMAP server gives a mail app. TheX-Message-Sourceresponse header says which, one ofRAW_MESSAGE_SOURCES.domains.createAddressanddomains.updateAddresstakekeepOriginal, and everyDomainAddressResourcereports it. While it is on, each message the address receives is also kept byte for byte as it arrived, and it is deleted with its message.- An
email.receivedevent to an endpoint withincludeRawon carriesdata.raw(WebhookMessageRaw): a link that downloads the message source for an hour, itssizeand itssource,originalorrebuilt. domains.getAddressLimitsanddomains.updateAddressLimitsread and change the limits of one address (AddressLimitsResource): aholdthat pauses or disables sending or receiving, caps on messages and recipients an hour, a day and a month,recipientsPerMessage, theallowedRecipientsandblockedRecipientsit may send to, and theallowedSendersit accepts mail from, with what it has used so far and when each count goes down. A send over a cap is 429address_limit_reachedwithretryAfterSecondsin the error, a paused address 429address_sending_paused, a disabled one 403address_sending_disabled, and a recipient its lists leave out 403recipient_not_allowed.ADDRESS_HOLDSholds the two holds.domains.getanddomains.updategive each DNS recordfound, what public DNS answers at that name now, andproblem, aDomainRecordProblemResourcewith acodefromDOMAIN_RECORD_PROBLEMSand amessageto show a person: the domain added to the name twice, a value saved with its quote marks, a proxied CNAME, and the other usual mistakes.domains.updatetakesautodiscovery. True offers the SRV and TXT records that let mail, calendar and contacts apps find the servers from an address on the domain alone, listed inautodiscoveryRecords, and everyDomainResourcereportsautodiscovery.webhooks.createandwebhooks.updatetakeincludeContent, which puts the message into everyemail.receivedevent asdata.content(WebhookMessageContent): the text, the HTML up to 512 KiB and each attachment with a link that downloads it for an hour. Turning it on needsthreads:read, and everyWebhookResourcereportsincludeContent.- A connected mailbox can be the sender of
emails.sendwith an API key, of broadcasts, automations and sign-up forms, and a key or an app can send from the free address of the person it acts for. Only that person may send as a free address: anyone else still gets 403from_address_forbidden. threads.countsleaves labelled mail out ofteam.assignedandteam.unassigned, as the inbox does, unless the person has chosen to show labelled mail in the inbox.domains.list,members.list,keys.list,webhooks.list,rules.listandconnectedMailboxes.list, with theirlistAllanditerate, takeq, which searches every field a person reads on the row: names, addresses, ids, scopes, events, condition values. Every word has to appear, ignoring case and accents, and close spellings count when nothing matches exactly. The option types areDomainListOptions,MemberListOptions,ApiKeyListOptions,WebhookListOptions,RuleListOptionsandConnectedMailboxListOptions.rules.statsreads how the rules did inside a window: messages matched and failed, a series of buckets, the matches of each rule, the actions taken, the failures and the senders matched most.ruleIdscounts some rules only.billing.getreportsusage.addressChecks: the deep address checks used this calendar month, what the plan includes and when they start again, besidepayAsYouGo.coversAddressChecksandextraAddressChecks.billing.listPlansgives each plan’smonthlyAddressChecks, andbilling.getPayAsYouGoaddsprices.addressChecksandperiod.addressChecks.tools.checkAddressandtools.checkAddresseswithdeepfirst use the deep checks the plan includes each month (10 on Free, 100 on Pro and Starter, 500 on Business, 1,000 on Enterprise), then pay as you go at $1.50 per 100 addresses.- An automation branch can check the contact’s address with
AutomationAddressCondition,{ kind: 'address_check', mailbox, accept }.acceptisvalidorvalid_or_risky(AUTOMATION_ADDRESS_ACCEPTS).mailboxalso runs the deep check, which uses the deep checks the plan includes and then pay as you go, and the free check decides when neither can cover it. - A send leaves out an address whose domain takes no mail, and one the check on sending finds has no mailbox. Each shows as
suppressed, with anemail.suppressedwebhook that names the reason, never as a bounce. - Forms check the address of every sign-up.
forms.subscriberefuses one whose domain takes no mail with the field errorundeliverable.settings.refuseDisposablealso refuses throwaway addresses (disposable), andsettings.checkMailboxruns a deep check on every sign-up and refuses a missing mailbox (mailbox_not_found).FormFieldProblemcarriessuggestionwhen a refused address looks like a typo, andFORM_FIELD_ERRORSnames the three new reasons.
0.0.2
- API keys begin
nm_live_ornm_test_, and temporary inbox tokensnm_inbox_. The client refuses a key of any other shape, and a key created before this release no longer works: create a new one in the app or withkeys.create. - Images up to 100 MB go in:
account.setPhoto,contacts.setPhoto,domains.setAddressPhoto,bookings.uploadBackground,branding.uploadImageandtemplates.uploadImage. The server crops and compresses them to the size each place shows. - The same six methods take
options.crop, the part of the image to keep as{ x, y, width, height }fractions of the image, sent as thecropquery parameter. - Like
files.upload, those six wait for the client timeout or ten minutes, whichever is longer.
0.0.1
The first release of @nextmail/sdk, the official TypeScript SDK: a typed method for every one of the 548 documented API operations, 684 methods in all once helpers such as listAll and iterate are counted, in 53 namespaces. Every request and response is typed, and the types are exported from the package root. It has no runtime dependencies, ships as ESM and CommonJS, and runs on Node 20+, Bun, Deno and Cloudflare Workers.
- Sending:
emails.sendandsendBatchwith attachments, scheduling, an undo window, tags, open and click tracking and translation,templates.sendfor stored templates, andbroadcasts.sendfor a personalised copy to everybody in an audience. - The mailbox: threads, drafts, labels, signatures, follow-up reminders, out of office replies, rules, the team inbox with assignments and comments, subscriptions, files and the calendar.
- Contacts and marketing: contacts and contact cards, audiences, segments, sign-up forms, broadcasts with A/B tests, automations with contact events, suppressions and unsubscribes.
- The workspace: domains and their DNS records, addresses, members, roles, API keys, webhooks, billing, branding, booking pages, exports, the knowledge base, connected mailboxes, and imports from an old mailbox or another provider.
- Every workspace is the same kind, the one that holds the free address included. That address sends only the mail a person writes in the app, so a send from it with an API key or an access token is refused with
from_address_forbidden. - The assistant: tasks with their runs and approvals, chats, and connectors to outside apps.
- A workspace API key or an OAuth access token, given to
new Nextmail()or read fromNEXTMAIL_API_KEYorNEXTMAIL_ACCESS_TOKENbycreateNextmail()and the ready madenextmailclient.security.beginStepUpandverifyStepUphandle the verification code a token is asked for before a sensitive change. - Cursor paging: each paged list comes with a
listAllthat reads every page and aniteratethat streams the items and stops whenever you like. - Retries for reads and for calls that are safe to repeat, with backoff after a network failure, a timeout or a server error, and after a rate limit that says when to try again. Sends carry an idempotency key that their retries reuse, so a retried send never goes out twice.
- Two error classes:
NextmailApiError, withstatus,code,param,requestIdand getters such asisValidation,isNotFound,isRateLimitedandisStepUpRequired, andNextmailNetworkError, withisTimeout. verifyWebhookSignaturechecks a webhook delivery in constant time, refuses one more than five minutes old and runs anywhere WebCrypto does, and the data of each of the 51 webhook events is typed.- Disposable inboxes through
createTempMail(), which needs no credential and also runs in a browser. - Every call takes a
signalto cancel it, and a workspace call anapiKeyof its own, so one client can serve several workspaces.raw.request()reaches any endpoint with the client’s credential, base URL, timeout and retries. - The client refuses to start in a browser, where its credential could be read, unless you pass
dangerouslyAllowBrowser, and never sends a credential over plainhttpto another machine.