Skip to the documentation
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, listAllTodos and iterateTodos read them through GET /calendar/todos, filtered by calendarIds, state (TODO_STATES, typed TodoState: open, done or all), dueBefore and dueAfter (TodoListOptions). getTodo, createTodo (TodoCreate), updateTodo (TodoPatch) and deleteTodo (DeletedTodoResource, with how many to-dos it removed) work on one. A TodoResource has a title, notes, a status from TODO_STATUSES (typed TodoStatus), start and due as a day or a moment with allDay and timezone, completedAt, priority, percentComplete, categories, the parentId of the to-do it is a step of and the recurrence it repeats by. Checking off a repeating to-do moves it to its next date. They need calendar:read and calendar:write.
  • calendar.listCalendars takes kind (CalendarListOptions) and lists your to-do lists with kind: 'todos', and calendar.createCalendar takes kind to make one. Members, colours, order and deleting work on to-do lists as they do on calendars.
  • calendar.deleteCalendar takes notifyGuests (CalendarDeleteOptions): left out or true, the guests of every upcoming meeting you organised in the calendar are sent a cancellation, as cancelEvent does, and false deletes it without telling anyone. DeletedCalendarResource carries cancelledMeetings. Sending the cancellations needs emails:send as well.
  • calendar.listCalendarLogins, calendar.createCalendarLogin, calendar.revokeCalendarLogin and calendar.createCalendarLoginProfileLink manage calendar sign-ins, through /calendar/logins. A calendar sign-in belongs to a person, not to an address: its username is cal- 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 returns CreatedCalendarLoginResource with 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 take account:read and account:write, and member (CalendarLoginCreate, CalendarLoginProfileLinkCreate, CalendarLoginListOptions) reaches a member’s with members:write.
  • The security log has two more kinds, calendar-login-created and calendar-login-revoked, and SecurityEventDetail gains login, the username of the sign-in an entry is about.
  • threads.listAutomations reads which automations ran on a thread and what they did, through GET /threads/{id}/automations: an Array<ThreadAutomationRunResource>, newest first, each with the automation it was (ThreadAutomationRef), its status, trigger, the case the email matched (ThreadAutomationMatch: the address or domain that received it, the sender entry and the filters that held), the messages of the thread it started from or sent (ThreadAutomationMessage, its role from AUTOMATION_THREAD_ROLES, typed ThreadAutomationRole) and every step it ran (ThreadAutomationStep, with the step as the version defines it). It needs threads:read and automations:read.
  • liveEvents.stream follows the mailbox as it changes: an async generator over GET /live-events, read as server-sent events, that yields each message.received, message.sent, thread.changed, thread.deleted and message.status_changed event (LIVE_EVENT_TYPES, typed LiveEventType) as a LiveEventResource for as long as you read it. It takes types, address and lastEventId (LiveEventStreamOptions), opens the stream again and resumes through Last-Event-ID when the server ends it or the connection drops, retries network failures, 429 and 5xx answers with backoff from 1 to 30 seconds (or longer when Retry-After asks), drops and reopens a connection that stays silent for 60 seconds, and throws the NextmailApiError on 400, 401, 403, 404 and 422. When it cannot resume it yields a reset event (LiveResetEvent, its reason from LIVE_RESET_REASONS). Break out of the loop or abort signal to close it.
  • message.status_changed carries the email’s status (LIVE_SEND_STATUSES, typed LiveSendStatus), its emailId and the recipients it is about (LiveMessageStatusChangedData).
  • threads.waitForEmail holds a request open until a message that matches arrives, through GET /threads/wait: it takes address, from, subject, since and timeout (ThreadWaitOptions) and resolves MessageWaitResource, with the first MessageArrivalResource or null when the wait ran out. Its deadline is the wait plus 15 seconds, whatever timeoutMs the client has.
  • The transport (client.raw) gains stream(path, options), which opens a streaming GET with the same credential and plain http checks as request, a deadline that lasts only until the headers arrive, and the same NextmailApiError for an error answer.
  • ADDRESS_FORWARD_STATUSES gains BOUNCED ('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 the forwardStatus of a route, and a route that forwards to one reads forward_bounced (ADDRESS_ROUTE_INACTIVE_REASONS.FORWARD_BOUNCED). Asking a bounced destination again sends it a new confirmation.
  • TrafficVerdicts and WebhookRoutedVerdicts carry arc: the ARC verdict for the servers that forwarded the message on its way in, pass, fail, none or temperror, and null on an entry written before ARC was checked.
  • calendar.listCalendars, getCalendar, createCalendar, updateCalendar and deleteCalendar manage 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 own color and position. Deleting a calendar deletes its events, and your default calendar cannot be deleted. calendar.setCalendarMember and removeCalendarMember give a member read or write access to a calendar you keep (MemberAccessSet, COLLECTION_ACCESS_LEVELS, typed CollectionAccess), and access on a calendar says what you may do with it (COLLECTION_RIGHTS, typed CollectionRight).
  • CalendarEventResource and CalendarOccurrenceResource carry calendarId. createEvent takes calendarId to put the event in a calendar, updateEvent takes it to move one, listEvents, listAllEvents and iterateEvents take calendarIds to keep only some calendars, createFeed takes calendarId to publish one calendar (and CalendarFeedResource says which), and importIcs takes calendarId (CalendarImportOptions) for the calendar the events go into.
  • contacts.listAddressBooks lists your address book and the ones other members gave you access to (ContactAddressBookResource). contacts.setAddressBookMember and removeAddressBookMember give a member read or write access to yours. listCards, listAllCards and iterateCards take addressBook to read one you are a member of, and createCard takes it to add to one you may write.
  • traffic.list, listAll and iterate read 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 take domainId, direction (TRAFFIC_DIRECTIONS, typed TrafficDirection), outcomes (TRAFFIC_OUTCOMES, typed TrafficOutcome), address, recipient, since and until (TrafficListOptions), and each TrafficEventResource carries the reply of the receiving server, the servers on each side and, inbound, the verdicts the message arrived with. Outbound entries need emails:read and inbound ones threads:read.
  • emails.sendRaw sends an RFC 5322 message you built yourself, as written: raw is its bytes (Uint8Array, ArrayBuffer or Blob, 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, unless to, cc or bcc give the envelope. It takes scheduledAt, followUpAt, cancellableForSeconds, tracking, signature, signatureId, tags and stream, honours idempotencyKey, and never sends a Bcc header. Editing the wording of a scheduled raw message is a 422 raw_message_locked.
  • AutomationEmailTrigger takes senders, 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.update takes labelAlerts, and settings.get returns it: label ids under each workspace id whose mail still alerts you while labelled mail stays out of your inbox.
  • MAILBOX_PROVIDERS and MAIL_SERVICES gain OPENEMAIL ('openemail'). An address whose mail OpenEmail receives finds its servers by itself, and a connected mailbox or an import on it reports that provider. A message signed by OpenEmail reports it as sentWith.
  • sentWith stays 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, listAll and iterate read 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 take kind (SHARE_KINDS, typed ShareKind). shareLinks.get(kind, itemId) reads the link of one item, shareLinks.set(kind, itemId, body?) makes it public or changes copyable (ShareLinkSet), and shareLinks.delete(kind, itemId) makes it private again (DeletedShareLinkResource). A private item answers 404 share_link_not_found.
  • shared.get(token) reads what the public page of a link shows, from any workspace (SharedItemResource, with SharedTemplate, SharedForm or SharedAutomation for its kind), and shared.copy(token) copies the item into this workspace as a draft (SharedCopyResource). An item its owner shares to look at only answers 403 share_not_copyable, and a link that no longer works answers 404 shared_item_not_found.
  • tasks.list, listAll and iterate take chatId (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, listAllEventsByMessageId and iterateEventsByMessageId read 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 the msg_ id, such as a reply or a bounce report that quotes it. They take limit, cursor and address (EmailEventByMessageIdListOptions), and a Message-ID that no message the key reaches went out with is a 404.
  • providerImports.list, listAll and iterate take source (PROVIDER_IMPORT_PROVIDERS, typed ProviderImportProvider), status (IMPORT_HISTORY_STATUSES, typed ImportHistoryStatus) and search, up to 320 characters, the filters imports.list already takes. An import from a provider never pauses, so status: 'paused' answers an empty page.
  • emails.listEvents, listAllEvents and iterateEvents take messageId, 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.createLink takes reuse (FileLinkCreateOptions): true hands 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, update and delete, keys.rotate for any key but the caller, and workspaces.offerOwnership, withdrawOwnershipOffer, account.acceptOwnershipOffer and declineOwnershipOffer refuse an API key with 403 console_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 with keys.rotate or me.rotate, and revokes keys with keys.revoke.
  • AppHostResource, from appHost.get, set and verify, gains sender (AppHostSender): where the emails sent to the people of the workspace come from, { address, domain, waitingOn }. waitingOn is logo or signing (APP_HOST_SENDER_WAITS, typed AppHostSenderWait) until they come from noreply@ the domain of the live web app address, then null. sender is null on the free plan and until an address on a verified domain of the workspace is live.
  • AddressResource, from addresses.list, listAll and iterate, gains role (ADDRESS_ROLES, typed AddressRole): owner on every address for an API key, and member or viewer for 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 with canSend: false on the rest, and the free address of the person the key acts for is listed, with role: 'owner', by a key of the workspace it belongs to.
  • chats.listMessages, listAllMessages and iterateMessages read the messages of a chat (ChatMessageResource), from the first unless order is desc (CHAT_MESSAGE_ORDERS). Each message has its text and its parts (ChatMessagePart, kinds in CHAT_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.sendMessage says something in a chat, or starts one under a new id, and resolves with the ChatTurnResource once the assistant has answered. status (CHAT_TURN_STATUSES) is awaiting_approval when a call that changes something waits in pendingToolCalls, which chats.approveToolCall, with optional args, or chats.denyToolCall answers. regenerate answers the last message again. chats.stopTurn stops the assistant and answers ChatTurnStopResource (CHAT_STOP_STATUSES), and a stopped turn says why in stopReason (CHAT_STOP_REASONS). A turn runs for at most 240 seconds, so these three calls wait up to 5 minutes by default, or options.timeoutMs. The refusals are chat_busy, approval_pending, tool_not_offered, ai_quota_exceeded, ai_not_configured and assistant_unavailable.
  • members.getDirectorySync reads directory sync (SCIM) (DirectorySyncResource), and members.connectDirectorySync turns it on and returns the token once (DirectorySyncTokenResource). members.disconnectDirectorySync turns it off, members.listDirectoryPeople reads who the directory synced (DirectoryPersonListResource, states in DIRECTORY_PERSON_STATES), and members.setDirectoryDefaultRole and setDirectoryGroupRole choose the roles it gives. Only the owner or a role holding workspace:manage reaches them, every change asks an OAuth access token for a verification code, and the refusals are plan_required, role_not_found and directory_sync_not_connected.
  • security.getPolicy reads whether the workspace requires two-factor sign-in and whether the person behind the client meets it (SecurityPolicyResource), with no scope. security.updatePolicy sets requireTwoFactor, with members:write and a verification code.
  • workspaces.getOwnershipOffer, offerOwnership and withdrawOwnershipOffer let the owner offer the workspace to one of its members (OwnershipOfferResource, WithdrawnOwnershipOfferResource). account.listOwnershipOffers, acceptOwnershipOffer and declineOwnershipOffer answer the offers made to the person (IncomingOwnershipOfferResource, OwnershipTransferResource, DeclinedOwnershipOfferResource). Offering and accepting ask for a verification code. The refusals are ownership_offer_not_found, ownership_not_eligible, ownership_changed, domain_moving, two_factor_required and workspace_allowance_reached.
  • account.setName changes the name of the person (AccountResource). account.endConnectedAppElevation makes a connected app ask for verification codes again (EndedConnectedAppElevationResource).
  • dnsConnections.start answers 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 answers dns_unavailable.
  • domains.createMailAppProfileLink makes a one-time link that sets an address up on an Apple device (MailAppProfileLinkCreate, MailAppProfileLinkResource). It needs members:write and a verification code, and past 10 links an hour it is profile_link_rate_limited. domains.startGravatarPublish answers the link that publishes the photo of an address to Gravatar (GravatarPublishResource), refused with photo_required and gravatar_not_configured.
  • threads.setReplying and clearReplying show the team who is writing a reply (ThreadReplyingResource). threads.listTracking reads the tracking report of every tracked message sent in a thread, and threads.getDelivery counts what bounced, was refused or was held back (ThreadDeliveryResource), both narrowed by address. threads.listFileLinks, listAllFileLinks and iterateFileLinks read the download links one message carried, with includeRevoked (MessageFileLinkListOptions). threads.counts takes hideLabelled.
  • senders.getAvatar fetches the picture of a sender as bytes, and SenderProfileResource gains avatarUrl and avatarKind (SENDER_AVATAR_KINDS).
  • emails.send and sendBatch take isForward, originalMessage, the quoted history of a forward or a reply, and encryption (SealedMessageInput), { format: 'pgp-mime', sealedAt, sealedTo } for a message you sealed yourself with OpenPGP. emails.translate takes skipQuoted, and TranslationResource reports quotedHistoryKept.
  • emails.listEvents, listAllEvents and iterateEvents (EmailEventListOptions), getTracking (EmailTrackingOptions) and the tracking opens and clicks methods take address. The tracking.list methods take offsetMinutes, and TrackingStatsResource gains downloads (TrackingDownloads), the files that went out as download links and how often they were fetched.
  • templates.update, replaceContent and publish take expectedUpdatedAt, the updatedAt of the version you read, and refuse a change saved in between with version_conflict. TemplateVersionResource gains updatedAt.
  • drafts.create and update take attachments (DraftAttachmentInput), up to 20 files inline or by fileId, and DraftAttachmentResource gains fileId.
  • New filters: ruleIds on the rules.listRuns methods, audienceId on the contacts.list methods, from and to on contacts.activity, inactiveDays on the audiences.listContacts methods, since and until on audiences.growth, forms.analytics and bookings.analytics, since on broadcasts.analytics and broadcasts.stats, source, status (IMPORT_HISTORY_STATUSES) and search on the imports.list methods, and from on the signatures.list methods.
  • contacts.setAudiences and audiences.addContact take createContact, which saves an address that is not a contact yet as one first and then needs contacts:write. Through an app a member connected, an address another member saved is a 409 contact_exists there and on contacts.save.
  • Scopes: addresses.list, listAll and iterate need emails:read, or emails:send in its place. The audiences.listContacts methods need contacts:read as well as audiences:read. domains.getMailAppSettings and listAppPasswords need threads:read, and domains.updateMailAppSettings needs threads:read and domains:write. domains.createAddress asks an OAuth access token for a verification code when it chooses where the mail goes or deletion on expiry.
  • domains.createAddress and domains.updateAddress take expiresAt and onExpiry (ADDRESS_EXPIRY_ACTIONS, typed AddressExpiryAction), and every DomainAddressResource reports them with expiredAt. From its expiresAt an address takes no mail and sends none, a send from it is refused with 403 address_expired, and within a minute it is switched off, or deleted with the conversations delivered to it when onExpiry is delete. A later expiresAt, null or enabled: true turns a stopped address back on. WEBHOOK_EVENTS.ADDRESS_EXPIRED is the new event address.expired, typed as AddressExpiredEventData.
  • DOMAIN_ADDRESS_DESTINATIONS gains WEBHOOK and GROUP. The same two methods take webhookId for a webhook destination, tapWebhookIds to copy every message to up to 5 endpoints, and groupPosting (ADDRESS_GROUP_POSTING_POLICIES, typed AddressGroupPosting) and groupKeepCopy for a group, and every address reports them. The refusals are webhook_not_found and too_many_taps.
  • WEBHOOK_EVENTS.EMAIL_ROUTED is the event email.routed, typed as EmailRoutedEventData: a message that arrived at an address whose destination is webhook, 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 carries content and raw. routedBy (WebhookRoutedBy, kinds in WEBHOOK_ROUTED_SOURCES) says which sent it, recipient keeps the plus tag and verdicts (WebhookRoutedVerdicts) are what the receiving server found. EmailReceivedEventData gains tap, true when an endpoint gets the message as a tap of the address rather than through its subscription.
  • domains.listRoutes, listAllRoutes and iterateRoutes read the pattern routes of a domain (AddressRouteResource) in the order they are tried. domains.createRoute, getRoute, updateRoute and deleteRoute manage them: a route catches mail to addresses nobody created whose local part matches its pattern, such as support-*, and delivers it to an address, forwards it once the destination confirms, posts it to a webhook as email.routed or reads it on another domain (ADDRESS_ROUTE_ACTIONS). active and inactiveReason (ADDRESS_ROUTE_INACTIVE_REASONS) say whether a route takes mail now. A domain holds at most 100 routes, and the refusals are invalid_route_pattern, route_pattern_taken, route_target_not_found and route_limit_reached. domains.testRoute answers which step decides mail to an address (ADDRESS_ROUTE_TEST_STEPS), the route and where the mail goes (AddressRouteTestResource), without sending anything.
  • domains.listGroupMembers, listAllGroupMembers and iterateGroupMembers read the group members of a group address (GroupMemberResource), and domains.addGroupMembers and removeGroupMember change 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 are not_a_group, group_member_limit, group_member_not_found and group_nesting_too_deep.
  • domains.update takes aliasOf, which makes the domain an alias of another domain of the workspace, and every DomainResource reports aliasOf and aliases (DomainAlias). The refusals are alias_not_allowed, alias_chain and alias_has_addresses, and creating an address on an alias is refused with alias_has_addresses.
  • domains.updateAddressLimits takes receiving.storageBytes, a storage quota for one address from 1 MiB to 1 TiB, and AddressReceivingLimits reports 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.getAddressLimits reports what the address keeps in usage.storage (AddressStorageUsage, with bytes and messages): 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, listAllDeadLetters and iterateDeadLetters read 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. status reads the open ones by default, or replayed, discarded or all (WEBHOOK_DEAD_LETTER_FILTERS). A dead letter is kept 30 days.
  • webhooks.replayDeadLetters sends up to 100 open dead letters again in one call, the named ones or the oldest, and answers with an outcome for each (WEBHOOK_DEAD_LETTER_REPLAY_OUTCOMES). A delivered one is closed as replayed. webhooks.discardDeadLetter closes one without sending it, and one already replayed is 409 dead_letter_resolved.
  • webhooks.create and webhooks.update take retryPolicy (WEBHOOK_RETRY_POLICIES): standard tries a failed delivery up to 8 times over about 27 and a half hours, as before, and extended up to 16 times over about 3 days. They also take includeRaw, which needs threads:read, and every WebhookResource reports both.
  • threads.getRawMessage downloads the source of one message as message/rfc822 bytes, ready to save as an .eml file. It is the message byte for byte as it arrived when the address had keepOriginal on, and otherwise a source rebuilt from the stored message, the same bytes the IMAP server gives a mail app. The X-Message-Source response header says which, one of RAW_MESSAGE_SOURCES.
  • domains.createAddress and domains.updateAddress take keepOriginal, and every DomainAddressResource reports 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.received event to an endpoint with includeRaw on carries data.raw (WebhookMessageRaw): a link that downloads the message source for an hour, its size and its source, original or rebuilt.
  • domains.getAddressLimits and domains.updateAddressLimits read and change the limits of one address (AddressLimitsResource): a hold that pauses or disables sending or receiving, caps on messages and recipients an hour, a day and a month, recipientsPerMessage, the allowedRecipients and blockedRecipients it may send to, and the allowedSenders it accepts mail from, with what it has used so far and when each count goes down. A send over a cap is 429 address_limit_reached with retryAfterSeconds in the error, a paused address 429 address_sending_paused, a disabled one 403 address_sending_disabled, and a recipient its lists leave out 403 recipient_not_allowed. ADDRESS_HOLDS holds the two holds.
  • domains.get and domains.update give each DNS record found, what public DNS answers at that name now, and problem, a DomainRecordProblemResource with a code from DOMAIN_RECORD_PROBLEMS and a message to 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.update takes autodiscovery. 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 in autodiscoveryRecords, and every DomainResource reports autodiscovery.
  • webhooks.create and webhooks.update take includeContent, which puts the message into every email.received event as data.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 needs threads:read, and every WebhookResource reports includeContent.
  • A connected mailbox can be the sender of emails.send with 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 403 from_address_forbidden.
  • threads.counts leaves labelled mail out of team.assigned and team.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.list and connectedMailboxes.list, with their listAll and iterate, take q, 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 are DomainListOptions, MemberListOptions, ApiKeyListOptions, WebhookListOptions, RuleListOptions and ConnectedMailboxListOptions.
  • rules.stats reads 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. ruleIds counts some rules only.
  • billing.get reports usage.addressChecks: the deep address checks used this calendar month, what the plan includes and when they start again, beside payAsYouGo.coversAddressChecks and extraAddressChecks. billing.listPlans gives each plan’s monthlyAddressChecks, and billing.getPayAsYouGo adds prices.addressChecks and period.addressChecks.
  • tools.checkAddress and tools.checkAddresses with deep first 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 }. accept is valid or valid_or_risky (AUTOMATION_ADDRESS_ACCEPTS). mailbox also 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 an email.suppressed webhook that names the reason, never as a bounce.
  • Forms check the address of every sign-up. forms.subscribe refuses one whose domain takes no mail with the field error undeliverable. settings.refuseDisposable also refuses throwaway addresses (disposable), and settings.checkMailbox runs a deep check on every sign-up and refuses a missing mailbox (mailbox_not_found). FormFieldProblem carries suggestion when a refused address looks like a typo, and FORM_FIELD_ERRORS names the three new reasons.

0.0.2

  • API keys begin nm_live_ or nm_test_, and temporary inbox tokens nm_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 with keys.create.
  • Images up to 100 MB go in: account.setPhoto, contacts.setPhoto, domains.setAddressPhoto, bookings.uploadBackground, branding.uploadImage and templates.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 the crop query 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.send and sendBatch with attachments, scheduling, an undo window, tags, open and click tracking and translation, templates.send for stored templates, and broadcasts.send for 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 from NEXTMAIL_API_KEY or NEXTMAIL_ACCESS_TOKEN by createNextmail() and the ready made nextmail client. security.beginStepUp and verifyStepUp handle the verification code a token is asked for before a sensitive change.
  • Cursor paging: each paged list comes with a listAll that reads every page and an iterate that 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, with status, code, param, requestId and getters such as isValidation, isNotFound, isRateLimited and isStepUpRequired, and NextmailNetworkError, with isTimeout.
  • verifyWebhookSignature checks 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 signal to cancel it, and a workspace call an apiKey of 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 plain http to another machine.