nextmail workspaces
Every command in this namespace, with its arguments, flags and examples.
Commands
The workspaces the person behind the key or the app can open: list them, create one, choose the one the app opens, offer the workspace the app belongs to to one of its members, and delete it. An API key acts for the workspace owner, and an app for the person who connected it.
Every command here also takes the global flags, such as --json, --profile and --dry-run. See the global flags
nextmail workspaces list
List your workspaces
lsUsage
nextmail workspaces list [flags]
Resolves every workspace the person behind the client can open, the ones they own first, as the workspace switcher of the app lists them. It is about the person, not the workspace the key belongs to. An API key answers for the workspace owner, and an app for the person who connected it.
activeWorkspaceId is the workspace the app opens for them, and primaryWorkspaceId the first one they made, which can never be deleted.
Examples
nextmail workspaces listnextmail workspaces list --jsonAlso available in
- API
GET /workspaces- TypeScript
workspaces.list()- Python
workspaces.list()- Ruby
workspaces.list- PHP
workspaces->list- Go
Workspaces.List- Java
workspaces().list- C#
Workspaces.ListAsync
nextmail workspaces create
Create a workspace
newaddUsage
nextmail workspaces create --name <value> [flags] nextmail workspaces create --data <json|@file|-> [flags]
Makes a new workspace owned by the person, on the Starter plan, and makes it the workspace the app opens for them, as creating one in the app does. The key or the app making the call keeps acting for its own workspace.
An account can own one workspace on the Starter plan. While it owns one, the call is refused with 403 workspace_allowance_reached and the message names that workspace: upgrade it first.
Pass --idempotency-key to make a retry safe. A retry with the same key and the same body resolves with the workspace the first call made and replayed: true, and makes nothing new. The same key with a different body is a 422 idempotency_key_reuse. keys.create with workspaceId then gives the new workspace a key of its own.
Flags
--name <value>Up to 64 characters. Leading and trailing spaces are trimmed. Required, here or in
--data.--idempotency-key <value>Makes a retry safe: the same key with the same body resolves with the workspace the first call made and
replayed: true. 1 to 255 letters, digits,_,.,:or-, and the same key with a different body is a 422idempotency_key_reuse.--data <json|@file|->The whole
bodyas JSON, inline, from a file with @path, or - for standard input. Flags override its keys.
Examples
nextmail workspaces create --name 'Acme Support'nextmail workspaces create --data @workspace.jsonAlso available in
nextmail workspaces get-active
Read the workspace the app opens
Usage
nextmail workspaces get-active [flags]
Resolves the workspace the app opens for the person when they sign in, or the one it falls back to when they never chose one. It is not the workspace the key or the app acts on, which never changes.
Examples
nextmail workspaces get-activenextmail workspaces get-active --jsonAlso available in
nextmail workspaces set-active
Choose the workspace the app opens
Usage
nextmail workspaces set-active <workspace-id> [flags]
Switches the workspace the app opens for the person, as the workspace switcher does, to any workspace they can open. It changes nothing for the key or the app making the call, which keeps acting for its own workspace.
Arguments
<workspace-id>RequiredA workspace id from
list.
Examples
nextmail workspaces set-active 10417196-e324-4283-af98-66ec62167c47nextmail workspaces set-active 10417196-e324-4283-af98-66ec62167c47 --jsonAlso available in
nextmail workspaces delete
Delete a workspace
rmdelremoveUsage
nextmail workspaces delete <id> --confirm <value> [flags]
Deletes a workspace the account owns, with its domains, addresses, mail and members, and cancels its plan. It cannot be undone. id is the workspace the key or the app belongs to, or another one the account owns, such as one create made. --confirm has to be the name of the workspace, as list shows it, the same way the app asks the person to type it.
Only the owner may do it. An access token acting for a member is refused with 403 owner_only, and a key or an app limited to particular addresses or domains with 422 capability_unsupported. Another workspace takes a key with no role and no address or domain limit, made by the owner it acts for, or an app the owner connected with every address, or the call is 403 beyond_caller_authority on id. That workspace keeps its own rules: one that requires two-factor sign-in while the owner has neither an authenticator app nor a passkey is 403 two_factor_required, a suspended one 403 workspace_suspended, and a workspace the account does not own a 404. The first workspace an account made is refused with 409 first_workspace, and one with a domain being moved in or out with 409 domain_moving.
Arguments
<id>RequiredThe workspace to delete: the one the key or the app belongs to, which
me.getreports asworkspaceId, or another one the account owns, by the idlistorcreatereturns.
Flags
--confirm <value>The name of the workspace. Letter case and the spaces around it do not matter. Sent as a query parameter. Required.
Examples
nextmail workspaces delete workspace_4c1b257a --confirm examplenextmail workspaces delete workspace_4c1b257a --confirm example --yesAlso available in
nextmail workspaces get-ownership-offer
Read the offer to hand the workspace over
Usage
nextmail workspaces get-ownership-offer <id> [flags]
Resolves the offer the owner made to hand the workspace to one of its members, while it waits: who it went to, when it was made, and when it ends unanswered, 7 days after it was made.
The app shows the offer to the owner alone, so it is a 404 ownership_offer_not_found when no offer is waiting and for anybody but the owner.
Arguments
<id>RequiredThe id of the workspace the key or the app belongs to, which
me.getreports asworkspaceId. Any other id is a 404.
Examples
nextmail workspaces get-ownership-offer workspace_4c1b257anextmail workspaces get-ownership-offer workspace_4c1b257a --jsonAlso available in
nextmail workspaces offer-ownership
Offer the workspace to a member
Usage
nextmail workspaces offer-ownership <id> <user-id> [flags]
Offers the workspace to one of its members, so they can become its owner and take over its plan and billing, as the owner can in the app. They are told by email and have 7 days to accept with account.acceptOwnershipOffer. Nothing changes until they do, and the owner then stays in the workspace as an admin.
A new offer replaces one that is waiting, and the person that one went to is told. The member has to have confirmed their email address and may not be a password sign-in for one address.
Only the workspace owner may make it, through an app they connected: an API key is refused with 403 console_only, an access token acting for a member with 403 owner_only, and an app limited to particular addresses or domains with 422 capability_unsupported, because the owner holds every address.
Arguments
<id>RequiredThe id of the workspace the key or the app belongs to, which
me.getreports asworkspaceId. Any other id is a 404.<user-id>RequiredThe account id of the member who would become the owner, as
members.listnames it, not the email address.
Examples
nextmail workspaces offer-ownership workspace_4c1b257a q7Vd3kX9mT2pLw8RzN4bYc6HfJ1sGa5Enextmail workspaces offer-ownership workspace_4c1b257a q7Vd3kX9mT2pLw8RzN4bYc6HfJ1sGa5E --jsonAlso available in
nextmail workspaces withdraw-ownership-offer
Withdraw the offer to hand the workspace over
Usage
nextmail workspaces withdraw-ownership-offer <id> [flags]
Withdraws the offer before it is answered, and the person it went to is told. withdrawn is false when no offer was waiting, and then nothing changes.
Only the workspace owner may withdraw it, through an app they connected: an API key is refused with 403 console_only, an access token acting for a member with 403 owner_only, and an app limited to particular addresses or domains with 422 capability_unsupported, because the owner holds every address.
Arguments
<id>RequiredThe id of the workspace the key or the app belongs to, which
me.getreports asworkspaceId. Any other id is a 404.
Examples
nextmail workspaces withdraw-ownership-offer workspace_4c1b257anextmail workspaces withdraw-ownership-offer workspace_4c1b257a --yesAlso available in
- API
DELETE /workspaces/{id}/ownership-offer- TypeScript
workspaces.withdrawOwnershipOffer()- Python
workspaces.withdraw_ownership_offer()- Ruby
workspaces.withdraw_ownership_offer- PHP
workspaces->withdrawOwnershipOffer- Go
Workspaces.WithdrawOwnershipOffer- Java
workspaces().withdrawOwnershipOffer- C#
Workspaces.WithdrawOwnershipOfferAsync