Skip to the documentation
CLI

nextmail signups

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

Commands

An agent creates an account for a person with no credential at all: it starts a sign-up for their address, the person reads it the six-digit code emailed to them, and finishing the sign-up returns an API key for the new account.

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

nextmail signups create

Start creating an account for a person

No sign-in neededAliasesnewadd

Usage

nextmail signups create --email <value> [flags]
nextmail signups create --data <json|@file|-> [flags]

Starts a sign-up for an address and emails it a six-digit code that works once and runs out after 10 minutes. It needs no credential. Ask the person for the code, then finish with verify, which creates the account and returns its API key.

An address that cannot receive mail, or one on a disposable domain, is 422 sign_up_address_refused and nothing is sent. When the address already has an account, no code is sent: that person is emailed how to connect an agent to the account they have, and this call resolves exactly as it would for a new address, so it never reveals who has an account.

One network may start 3 sign-ups an hour, counted together with sign-ups made in the apps, and one address 5 an hour. The next is 429 sign_up_rate_limited with Retry-After. When the email cannot be sent it is 503 sign_up_undeliverable and no sign-up is waiting.

Flags

--email <value>

The address the account signs in with. The code goes there, so it has to be one the person reads. Required, here or in --data.

--name <value>

The name of the person the account is for. The address stands in when it is left out.

--agent <value>

Who is asking, such as Claude Code. The emails name it, and the key is named after it.

--scopes <a,b>Repeatable

What the key may do. Every scope when it is left out.

--data <json|@file|->

The whole body as JSON, inline, from a file with @path, or - for standard input. Flags override its keys.

Examples

The required values only
nextmail signups create --email [email protected]
With optional flags
nextmail signups create --email [email protected] --name 'Ada Lovelace' --agent 'Claude Code'
Read the whole body from a JSON file
nextmail signups create --data @signups.json

Also available in

API
POST /signups
TypeScript
signups.create()
Python
signups.create()
Ruby
signups.create
PHP
signups->create
Go
Signups.Create
Java
signups().create
C#
Signups.CreateAsync

nextmail signups verify

Finish a sign-up with the code and get the key

No sign-in needed

Usage

nextmail signups verify <sign-up-id> <code> [flags]

Sends the six-digit code the person read from their email. A right code creates the account, its workspace and its free address, and issues an API key that acts for the new owner. It needs no credential and resolves with one: apiKey.token is shown here and nowhere else, so store it before anything else. The person gets a welcome email with a link to set a password, and sees the key under Settings, API keys.

A sign-up takes 5 codes. A wrong one is 400 sign_up_code_invalid with the tries left in the message, and the last wrong one cancels the sign-up with 429 sign_up_locked. A code that ran out, was used already or belongs to no sign-up is 400 sign_up_code_expired, and an address that got an account while the code was waiting is 409 sign_up_address_taken.

Arguments

<sign-up-id>Required

The id create resolved with.

<code>Required

The six digits from the email the person received.

Examples

nextmail signups verify sign-up_4c1b257a 123456
Print the raw JSON
nextmail signups verify sign-up_4c1b257a 123456 --json

Also available in

API
POST /signups/{id}/verify
TypeScript
signups.verify()
Python
signups.verify()
Ruby
signups.verify
PHP
signups->verify
Go
Signups.Verify
Java
signups().verify
C#
Signups.VerifyAsync