Skip to the documentation
C#

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) and CreateCalendarLoginProfileLinkAsync(body) 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. CreateCalendarLoginAsync returns the password, shown this once, servers with the caldav and carddav servers, and an Apple configuration profile in appleProfile with CalDAV and CardDAV only, and CreateCalendarLoginProfileLinkAsync makes a one-time link that sets one up on an Apple device. Your own take account:read and account:write, and member: on ListCalendarLoginsAsync, or member in the body of the two that create, reaches a member’s with members:write. Neither of those two is retried.
  • SecurityEventKinds.CalendarLoginCreated ("calendar-login-created") and SecurityEventKinds.CalendarLoginRevoked ("calendar-login-revoked") are two more kinds in the security log, and the detail of an entry carries login, 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, ListAllTodosAsync and IterateTodosAsync read them through GET /calendar/todos, filtered by calendarIds:, state: (open, done or all, TodoStates), dueBefore: and dueAfter:. GetTodoAsync(id), CreateTodoAsync(body), UpdateTodoAsync(id, patch) and DeleteTodoAsync(id) work on one, and DeleteTodoAsync returns how many to-dos it removed. A to-do has a title, notes, a status (TodoStatuses), 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, and CreateTodoAsync is not retried after a network failure.
  • Calendar.ListCalendarsAsync takes kind: and lists your to-do lists with CalendarKinds.Todos, and CreateCalendarAsync takes kind in its body to make one. Members, colours, order and deleting work on to-do lists as they do on calendars.
  • Calendar.DeleteCalendarAsync takes notifyGuests:: left out or true, the guests of every upcoming meeting you organised in the calendar are sent a cancellation, as CancelEventAsync does, and false deletes it without telling anyone. The result carries cancelledMeetings. Sending the cancellations needs emails:send as well.
  • kind: on ListCalendarsAsync and notifyGuests: on DeleteCalendarAsync come after apiKey, so a call that passes apiKey by position still works. The cancellation token stays last, so a call that passed it by position right after apiKey no longer compiles and names it instead: cancellationToken: token.
  • Threads.ListAutomationsAsync reads which automations ran on a thread and what they did, through GET /threads/{id}/automations: a list of JsonObject items, newest first, each with the automation it was (id, name and status), its status and trigger, the case the email matched in match (the address or domain that received it, the sender entry and the filters that held, or null), the messages of the thread it started from or sent, each with a role from AutomationThreadRoles, and every step it ran in steps, with the step as the version defines it. It needs threads:read and automations:read.
  • LiveEvents.StreamAsync follows the mailbox as it changes: an IAsyncEnumerable<JsonObject> 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 (LiveEventTypes) for as long as you read it. It takes types:, address: and lastEventId:, opens the stream again and resumes through Last-Event-ID when 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 when Retry-After asks, up to 5 minutes), drops and reopens a connection that stays silent for 60 seconds, and throws the NextmailApiException on 400, 401, 403, 404 and 422. When it cannot resume it yields an event whose type is reset, with its reason from LiveResetReasons. Break out of the await foreach loop to close it, or cancel the token, which closes it and throws OperationCanceledException. The client’s Timeout bounds only the wait for the response headers.
  • message.status_changed carries the email’s status (LiveSendStatuses), its emailId and the recipients it is about.
  • Threads.WaitForEmailAsync holds a request open until a message that matches arrives, through GET /threads/wait: it takes address:, from:, subject:, since: and timeout:, the wait in whole seconds, and returns the first arrival as message, or null when the wait ran out. Its deadline is the wait plus 15 seconds, whatever Timeout the 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 reads AddressRouteInactiveReasons.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, none or temperror, and null on an entry written before ARC was checked.
  • Calendar.ListCalendarsAsync, GetCalendarAsync(id), CreateCalendarAsync, UpdateCalendarAsync(id, patch) and DeleteCalendarAsync(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 own color and position. Deleting a calendar deletes its events, and your default calendar cannot be deleted. Calendar.SetCalendarMemberAsync(id, memberId, body) gives a member the read or write access (CollectionAccessLevels) its body names on a calendar you keep, and RemoveCalendarMemberAsync(id, memberId) takes it away. access (CollectionRights) on a calendar says what you may do with it: owner, write or read. SetCalendarMemberAsync is retried after a network failure, and RemoveCalendarMemberAsync is not.
  • Calendar events and occurrences carry calendarId. CreateEventAsync takes calendarId to put the event in a calendar and UpdateEventAsync takes it to move one, ListEventsAsync, ListAllEventsAsync and IterateEventsAsync take calendarIds: to keep only some calendars, CreateFeedAsync takes calendarId to publish one calendar, which every calendar link reports, and ImportIcsAsync takes calendarId: for the calendar the events go into, which every calendar import reports.
  • Contacts.ListAddressBooksAsync lists your address book and the ones other members gave you access to. Contacts.SetAddressBookMemberAsync(id, memberId, body) gives a member read or write access to yours, and RemoveAddressBookMemberAsync(id, memberId) takes it away. ListCardsAsync, ListAllCardsAsync and IterateCardsAsync take addressBook: to read one you are a member of, and CreateCardAsync takes addressBook to add to one you may write.
  • Traffic.ListAsync, ListAllAsync and IterateAsync 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, outcomes, address, recipient, since and until. Outbound entries need emails:read and inbound ones threads:read.
  • Emails.SendRawAsync sends an RFC 5322 message you built yourself, as written: raw is its bytes as a byte[] or a readable Stream, 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, unless to, cc or bcc give the envelope. It takes the scheduling, tracking, signature, tag and lane options of SendAsync, honours idempotencyKey, and never sends a Bcc header.
  • The email_received trigger of an automation 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.
  • Settings.UpdateAsync takes labelAlerts, and Settings.GetAsync returns it: label ids under each workspace id whose mail still alerts you while labelled mail stays out of your inbox.
  • MailboxProviders.Openemail and MailServices.Openemail ("openemail"): the provider of a mailbox on OpenEmail and the sentWith of a message sent with it.
  • 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.ListAsync, ListAllAsync and IterateAsync read 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 take kind: (ShareKinds), limit: and cursor:. ShareLinks.GetAsync(kind, itemId) reads the link of one item, ShareLinks.SetAsync(kind, itemId) makes it public, with an optional body whose copyable says whether people may copy it, and ShareLinks.DeleteAsync(kind, itemId) makes it private again. A private item answers 404 share_link_not_found. SetAsync is retried after a network failure, since an item keeps one link however often it is shared, and DeleteAsync is not.
  • Shared.GetAsync(token) reads what the public page of a link shows, from any workspace, with the template, form or automation its kind names, and Shared.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 403 share_not_copyable, and a link that no longer works answers 404 shared_item_not_found.
  • Tasks.ListAsync, ListAllAsync and IterateAsync take chatId: 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() reads NEXTMAIL_API_KEY, NEXTMAIL_ACCESS_TOKEN and NEXTMAIL_BASE_URL, and NextmailOptions takes ApiKey, AccessToken, AccessTokenProvider, BaseUrl, Timeout, MaxRetries, HttpClient, UserAgent and Headers. The client has a property for every namespace, such as Emails, Threads and Domains, and it is safe to share between threads.
  • Every method is asynchronous, ends in Async and takes a CancellationToken last. A request body is a Body, or any IReadOnlyDictionary<string, object?>, whose keys keep the camelCase names of the API, and a Body goes out in the order its keys were added. Options are named arguments such as limit:, cursor: and idempotencyKey:, and a response comes back as a JsonObject.
  • Every paginated resource has ListAsync, which returns one Page, ListAllAsync, which returns every item, and IterateAsync, which returns an IAsyncEnumerable<JsonObject> that fetches the next page only when it gets there.
  • An API refusal throws NextmailApiException, with Status, ErrorType, Code, Param, RequestId and checks such as IsValidation, IsNotFound and IsStepUpRequired to use in a when filter. No response at all throws NextmailNetworkException, with IsTimeout when the deadline passed, and both derive from NextmailException. A mistake in the call itself throws ArgumentException before 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-After is a minute or less. Every send carries an idempotency key that its retries reuse, and idempotencyKey: sets your own.
  • AccessToken takes an OAuth access token, and AccessTokenProvider a 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 with IsStepUpRequired, and Security.BeginStepUpAsync and VerifyStepUpAsync provide 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, and client.Raw.RequestAsync() calls an endpoint no method wraps, with the credential, timeout and retries of the client.
  • NextmailClient.ToBase64(), IsApiKey(), IsAccessToken(), IsSealed(), ResolveLanguage(), LanguageByCode() and IsRtlLanguage() are the helpers of the TypeScript SDK, and every set of values the API uses is a class in Nextmail.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 an HttpClient it was handed, and shares one for the whole process when given none.
  • API keys begin nm_live_ or nm_test_, and temporary inbox tokens nm_inbox_. The client refuses a key of any other shape.
  • Account.SetPhotoAsync, Contacts.SetPhotoAsync, Domains.SetAddressPhotoAsync, Bookings.UploadBackgroundAsync, Branding.UploadImageAsync and Templates.UploadImageAsync take images up to 100 MB, wait as long as Files.UploadAsync does, and take crop:, an ImageCrop of the part of the image to keep, in fractions of the image from 0 to 1.
  • Emails.ListEventsByMessageIdAsync, ListAllEventsByMessageIdAsync and IterateEventsByMessageIdAsync 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:, as Emails.ListEventsAsync does, and a Message-ID that no message the key reaches went out with is a 404.
  • ProviderImports.ListAsync, ListAllAsync and IterateAsync take source: (ProviderImportProviders), status: (ImportHistoryStatuses) and search:, up to 320 characters, the filters Imports.ListAsync already takes, sent on every page. An import from a provider never pauses, so status: "paused" answers an empty page.
  • Emails.ListEventsAsync, ListAllEventsAsync and IterateEventsAsync 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.CreateLinkAsync takes reuse:: 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.CreateAsync, UpdateAsync and DeleteAsync, Keys.RotateAsync for any key but the caller, and Workspaces.OfferOwnershipAsync, WithdrawOwnershipOfferAsync, Account.AcceptOwnershipOfferAsync and DeclineOwnershipOfferAsync 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.RotateAsync or Me.RotateAsync, and revokes keys with Keys.RevokeAsync.
  • AppHost.GetAsync, SetAsync and VerifyAsync report sender: where the emails sent to the people of the workspace come from, with address, domain and waitingOn. waitingOn is logo or signing (AppHostSenderWaits) 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.
  • Every address from Addresses.ListAsync, ListAllAsync and IterateAsync reports role (AddressRoles): 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 lists only the addresses and domains it covers, 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.ListMessagesAsync, ListAllMessagesAsync and IterateMessagesAsync read the messages of a chat with the assistant, from the first unless order: is desc (ChatMessageOrders). Each message has its text and its parts, kinds in ChatMessagePartTypes: 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.SendMessageAsync says something in a chat, or starts one under a new id, and returns the turn once the assistant has answered. status (ChatTurnStatuses) is awaiting_approval when a call that changes something waits in pendingToolCalls, which Chats.ApproveToolCallAsync, with optional args, or Chats.DenyToolCallAsync answers. regenerate answers the last message again, and files go out as they do on a send. Chats.StopTurnAsync stops the assistant and answers stopped or idle (ChatStopStatuses), and a stopped turn says why in stopReason (ChatStopReasons). A turn runs for at most 240 seconds, so the three calls that wait for one take timeout: and wait 5 minutes by default, or the client’s Timeout when that is longer. The refusals are chat_busy, approval_pending, tool_not_offered, ai_quota_exceeded, ai_not_configured and assistant_unavailable.
  • Members.GetDirectorySyncAsync reads directory sync (SCIM), and Members.ConnectDirectorySyncAsync turns it on and returns the token once. Members.DisconnectDirectorySyncAsync turns it off, Members.ListDirectoryPeopleAsync reads who the directory synced, with startIndex: and count: and states in DirectoryPersonStates, and Members.SetDirectoryDefaultRoleAsync and SetDirectoryGroupRoleAsync choose the roles it gives, or none with null. 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.GetPolicyAsync reads whether the workspace requires two-factor sign-in and whether the person behind the client meets it, with no scope. Security.UpdatePolicyAsync sets requireTwoFactor, with members:write and a verification code.
  • Workspaces.GetOwnershipOfferAsync, OfferOwnershipAsync and WithdrawOwnershipOfferAsync let the owner offer the workspace to one of its members. Account.ListOwnershipOffersAsync, AcceptOwnershipOfferAsync and DeclineOwnershipOfferAsync answer the offers made to the person. 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.SetNameAsync changes the name of the person. Account.ListPushDevicesAsync, RemovePushDeviceAsync and SendTestPushAsync read the phones that get the person’s notifications (PushPlatforms), stop one, and send a test. Account.EndConnectedAppElevationAsync makes a connected app ask for verification codes again.
  • DnsConnections.StartAsync returns 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 answers dns_unavailable.
  • Domains.CreateMailAppProfileLinkAsync makes a one-time link that sets an address up on an Apple device. It needs members:write and a verification code, and past 10 links an hour it is profile_link_rate_limited. Domains.StartGravatarPublishAsync returns the link that publishes the photo of an address to Gravatar, refused with photo_required and gravatar_not_configured.
  • Threads.SetReplyingAsync and ClearReplyingAsync show the team who is writing a reply. Threads.ListTrackingAsync reads the tracking report of every tracked message sent in a thread, and Threads.GetDeliveryAsync counts what bounced, was refused or was held back, both narrowed by address:. Threads.ListFileLinksAsync, ListAllFileLinksAsync and IterateFileLinksAsync read the download links one message carried, with includeRevoked:. Threads.CountsAsync takes hideLabelled:.
  • Senders.GetAvatarAsync downloads the picture of a sender as a byte[], and Senders.GetAsync and ResearchAsync report avatarUrl and avatarKind (SenderAvatarKinds).
  • Emails.SendAsync and SendBatchAsync take isForward, originalMessage, the quoted history of a forward or a reply, and encryption, a dictionary with format set to pgp-mime, sealedAt and sealedTo, for a message you sealed yourself with OpenPGP. Emails.TranslateAsync takes skipQuoted and reports quotedHistoryKept.
  • Emails.ListEventsAsync, ListAllEventsAsync, IterateEventsAsync and GetTrackingAsync, and the opens and clicks methods of Tracking, take address:. The Tracking.ListAsync methods take offsetMinutes:, and Tracking.GetStatsAsync reports downloads, the files that went out as download links and how often they were fetched.
  • Templates.UpdateAsync, ReplaceContentAsync and PublishAsync take expectedUpdatedAt, the updatedAt of the version you read, and refuse a change saved in between with version_conflict. Every template version reports updatedAt.
  • Drafts.CreateAsync and UpdateAsync take attachments, up to 20 files inline or by fileId, encoded as they are on a send, and every file of a draft reports its fileId.
  • Filters: ruleIds: on the Rules.ListRunsAsync methods, audienceId: on the Contacts.ListAsync methods, from: and to: on Contacts.ActivityAsync, inactiveDays: on the Audiences.ListContactsAsync methods, since: and until: on Audiences.GrowthAsync, Forms.AnalyticsAsync and Bookings.AnalyticsAsync, since: on Broadcasts.AnalyticsAsync and StatsAsync, source: (MailboxImportSources), status: (ImportHistoryStatuses) and search: on the Imports.ListAsync methods, and from: on the Signatures.ListAsync methods.
  • Contacts.SetAudiencesAsync and Audiences.AddContactAsync 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.SaveAsync.
  • Scopes: Addresses.ListAsync, ListAllAsync and IterateAsync need emails:read, or emails:send in its place. The Audiences.ListContactsAsync methods need contacts:read as well as audiences:read. Emails.ComposeAsync, RewriteAsync, SuggestSubjectAsync and TranslateAsync take drafts:write in place of emails:send. Domains.GetMailAppSettingsAsync and ListAppPasswordsAsync need threads:read, and Domains.UpdateMailAppSettingsAsync needs threads:read and domains:write. Domains.CreateAddressAsync asks 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, as Emails.SendAsync takes it, goes out as that link with its filename and contentType.
  • Domains.CreateAddressAsync and Domains.UpdateAddressAsync take expiresAt and onExpiry (AddressExpiryActions), and every address 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. WebhookEvents.AddressExpired is the event address.expired.
  • DomainAddressDestinations includes 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 (AddressGroupPostingPolicies) and groupKeepCopy for a group, and every address reports them. The refusals are webhook_not_found and too_many_taps.
  • WebhookEvents.EmailRouted is the event email.routed: 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 says which sent it, with a kind from WebhookRoutedSources, recipient keeps the plus tag and verdicts are what the receiving server found. An email.received event carries tap, true when an endpoint gets the message as a tap of the address rather than through its subscription.
  • Domains.ListRoutesAsync, ListAllRoutesAsync and IterateRoutesAsync read the pattern routes of a domain in the order they are tried. Domains.CreateRouteAsync, GetRouteAsync, UpdateRouteAsync and DeleteRouteAsync 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 (AddressRouteActions). active and inactiveReason (AddressRouteInactiveReasons) 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.TestRouteAsync answers 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, ListAllGroupMembersAsync and IterateGroupMembersAsync read the group members of a group address, and Domains.AddGroupMembersAsync and RemoveGroupMemberAsync change 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 are not_a_group, group_member_limit, group_member_not_found and group_nesting_too_deep.
  • Domains.UpdateAsync takes aliasOf, which makes the domain an alias of another domain of the workspace, and every domain reports aliasOf and aliases. 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.UpdateAddressLimitsAsync takes receiving.storageBytes, a storage quota for one address from 1 MiB to 1 TiB, and Domains.GetAddressLimitsAsync reports what the address keeps in usage.storage, with bytes and messages. 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, ListAllDeadLettersAsync and IterateDeadLettersAsync read 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 the open ones by default, or replayed, discarded or all (WebhookDeadLetterFilters). A dead letter is kept 30 days.
  • Webhooks.ReplayDeadLettersAsync sends up to 100 open dead letters again in one call, the named ones or the oldest, and answers with an outcome for each (WebhookDeadLetterReplayOutcomes). A delivered one is closed as replayed. Webhooks.DiscardDeadLetterAsync closes one without sending it, and one already replayed is 409 dead_letter_resolved.
  • Webhooks.CreateAsync and Webhooks.UpdateAsync take retryPolicy (WebhookRetryPolicies): standard tries a failed delivery up to 8 times over about 27 and a half hours, and extended up to 16 times over about 3 days. They also take includeRaw, which needs threads:read, and every endpoint reports both.
  • Threads.GetRawMessageAsync downloads the source of one message as a byte[] of message/rfc822, 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 RawMessageSources.
  • Domains.CreateAddressAsync and Domains.UpdateAddressAsync take keepOriginal, 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.received event to an endpoint with includeRaw on carries data.raw: a link that downloads the message source for an hour, its size and its source, original or rebuilt.
  • Domains.GetAddressLimitsAsync and Domains.UpdateAddressLimitsAsync read 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. AddressHolds lists the holds.
  • Domains.GetAsync and Domains.UpdateAsync give each DNS record found, what public DNS answers at that name now, and problem, with a code from DomainRecordProblems and a message to show a person.
  • Domains.UpdateAsync takes autodiscovery, 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 in autodiscoveryRecords.
  • Webhooks.CreateAsync and Webhooks.UpdateAsync take includeContent, which puts the message into every email.received event as data.content: 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.
  • A connected mailbox can be the sender of Emails.SendAsync 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.
  • Threads.CountsAsync 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.ListAsync, Members.ListAsync, Keys.ListAsync, Webhooks.ListAsync, Rules.ListAsync and ConnectedMailboxes.ListAsync, with their ListAllAsync and IterateAsync, 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.
  • Rules.StatsAsync 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.GetAsync reports usage.addressChecks, the deep address checks used this calendar month against what the plan includes, and Billing.ListPlansAsync each plan’s monthlyAddressChecks. Tools.CheckAddressAsync and Tools.CheckAddressesAsync with deep first 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": ... }, with accept from AutomationAddressAccepts.
  • 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.SubscribeAsync refuses one whose domain takes no mail with the field error undeliverable. refuseDisposable in the settings also refuses throwaway addresses (disposable), checkMailbox runs a deep check on every sign-up and refuses a missing mailbox (mailbox_not_found), and a refused address that looks like a typo carries suggestion.