Skip to the documentation
API

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: 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.

GET/account/notifications

Read your notification settings

Scopesaccount:readReads

Which kinds of email Nextmail sends the person, as Account, Notifications shows them, and the workspaces whose notifications are muted on their phone. 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

TypeScript
nextmail.account.getNotifications()
Python
account.get_notifications()
Ruby
account.get_notifications
PHP
account->getNotifications
Go
Account.GetNotifications
Java
account().getNotifications
C#
Account.GetNotificationsAsync
CLI
nextmail account get-notifications
MCP
getNotificationSettings

PUT/account/notifications/email/{category}

Turn a kind of email on or off

Scopesaccount:writeChanges data

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

categorystringRequired

The kind of email.

One of"account""billing""activity""product"

Request body

enabledbooleanRequired

True 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
nextmail.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/notifications/push/{workspaceId}

Mute a workspace on your phone

Scopesaccount:writeChanges data

muted: true stops the phone app notifying the person about the mail of one workspace, and false lets it notify them again. It applies to every phone they signed in on. A workspace they cannot open is a 404.

Requires the account:write scope.

Path parameters

workspaceIdstringRequired

A workspace from GET /workspaces.

Request body

mutedbooleanRequired

True to mute it, false to let it notify again.

Returns

The notification settings as they are now.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
nextmail.account.setPushMuted()
Python
account.set_push_muted()
Ruby
account.set_push_muted
PHP
account->setPushMuted
Go
Account.SetPushMuted
Java
account().setPushMuted
C#
Account.SetPushMutedAsync
CLI
nextmail account set-push-muted
MCP
setWorkspacePushMuted

PUT/account/photo

Set your profile photo

Scopesaccount:writeChanges data

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 5 MB goes in. It is fitted into a 512 pixel square and stored as WebP, and an animated image keeps its first frame.

Requires the account:write scope.

Request body

Content typeimage/png, image/jpeg, image/webp, image/gif

binary

Returns

The photo, with its new url.

Errors

422

invalid_image when 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

TypeScript
nextmail.account.setPhoto()
Python
account.set_photo()
Ruby
account.set_photo
PHP
account->setPhoto
Go
Account.SetPhoto
Java
account().setPhoto
C#
Account.SetPhotoAsync
CLI
nextmail account set-photo
MCP
setProfilePhoto

DELETE/account/photo

Remove your profile photo

Scopesaccount:writeDeletes

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

TypeScript
nextmail.account.removePhoto()
Python
account.remove_photo()
Ruby
account.remove_photo
PHP
account->removePhoto
Go
Account.RemovePhoto
Java
account().removePhoto
C#
Account.RemovePhotoAsync
CLI
nextmail account remove-photo
MCP
removeProfilePhoto

GET/account/username

Read your username

Scopesaccount:readReads

The username of the person, whether they chose it or it was made for them, and the free address it gives 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

TypeScript
nextmail.account.getUsername()
Python
account.get_username()
Ruby
account.get_username
PHP
account->getUsername
Go
Account.GetUsername
Java
account().getUsername
C#
Account.GetUsernameAsync
CLI
nextmail account get-username
MCP
getUsername

PUT/account/username

Choose your username

Scopesaccount:writeChanges data

Sets the username for good, and with it the free address. Once chosen it never changes: a second choice is a 409 username_locked. A username another account has is a 409 username_taken, and one that is too short, too long, reserved or not lowercase letters, numbers and single dots is a 422 invalid_parameter on username. 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 was chosen before and never changes. username_taken: another account has it.

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
nextmail.account.setUsername()
Python
account.set_username()
Ruby
account.set_username
PHP
account->setUsername
Go
Account.SetUsername
Java
account().setUsername
C#
Account.SetUsernameAsync
CLI
nextmail account set-username
MCP
chooseUsername

GET/account/username/availability

Check a username

Scopesaccount:readReads

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

usernamestringRequired

The 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

TypeScript
nextmail.account.checkUsername()
Python
account.check_username()
Ruby
account.check_username
PHP
account->checkUsername
Go
Account.CheckUsername
Java
account().checkUsername
C#
Account.CheckUsernameAsync
CLI
nextmail account check-username
MCP
checkUsername

GET/account/connected-apps

List your connected apps

Scopesaccount:readReads

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

TypeScript
nextmail.account.listConnectedApps()
Python
account.list_connected_apps()
Ruby
account.list_connected_apps
PHP
account->listConnectedApps
Go
Account.ListConnectedApps
Java
account().listConnectedApps
C#
Account.ListConnectedAppsAsync
CLI
nextmail account list-connected-apps
MCP
listConnectedApps

DELETE/account/connected-apps/{clientId}

Remove a connected app

Scopesaccount:writeDeletes

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

clientIdstringRequired

The app's clientId from GET /account/connected-apps.

