Skip to the documentation
CLI

nextmail chats

Every command in this namespace, with its arguments, flags and examples.

Commands

The conversations held with the assistant in the app: list and search them, read one, rename it and delete it. Each person reaches only their own.

Every command here also takes the global flags, such as --json, --profile and --dry-run. See the global flags

nextmail chats list

List the assistant chats

Scopesthreads:readNeeds a sign-inAliasesls

Usage

nextmail chats list [flags]

Resolves one page of the conversations held with the assistant in the app, newest first, as its Chats page lists them, each with its title, how many messages it holds and when it last changed.

Each person reaches only their own chats: an API key reaches the chats of the workspace owner, and an access token reaches the chats of the person who connected it. A key or token limited to particular addresses or domains is 422 capability_unsupported.

Add --all to walk every page: a table on a terminal, one JSON object per line when piped or with --ndjson, and one { items, hasMore, nextCursor } document with --json. --max <n> stops after that many items.

Flags

--q <value>

Searches the titles.

--sort <value>

newest (the default) or oldest by the last change, or title. A cursor carries on in the order it was handed out in.

Default"newest"
--limit <n>

Page size, from 1 to 100. The server defaults to 25.

Default25
--cursor <value>

The nextCursor of the previous page. Leave it out for the first page.

--all

Fetch every page and stream the items as they arrive.

--max <n>

Stop after this many items. Implies --all.

--ndjson

Print every item as one JSON object per line. Implies --all

Examples

nextmail chats list
With optional flags
nextmail chats list --q invoices
Walk every page and stop after 100 items
nextmail chats list --all --max 100
One JSON object per line when piped
nextmail chats list --all > chats.ndjson

Also available in

API
GET /chats
TypeScript
nextmail.chats.list()
Python
chats.list()
Ruby
chats.list
PHP
chats->list
Go
Chats.List
Java
chats().list
C#
Chats.ListAsync

nextmail chats get

Retrieve a chat

Scopesthreads:readNeeds a sign-inAliasesshowview

Usage

nextmail chats get <id> [flags]

Resolves one chat with the assistant by its id: its title, how many messages it holds and when it last changed.

Each person reaches only their own chats: an API key reaches the chats of the workspace owner, and an access token reaches the chats of the person who connected it. A key or token limited to particular addresses or domains is 422 capability_unsupported.

Arguments

<id>Required

The chat id from list.

Examples

nextmail chats get 8f3c2a71-5e9d-4b06-a1c4-7d2e9f0b3a65
Print the raw JSON
nextmail chats get 8f3c2a71-5e9d-4b06-a1c4-7d2e9f0b3a65 --json

Also available in

API
GET /chats/{id}
TypeScript
nextmail.chats.get()
Python
chats.get()
Ruby
chats.get
PHP
chats->get
Go
Chats.Get
Java
chats().get
C#
Chats.GetAsync

nextmail chats rename

Rename a chat

Scopesthreads:writeNeeds a sign-in

Usage

nextmail chats rename <id> <title> [flags]

Gives a chat with the assistant a new title, up to 120 characters, and resolves with the chat as it is now.

Each person reaches only their own chats: an API key reaches the chats of the workspace owner, and an access token reaches the chats of the person who connected it. A key or token limited to particular addresses or domains is 422 capability_unsupported.

Arguments

<id>Required

The chat id from list.

<title>Required

The new title, from 1 to 120 characters.

Examples

nextmail chats rename 8f3c2a71-5e9d-4b06-a1c4-7d2e9f0b3a65 'Quarterly invoices'
Print the raw JSON
nextmail chats rename 8f3c2a71-5e9d-4b06-a1c4-7d2e9f0b3a65 'Quarterly invoices' --json

Also available in

API
PATCH /chats/{id}
TypeScript
nextmail.chats.rename()
Python
chats.rename()
Ruby
chats.rename
PHP
chats->rename
Go
Chats.Rename
Java
chats().rename
C#
Chats.RenameAsync

nextmail chats delete

Delete a chat

Scopesthreads:writeNeeds a sign-in
Asks you to confirm
Aliasesrmdelremove

Usage

nextmail chats delete <id> [flags]

Deletes a chat with the assistant and every message in it, for good. Nothing the assistant did in the mailbox is undone.

Each person reaches only their own chats: an API key reaches the chats of the workspace owner, and an access token reaches the chats of the person who connected it. A key or token limited to particular addresses or domains is 422 capability_unsupported.

Arguments

<id>Required

The chat id from list.

Examples

nextmail chats delete 8f3c2a71-5e9d-4b06-a1c4-7d2e9f0b3a65
Skip the confirmation, for scripts
nextmail chats delete 8f3c2a71-5e9d-4b06-a1c4-7d2e9f0b3a65 --yes

Also available in

API
DELETE /chats/{id}
TypeScript
nextmail.chats.delete()
Python
chats.delete()
Ruby
chats.delete
PHP
chats->delete
Go
Chats.Delete
Java
chats().delete
C#
Chats.DeleteAsync