Changelog
Every release of the package, newest first.
0.1.0
Upgrading from 0.0.1: four new parameters sit before parameters that were already there, so a call that passes those later arguments by position has to name them. calendarIds: comes before limit: in Calendar.ListEventsAsync, ListAllEventsAsync and IterateEventsAsync, addressBook: before limit: in Contacts.ListCardsAsync, ListAllCardsAsync and IterateCardsAsync, chatId: before limit: in Tasks.ListAsync, ListAllAsync and IterateAsync, and calendarId: before apiKey: in Calendar.ImportIcsAsync. Most of those calls stop compiling, but ImportIcsAsync(data, filename, apiKey) still compiles and sends the key as the calendar id.
Calendar.ListCalendarLoginsAsync,CreateCalendarLoginAsync(body),RevokeCalendarLoginAsync(id)andCreateCalendarLoginProfileLinkAsync(body)manage 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.CreateCalendarLoginAsyncreturns thepassword, shown this once,serverswith thecaldavandcarddavservers, and an Apple configuration profile inappleProfilewith CalDAV and CardDAV only, andCreateCalendarLoginProfileLinkAsyncmakes a one-time link that sets one up on an Apple device. Your own takeaccount:readandaccount:write, andmember:onListCalendarLoginsAsync, ormemberin the body of the two that create, reaches a member’s withmembers:write. Neither of those two is retried.SecurityEventKinds.CalendarLoginCreated("calendar-login-created") andSecurityEventKinds.CalendarLoginRevoked("calendar-login-revoked") are two more kinds in the security log, and thedetailof an entry carrieslogin, the username of the sign-in it is about.- To-dos: a to-do list is a calendar of kind
todos(CalendarKinds.Todos), and its items are RFC 5545 to-dos that calendar apps such as Reminders, Thunderbird and tasks.org sync over CalDAV.Calendar.ListTodosAsync,ListAllTodosAsyncandIterateTodosAsyncread them throughGET /calendar/todos, filtered bycalendarIds:,state:(open,doneorall,TodoStates),dueBefore:anddueAfter:.GetTodoAsync(id),CreateTodoAsync(body),UpdateTodoAsync(id, patch)andDeleteTodoAsync(id)work on one, andDeleteTodoAsyncreturns how many to-dos itremoved. A to-do has atitle,notes, astatus(TodoStatuses),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, andCreateTodoAsyncis not retried after a network failure. Calendar.ListCalendarsAsynctakeskind:and lists your to-do lists withCalendarKinds.Todos, andCreateCalendarAsynctakeskindin its body to make one. Members, colours, order and deleting work on to-do lists as they do on calendars.Calendar.DeleteCalendarAsynctakesnotifyGuests:: left out ortrue, the guests of every upcoming meeting you organised in the calendar are sent a cancellation, asCancelEventAsyncdoes, andfalsedeletes it without telling anyone. The result carriescancelledMeetings. Sending the cancellations needsemails:sendas well.kind:onListCalendarsAsyncandnotifyGuests:onDeleteCalendarAsynccome afterapiKey, so a call that passesapiKeyby position still works. The cancellation token stays last, so a call that passed it by position right afterapiKeyno longer compiles and names it instead:cancellationToken: token.Threads.ListAutomationsAsyncreads which automations ran on a thread and what they did, throughGET /threads/{id}/automations: a list ofJsonObjectitems, newest first, each with theautomationit was (id,nameandstatus), itsstatusandtrigger, the case the email matched inmatch(the address or domain that received it, the sender entry and the filters that held, or null), themessagesof the thread it started from or sent, each with arolefromAutomationThreadRoles, and every step it ran insteps, with the step as the version defines it. It needsthreads:readandautomations:read.LiveEvents.StreamAsyncfollows the mailbox as it changes: anIAsyncEnumerable<JsonObject>overGET /live-events, read as server-sent events, that yields eachmessage.received,message.sent,thread.changed,thread.deletedandmessage.status_changedevent (LiveEventTypes) for as long as you read it. It takestypes:,address:andlastEventId:, opens the stream again and resumes throughLast-Event-IDwhen the server ends it or the connection drops, retries network failures and 408, 429 and 5xx answers with backoff from 1 to 30 seconds (or longer whenRetry-Afterasks, up to 5 minutes), drops and reopens a connection that stays silent for 60 seconds, and throws theNextmailApiExceptionon 400, 401, 403, 404 and 422. When it cannot resume it yields an event whosetypeisreset, with itsreasonfromLiveResetReasons. Break out of theawait foreachloop to close it, or cancel the token, which closes it and throwsOperationCanceledException. The client’sTimeoutbounds only the wait for the response headers.message.status_changedcarries the email’sstatus(LiveSendStatuses), itsemailIdand therecipientsit is about.Threads.WaitForEmailAsyncholds a request open until a message that matches arrives, throughGET /threads/wait: it takesaddress:,from:,subject:,since:andtimeout:, the wait in whole seconds, and returns the first arrival asmessage, or null when the wait ran out. Its deadline is the wait plus 15 seconds, whateverTimeoutthe client has.AddressForwardStatuses.Bounced("bounced") is a forwarding destination whose server refused forwarded mail for good, so nothing is forwarded to it until it confirms again. A route that forwards to one readsAddressRouteInactiveReasons.ForwardBounced("forward_bounced"). Asking a bounced destination again sends it a new confirmation.- A traffic entry and a routed message carry
verdicts.arc: the ARC verdict for the servers that forwarded the message on its way in,pass,fail,noneortemperror, andnullon an entry written before ARC was checked. Calendar.ListCalendarsAsync,GetCalendarAsync(id),CreateCalendarAsync,UpdateCalendarAsync(id, patch)andDeleteCalendarAsync(id)manage your calendars: 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.SetCalendarMemberAsync(id, memberId, body)gives a member thereadorwriteaccess (CollectionAccessLevels) its body names on a calendar you keep, andRemoveCalendarMemberAsync(id, memberId)takes it away.access(CollectionRights) on a calendar says what you may do with it:owner,writeorread.SetCalendarMemberAsyncis retried after a network failure, andRemoveCalendarMemberAsyncis not.- Calendar events and occurrences carry
calendarId.CreateEventAsynctakescalendarIdto put the event in a calendar andUpdateEventAsynctakes it to move one,ListEventsAsync,ListAllEventsAsyncandIterateEventsAsynctakecalendarIds:to keep only some calendars,CreateFeedAsynctakescalendarIdto publish one calendar, which every calendar link reports, andImportIcsAsynctakescalendarId:for the calendar the events go into, which every calendar import reports. Contacts.ListAddressBooksAsynclists your address book and the ones other members gave you access to.Contacts.SetAddressBookMemberAsync(id, memberId, body)gives a memberreadorwriteaccess to yours, andRemoveAddressBookMemberAsync(id, memberId)takes it away.ListCardsAsync,ListAllCardsAsyncandIterateCardsAsynctakeaddressBook:to read one you are a member of, andCreateCardAsynctakesaddressBookto add to one you may write.Traffic.ListAsync,ListAllAsyncandIterateAsyncread 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,outcomes,address,recipient,sinceanduntil. Outbound entries needemails:readand inbound onesthreads:read.Emails.SendRawAsyncsends an RFC 5322 message you built yourself, as written:rawis its bytes as abyte[]or a readableStream, encoded for you, or base64 text, up to 10 MB. The sender is its From header and the recipients its To, Cc and Bcc headers, unlessto,ccorbccgive the envelope. It takes the scheduling, tracking, signature, tag and lane options ofSendAsync, honoursidempotencyKey, and never sends a Bcc header.- The
email_receivedtrigger of an automation takessenders, 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. Settings.UpdateAsynctakeslabelAlerts, andSettings.GetAsyncreturns it: label ids under each workspace id whose mail still alerts you while labelled mail stays out of your inbox.MailboxProviders.OpenemailandMailServices.Openemail("openemail"): the provider of a mailbox on OpenEmail and thesentWithof a message sent with it.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.ListAsync,ListAllAsyncandIterateAsyncread the templates, forms and automations the workspace shares at a public link, the newest first, with how often each page was opened and each item copied, and takekind:(ShareKinds),limit:andcursor:.ShareLinks.GetAsync(kind, itemId)reads the link of one item,ShareLinks.SetAsync(kind, itemId)makes it public, with an optional body whosecopyablesays whether people may copy it, andShareLinks.DeleteAsync(kind, itemId)makes it private again. A private item answers 404share_link_not_found.SetAsyncis retried after a network failure, since an item keeps one link however often it is shared, andDeleteAsyncis not.Shared.GetAsync(token)reads what the public page of a link shows, from any workspace, with thetemplate,formorautomationitskindnames, andShared.CopyAsync(token)copies the item into this workspace as a draft and is never retried. 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.ListAsync,ListAllAsyncandIterateAsynctakechatId: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.1
The first release of the .NET SDK, the Nextmail package on NuGet. It targets net8.0 and netstandard2.0, is safe to trim and to compile ahead of time, and on .NET 8 and later it has no dependencies. It has a method for each of the 746 methods of the TypeScript SDK, in the same 53 namespaces and under the same names in PascalCase with an Async suffix. They cover everything from sending and reading mail to contacts, broadcasts, automations, the calendar, booking pages, tasks and the settings of a workspace, and a parity check proves that each one sends the same request as its TypeScript twin.
new NextmailClient()readsNEXTMAIL_API_KEY,NEXTMAIL_ACCESS_TOKENandNEXTMAIL_BASE_URL, andNextmailOptionstakesApiKey,AccessToken,AccessTokenProvider,BaseUrl,Timeout,MaxRetries,HttpClient,UserAgentandHeaders. The client has a property for every namespace, such asEmails,ThreadsandDomains, and it is safe to share between threads.- Every method is asynchronous, ends in
Asyncand takes aCancellationTokenlast. A request body is aBody, or anyIReadOnlyDictionary<string, object?>, whose keys keep the camelCase names of the API, and aBodygoes out in the order its keys were added. Options are named arguments such aslimit:,cursor:andidempotencyKey:, and a response comes back as aJsonObject. - Every paginated resource has
ListAsync, which returns onePage,ListAllAsync, which returns every item, andIterateAsync, which returns anIAsyncEnumerable<JsonObject>that fetches the next page only when it gets there. - An API refusal throws
NextmailApiException, withStatus,ErrorType,Code,Param,RequestIdand checks such asIsValidation,IsNotFoundandIsStepUpRequiredto use in awhenfilter. No response at all throwsNextmailNetworkException, withIsTimeoutwhen the deadline passed, and both derive fromNextmailException. A mistake in the call itself throwsArgumentExceptionbefore anything is sent. - Reads, sends and every write that is safe to repeat are retried on 408, 500, 502, 503 and 504 with backoff, and on a 429 only when its
Retry-Afteris a minute or less. Every send carries an idempotency key that its retries reuse, andidempotencyKey:sets your own. AccessTokentakes an OAuth access token, andAccessTokenProvidera function that returns one before every request, so the token can be renewed without a new client. When a change made with a token needs a verification code, the call throws withIsStepUpRequired, andSecurity.BeginStepUpAsyncandVerifyStepUpAsyncprovide one.- 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. NextmailClient.VerifyWebhookSignature()checks a webhook delivery in constant time, refuses one more than five minutes old and returns the event.NextmailClient.CreateTempMail()opens disposable inboxes with no credential, andclient.Raw.RequestAsync()calls an endpoint no method wraps, with the credential, timeout and retries of the client.NextmailClient.ToBase64(),IsApiKey(),IsAccessToken(),IsSealed(),ResolveLanguage(),LanguageByCode()andIsRtlLanguage()are the helpers of the TypeScript SDK, and every set of values the API uses is a class inNextmail.Constants.- The client sends a credential over plain
http:only to a server on this machine, refuses a request path that leaves the API origin and never prints a credential. It never disposes anHttpClientit was handed, and shares one for the whole process when given none. - API keys begin
nm_live_ornm_test_, and temporary inbox tokensnm_inbox_. The client refuses a key of any other shape. Account.SetPhotoAsync,Contacts.SetPhotoAsync,Domains.SetAddressPhotoAsync,Bookings.UploadBackgroundAsync,Branding.UploadImageAsyncandTemplates.UploadImageAsynctake images up to 100 MB, wait as long asFiles.UploadAsyncdoes, and takecrop:, anImageCropof the part of the image to keep, in fractions of the image from 0 to 1.Emails.ListEventsByMessageIdAsync,ListAllEventsByMessageIdAsyncandIterateEventsByMessageIdAsyncread 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:,cursor:andaddress:, asEmails.ListEventsAsyncdoes, and a Message-ID that no message the key reaches went out with is a 404.ProviderImports.ListAsync,ListAllAsyncandIterateAsynctakesource:(ProviderImportProviders),status:(ImportHistoryStatuses) andsearch:, up to 320 characters, the filtersImports.ListAsyncalready takes, sent on every page. An import from a provider never pauses, sostatus: "paused"answers an empty page.Emails.ListEventsAsync,ListAllEventsAsyncandIterateEventsAsynctakemessageId:, 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.CreateLinkAsynctakesreuse::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.CreateAsync,UpdateAsyncandDeleteAsync,Keys.RotateAsyncfor any key but the caller, andWorkspaces.OfferOwnershipAsync,WithdrawOwnershipOfferAsync,Account.AcceptOwnershipOfferAsyncandDeclineOwnershipOfferAsyncrefuse 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.RotateAsyncorMe.RotateAsync, and revokes keys withKeys.RevokeAsync.AppHost.GetAsync,SetAsyncandVerifyAsyncreportsender: where the emails sent to the people of the workspace come from, withaddress,domainandwaitingOn.waitingOnislogoorsigning(AppHostSenderWaits) 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.- Every address from
Addresses.ListAsync,ListAllAsyncandIterateAsyncreportsrole(AddressRoles):owneron every address for an API key, andmemberorviewerfor an app a member connected. A key narrowed to particular addresses or domains lists only the addresses and domains it covers, and the free address of the person the key acts for is listed, withroleowner, by a key of the workspace it belongs to. Chats.ListMessagesAsync,ListAllMessagesAsyncandIterateMessagesAsyncread the messages of a chat with the assistant, from the first unlessorder:isdesc(ChatMessageOrders). Each message has itstextand itsparts, kinds inChatMessagePartTypes: the words, the tools the assistant called with their arguments, results and status (ChatToolCallStatuses), and the files. A tool result the caller may not read comes back redacted.Chats.SendMessageAsyncsays something in a chat, or starts one under a new id, and returns the turn once the assistant has answered.status(ChatTurnStatuses) isawaiting_approvalwhen a call that changes something waits inpendingToolCalls, whichChats.ApproveToolCallAsync, with optionalargs, orChats.DenyToolCallAsyncanswers.regenerateanswers the last message again, and files go out as they do on a send.Chats.StopTurnAsyncstops the assistant and answersstoppedoridle(ChatStopStatuses), and a stopped turn says why instopReason(ChatStopReasons). A turn runs for at most 240 seconds, so the three calls that wait for one taketimeout:and wait 5 minutes by default, or the client’sTimeoutwhen that is longer. The refusals arechat_busy,approval_pending,tool_not_offered,ai_quota_exceeded,ai_not_configuredandassistant_unavailable.Members.GetDirectorySyncAsyncreads directory sync (SCIM), andMembers.ConnectDirectorySyncAsyncturns it on and returns the token once.Members.DisconnectDirectorySyncAsyncturns it off,Members.ListDirectoryPeopleAsyncreads who the directory synced, withstartIndex:andcount:and states inDirectoryPersonStates, andMembers.SetDirectoryDefaultRoleAsyncandSetDirectoryGroupRoleAsyncchoose the roles it gives, or none with null. 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.GetPolicyAsyncreads whether the workspace requires two-factor sign-in and whether the person behind the client meets it, with no scope.Security.UpdatePolicyAsyncsetsrequireTwoFactor, withmembers:writeand a verification code.Workspaces.GetOwnershipOfferAsync,OfferOwnershipAsyncandWithdrawOwnershipOfferAsynclet the owner offer the workspace to one of its members.Account.ListOwnershipOffersAsync,AcceptOwnershipOfferAsyncandDeclineOwnershipOfferAsyncanswer the offers made to the person. 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.SetNameAsyncchanges the name of the person.Account.ListPushDevicesAsync,RemovePushDeviceAsyncandSendTestPushAsyncread the phones that get the person’s notifications (PushPlatforms), stop one, and send a test.Account.EndConnectedAppElevationAsyncmakes a connected app ask for verification codes again.DnsConnections.StartAsyncreturns the link that connects a Cloudflare account to the workspace in a browser. It asks an OAuth access token for a verification code, and a server that cannot connect a provider answersdns_unavailable.Domains.CreateMailAppProfileLinkAsyncmakes a one-time link that sets an address up on an Apple device. It needsmembers:writeand a verification code, and past 10 links an hour it isprofile_link_rate_limited.Domains.StartGravatarPublishAsyncreturns the link that publishes the photo of an address to Gravatar, refused withphoto_requiredandgravatar_not_configured.Threads.SetReplyingAsyncandClearReplyingAsyncshow the team who is writing a reply.Threads.ListTrackingAsyncreads the tracking report of every tracked message sent in a thread, andThreads.GetDeliveryAsynccounts what bounced, was refused or was held back, both narrowed byaddress:.Threads.ListFileLinksAsync,ListAllFileLinksAsyncandIterateFileLinksAsyncread the download links one message carried, withincludeRevoked:.Threads.CountsAsynctakeshideLabelled:.Senders.GetAvatarAsyncdownloads the picture of a sender as abyte[], andSenders.GetAsyncandResearchAsyncreportavatarUrlandavatarKind(SenderAvatarKinds).Emails.SendAsyncandSendBatchAsynctakeisForward,originalMessage, the quoted history of a forward or a reply, andencryption, a dictionary withformatset topgp-mime,sealedAtandsealedTo, for a message you sealed yourself with OpenPGP.Emails.TranslateAsynctakesskipQuotedand reportsquotedHistoryKept.Emails.ListEventsAsync,ListAllEventsAsync,IterateEventsAsyncandGetTrackingAsync, and the opens and clicks methods ofTracking, takeaddress:. TheTracking.ListAsyncmethods takeoffsetMinutes:, andTracking.GetStatsAsyncreportsdownloads, the files that went out as download links and how often they were fetched.Templates.UpdateAsync,ReplaceContentAsyncandPublishAsynctakeexpectedUpdatedAt, theupdatedAtof the version you read, and refuse a change saved in between withversion_conflict. Every template version reportsupdatedAt.Drafts.CreateAsyncandUpdateAsynctakeattachments, up to 20 files inline or byfileId, encoded as they are on a send, and every file of a draft reports itsfileId.- Filters:
ruleIds:on theRules.ListRunsAsyncmethods,audienceId:on theContacts.ListAsyncmethods,from:andto:onContacts.ActivityAsync,inactiveDays:on theAudiences.ListContactsAsyncmethods,since:anduntil:onAudiences.GrowthAsync,Forms.AnalyticsAsyncandBookings.AnalyticsAsync,since:onBroadcasts.AnalyticsAsyncandStatsAsync,source:(MailboxImportSources),status:(ImportHistoryStatuses) andsearch:on theImports.ListAsyncmethods, andfrom:on theSignatures.ListAsyncmethods. Contacts.SetAudiencesAsyncandAudiences.AddContactAsynctakecreateContact, 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.SaveAsync.- Scopes:
Addresses.ListAsync,ListAllAsyncandIterateAsyncneedemails:read, oremails:sendin its place. TheAudiences.ListContactsAsyncmethods needcontacts:readas well asaudiences:read.Emails.ComposeAsync,RewriteAsync,SuggestSubjectAsyncandTranslateAsynctakedrafts:writein place ofemails:send.Domains.GetMailAppSettingsAsyncandListAppPasswordsAsyncneedthreads:read, andDomains.UpdateMailAppSettingsAsyncneedsthreads:readanddomains:write.Domains.CreateAddressAsyncasks an OAuth access token for a verification code when it chooses where the mail goes or deletion on expiry. - An attachment given as a dictionary with
url, asEmails.SendAsynctakes it, goes out as that link with itsfilenameandcontentType. Domains.CreateAddressAsyncandDomains.UpdateAddressAsynctakeexpiresAtandonExpiry(AddressExpiryActions), and every address reports 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 orenabledtrue turns a stopped address back on.WebhookEvents.AddressExpiredis the eventaddress.expired.DomainAddressDestinationsincludesWebhookandGroup. The same two methods takewebhookIdfor a webhook destination,tapWebhookIdsto copy every message to up to 5 endpoints, andgroupPosting(AddressGroupPostingPolicies) andgroupKeepCopyfor a group, and every address reports them. The refusals arewebhook_not_foundandtoo_many_taps.WebhookEvents.EmailRoutedis the eventemail.routed: 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.routedBysays which sent it, with akindfromWebhookRoutedSources,recipientkeeps the plus tag andverdictsare what the receiving server found. Anemail.receivedevent carriestap, true when an endpoint gets the message as a tap of the address rather than through its subscription.Domains.ListRoutesAsync,ListAllRoutesAsyncandIterateRoutesAsyncread the pattern routes of a domain in the order they are tried.Domains.CreateRouteAsync,GetRouteAsync,UpdateRouteAsyncandDeleteRouteAsyncmanage 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 (AddressRouteActions).activeandinactiveReason(AddressRouteInactiveReasons) 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.TestRouteAsyncanswers which step decides mail to an address, without sending anything: an address, an alias, a route, the catch-all or none (AddressRouteTestSteps), with the route that decided and where the mail would end up.Domains.ListGroupMembersAsync,ListAllGroupMembersAsyncandIterateGroupMembersAsyncread the group members of a group address, andDomains.AddGroupMembersAsyncandRemoveGroupMemberAsyncchange them. A group member is an address of the workspace or an address at another provider, which confirms by email first (GroupMemberKinds). 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.UpdateAsynctakesaliasOf, which makes the domain an alias of another domain of the workspace, and every domain reportsaliasOfandaliases. The refusals arealias_not_allowed,alias_chainandalias_has_addresses, and creating an address on an alias is refused withalias_has_addresses.Domains.UpdateAddressLimitsAsynctakesreceiving.storageBytes, a storage quota for one address from 1 MiB to 1 TiB, andDomains.GetAddressLimitsAsyncreports what the address keeps inusage.storage, withbytesandmessages. 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. Mail stored before storage counting began and mail routed to a webhook are not counted.Webhooks.ListDeadLettersAsync,ListAllDeadLettersAsyncandIterateDeadLettersAsyncread the events an endpoint gave up on: each event whose last automatic attempt failed, with how many times it was tried, the last answer and that attempt.status:reads theopenones by default, orreplayed,discardedorall(WebhookDeadLetterFilters). A dead letter is kept 30 days.Webhooks.ReplayDeadLettersAsyncsends up to 100 open dead letters again in one call, the named ones or the oldest, and answers with anoutcomefor each (WebhookDeadLetterReplayOutcomes). A delivered one is closed asreplayed.Webhooks.DiscardDeadLetterAsynccloses one without sending it, and one already replayed is 409dead_letter_resolved.Webhooks.CreateAsyncandWebhooks.UpdateAsynctakeretryPolicy(WebhookRetryPolicies):standardtries a failed delivery up to 8 times over about 27 and a half hours, andextendedup to 16 times over about 3 days. They also takeincludeRaw, which needsthreads:read, and every endpoint reports both.Threads.GetRawMessageAsyncdownloads the source of one message as abyte[]ofmessage/rfc822, 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 ofRawMessageSources.Domains.CreateAddressAsyncandDomains.UpdateAddressAsynctakekeepOriginal, and every address 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.receivedevent to an endpoint withincludeRawon carriesdata.raw: a link that downloads the message source for an hour, itssizeand itssource,originalorrebuilt. Domains.GetAddressLimitsAsyncandDomains.UpdateAddressLimitsAsyncread and change what one address may send and receive: a hold that pauses or disables sending or receiving, caps per hour, per 24 hours and per month on messages and recipients, recipients per message, and lists of allowed and blocked recipients and allowed senders, with the usage so far.AddressHoldslists the holds.Domains.GetAsyncandDomains.UpdateAsyncgive each DNS recordfound, what public DNS answers at that name now, andproblem, with acodefromDomainRecordProblemsand amessageto show a person.Domains.UpdateAsynctakesautodiscovery, which 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.Webhooks.CreateAsyncandWebhooks.UpdateAsynctakeincludeContent, which puts the message into everyemail.receivedevent asdata.content: 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.- A connected mailbox can be the sender of
Emails.SendAsyncwith 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. Threads.CountsAsyncleaves labelled mail out ofteam.assignedandteam.unassigned, as the inbox does, unless the person has chosen to show labelled mail in the inbox.Domains.ListAsync,Members.ListAsync,Keys.ListAsync,Webhooks.ListAsync,Rules.ListAsyncandConnectedMailboxes.ListAsync, with theirListAllAsyncandIterateAsync, 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.Rules.StatsAsyncreads 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.GetAsyncreportsusage.addressChecks, the deep address checks used this calendar month against what the plan includes, andBilling.ListPlansAsynceach plan’smonthlyAddressChecks.Tools.CheckAddressAsyncandTools.CheckAddressesAsyncwithdeepfirst use the deep checks the plan includes each month (10 on Free, 100 on 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:
{ "kind": "address_check", "mailbox": ..., "accept": ... }, withacceptfromAutomationAddressAccepts. - 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.SubscribeAsyncrefuses one whose domain takes no mail with the field errorundeliverable.refuseDisposablein the settings also refuses throwaway addresses (disposable),checkMailboxruns a deep check on every sign-up and refuses a missing mailbox (mailbox_not_found), and a refused address that looks like a typo carriessuggestion.