Returns

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
nextmail.account.revokeConnectedApp()
Python
account.revoke_connected_app()
Ruby
account.revoke_connected_app
PHP
account->revokeConnectedApp
Go
Account.RevokeConnectedApp
Java
account().revokeConnectedApp
C#
Account.RevokeConnectedAppAsync
CLI
nextmail account revoke-connected-app
MCP
revokeConnectedApp

GET/account/connected-apps/{clientId}/requests

Read the request log of a connected app

Scopesaccount:readReads

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

clientIdstringRequired

The app's clientId from GET /account/connected-apps.

Query parameters

failedOnlyboolean

True keeps the calls answered with a status of 400 or more.

statusstring

Keeps 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 422 invalid_parameter.

sincestring

Keeps the calls made at or after this instant.

Formatdate-time
untilstring

Keeps the calls made before this instant.

Formatdate-time
limitinteger

Rows per page, 1 to 100.

At least 1At most 100Default25
cursorstring

The 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 400 invalid_cursor.

Returns

A page of the log.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
nextmail.account.listConnectedAppRequests()nextmail.account.listAllConnectedAppRequests()nextmail.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

Scopesaccount:readReads

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

TypeScript
nextmail.account.listInvitations()
Python
account.list_invitations()
Ruby
account.list_invitations
PHP
account->listInvitations
Go
Account.ListInvitations
Java
account().listInvitations
C#
Account.ListInvitationsAsync
CLI
nextmail account list-invitations
MCP
listReceivedInvitations

POST/account/invitations/{invitationId}/accept

Accept an invitation

Scopesaccount:writeChanges data

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

invitationIdstringRequired

The invitation id from GET /account/invitations.

Request body

activateboolean

Returns

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

TypeScript
nextmail.account.acceptInvitation()
Python
account.accept_invitation()
Ruby
account.accept_invitation
PHP
account->acceptInvitation
Go
Account.AcceptInvitation
Java
account().acceptInvitation
C#
Account.AcceptInvitationAsync
CLI
nextmail account accept-invitation
MCP
acceptInvitation

POST/account/invitations/{invitationId}/decline

Decline an invitation

Scopesaccount:writeDeletes

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

invitationIdstringRequired

The invitation id from GET /account/invitations.

Returns

Declined.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
nextmail.account.declineInvitation()
Python
account.decline_invitation()
Ruby
account.decline_invitation
PHP
account->declineInvitation
Go
Account.DeclineInvitation
Java
account().declineInvitation
C#
Account.DeclineInvitationAsync
CLI
nextmail account decline-invitation
MCP
declineInvitation

GET/account/sessions

List your signed-in devices

Scopesaccount:readReads

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

TypeScript
nextmail.account.listSessions()
Python
account.list_sessions()
Ruby
account.list_sessions
PHP
account->listSessions
Go
Account.ListSessions
Java
account().listSessions
C#
Account.ListSessionsAsync
CLI
nextmail account list-sessions
MCP
listSessions

DELETE/account/sessions

Sign out everywhere

Scopesaccount:writeDeletes

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

connectedAppsboolean

Also 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

TypeScript
nextmail.account.revokeSessions()
Python
account.revoke_sessions()
Ruby
account.revoke_sessions
PHP
account->revokeSessions
Go
Account.RevokeSessions
Java
account().revokeSessions
C#
Account.RevokeSessionsAsync
CLI
nextmail account revoke-sessions
MCP
revokeOtherSessions

DELETE/account/sessions/{sessionId}

Sign out one device

Scopesaccount:writeDeletes

Signs one browser or phone out. Its next request is refused at once, and a phone stops getting notifications. A device that is not signed in to the account is a 404.

Requires the account:write scope.

Path parameters

sessionIdstringRequired

The device's id from GET /account/sessions.

Returns

Signed out.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
nextmail.account.revokeSession()
Python
account.revoke_session()
Ruby
account.revoke_session
PHP
account->revokeSession
Go
Account.RevokeSession
Java
account().revokeSession
C#
Account.RevokeSessionAsync
CLI
nextmail account revoke-session
MCP
revokeSession

GET/account/security-events

Read your security log

Scopesaccount:readReads

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

limitinteger

Rows per page, 1 to 100.

At least 1At most 100Default25
cursorstring

The 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 400 invalid_cursor.

Returns

A page of the log.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
nextmail.account.listSecurityEvents()nextmail.account.listAllSecurityEvents()nextmail.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

Scopesaccount:readReads

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

TypeScript
nextmail.account.listPasskeys()
Python
account.list_passkeys()
Ruby
account.list_passkeys
PHP
account->listPasskeys
Go
Account.ListPasskeys
Java
account().listPasskeys
C#
Account.ListPasskeysAsync
CLI
nextmail account list-passkeys
MCP
listPasskeys

PATCH/account/passkeys/{passkeyId}

