Ruby
Changelog
Every release of the gem, newest first.
0.1.0
- To-dos: a to-do list is a calendar of kind
todos(Nextmail::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.list_todos,list_all_todosanditerate_todosread them throughGET /calendar/todos, filtered bycalendar_ids:,state:(open,doneorall, fromNextmail::TODO_STATES),due_before:anddue_after:.get_todo(id),create_todo,update_todo(id)anddelete_todo(id)work on one, anddelete_todosays how many to-dos itremoved. A to-do is a Hash with atitle,notes, astatusfromNextmail::TODO_STATUSES,startanddueas a day or a moment withallDayandtimezone,completedAt,priority,percentComplete,categories, theparentIdof the to-do it is a step of and therecurrenceit repeats by.start:,due:,due_before:anddue_after:take a Time, DateTime, Date or String. Checking off a repeating to-do moves it to its next date. They needcalendar:readandcalendar:write. calendar.list_calendarstakeskind:and lists your to-do lists withkind: "todos", andcalendar.create_calendartakeskind:to make one. Members, colours, order and deleting work on to-do lists as they do on calendars.calendar.delete_calendartakesnotify_guests:: left out or true, the guests of every upcoming meeting you organised in the calendar are sent a cancellation, ascancel_eventdoes, and false deletes it without telling anyone. The Hash it returns carriescancelledMeetings. Sending the cancellations needsemails:sendas well.calendar.list_calendar_logins,create_calendar_login,revoke_calendar_loginandcreate_calendar_login_profile_linkmanage 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.create_calendar_login(name:)returns the sign-in with itspasswordshown once, itsservers(username,caldavandcarddav, each nil when the person’s role does not reach it) and an Apple configuration profile with CalDAV and CardDAV only inappleProfile, andcreate_calendar_login_profile_link(name:, displayName:, description:)returns a one-time link that makes one on an Apple device. Your own takeaccount:readandaccount:write, andmember:reaches a member’s withmembers:write. Neither create is retried automatically.Nextmail::SECURITY_EVENT_KINDSgainsCALENDAR_LOGIN_CREATED("calendar-login-created") andCALENDAR_LOGIN_REVOKED("calendar-login-revoked"), and thedetailof a security log entry gainslogin, the username of the sign-in the entry is about.threads.list_automationsreads which automations ran on a thread and what they did, throughGET /threads/{id}/automations: an Array of Hashes, 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 nil), themessagesof the thread it started from or sent, each with arolefromNextmail::AUTOMATION_THREAD_ROLES, and every step it ran insteps, with the step as the version defines it. It needsthreads:readandautomations:read.live_events.streamfollows the mailbox as it changes: it readsGET /live-eventsas server-sent events and yields eachmessage.received,message.sent,thread.changed,thread.deletedandmessage.status_changedevent (Nextmail::LIVE_EVENT_TYPES) to the block as a Hash withid,type,occurredAtanddata, or returns an Enumerator without one. It takestypes:,address:andlast_event_id:, 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), drops and reopens a connection that stays silent for 60 seconds, and raises theNextmail::ApiErrorsubclass on 400, 401, 403, 404 and 422. When it cannot resume it yields a reset, a Hash withtypeset toresetand areasonfromNextmail::LIVE_RESET_REASONS. Leave the block withbreakto close it.message.status_changedcarries the email’sstatus(Nextmail::LIVE_SEND_STATUSES), itsemailIdand therecipientsit is about.threads.wait_for_emailholds a request open until a message that matches arrives, throughGET /threads/wait: it takesaddress:,from:,subject:,since:andtimeout:and returns the wait, with the first message that matched or nil when the wait ran out. Its timeout is the wait plus 15 seconds, whatevertimeout:the client has.client.raw.stream(path)opens a streaming GET with the same credential and plain http checks asrequestand yields aNextmail::HttpStream, whoseeach_chunkreads the body as it arrives, then returns what the block returns. The client’stimeout:lasts only until the headers arrive,idle_timeout:bounds each wait for more of the body, and an error answer raises the sameNextmail::ApiErrorasrequest. Anadapter:streams when it hasstream(request, idle_timeout:), and one with onlycallhands over the body whole.ADDRESS_FORWARD_STATUSESgainsBOUNCED("bounced"): 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 readsforward_bounced(ADDRESS_ROUTE_INACTIVE_REASONS[: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, andnilon an entry written before ARC was checked. calendar.list_calendars,get_calendar,create_calendar,update_calendaranddelete_calendarmanage 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.set_calendar_member(id, member_id, access:)andremove_calendar_member(id, member_id)give a memberreadorwriteaccess to a calendar you keep (Nextmail::COLLECTION_ACCESS_LEVELS), andaccesson a calendar says what you may do with it (Nextmail::COLLECTION_RIGHTS). A calendar’skindis one ofNextmail::CALENDAR_KINDS.- Calendar events and occurrences carry
calendarId.create_eventtakescalendarId:to put the event in a calendar,update_eventtakes it to move one,list_events,list_all_eventsanditerate_eventstakecalendar_ids:to keep only some calendars,create_feedtakescalendarId:to publish one calendar (and a calendar link says which), andimport_icstakescalendar_id:for the calendar the events go into. contacts.list_address_bookslists your address book and the ones other members gave you access to.contacts.set_address_book_member(id, member_id, access:)andremove_address_book_member(id, member_id)give a memberreadorwriteaccess to yours.list_cards,list_all_cardsanditerate_cardstakeaddress_book:to read one you are a member of, andcreate_cardtakesaddressBook:to add to one you may write.set_calendar_memberandset_address_book_memberare retried after a network failure, since setting the same access again changes nothing, and the tworemove_methods are not.traffic.list,list_allanditerateread 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 takedomain_id:,direction:,outcomes:,address:,recipient:,since:anduntil:. Outbound entries needemails:readand inbound onesthreads:read.emails.send_rawsends an RFC 5322 message you built yourself, as written:rawis its bytes as a binary String or an IO, encoded for you, or a base64 String, 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 ofsend, honoursidempotency_key:, 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.updatetakeslabelAlerts, andsettings.getreturns it: label ids under each workspace id whose mail still alerts you while labelled mail stays out of your inbox.MAILBOX_PROVIDERSandMAIL_SERVICESgainOPENEMAIL("openemail"), 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.share_links.list,list_allanditerateread 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:(Nextmail::SHARE_KINDS),limit:andcursor:.share_links.get(kind, item_id)reads the link of one item,share_links.set(kind, item_id)makes it public or changescopyable:, andshare_links.delete(kind, item_id)makes it private again.setis retried after a network failure, since an item keeps one link however often it is shared, anddeleteis not. A private item answers 404share_link_not_found.shared.get(token)reads what the public page of a link shows, from any workspace, andshared.copy(token)copies the item into this workspace as a draft.copyis never retried, because a second call makes a second copy. An item its owner shares to look at only answers 403share_not_copyable, and a link that no longer works answers 404shared_item_not_found.tasks.list,list_allanditeratetakechat_id: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 Ruby gem. It has a method for every one of the 746 methods of the TypeScript SDK, in 53 namespaces, each under its TypeScript name in snake_case, and a parity check in the gem’s own build proves that every one sends byte for byte the request its TypeScript twin sends.
Nextmail::Clienthas a reader for every namespace, fromemails,threadsandtemplatestoautomations,bookingsandconnected_mailboxes. A request body goes in as keyword arguments or as one Hash whose keys keep the API’s camelCase names, and a response comes back as a Hash with Symbol keys.- A client takes
api_key:oraccess_token:, andaccess_token:also takes anything that responds tocalland returns a token, called before every request, so a token renews without a new client.base_url:,timeout:,max_retries:,headers:,user_agent:andadapter:set the rest, and every method takesapi_key:, orinbox_token:ontemp_mail, to act with another credential for one call. - 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. Nextmail.create_clientbuilds a client fromNEXTMAIL_API_KEY,NEXTMAIL_ACCESS_TOKENandNEXTMAIL_BASE_URL, andNextmail.init,Nextmail.clientandNextmail.reset_clientmanage one shared client thatNextmail.emailsand every other namespace reach through.Nextmail.create_temp_mailopens disposable inboxes with no credential.- Every paginated resource has
list, which returns oneNextmail::Pagewithitems,has_more?andnext_cursor,list_all, which returns every item as an Array, anditerate, which yields each item to a block or returns an Enumerator that fetches the next page only when it gets there. - An API refusal raises
Nextmail::ApiErroror its subclass for the error type, such asNotFoundError,ValidationErrororRateLimitError, withstatus,type,code,param,doc_url,request_id,retry_after_secondsandfields, and predicates such asvalidation?,step_up_required?andretryable?. No response at all raisesNextmail::NetworkError, withtimeout?when the deadline passed, and a mistake in the call itself raisesArgumentErrorbefore 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. A send carries an idempotency key that its retries reuse, so a retry never sends a second message.timeout:bounds a whole attempt, and uploads wait at least ten minutes. Nextmail.verify_webhook_signaturechecks a delivery in constant time, refuses one more than five minutes old and returns the parsed event. It reads the signature from a Hash in any case, a Rack env or Rails’request.headers.- The helpers of the TypeScript SDK are here too, such as
Nextmail.to_base64andNextmail.resolve_language, and every value set it exports is a frozen Hash onNextmail, such asNextmail::WEBHOOK_EVENTSandNextmail::API_SCOPES. - The gem has no runtime dependencies. Requests go through Net::HTTP with a pool of kept-alive connections that one client shares across threads and rebuilds after a fork, and
HTTPS_PROXYandNO_PROXYare honoured.client.raw.requestreaches any endpoint with the client’s credential and retries, and a credential is never sent over plainhttp:to anything but this machine. - When a newer version is on RubyGems, the client says so once, on a terminal only.
disable_update_notice: trueorNEXTMAIL_DISABLE_UPDATE_NOTICE=1turns that off. - It needs Ruby 3.2 or newer.
- API keys begin
nm_live_ornm_test_, and temporary inbox tokensnm_inbox_. The client refuses a key of any other shape. account.set_photo,contacts.set_photo,domains.set_address_photo,bookings.upload_background,branding.upload_imageandtemplates.upload_imagetake images up to 100 MB, andcrop:, a Hash of:x,:y,:widthand:heightfractions of the image, to keep only that part of it. They wait as long asfiles.uploaddoes: 600 seconds, or the clienttimeoutwhen that is longer.domains.list_routes,list_all_routesanditerate_routesread the pattern routes of a domain in the order they are tried, anddomains.create_route,get_route,update_routeanddelete_routemanage 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 (Nextmail::ADDRESS_ROUTE_ACTIONS).activeandinactiveReason(Nextmail::ADDRESS_ROUTE_INACTIVE_REASONS) say whether a route takes mail now.domains.test_routeanswers which step decides mail to an address (Nextmail::ADDRESS_ROUTE_TEST_STEPS), the route and where the mail goes, without sending anything.domains.create_addressanddomains.update_addresstakeexpiresAt:andonExpiry:(Nextmail::ADDRESS_EXPIRY_ACTIONS), 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.expiresAt:takes a String or a Time.Nextmail::WEBHOOK_EVENTS[:ADDRESS_EXPIRED]is the eventaddress.expired.Nextmail::DOMAIN_ADDRESS_DESTINATIONSincludesWEBHOOKandGROUP. The same two methods takewebhookId:for a webhook destination,tapWebhookIds:to copy every message to up to 5 endpoints, andgroupPosting:(Nextmail::ADDRESS_GROUP_POSTING_POLICIES) andgroupKeepCopy:for a group, and every address reports them.Nextmail::WEBHOOK_EVENTS[:EMAIL_ROUTED]is the eventemail.routed: a message that arrived at an address whose destination iswebhook, or that a route of its domain sent to a webhook, kept for 30 days instead of being filed. It always carriescontentandraw, androutedBysays which sent it (Nextmail::WEBHOOK_ROUTED_SOURCES). Anemail.receivedevent carriestap, true when an endpoint gets the message as a tap of the address rather than through its subscription.domains.list_group_members,list_all_group_membersanditerate_group_membersread the group members of a group address, anddomains.add_group_membersandremove_group_memberchange them. A group member is an address of the workspace or an address at another provider, which confirms by email first (Nextmail::GROUP_MEMBER_KINDS). A group holds at most 1,000 group members and groups nest at most 3 deep.domains.updatetakesaliasOf:, which makes the domain an alias of another domain of the workspace, and every domain reportsaliasOfandaliases.domains.update_address_limitstakesreceiving: {storageBytes:}, a storage quota for one address from 1 MiB to 1 TiB, past which a message gets a permanent bounce (5.2.2), anddomains.get_address_limitsreports what the address keeps inusage[:storage], withbytesandmessages.webhooks.list_dead_letters,list_all_dead_lettersanditerate_dead_lettersread the events an endpoint gave up on, with how many times each was tried, the last answer and that attempt.status:reads theopenones by default, orreplayed,discardedorall(Nextmail::WEBHOOK_DEAD_LETTER_FILTERS). A dead letter is kept 30 days.webhooks.replay_dead_letterssends up to 100 open dead letters again in one call, the named ones or the oldest, and answers with anoutcomefor each (Nextmail::WEBHOOK_DEAD_LETTER_REPLAY_OUTCOMES).webhooks.discard_dead_lettercloses one without sending it.webhooks.createandwebhooks.updatetakeretryPolicy:(Nextmail::WEBHOOK_RETRY_POLICIES):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:readand gives everyemail.receivedeventdata[:raw]: a link that downloads the message source for an hour, itssizeand itssource,originalorrebuilt.threads.get_raw_messagedownloads the source of one message as a binary String ofmessage/rfc822bytes, ready to save as an.emlfile: the message byte for byte as it arrived when the address hadkeepOriginalon, and otherwise a source rebuilt from the stored message (Nextmail::RAW_MESSAGE_SOURCES).domains.create_addressanddomains.update_addresstakekeepOriginal:, 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.domains.get_address_limitsanddomains.update_address_limitsread 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.Nextmail::ADDRESS_HOLDSlists the holds.domains.getanddomains.updategive each DNS recordfound, what public DNS answers at that name now, andproblem, a Hash with acodefromNextmail::DOMAIN_RECORD_PROBLEMSand amessageto show a person.domains.updatetakesautodiscovery:.trueoffers 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.createandwebhooks.updatetakeincludeContent:, 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.sendwith an API key, of broadcasts, automations and sign-up forms, and a key or an app can send from the free address of the person it acts for. Only that person may send as a free address. threads.countsleaves labelled mail out ofteam.assignedandteam.unassigned, as the inbox does, unless the person has chosen to show labelled mail in the inbox.domains.list,members.list,keys.list,webhooks.list,rules.listandconnected_mailboxes.list, with theirlist_allanditerate, 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.statsreads how the rules did inside a window: messages matched and failed, a series of buckets, the matches of each rule, the actions taken, the failures and the senders matched most.rule_ids:counts some rules only.billing.getreportsusage.addressChecks, the deep address checks used this calendar month against what the plan includes, andbilling.list_planseach plan’smonthlyAddressChecks.tools.check_addressandtools.check_addresseswithdeep: truefirst 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: }, withacceptfromNextmail::AUTOMATION_ADDRESS_ACCEPTS. - A send leaves out an address whose domain takes no mail, and one the check on sending finds has no mailbox. Each shows as
suppressed, with anemail.suppressedwebhook that names the reason, never as a bounce. - Forms check the address of every sign-up:
forms.subscriberefuses one whose domain takes no mail with the field errorundeliverable.settings: { refuseDisposable: true }also refuses throwaway addresses (disposable),checkMailbox: trueruns 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. chats.list_messages,list_all_messagesanditerate_messagesread the messages of a chat, from the first unlessorder:isdesc(Nextmail::CHAT_MESSAGE_ORDERS). Each message has itstextand itsparts(Nextmail::CHAT_MESSAGE_PART_TYPES): the words, the tools the assistant called with their arguments, results and status (Nextmail::CHAT_TOOL_CALL_STATUSES), and the files. A tool result the caller may not read comes back redacted.chats.send_messagesays something in a chat, or starts one under a new id, and returns the turn once the assistant has answered.status(Nextmail::CHAT_TURN_STATUSES) isawaiting_approvalwhen a call that changes something waits inpendingToolCalls, whichchats.approve_tool_call, with optionalargs, orchats.deny_tool_callanswers.regenerateanswers the last message again, andattachmentstakes files byfileIdor inline, with raw bytes encoded for you.chats.stop_turnstops the assistant (Nextmail::CHAT_STOP_STATUSES), and a stopped turn says why instopReason(Nextmail::CHAT_STOP_REASONS). A turn runs for at most 240 seconds, sosend_message,approve_tool_callanddeny_tool_callwait 300 seconds, or the clienttimeoutwhen that is longer, and taketimeout:to wait another number of seconds,0for as long as it takes. None of them is retried.members.get_directory_syncreads directory sync (SCIM), andmembers.connect_directory_syncturns it on and returns its token once.members.disconnect_directory_syncturns it off,members.list_directory_peoplereads who the directory synced, withstart_index:andcount:(Nextmail::DIRECTORY_PERSON_STATES), andmembers.set_directory_default_roleandset_directory_group_rolechoose the roles it gives,nilfor none. Only the owner or a role holdingworkspace:managereaches them, and every change asks an OAuth access token for a verification code.security.get_policyreads whether the workspace requires two-factor sign-in and whether the person behind the client meets it, with no scope.security.update_policysetsrequireTwoFactor, withmembers:writeand a verification code.workspaces.get_ownership_offer,offer_ownershipandwithdraw_ownership_offerlet the owner offer the workspace to one of its members, andaccount.list_ownership_offers,accept_ownership_offeranddecline_ownership_offeranswer the offers made to the person. Offering and accepting ask for a verification code.account.set_namechanges the name of the person.account.list_push_devices,remove_push_deviceandsend_test_pushread the phones that get the person’s notifications (Nextmail::PUSH_PLATFORMS), stop one, and send a test.account.end_connected_app_elevationmakes a connected app ask for verification codes again.dns_connections.startreturns the link that connects a Cloudflare account to the workspace in a browser.domains.create_mail_app_profile_linkmakes a one-time link that sets an address up on an Apple device, anddomains.start_gravatar_publishreturns the link that publishes the photo of an address to Gravatar.threads.set_replyingandclear_replyingshow the team who is writing a reply.threads.list_trackingreads the tracking report of every tracked message sent in a thread, andthreads.get_deliverycounts what bounced, was refused or was held back, both narrowed byaddress:.threads.list_file_links,list_all_file_linksanditerate_file_linksread the download links one message carried, withinclude_revoked:.threads.countstakeshide_labelled:.senders.get_avatarreturns the picture of a sender as a binary String, andsenders.getreportsavatarUrlandavatarKind(Nextmail::SENDER_AVATAR_KINDS).emails.sendandsend_batchtakeisForward,originalMessage, the quoted history of a forward or a reply, andencryption, a Hash withformat,sealedAtandsealedTofor a message you sealed yourself with OpenPGP.emails.translatetakesskipQuotedand reportsquotedHistoryKept.emails.list_events,list_all_events,iterate_eventsandget_tracking, and thetrackingopens and clicks methods, takeaddress:. Thetracking.listmethods takeoffset_minutes:, andtracking.get_statsreportsdownloads, the files that went out as download links and how often they were fetched.templates.updateandreplace_contenttakeexpectedUpdatedAt, andtemplates.publishtakesexpected_updated_at:, theupdatedAtof the version you read, and they refuse a change saved in between withversion_conflict. Template versions reportupdatedAt.drafts.createandupdatetakeattachments, up to 20 files inline or byfileId, with raw bytes encoded for you, anddrafts.getreports thefileIdof each file.- Filters:
rule_ids:on therules.list_runsmethods,audience_id:on thecontacts.listmethods,from:andto:oncontacts.activity,inactive_days:on theaudiences.list_contactsmethods,since:anduntil:onaudiences.growth,forms.analyticsandbookings.analytics,since:onbroadcasts.analyticsandbroadcasts.stats,source:(Nextmail::MAILBOX_IMPORT_SOURCES),status:(Nextmail::IMPORT_HISTORY_STATUSES) andsearch:on theimports.listmethods, andfrom:on thesignatures.listmethods. contacts.set_audiencesandaudiences.add_contacttakecreateContact, which saves an address that is not a contact yet as one first and then needscontacts:write. Through an app a member connected, an address another member saved is a 409contact_existsthere and oncontacts.save.- Scopes:
addresses.list,list_allanditerateneedemails:read, oremails:sendin its place. Theaudiences.list_contactsmethods needcontacts:readas well asaudiences:read.emails.compose,rewrite,suggest_subjectandtranslatetakedrafts:writein place ofemails:send.domains.get_mail_app_settingsandlist_app_passwordsneedthreads:read, anddomains.update_mail_app_settingsneedsthreads:readanddomains:write.domains.create_addressasks an OAuth access token for a verification code when it chooses where the mail goes or deletion on expiry. - An attachment given as a Hash with
url, and an optionalfilenameandcontentType, is sent as a file to fetch, as the docs ofemails.senddescribe. app_host.get,setandverifyreportsender: where the emails sent to the people of the workspace come from, a Hash withaddress,domainandwaitingOn.waitingOnislogoorsigning(Nextmail::APP_HOST_SENDER_WAITS) until they come fromnoreply@the domain of the live web app address, thennil.senderisnilon the free plan and until an address on a verified domain of the workspace is live.addresses.list,list_allanditeratereport theroleof each address (Nextmail::ADDRESS_ROLES):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.files.create_linktakesreuse:. Withtrueit 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,updateanddelete,keys.rotatefor any key but the caller, andworkspaces.offer_ownership,withdraw_ownership_offer,account.accept_ownership_offeranddecline_ownership_offerrefuse an API key with 403console_only, which raisesNextmail::PermissionError. The console confirms these changes with a verification code, which a key cannot give, so they are made there. A key still rotates its own secret withkeys.rotateorme.rotate, and revokes keys withkeys.revoke.provider_imports.list,list_allanditeratetakesource:(Nextmail::PROVIDER_IMPORT_PROVIDERS),status:(Nextmail::IMPORT_HISTORY_STATUSES) andsearch:, up to 320 characters, the same filtersimports.listtakes, sent on every page. An import from a provider never pauses, sostatus: "paused"answers an empty page.emails.list_events,list_all_eventsanditerate_eventstakemessage_id:, 1 to 998 characters, sent asmessageId: 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.emails.list_events_by_message_id,list_all_events_by_message_idanditerate_events_by_message_idread 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 takeaddress:,limit:andcursor:aslist_eventsdoes, and a Message-ID that no message the key reaches went out with is a 404.