Your account
Every operation in this group: what it accepts, what it returns and the errors it can answer with.
Operations
The account of the person behind the key or the app: their name, which email notifications they get, their profile photo and username, the apps they connected and the invitations waiting for them. These calls act on a person, never on a workspace: an API key acts for the workspace owner, and an app for the person who connected it. Reading needs account:read and every change needs account:write. Neither is ever limited by a role, so an app a member connected reaches the member's own account too.
/account/account/connected-apps/{clientId}/elevation/account/notifications/account/notifications/email/{category}/account/photo/account/photo/account/username/account/username/account/username/availability/account/connected-apps/account/connected-apps/{clientId}/account/connected-apps/{clientId}/requests/account/invitations/account/invitations/{invitationId}/accept/account/invitations/{invitationId}/decline/account/sessions/account/sessions/account/sessions/{sessionId}/account/security-events/account/passkeys/account/passkeys/{passkeyId}/account/passkeys/{passkeyId}/account/sign-in-methods/account/sign-in-methods/{provider}/connect/account/sign-in-methods/{provider}/notifications/notifications/unread-count/notifications/read/notifications/read-all/notifications/clear/account/ownership-offers/account/ownership-offers/{workspaceId}/accept/account/ownership-offers/{workspaceId}/decline
PATCH/account
Change your name
Sets the name of the person, the one their team sees in Nextmail and the emails Nextmail sends them greet them by, as Account, Profile does. It is trimmed, and an empty one is a 422 invalid_parameter on name. It does not change the name mail goes out under, which belongs to each address.
Requires the account:write scope.
Request body
namestringRequired- 1 to 100 characters
Returns
The account, with its new name.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
DELETE/account/connected-apps/{clientId}/elevation
Make a connected app ask for codes again
Ends the time the person allowed the app to make the changes that ask for a verification code without one, so it asks for a code again. It changes nothing else about the app, and ending it when there is none changes nothing. Allowing an app to skip codes stays in the app, on Account, Connected apps. An app the person never connected is a 404.
Requires the account:write scope.
Path parameters
clientIdstringRequiredThe app's
clientIdfromGET /account/connected-apps.
Returns
It asks for codes again.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
- TypeScript
account.endConnectedAppElevation()- Python
account.end_connected_app_elevation()- Ruby
account.end_connected_app_elevation- PHP
account->endConnectedAppElevation- Go
Account.EndConnectedAppElevation- Java
account().endConnectedAppElevation- C#
Account.EndConnectedAppElevationAsync- CLI
nextmail account end-connected-app-elevation- MCP
endConnectedAppElevation
GET/account/notifications
Read your notification settings
Which kinds of email Nextmail sends the person, as Account, Notifications shows them. Account and billing email cannot be turned off.
Requires the account:read scope.
Returns
The notification settings.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
PUT/account/notifications/email/{category}
Turn a kind of email on or off
enabled: false stops Nextmail sending the person that kind of email, and true starts it again. account and billing cannot be turned off, and asking to is a 422 invalid_parameter on category.
Requires the account:write scope.
Path parameters
categorystringRequiredThe kind of email.
One of"account""billing""activity""product"
Request body
enabledbooleanRequiredTrue to receive that email, false to stop it.
Returns
The notification settings as they are now.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
- TypeScript
account.setEmailNotification()- Python
account.set_email_notification()- Ruby
account.set_email_notification- PHP
account->setEmailNotification- Go
Account.SetEmailNotification- Java
account().setEmailNotification- C#
Account.SetEmailNotificationAsync- CLI
nextmail account set-email-notification- MCP
setEmailNotification
PUT/account/photo
Set your profile photo
Uploads the person's profile photo, replacing any there was, as Account, Profile does. Send the image itself as the body, not JSON, with its type in Content-Type: image/png, image/jpeg, image/webp, image/gif. Up to 100 MB goes in. It is fitted into a 512 pixel square and stored as WebP, and an animated image keeps its first frame. Pass crop to choose the part of the image to keep, as the app does when you drag and zoom it.
Requires the account:write scope.
Query parameters
cropstringThe part of the image to keep, as four numbers from 0 to 1 separated by commas: the left edge, the top edge, the width and the height, each a fraction of the image as it shows upright.
0.25,0,0.5,1keeps the middle half of its width. Leave it out to keep the whole image. A crop that does not fit inside the image is refused withinvalid_parameter.Pattern^[0-9.]+,[0-9.]+,[0-9.]+,[0-9.]+$
Request body
Content typeimage/png, image/jpeg, image/webp, image/gif
Returns
The photo, with its new url.
Errors
- 422
invalid_imagewhen the body is not an image of an accepted type, is too large or cannot be read.- 502
image_not_stored: the image was read but could not be stored. Try again.- 503
image_busy: the image service is saturated. Try again shortly.
The errors every operation can return400401403404429500Error catalog
Also available in
DELETE/account/photo
Remove your profile photo
Removes the profile photo and deletes the stored image, so the app shows initials again. Removing it when there is none changes nothing.
Requires the account:write scope.
Returns
Removed, with url null.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
GET/account/username
Read your username
The username of the person, and whether they chose it or it was made for them. A username is made from their name the first time it is read.
Requires the account:read scope.
Returns
The username.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
PUT/account/username
Choose your username
Chooses or changes the username. A username made for the person can be replaced by one they choose at any time. After that it can change once a year: a change within a year of the last one is a 409 username_locked, and its message says when the next change is possible. The old username is never given to anyone else, so a username another account has or had is a 409 username_taken. One that is too short, too long, reserved or not lowercase letters, numbers and single dots is a 422 invalid_parameter on username. Sending the username the person already has changes nothing, so a retry after a lost response is safe. Check one first with GET /account/username/availability.
Requires the account:write scope.
Request body
usernamestringRequired- Up to 60 characters
Returns
The username, now chosen.
Errors
- 409
username_locked: the username changed less than a year ago, and the message says when the next change is possible.username_taken: another account has it or had it.
The errors every operation can return400401403404422429500Error catalog
Also available in
GET/account/username/availability
Check a username
Whether the person could choose a username, without choosing it. The answer says why when they could not.
Requires the account:read scope.
Query parameters
usernamestringRequiredThe username to check. It is lowercased and its spaces become dots before it is checked, as the app does.
1 to 60 characters
Returns
The verdict.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
GET/account/connected-apps
List your connected apps
Every app the person connected with OAuth, as Account, Connected apps lists them: what each may reach, until when, how many tokens it holds and whether changes are allowed without a code for it right now. current marks the app making the call. Changing what an app may reach is done in the app, never through an app.
Requires the account:read scope.
Returns
The connected apps.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
DELETE/account/connected-apps/{clientId}
Remove a connected app
Deletes every token the app holds and the access the person gave it, so its next call is refused and it has to ask again. Removing the app making the call disconnects it. An app the person never connected is a 404.
Requires the account:write scope.
Path parameters
clientIdstringRequiredThe app's
clientIdfromGET /account/connected-apps.
Returns
Removed.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
GET/account/connected-apps/{clientId}/requests
Read the request log of a connected app
Every REST call the app made with the access the person gave it, newest first, the CLI signed in from a browser included: the method, the path, the status, how long it took and the error code of a refusal. Never a body, a query string or the address it came from. Calls made under an earlier connection of the same app are not in it. failedOnly, status, since and until narrow it, and paging is keyset: pass nextCursor back as cursor while hasMore is true. An app the person never connected is a 404.
Requires the account:read scope.
Path parameters
clientIdstringRequiredThe app's
clientIdfromGET /account/connected-apps.
Query parameters
failedOnlybooleanTrue keeps the calls answered with a status of 400 or more.
statusstringKeeps the calls answered with one of these HTTP status codes, comma-separated, such as
401,403. At most 20 codes, each from 100 to 599. Anything else is a 422invalid_parameter.sincestringKeeps the calls made at or after this instant.
Formatdate-timeuntilstringKeeps the calls made before this instant.
Formatdate-timelimitintegerRows per page, 1 to 100.
At least 1At most 100Default25cursorstringThe previous page's
nextCursor, passed back as it came. It is opaque: it holds where the last row sat in this list's order, so a row deleted or edited between pages never breaks the walk, and the next page starts at the first row that sorts after it. A value this list did not hand out is a 400invalid_cursor.
Returns
A page of the log.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
- TypeScript
account.listConnectedAppRequests()account.listAllConnectedAppRequests()account.iterateConnectedAppRequests()- Python
account.list_connected_app_requests()account.list_all_connected_app_requests()account.iterate_connected_app_requests()- Ruby
account.list_connected_app_requestsaccount.list_all_connected_app_requestsaccount.iterate_connected_app_requests- PHP
account->listConnectedAppRequestsaccount->listAllConnectedAppRequestsaccount->iterateConnectedAppRequests- Go
Account.ListConnectedAppRequestsAccount.ListAllConnectedAppRequestsAccount.IterateConnectedAppRequests- Java
account().listConnectedAppRequestsaccount().listAllConnectedAppRequestsaccount().iterateConnectedAppRequests- C#
Account.ListConnectedAppRequestsAsyncAccount.ListAllConnectedAppRequestsAsyncAccount.IterateConnectedAppRequestsAsync- CLI
nextmail account list-connected-app-requests- MCP
listConnectedAppRequests
GET/account/invitations
List your invitations
The invitations to join a workspace waiting for the address the person signs in with, oldest first. Expired, accepted and withdrawn ones are left out.
Requires the account:read scope.
Returns
The invitations.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
POST/account/invitations/{invitationId}/accept
Accept an invitation
Joins the workspace with the role and the addresses the invitation gives, as accepting it in the app or from its link does. activate: true also makes it the workspace the app opens. A workspace that asks for two-factor sign-in is a 403 two_factor_required until the person turns it on, and an invitation that expired, was withdrawn or went to another address is a 422.
Requires the account:write scope.
Path parameters
invitationIdstringRequiredThe invitation id from
GET /account/invitations.
Request body
activateboolean
Returns
Joined.
Errors
- 403
two_factor_required: the workspace asks everyone in it to sign in with two-factor authentication.mailbox_login: a password sign-in for one address cannot join a workspace.
The errors every operation can return400401404422429500Error catalog
Also available in
POST/account/invitations/{invitationId}/decline
Decline an invitation
Turns the invitation down, so its link stops working, and tells whoever sent it. It cannot be taken back: they have to invite the person again. An invitation they already accepted is a 409 invitation_accepted.
Requires the account:write scope.
Path parameters
invitationIdstringRequiredThe invitation id from
GET /account/invitations.
Returns
Declined.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
GET/account/sessions
List your signed-in devices
Every browser and phone the person is signed in on, as Account, Security lists them, most recently used first: the browser and system, the country and city it was last used from, how it signed in and when. No address is ever recorded, only the place. These calls act on a person, never on a workspace: an API key acts for the workspace owner, and an app for the person who connected it.
Requires the account:read scope.
Returns
The signed-in devices.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
DELETE/account/sessions
Sign out everywhere
Signs the person out of every browser and phone at once. Each one is refused on its next request. With connectedApps=true every connected app is removed as well, except the app making this call. A key or an app is not a signed-in device, so the call never ends its own access.
Requires the account:write scope.
Query parameters
connectedAppsbooleanAlso remove every connected app, apart from the one making the call.
Defaultfalse
Returns
How many devices and apps were signed out.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
DELETE/account/sessions/{sessionId}
Sign out one device
Signs one browser or phone out. Its next request is refused at once. A device that is not signed in to the account is a 404.
Requires the account:write scope.
Path parameters
sessionIdstringRequiredThe device's
idfromGET /account/sessions.
Returns
Signed out.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
GET/account/security-events
Read your security log
What happened to the sign-in of the account, newest first: each sign-in with its device and place, devices signed out, password changes and resets, two-factor turned on or off, and passkeys added or removed. Nothing is ever removed from it. Paging is keyset: pass nextCursor back as cursor while hasMore is true.
Requires the account:read scope.
Query parameters
limitintegerRows per page, 1 to 100.
At least 1At most 100Default25cursorstringThe previous page's
nextCursor, passed back as it came. It is opaque: it holds where the last row sat in this list's order, so a row deleted or edited between pages never breaks the walk, and the next page starts at the first row that sorts after it. A value this list did not hand out is a 400invalid_cursor.
Returns
A page of the log.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
- TypeScript
account.listSecurityEvents()account.listAllSecurityEvents()account.iterateSecurityEvents()- Python
account.list_security_events()account.list_all_security_events()account.iterate_security_events()- Ruby
account.list_security_eventsaccount.list_all_security_eventsaccount.iterate_security_events- PHP
account->listSecurityEventsaccount->listAllSecurityEventsaccount->iterateSecurityEvents- Go
Account.ListSecurityEventsAccount.ListAllSecurityEventsAccount.IterateSecurityEvents- Java
account().listSecurityEventsaccount().listAllSecurityEventsaccount().iterateSecurityEvents- C#
Account.ListSecurityEventsAsyncAccount.ListAllSecurityEventsAsyncAccount.IterateSecurityEventsAsync- CLI
nextmail account list-security-events- MCP
listSecurityEvents
GET/account/passkeys
List your passkeys
The passkeys that can sign in to the account, oldest first, each with its name, whether it is synced between the person's devices and when it was last used. A passkey is added on the device that holds it, in Account, Security, never through the API.
Requires the account:read scope.
Returns
The passkeys.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
PATCH/account/passkeys/{passkeyId}
Rename a passkey
Gives a passkey a name the person will recognise, 1 to 60 characters. A passkey that is not on the account is a 404.
Requires the account:write scope.
Path parameters
passkeyIdstringRequiredThe passkey's
idfromGET /account/passkeys.
Request body
namestringRequired- 1 to 60 characters
Returns
The passkey with its new name.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
DELETE/account/passkeys/{passkeyId}
Remove a passkey
Removes a passkey, so it can no longer sign in or confirm a change. The person is told by email, and it is written to their security log. The passkey stays on the device until they delete it there. A passkey that is not on the account is a 404.
Requires the account:write scope.
Path parameters
passkeyIdstringRequiredThe passkey's
idfromGET /account/passkeys.
Returns
Removed.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
GET/account/sign-in-methods
List your sign-in methods
Every way the person signs in to the account: whether a password is set, and for Google and GitHub whether each is set up on this server, whether it is connected and when, and whether it can be removed now. A provider cannot be removed when it is the only way to sign in. The passkeys that sign in to the account are counted here and listed by GET /account/passkeys.
Requires the account:read scope.
Returns
The sign-in methods.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
POST/account/sign-in-methods/{provider}/connect
Get the link that connects a sign-in method
Returns the link that connects Google or GitHub as a way to sign in to the account. A program cannot follow the link itself, because the sign-in at the provider runs in the person's browser. Hand the url to the person and ask them to open it while they are signed in to the account, then approve the sign-in at the provider. Needs a verification code from an OAuth app first, and an API key is refused with console_only. A provider that is already connected is a 409, one this server does not set up is a 503 and an address that is not verified is a 403.
Requires the account:write scope.
Path parameters
providerstringRequiredThe sign-in provider:
googleorgithub.One of"google""github"
Returns
The link for the person to open.
Errors
- 403
The key lacks the scope, or may not send as that address.
step_up_required: the call was made with an OAuth access token that has not been verified in the last 60 minutes. Ask for a code withPOST /security/step-up, send it toPOST /security/step-up/verify, then repeat the call. The person can also choose Allow changes for 60 minutes on the app in Account settings, Connected apps, on the Nextmail website. An API key is never asked for a code.
The errors every operation can return400401404422429500Error catalog
Also available in
- TypeScript
account.connectSignInMethod()- Python
account.connect_sign_in_method()- Ruby
account.connect_sign_in_method- PHP
account->connectSignInMethod- Go
Account.ConnectSignInMethod- Java
account().connectSignInMethod- C#
Account.ConnectSignInMethodAsync- CLI
nextmail account connect-sign-in-method- MCP
connectSignInMethod
DELETE/account/sign-in-methods/{provider}
Remove a sign-in method
Removes Google or GitHub as a way to sign in to the account, so it can no longer sign the person in, and writes it to their security log. The last way to sign in cannot be removed: that is a 409 last_sign_in_method. A provider the account does not have is a 404. Needs a verification code from an OAuth app first, and an API key is refused with console_only.
Requires the account:write scope.
Path parameters
providerstringRequiredThe sign-in provider:
googleorgithub.One of"google""github"
Returns
Removed.
Errors
- 403
The key lacks the scope, or may not send as that address.
step_up_required: the call was made with an OAuth access token that has not been verified in the last 60 minutes. Ask for a code withPOST /security/step-up, send it toPOST /security/step-up/verify, then repeat the call. The person can also choose Allow changes for 60 minutes on the app in Account settings, Connected apps, on the Nextmail website. An API key is never asked for a code.
The errors every operation can return400401404422429500Error catalog
Also available in
- TypeScript
account.disconnectSignInMethod()- Python
account.disconnect_sign_in_method()- Ruby
account.disconnect_sign_in_method- PHP
account->disconnectSignInMethod- Go
Account.DisconnectSignInMethod- Java
account().disconnectSignInMethod- C#
Account.DisconnectSignInMethodAsync- CLI
nextmail account disconnect-sign-in-method- MCP
disconnectSignInMethod
GET/notifications
List your notifications
The notifications of the person, newest first, as the bell in Nextmail lists them. Today each one is an invitation to join a workspace, sent to the address the person signs in with, and it stays listed once it is answered, withdrawn or expires, with invitation.status saying which. Answer an open one with POST /account/invitations/{invitationId}/accept or POST /account/invitations/{invitationId}/decline, which also marks it read. unreadCount counts every unread notification, not just this page's.
Requires the account:read scope.
Query parameters
limitintegerRows per page, 1 to 50.
At least 1At most 50Default20cursorstringThe previous page's
nextCursor, passed back as it came. It is opaque: it holds where the last row sat in this list's order, so a row deleted or edited between pages never breaks the walk, and the next page starts at the first row that sorts after it. A value this list did not hand out is a 400invalid_cursor.
Returns
A page of notifications.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
GET/notifications/unread-count
Count your unread notifications
How many notifications the person has not read yet, the number on the bell. It is cheaper than listing them, so poll this one.
Requires the account:read scope.
Returns
The unread count.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
POST/notifications/read
Mark notifications read
Marks the notifications with these ids read, up to 100 at a time. An id that is already read, or that is not one of the person's notifications, is skipped, so marked counts only the ones that changed. Reading a notification never answers it: an open invitation stays open.
Requires the account:write scope.
Request body
idsstring[]Required- 1 to 100 items
Returns
Marked.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
POST/notifications/read-all
Mark every notification read
Marks every notification of the person read, as Mark all as read in Nextmail does, and clears the number on the bell. Open invitations stay open.
Requires the account:write scope.
Returns
Marked.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
POST/notifications/clear
Clear your notifications
Removes the person's notifications, as Clear notifications in Nextmail does. The notification of an invitation that is still open stays, because the invitation still waits for an answer, unless declineInvitations is true: then every open invitation to the person is declined first, as POST /account/invitations/{invitationId}/decline declines one, and its notification goes too. A declined invitation cannot be accepted, so only a new invitation brings the person in. openInvitations counts the invitations still open after the call.
Requires the account:write scope.
Request body
declineInvitationsbooleanDecline every invitation that is still open first, so its notification goes too. False when left out, which keeps open invitations and their notifications.
Returns
Cleared.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
GET/account/ownership-offers
List the offers to own a workspace
The offers waiting for the person to become the owner of a workspace, in any workspace they belong to. These calls act on a person, never on a workspace: an API key acts for the workspace owner, and an app for the person who connected it.
Requires the account:read scope.
Returns
The offers waiting.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
POST/account/ownership-offers/{workspaceId}/accept
Accept an offer to own a workspace
Makes the person the owner of the workspace that was offered to them, with its plan and billing, as answering the offer in the app does. The owner who offered it stays in it as an admin and is told. A workspace that requires two-factor sign-in is a 403 two_factor_required until the person turns it on, an account that already owns a workspace on the Starter plan cannot take over another one on Starter (403 workspace_allowance_reached), and an offer that is not waiting is a 404 ownership_offer_not_found. These calls act on a person, never on a workspace: an API key acts for the workspace owner, and an app for the person who connected it. An API key is still refused here with 403 console_only, so the person answers the offer in the console or through an app they connected.
Requires the account:write scope.
Path parameters
workspaceIdstringRequiredThe workspace whose owner offered it, as
GET /account/ownership-offerslists it.
Returns
The person owns the workspace now.
Errors
- 403
console_only: the call was made with an API key. An API key cannot offer, withdraw, accept or decline the ownership of a workspace. Handing a workspace over is confirmed with a verification code, which a key cannot give, so make the change in the Nextmail console.two_factor_required: the workspace requires two-factor sign-in and the person has not turned it on.workspace_allowance_reached: the account already owns a workspace on the Starter plan.insufficient_scope: the token lacksaccount:write.step_up_required: the call was made with an OAuth access token that has not been verified in the last 60 minutes. Ask for a code withPOST /security/step-up, send it toPOST /security/step-up/verify, then repeat the call. The person can also choose Allow changes for 60 minutes on the app in Account settings, Connected apps, on the Nextmail website. An API key is never asked for a code.- 404
ownership_offer_not_found: no offer from that workspace is waiting.- 409
ownership_changed: the workspace changed while the answer was on its way.ownership_not_eligible: the account cannot own a workspace yet.domain_moving: a domain is being moved into or out of the workspace.
The errors every operation can return400401422429500Error catalog
Also available in
- TypeScript
account.acceptOwnershipOffer()- Python
account.accept_ownership_offer()- Ruby
account.accept_ownership_offer- PHP
account->acceptOwnershipOffer- Go
Account.AcceptOwnershipOffer- Java
account().acceptOwnershipOffer- C#
Account.AcceptOwnershipOfferAsync- CLI
nextmail account accept-ownership-offer- MCP
acceptOwnershipOffer
POST/account/ownership-offers/{workspaceId}/decline
Decline an offer to own a workspace
Declines the offer. The owner who made it is told, and nothing else changes. An offer that is not waiting is a 404 ownership_offer_not_found. These calls act on a person, never on a workspace: an API key acts for the workspace owner, and an app for the person who connected it. An API key is still refused here with 403 console_only, so the person answers the offer in the console or through an app they connected.
Requires the account:write scope.
Path parameters
workspaceIdstringRequiredThe workspace whose owner offered it, as
GET /account/ownership-offerslists it.
Returns
Declined.
Errors
- 403
console_only: the call was made with an API key. An API key cannot offer, withdraw, accept or decline the ownership of a workspace. Handing a workspace over is confirmed with a verification code, which a key cannot give, so make the change in the Nextmail console.insufficient_scope: the token lacksaccount:write.- 404
ownership_offer_not_found: no offer from that workspace is waiting.
The errors every operation can return400401422429500Error catalog
Also available in
- TypeScript
account.declineOwnershipOffer()- Python
account.decline_ownership_offer()- Ruby
account.decline_ownership_offer- PHP
account->declineOwnershipOffer- Go
Account.DeclineOwnershipOffer- Java
account().declineOwnershipOffer- C#
Account.DeclineOwnershipOfferAsync- CLI
nextmail account decline-ownership-offer- MCP
declineOwnershipOffer
Objects
AcceptedInvitationobject
objectstringRequired- One of
"invitation" idstringRequiredacceptedbooleanRequired- One of
true workspaceIdstringRequiredworkspaceNamestringRequiredaddressesGrantedintegerRequired- At least 0
domainsGrantedintegerRequired- At least 0
activatedbooleanRequiredWhether the app now opens the workspace, after
activate: true.
Accountobject
objectstringRequired- One of
"account" idstringRequirednamestringRequiredemailstringRequiredThe address the person signs in with.
AccountPhotoobject
objectstringRequired- One of
"account_photo" urlstringRequired- Can be null
ConnectedAppobject
objectstringRequired- One of
"connected_app" clientIdstringRequirednamestringRequired- Can be null
kindstringRequiredclifor a sign-in of the command line tool,appfor every other app.One of"app""cli"cliDevicestring- Can be null
currentbooleanRequiredWhether it is the app making this call.
registeredByAccountbooleanredirectUrisstring[]connectedAtstring- Can be nullFormat
date-time accessUntilstringWhen its last token runs out.
Can be nullFormatdate-timetokenCountintegerRequired- At least 0
statusstringRequired- One of
"active""expired""needs-approval""access-lost" usablePermissionsintegerHow many of the permissions it was given the person still holds.
Can be nullelevatedUntilstringUntil when it may make changes that ask for a verification code without one.
Can be nullFormatdate-timegrantobjectWhat the person gave it, or null for an app that has to ask again.
Can be nullworkspaceIdstringRequiredThe one workspace the app acts for.
workspaceNamestringRequired- Can be null
permissionsstring[]RequiredaddressAllowliststring[]Required- Can be null
domainAllowliststring[]Required- Can be null
expiresAtstringRequiredWhen the access ends, or null when it lasts until it is removed.
Can be nullFormatdate-timeupdatedAtstringRequired- Format
date-time
ConnectedAppListobject
objectstring- One of
"list" dataConnectedApp[]
ConnectedAppRequestobject
objectstringRequired- One of
"connected_app_request" idstringRequiredclientIdstringRequiredworkspaceIdstringRequiredThe workspace the call acted on.
requestIdstringRequiredThe
X-Request-Idthe call was answered with.Can be nullmethodstringRequiredpathstringRequiredThe path that was called, without its query string.
statusintegerRequirederrorCodestringRequiredThe
codeof the error the call was answered with, or null.Can be nulldurationMsintegerRequired- At least 0
userAgentstringRequired- Can be null
createdAtstringRequired- Format
date-time
ConnectedAppRequestListobject
objectstring- One of
"list" hasMorebooleanTrue when another page follows. Pass
nextCursorback ascursorto read it.nextCursorstringAn opaque cursor for the next page, or null on the last page. Pass it back unchanged.
Can be null
DeclinedInvitationobject
objectstringRequired- One of
"invitation" idstringRequireddeclinedbooleanRequired- One of
true
DeclinedOwnershipOfferobject
objectstringRequired- One of
"ownership_offer" workspaceIdstringRequiredThe workspace that was on offer.
workspaceNamestringRequiredIts name.
declinedbooleanRequired- One of
true ownerobjectRequiredThe owner who offered it, who still owns it.
userIdstringRequiredTheir account id.
namestringRequiredTheir name, when they gave one.
Can be nullemailstringRequiredThe address they sign in with.
EmailNotificationSettingobject
categorystringRequired- One of
"account""billing""activity""product" labelstringRequireddescriptionstringRequiredrequiredbooleanRequiredWhether it can never be turned off.
enabledbooleanRequired
EndedConnectedAppElevationobject
objectstringRequired- One of
"connected_app" clientIdstringRequiredelevatedUntilstringRequiredAlways null: the app asks for codes again.
Can be nullFormatdate-time
IncomingOwnershipOfferobject
objectstringRequired- One of
"ownership_offer" workspaceIdstringRequiredThe workspace on offer.
workspaceNamestringRequiredIts name.
fromobjectRequiredThe owner who offered it.
userIdstringRequiredTheir account id.
namestringRequiredTheir name, when they gave one.
Can be nullemailstringRequiredThe address they sign in with.
offeredAtstringRequiredWhen the offer was made.
Formatdate-timeexpiresAtstringRequiredWhen it ends unanswered, 7 days after it was made.
Formatdate-time
IncomingOwnershipOfferListobject
objectstring- One of
"list"
Notificationobject
objectstringRequired- One of
"notification" idstringRequiredkindstringRequiredWhat the notification is about:
workspace-invitationfor an invitation to join a workspace, andheld-mailwhen the AI check held mail for a mailbox the person reads. New kinds will be added, so skip a kind you do not know.One of"workspace-invitation""held-mail"readbooleanRequiredreadAtstringRequiredWhen it was marked read, or null while it is unread.
Can be nullFormatdate-timenotifiedAtstringRequiredWhen the person was last told: when the invitation was sent, or sent again.
Formatdate-timeinvitationobjectRequiredThe invitation when
kindisworkspace-invitation, and null for a kind that is about something else.Can be nullidstringRequiredThe invitation id, for
POST /account/invitations/{invitationId}/acceptandPOST /account/invitations/{invitationId}/decline.workspaceIdstringRequiredworkspaceNamestringRequiredroleNamestringRequiredinviterNamestringRequired- Can be null
inviterEmailstringRequiredThe address of the person who sent the invitation, null once their account is gone.
Can be nullinviterImagestringRequiredA link to the profile photo of the person who sent the invitation, null when they have none.
Can be nulladdressesintegerRequiredHow many addresses and whole domains it gives.
At least 0statusstringRequiredopenwhile it can be accepted,acceptedonce the person joined,declinedonce they turned it down,withdrawnonce the workspace took it back, andexpiredonce it ran out.One of"open""accepted""declined""withdrawn""expired"expiresAtstringRequiredWhen it stops working if nobody answers it.
Formatdate-time
heldMailobjectPresent only when
kindisheld-mail, a kind no longer written: the mailbox that had mail held on that day.workspaceIdstringRequiredworkspaceNamestringRequiredmailboxAddressIdstringRequiredThe address id of the mailbox, null when the mail came to an address with no row of its own.
Can be nulladdressstringRequiredThe mailbox address.
Can be nulldaystringRequiredThe day, in UTC, the notification covers. One notification sums up a mailbox for a day.
Formatdate
NotificationCountobject
objectstringRequired- One of
"notification_count" unreadCountintegerRequiredHow many notifications are unread.
At least 0
NotificationListobject
objectstring- One of
"list" dataNotification[]unreadCountintegerHow many notifications are unread, on every page together.
At least 0hasMorebooleanWhether another page follows.
nextCursorstringAn opaque cursor for the next page, or null on the last page. Pass it back unchanged.
Can be null
NotificationSettingsobject
objectstringRequired- One of
"notification_settings" emailEmailNotificationSetting[]RequiredEvery kind of email Nextmail sends.
NotificationsClearedobject
objectstringRequired- One of
"notifications_cleared" clearedintegerRequiredHow many notifications this call removed.
At least 0declinedInvitationsintegerRequiredHow many open invitations this call declined. Always 0 unless
declineInvitationswas true.At least 0openInvitationsintegerRequiredHow many invitations to the person are still open. Their notifications stay listed.
At least 0unreadCountintegerRequiredHow many notifications are still unread.
At least 0
NotificationsReadobject
objectstringRequired- One of
"notifications_read" markedintegerRequiredHow many notifications this call marked read.
At least 0unreadCountintegerRequiredHow many notifications are still unread.
At least 0
OwnershipTransferobject
objectstringRequired- One of
"ownership_transfer" workspaceIdstringRequiredThe workspace the person owns now.
workspaceNamestringRequiredIts name.
acceptedbooleanRequired- One of
true previousOwnerobjectRequiredThe owner who offered it, who stays in it as a member.
userIdstringRequiredTheir account id.
namestringRequiredTheir name, when they gave one.
Can be nullemailstringRequiredThe address they sign in with.
previousOwnerRoleNamestringRequiredThe role the previous owner holds now, usually Admin.
Passkeyobject
objectstringRequired- One of
"passkey" idstringRequirednamestringRequiredsyncedbooleanRequiredWhether it is backed up and shared between the person's devices.
transportsstring[]RequiredHow the device that holds it is reached, such as
internalorusb.One of"internal""hybrid""usb""nfc""ble""smart-card""cable"createdAtstringRequired- Format
date-time lastUsedAtstringRequiredWhen it last signed in or confirmed a change.
Can be nullFormatdate-time
PasskeyListobject
objectstring- One of
"list" dataPasskey[]
ReceivedInvitationobject
objectstringRequired- One of
"invitation" idstringRequiredworkspaceIdstringRequiredworkspaceNamestringRequiredroleNamestringRequiredinviterNamestring- Can be null
addressesintegerRequiredHow many addresses and whole domains it gives.
At least 0expiresAtstringRequired- Format
date-time createdAtstringRequired- Format
date-time
ReceivedInvitationListobject
objectstring- One of
"list"
RemovedPasskeyobject
objectstringRequired- One of
"passkey" idstringRequiredremovedbooleanRequired- One of
true
RemovedSignInMethodobject
objectstringRequired- One of
"sign_in_method" providerstringRequired- One of
"google""github" removedbooleanRequired- One of
true
RevokedConnectedAppobject
objectstringRequired- One of
"connected_app" clientIdstringRequiredrevokedbooleanRequired- One of
true tokensRevokedintegerRequired- At least 0
RevokedSessionobject
objectstringRequired- One of
"session" idstringRequiredrevokedbooleanRequired- One of
true
SecurityEventobject
objectstringRequired- One of
"security_event" idstringRequiredscopestringRequiredaccountfor the person's own log,workspacefor the workspace's.One of"account""workspace"kindstringRequired- One of
"sign-in""session-revoked""sessions-revoked""password-changed""password-reset""two-factor-enabled""two-factor-disabled""passkey-added""passkey-removed""social-connected""social-disconnected""member-added""member-removed""member-role-changed""invitation-sent""invitation-revoked""role-created""role-changed""role-deleted""two-factor-requirement-changed""address-password-set""address-password-removed""calendar-login-created""calendar-login-revoked""directory-sync-connected""directory-sync-disconnected""directory-sync-token-rotated""directory-sync-changed""connector-connected""connector-disconnected""connector-changed""ownership-offered""ownership-transferred""address-access-granted""address-access-revoked""domain-access-granted""domain-access-revoked""held-mail-released""held-mail-confirmed""inbound-check-changed" atstringRequired- Format
date-time actorobjectRequiredWho made a workspace change, or null for the person's own log.
Can be nullnamestringRequired- Can be null
emailstringRequired- Can be null
memberobjectRequiredThe person a workspace change was about.
Can be nullnamestringRequired- Can be null
emailstringRequired- Can be null
deviceobjectRequiredThe device it happened on, when one was known.
Can be nullkindstringRequiredbrowser, orunknownwhen the request named no browser.One of"browser""unknown"browserstringRequiredSuch as
Chrome.Can be nullosstringRequiredSuch as
macOSoriOS.Can be null
authMethodstringRequiredHow a sign-in was made.
Can be nullOne of"password""totp""backup-code""passkey""email-link""handoff""social""support"countrystringRequired- Can be null
citystringRequired- Can be null
detailSecurityEventDetailRequired
SecurityEventDetailobject
What the event was about. Only the fields that apply to its kind are present.
byKeybooleanTrue when an API key made the change.
byDirectorybooleanTrue when directory sync made the change.
rolestring- Can be null
previousRolestring- Can be null
passkeystringThe name of the passkey.
Can be nulldevicestringThe device that was signed out, as an English label.
Can be nulldeviceInfoobjectThe same device in parts, so a client can word it itself. Absent on entries recorded before it was added.
Can be nullkindstringRequiredbrowser, orunknownwhen the request named no browser.One of"browser""unknown"browserstringRequiredSuch as
Chrome.Can be nullosstringRequiredSuch as
macOSoriOS.Can be null
sessionsintegerHow many devices were signed out.
appsintegerHow many connected apps were removed.
newDevicebooleanTrue for a sign-in from a device not seen before.
addressstring- Can be null
domainstringThe domain a
domain-access-grantedordomain-access-revokedentry is about.Can be nullrequiredbooleanenabledbooleanconnectorstringThe name of the app a connector entry is about.
Can be nullaccessstringWhat the connector lets the assistant do,
readorfull.Can be nullpausedbooleanWhether the connector is paused.
loginstringThe username of the calendar sign-in an entry is about.
Can be null
SecurityEventListobject
objectstring- One of
"list" dataSecurityEvent[]hasMorebooleanTrue when another page follows. Pass
nextCursorback ascursorto read it.nextCursorstringAn opaque cursor for the next page, or null on the last page. Pass it back unchanged.
Can be null
Sessionobject
objectstringRequired- One of
"session" idstringRequiredcurrentbooleanRequiredWhether it is the device making the call. Always false for a key or an app.
deviceSessionDeviceRequiredauthMethodstringRequiredHow it signed in, or null for a device signed in before this was recorded.
Can be nullOne of"password""totp""backup-code""passkey""email-link""handoff""social""support"countrystringRequiredThe two-letter country it was last used from.
Can be nullcitystringRequired- Can be null
createdAtstringRequiredWhen it signed in.
Formatdate-timelastActiveAtstringRequiredWhen it was last used, to within ten minutes.
Formatdate-timeexpiresAtstringRequiredWhen it is signed out by itself.
Formatdate-time
SessionDeviceobject
kindstringRequiredbrowser, orunknownwhen the request named no browser.One of"browser""unknown"browserstringRequiredSuch as
Chrome.Can be nullosstringRequiredSuch as
macOSoriOS.Can be null
SessionListobject
objectstring- One of
"list" dataSession[]
SessionSweepobject
objectstringRequired- One of
"session_sweep" sessionsRevokedintegerRequired- At least 0
appsRevokedintegerRequired- At least 0
SignInMethodobject
objectstringRequired- One of
"sign_in_method" providerstringRequired- One of
"google""github" configuredbooleanRequiredWhether this server sets the provider up, so that it can be connected.
connectedbooleanRequiredWhether the account signs in with it.
connectedAtstringRequiredWhen it was connected, or null when it is not.
Can be nullFormatdate-timecanDisconnectbooleanRequiredWhether it can be removed now. False when it is not connected, and when it is the only way to sign in.
SignInMethodLinkobject
objectstringRequired- One of
"sign_in_method_link" providerstringRequired- One of
"google""github" urlstringRequiredThe link the person opens in their own browser, signed in to the account, to connect the provider.
SignInMethodsobject
objectstringRequired- One of
"sign_in_methods" methodsSignInMethod[]RequiredGoogle, then GitHub.
passwordSetbooleanRequiredWhether the account has a password to sign in with.
passkeysintegerRequiredHow many passkeys can sign in to the account.
At least 0
Usernameobject
objectstringRequired- One of
"username" usernamestringRequired- Can be null
chosenbooleanRequiredWhether the person chose it. They can replace one made for them at any time, and change a chosen one once a year.
UsernameAvailabilityobject
objectstringRequired- One of
"username_availability" usernamestringRequiredThe username as it was checked.
statusstringRequiredcurrentwhen it is the username the person already has.One of"available""current""taken""reserved""invalid""too_short""too_long"availablebooleanRequiredmessagestringRequired