Rename a passkey

Scopesaccount:writeChanges data

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

passkeyIdstringRequired

The passkey's id from GET /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

TypeScript
nextmail.account.renamePasskey()
Python
account.rename_passkey()
Ruby
account.rename_passkey
PHP
account->renamePasskey
Go
Account.RenamePasskey
Java
account().renamePasskey
C#
Account.RenamePasskeyAsync
CLI
nextmail account rename-passkey
MCP
renamePasskey

DELETE/account/passkeys/{passkeyId}

Remove a passkey

Scopesaccount:writeDeletes

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

passkeyIdstringRequired

The passkey's id from GET /account/passkeys.

Returns

Removed.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
nextmail.account.removePasskey()
Python
account.remove_passkey()
Ruby
account.remove_passkey
PHP
account->removePasskey
Go
Account.RemovePasskey
Java
account().removePasskey
C#
Account.RemovePasskeyAsync
CLI
nextmail account remove-passkey
MCP
removePasskey

Objects

AcceptedInvitationobject

objectstringRequired
One of"invitation"
idstringRequired
acceptedbooleanRequired
One oftrue
workspaceIdstringRequired
workspaceNamestringRequired
addressesGrantedintegerRequired
At least 0
domainsGrantedintegerRequired
At least 0
activatedbooleanRequired

Whether the app now opens the workspace, after activate: true.

AccountPhotoobject

objectstringRequired
One of"account_photo"
urlstringRequired
Can be null

ConnectedAppobject

objectstringRequired
One of"connected_app"
clientIdstringRequired
namestringRequired
Can be null
kindstringRequired

cli for a sign-in of the command line tool, app for every other app.

One of"app""cli"
cliDevicestring
Can be null
currentbooleanRequired

Whether it is the app making this call.

registeredByAccountboolean
redirectUrisstring[]
connectedAtstring
Can be nullFormatdate-time
accessUntilstring

When its last token runs out.

Can be nullFormatdate-time
tokenCountintegerRequired
At least 0
statusstringRequired
One of"active""expired""needs-approval""access-lost"
usablePermissionsinteger

How many of the permissions it was given the person still holds.

Can be null
elevatedUntilstring

Until when it may make changes that ask for a verification code without one.

Can be nullFormatdate-time
grantobject

What the person gave it, or null for an app that has to ask again.

Can be null
workspaceIdstringRequired

The one workspace the app acts for.

workspaceNamestringRequired
Can be null
permissionsstring[]Required
addressAllowliststring[]Required
Can be null
domainAllowliststring[]Required
Can be null
expiresAtstringRequired

When the access ends, or null when it lasts until it is removed.

Can be nullFormatdate-time
updatedAtstringRequired
Formatdate-time

ConnectedAppRequestobject

objectstringRequired
One of"connected_app_request"
idstringRequired
clientIdstringRequired
workspaceIdstringRequired

The workspace the call acted on.

requestIdstringRequired

The X-Request-Id the call was answered with.

Can be null
methodstringRequired
pathstringRequired

The path that was called, without its query string.

statusintegerRequired
errorCodestringRequired

The code of the error the call was answered with, or null.

Can be null
durationMsintegerRequired
At least 0
userAgentstringRequired
Can be null
createdAtstringRequired
Formatdate-time

ConnectedAppRequestListobject

objectstring
One of"list"
hasMoreboolean

True when another page follows. Pass nextCursor back as cursor to read it.

nextCursorstring

An opaque cursor for the next page, or null on the last page. Pass it back unchanged.

Can be null

DeclinedInvitationobject

objectstringRequired
One of"invitation"
idstringRequired
declinedbooleanRequired
One oftrue

EmailNotificationSettingobject

categorystringRequired
One of"account""billing""activity""product"
labelstringRequired
descriptionstringRequired
requiredbooleanRequired

Whether it can never be turned off.

enabledbooleanRequired

NotificationSettingsobject

objectstringRequired
One of"notification_settings"
emailEmailNotificationSetting[]Required

Every kind of email Nextmail sends.

mutedWorkspacesstring[]Required

The workspaces whose notifications are muted on the phone.

Passkeyobject

objectstringRequired
One of"passkey"
idstringRequired
namestringRequired
syncedbooleanRequired

Whether it is backed up and shared between the person's devices.

transportsstring[]Required

How the device that holds it is reached, such as internal or usb.

One of"internal""hybrid""usb""nfc""ble""smart-card""cable"
createdAtstringRequired
Formatdate-time
lastUsedAtstringRequired

When it last signed in or confirmed a change.

Can be nullFormatdate-time

PasskeyListobject

objectstring
One of"list"

ReceivedInvitationobject

objectstringRequired
One of"invitation"
idstringRequired
workspaceIdstringRequired
workspaceNamestringRequired
roleNamestringRequired
inviterNamestring
Can be null
addressesintegerRequired

How many addresses and whole domains it gives.

At least 0
expiresAtstringRequired
Formatdate-time
createdAtstringRequired
Formatdate-time

RemovedPasskeyobject

objectstringRequired
One of"passkey"
idstringRequired
removedbooleanRequired
One oftrue

RevokedConnectedAppobject

objectstringRequired
One of"connected_app"
clientIdstringRequired
revokedbooleanRequired
One oftrue
tokensRevokedintegerRequired
At least 0

RevokedSessionobject

objectstringRequired
One of"session"
idstringRequired
revokedbooleanRequired
One oftrue

SecurityEventobject

objectstringRequired
One of"security_event"
idstringRequired
scopestringRequired

account for the person's own log, workspace for 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""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""directory-sync-connected""directory-sync-disconnected""directory-sync-token-rotated""directory-sync-changed""connector-connected""connector-disconnected""connector-changed""ownership-offered""ownership-transferred"
atstringRequired
Formatdate-time
actorobjectRequired

Who made a workspace change, or null for the person's own log.

Can be null
namestringRequired
Can be null
emailstringRequired
Can be null
memberobjectRequired

The person a workspace change was about.

Can be null
namestringRequired
Can be null
emailstringRequired
Can be null
deviceobjectRequired

The device it happened on, when one was known.

Can be null
kindstringRequired

browser, app for the Nextmail phone app, or unknown.

One of"browser""app""unknown"
browserstringRequired

Such as Chrome.

Can be null
osstringRequired

Such as macOS or iOS.

Can be null
namestringRequired

The name of the phone, when the phone app reported one.

Can be null
appVersionstringRequired
Can be null
authMethodstringRequired

How a sign-in was made.

Can be nullOne of"password""totp""backup-code""passkey""email-link""handoff"
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.

byKeyboolean

True when an API key made the change.

byDirectoryboolean

True when directory sync made the change.

rolestring
Can be null
previousRolestring
Can be null
passkeystring

The name of the passkey.

Can be null
devicestring

The device that was signed out, as an English label.

Can be null
deviceInfoobject

The same device in parts, so a client can word it itself. Absent on entries recorded before it was added.

Can be null
kindstringRequired

browser, app for the Nextmail phone app, or unknown.

One of"browser""app""unknown"
browserstringRequired

Such as Chrome.

Can be null
osstringRequired

Such as macOS or iOS.

Can be null
namestringRequired

The name of the phone, when the phone app reported one.

Can be null
appVersionstringRequired
Can be null
sessionsinteger

How many devices were signed out.

appsinteger

How many connected apps were removed.

newDeviceboolean

True for a sign-in from a device not seen before.

addressstring
Can be null
requiredboolean
enabledboolean
connectorstring

The name of the app a connector entry is about.

Can be null
accessstring

What the connector lets the assistant do, read or full.

Can be null
pausedboolean

Whether the connector is paused.

SecurityEventListobject

objectstring
One of"list"
hasMoreboolean

True when another page follows. Pass nextCursor back as cursor to read it.

nextCursorstring

An opaque cursor for the next page, or null on the last page. Pass it back unchanged.

Can be null

Sessionobject

objectstringRequired
One of"session"
idstringRequired
currentbooleanRequired

Whether it is the device making the call. Always false for a key or an app.

deviceSessionDeviceRequired
authMethodstringRequired

How 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"
countrystringRequired

The two-letter country it was last used from.

Can be null
citystringRequired
Can be null
createdAtstringRequired

When it signed in.

Formatdate-time
lastActiveAtstringRequired

When it was last used, to within ten minutes.

Formatdate-time
expiresAtstringRequired

When it is signed out by itself.

Formatdate-time

SessionDeviceobject

kindstringRequired

browser, app for the Nextmail phone app, or unknown.

One of"browser""app""unknown"
browserstringRequired

Such as Chrome.

Can be null
osstringRequired

Such as macOS or iOS.

Can be null
namestringRequired

The name of the phone, when the phone app reported one.

Can be null
appVersionstringRequired
Can be null

SessionListobject

objectstring
One of"list"

SessionSweepobject

objectstringRequired
One of"session_sweep"
sessionsRevokedintegerRequired
At least 0
appsRevokedintegerRequired
At least 0

Usernameobject

objectstringRequired
One of"username"
usernamestringRequired
Can be null
chosenbooleanRequired

Whether the person chose it. A chosen username never changes.

addressstringRequired

The free address that comes with the username, or null when there is none.

Can be null

UsernameAvailabilityobject

objectstringRequired
One of"username_availability"
usernamestringRequired

The username as it was checked.

statusstringRequired

current when it is the username the person already has.

One of"available""current""taken""reserved""invalid""too_short""too_long"
availablebooleanRequired
messagestringRequired