Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CLI

idvy is the command-line client for Pylota Identity. It sets up and deploys a deployment on your Cloudflare account, checks its health, administers tenants, identities, domains, members, keys and webhooks, sends, reads and searches mail, and signs as an identity. Every command can print JSON (--json), so scripts and agents can use it as well as people.

The behaviour behind each command is specified in the CLI and setup design.

Install

Download a prebuilt binary from the project’s GitHub Releases (macOS arm64 and x64, Linux x64 and arm64, Windows x64), or build it with Cargo (the crate is published by the maintainer from the same signed tag, never from CI):

cargo install pylota-identity-cli --locked

Each release lists every file’s SHA-256 in SHA256SUMS, signed in SHA256SUMS.sig, and carries GitHub build provenance you can check with gh attestation verify <file> -R PILOTAAI/pylota-identity.

idvy --version

The CLI’s version decides which Worker release idvy deploy installs, so keep the CLI and the deployment on the same version.

Configuration

idvy reads profiles from ~/.config/pylota-identity/config.toml ($XDG_CONFIG_HOME/pylota-identity/config.toml when XDG_CONFIG_HOME is set; %APPDATA%\pylota-identity\config.toml on Windows):

default_profile = "prod"

[profiles.prod]
url = "https://mail.example.com"
key = "pmk_live_…"                 # or key_env = "…", or key_command = "…"
identity = "bookings.acme@agents.example"   # default --identity for mail commands

[profiles.staging]
url = "https://mail-staging.example.com"
key_env = "PYLOTA_IDENTITY_STAGING_KEY"
Profile keyMeaning
urlThe API host, for example https://mail.example.com
keyAn API key (pmk_live_… or pmk_test_…)
key_envThe name of an environment variable that holds the key
key_commandA command whose output is the key, for example op read op://vault/pylota-identity/key. It runs once per invocation, with a 10-second timeout
identityThe default identity for mail commands (an ID or an address)
tenantThe default tenant for platform and partner keys (an ID or a slug). jobs start ignores it and needs --tenant
account_idYour Cloudflare account ID, written by idvy setup. Not a secret; the Cloudflare API token is never stored

Use only one of key, key_env and key_command in a profile. Unknown keys are an error.

Precedence, highest first: command-line flags (--url, --key, --profile, --account-id), then the environment (PYLOTA_IDENTITY_URL, PYLOTA_IDENTITY_KEY, PYLOTA_IDENTITY_PROFILE, CLOUDFLARE_ACCOUNT_ID), then the profile. Without --profile or PYLOTA_IDENTITY_PROFILE, the profile read is default_profile, else one named default. A key in PYLOTA_IDENTITY_KEY therefore overrides the key saved in any profile.

Which profile setup and login write. idvy setup and idvy login store a key, so they write the profile named by --profile, default default; PYLOTA_IDENTITY_PROFILE and default_profile do not change it.

File permissions. idvy creates the file with mode 0600 (its directory 0700) and refuses to read it (exit 3) if its group or other users have any access to it, or if another user owns it. Fix that with chmod 600 on the file.

Keys on the command line. --key works, but other users of the machine can see command lines. Prefer PYLOTA_IDENTITY_KEY or a profile; idvy prints a warning when you use --key.

Cloudflare credentials. Some commands use your Cloudflare API token; they are listed in Commands that use your Cloudflare token.

AWS credentials. setup ses, destroy --include-ses and the doctor’s ses check use your local AWS credentials from the standard AWS sources: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_SESSION_TOKEN in the environment, else the profile named by AWS_PROFILE (else default) in ~/.aws/credentials and ~/.aws/config (which other sources are supported, and in what order: verify at build time). They are never stored by idvy or uploaded to the Worker.

The settings are also listed in Configuration › CLI configuration.

Commands that use your Cloudflare token

These commands call the Cloudflare API or Wrangler with CLOUDFLARE_API_TOKEN. This is the one list; other pages link here.

CommandWhat it does with the token
setupCreates and reads every Cloudflare resource, deploys the Worker, uploads its secrets, and runs the D1 queries of setup (migrations, the bootstrap key, the platform domain row, the system identity)
setup sesUploads the Worker’s SES key as Worker secrets, deploys, and writes the platform domain’s SES DKIM records into its zone
deploy, upgradeApplies D1 migrations, deploys with Wrangler, and manages Vectorize index generations
doctorThe Cloudflare checks: DNS, routing, sending, event subscriptions, bindings, secret names, dead-letter items, quota and the zone count
destroyDisables routing, tears down the platform domain, deletes the Worker, the storage and the D1 database
secrets rotate-masterWrites the new master key into the free slot and switches the Worker to it (the re-seal is followed through the API)
ops freeze, ops unfreezeChanges PM_FREEZE and redeploys the deployed version
ops restore d1Exports, restores (D1 Time Travel) and re-applies changes to the D1 database
domains add --local-tokenOnboards a zone apex itself, when the deployment has no PM_CF_API_TOKEN, and registers it in D1
domains subscribeCreates a domain’s Email Sending event subscription and records it in D1
  • The token comes from the environment only. There is no flag for it, so it never appears in the process list, and idvy never writes it to the config file.
  • They also need the account ID: --account-id, else CLOUDFLARE_ACCOUNT_ID, else the profile’s account_id (which setup stores), else PM_CF_ACCOUNT_ID in deploy/wrangler.toml.
  • The permissions the token needs, and those of the Worker’s own PM_CF_API_TOKEN, are in one table: Deploy to Cloudflare › Create a Cloudflare API token. The first setup creates the Worker and its Custom Domains, so it needs a short-lived first-run token (Workers Admin at product scope); every later command works with a deploy token that holds Workers Editor on the Worker pylota-identity only, and destroy needs Workers Admin on that Worker.
  • Every other command needs only an API key, including the platform operations (dlq, keys rotate thread|link|cursor|web_bot_auth, jobs, waitlist invite, ops status, ops switch, ops restore mailbox|reconcile). assertions verify and webhooks verify need neither a key nor a token.

Global flags

These work with every command.

FlagEnvironmentMeaning
--url <url>PYLOTA_IDENTITY_URLAPI host. https:// is required except for localhost, 127.0.0.1 and [::1]
--key <key>PYLOTA_IDENTITY_KEYAPI key
--profile <name>PYLOTA_IDENTITY_PROFILEProfile in the config file
--account-id <id>CLOUDFLARE_ACCOUNT_IDCloudflare account ID, for the commands that use your Cloudflare token. Falls back to the profile’s account_id
--json–Print exactly one JSON document on stdout: the API response, or the command’s result, or the error envelope. The exceptions are ask --json --stream and events tail --json, which print NDJSON, one JSON document per line. Turns off every prompt
--query <expr>–A JMESPath expression applied to the JSON success document; implies --json. Never applied to errors; never changes the exit code
--schema–Print the command’s input, output and error schemas and exit codes as JSON, then exit. Needs no configuration, key or network
--quiet–Print only the essential value (a new ID, a secret, hit IDs) and errors
--yes–Answer yes to confirmations (not to destroy’s typed confirmation)
--verbose–Log each HTTP request’s method, path, status and duration to stderr (never bodies or keys)
--help–Help for any command
--version–The CLI’s version (at the top level only; deploy --version is a different flag)

Colour is used only when stdout is a terminal, and never when NO_COLOR is set.

Output

  • Human (the default): single objects print as indented JSON; lists print as tables; operator commands print one line per step.
  • --json: exactly one JSON document, the API’s response body unchanged. Lists print { "data": [ … ], "next_cursor": … }; add --all to follow every page into one document. The exceptions are ask --json --stream (ask) and events tail --json (events tail), which print NDJSON.
  • --query <expr>: a JMESPath expression applied to the success document, after --all has assembled every page, and to each line of ask --json --stream. The result is printed as one JSON document; with --quiet, a string result is printed without quotes. An invalid expression is exit 2 before any request. An error document is never filtered, and the exit code is the command’s, not the query’s: an empty or null result exits 0.
  • --schema: idvy <command> --schema prints one JSON document describing the command (its endpoint, idempotency, input from its flags, output and error schemas, and its exit codes) and exits 0, reading no configuration and making no request. idvy --schema prints the index of every command.
idvy messages list --identity bookings@acme.example.com --all \
  --query "data[?triage.needs_reply > \`0.7\`].{id: id, from: from.address}"
idvy send --schema
  • --quiet: one value per line, for scripts.

Text that comes from email (subjects, names, snippets, bodies, filenames, answers) is untrusted. In human and quiet modes idvy neutralises terminal control sequences and shows hidden bidirectional and zero-width characters as markers such as <U+202E>, so a message cannot rewrite your terminal. JSON output keeps the text exactly as the API returned it.

Errors print the API’s error envelope: in human mode as error: <code> (<status>): <message> with its fix, then docs: <url>, and request_id on stderr; with --json as the envelope on stdout.

Exit codes

CodeMeaning
0Success (also doctor with only warnings)
1Internal error in the CLI
2Invalid flags or arguments, or a required answer missing in non-interactive mode (also keys create --level platform without --permissions)
3Configuration: no URL or key, an unreadable or insecure config file, a failing key_env or key_command, missing Cloudflare credentials, no AWS credentials for setup ses or destroy --include-ses, or a deployment not set up for a domain method (422 transport_unavailable or 422 cf_token_required from domains add without --local-token)
4The API refused the key: 401 or 403
5Not found: 404 with a Pylota Identity error code
6Conflict or state: 409, 410, 423
7Invalid request: 400, 413, 422
8Limit: 402 billing_limit or 429
9Service unavailable: 5xx, a network error, or a 404 that did not come from Pylota Identity
10A Cloudflare API call or Wrangler failed, or a prerequisite is missing (Node.js 22+, Wrangler) or not met (the mail domain already has another provider’s MX records), during setup, setup ses, deploy, upgrade, destroy, secrets rotate-master, domains add --local-token or domains subscribe. doctor reports such failures as failing checks (exit 12)
11Verification failed: a release signature or checksum, webhooks verify, or assertions verify
12doctor found at least one failure
13Timed out: wait returned nothing, or a polling step passed its deadline
14setup ses or destroy --include-ses: an AWS API call failed, or the AWS account has no SES production access
15A precondition is not met: secrets rotate-master with an unfinished rotation (use --resume) or within 30 days of the last re-seal (use --discard-previous), or ops restore d1 while the deployment is not frozen
16metrics rates: a deliverability window is tripped or a sending pause is in effect
130Interrupted (Ctrl-C)

Naming identities and tenants

  • --identity (and identity arguments) take an identity ID (idn_…) or any active or retiring address of the identity, for example bookings@acme.example.com. Without it, mail commands use the profile’s identity, or the key’s own identity for an identity key.
  • --tenant takes a tenant ID (ten_…) or a slug (acme). Without it, a tenant or identity key uses its own tenant, and a platform key uses the profile’s tenant, else the default tenant created by idvy setup (the one whose addresses have no suffix). A partner key uses the profile’s tenant, else the command stops (exit 2) and asks for --tenant: no tenant is a partner’s by default. Three commands never use the default tenant: jobs start needs --tenant, and usage and usage daily with a platform or partner key need --tenant or the profile’s tenant.
  • --partner and partner arguments take a partner ID (ptn_…).
  • Domain arguments take a domain ID (dom_…) or a domain name.
  • Times take RFC 3339 (2026-10-09T10:00:00Z) or a date (2026-10-09, midnight UTC).

Mail commands that send

send, reply, reply-all, forward and calendar-reply need an idempotency key (drafts send derives its own, Drafts). Pass one with --idempotency-key; derive it from your task (bk-2291-confirm) and reuse it if you run the command again for the same message. If you leave it out, idvy generates one (idvy-<id>) and reuses it for its own retries. In human mode it prints the key to stderr; with --json the key appears only in the error document, if the command fails. See Sending › Safe retries.


Deployment

setup

Creates every Cloudflare resource, performs the first deploy of the Worker, creates the default tenant and its console owner, and stores a temporary platform key in a CLI profile. Safe to run again: it creates only what is missing.

idvy setup --domain <api-host> [--mail-domain <apex>] [--account-id <id>] [--jurisdiction eu|default]
            [--console-host <host>] [--owner-email <email>] [--owner-name <name>]
            [--tenant-name <name>] [--no-console] [--replace-mx] [--daily-send-quota <n>]
            [--backup-bucket <name>] [--version <v>] [--from-source [--source-dir <path>]]
            [--print-secrets] [--rotate-pepper] [--profile <name>] [--dir <path>]
FlagDefaultMeaning
--account-idCLOUDFLARE_ACCOUNT_IDCloudflare account ID (a global flag). Setup stores it in the profile as account_id
--domainrequiredThe API host (PM_API_HOST). The Worker serves the REST API (/v1/*, including signed links /v1/links/*), MCP (/mcp), /openapi.json, /health, /.well-known/*, the provider hooks (/hooks/*) and /billing/stripe/webhook there, and the console too unless --console-host names another host
--console-hostthe API hostThe host that serves the console (PM_CONSOLE_HOST). A different host becomes a second custom domain on the same Worker
--mail-domainasked forThe platform mail domain (PM_PLATFORM_DOMAIN). It must be a zone apex in the account. Required with --json or --yes
--jurisdictioneueu or default, for D1, R2 and Durable Objects. It cannot be changed later
--owner-emailasked forThe first console owner of the default tenant. Required unless --no-console
--owner-name–The owner’s name
--tenant-nameDefaultThe default tenant’s name
--no-consoleoffTurn the console off (PM_CONSOLE = "off")
--replace-mxoffDelete existing MX records at the mail domain. Mail to that domain’s current provider stops
--daily-send-quotaunsetYour account’s Email Sending daily quota, copied from the Cloudflare dashboard (PM_DAILY_SEND_QUOTA). An alert fires at 80% of it. Without it, doctor warns
--backup-bucketunsetCreate a second R2 bucket with this name in the same jurisdiction, bind it as BACKUP, and copy new mail objects into it nightly (PM_BACKUP_BUCKET)
--versionthe CLI’sWorker release to deploy
--from-sourceoffBuild the Worker locally from a checkout of the repository (needs Rust, the wasm32-unknown-unknown target and worker-build 0.8.7). It skips the GitHub Releases download but still needs crates.io (or vendored crates) and npm for Wrangler
--source-dir.The checkout that --from-source builds
--print-secretsoffPrint the generated secrets once, to stdout, at the end. Without it they go only to the Worker (through Wrangler, on stdin) and are never printed or written to a file or a log
--rotate-pepperoffBreak-glass: replace PM_KEY_PEPPER and create a new platform key. Every existing API key stops working
--profiledefaultProfile that receives the URL, the account ID and the temporary key. default_profile and PYLOTA_IDENTITY_PROFILE do not change it
--dir./deployWhere wrangler.toml and downloaded releases are kept

What it does, in order: checks Node.js and Wrangler; checks that the mail domain is a zone apex without another mail provider’s MX records; downloads and verifies the release bundle; creates D1, R2 (with its lifecycle rule, plus the backup bucket if you asked for one), the queues and the Vectorize index; enables Email Routing on the mail domain and writes the ownership record (_pylota-identity.<mail domain>); onboards the mail domain for Email Sending; picks IDs for the six rate-limit bindings; writes deploy/wrangler.toml; applies D1 migrations; deploys the Worker; uploads the generated secrets; waits for /health; creates the delivery-event subscription; points the catch-all at the Worker; creates a platform key that expires in 24 hours and saves it in the profile; records the platform domain; creates the default tenant with its owner and the system identity; and runs a mail test to set PM_TRUSTED_AUTHSERV_ID. Mail to the platform domain is refused until the Worker can store it, then accepted. If a step fails, fix the cause and run the same command again. The full list is in the CLI and setup design.

Setup performs the first deploy itself, so idvy deploy run straight after it finds nothing to change and exits 0. An invalid PM_DOCS_URL in deploy/wrangler.toml (not https, a query or fragment, over 200 bytes) is refused.

Billing stays off on a self-hosted deployment, and sign-up stays closed (PM_SIGNUP = "closed" is written into deploy/wrangler.toml, with PM_CONSOLE_HOST, so you can see both). People join as the owner you name here, or by invitation. To use Amazon SES for domains whose DNS is elsewhere, run setup ses afterwards.

idvy setup --account-id <account-id> --domain mail.example.com --jurisdiction eu

Without --mail-domain, setup asks for it. With every value given:

idvy setup --account-id <account-id> --domain mail.example.com --mail-domain agents.example \
  --jurisdiction eu --owner-email sam@acmecarhire.example --owner-name "Sam Patel"

setup ses

Connects the deployment to Amazon SES, once, so tenants can add domains with the dns_records and send_only methods, smtp_relay with --inbound ses, and so the SES failover is available. It uses your local AWS credentials. Run it after setup.

idvy setup ses --region <aws-region> [--allow-non-eu] [--prefix <prefix>] [--dir <path>] [--yes]
FlagDefaultMeaning
--regionrequiredThe SES region (PM_SES_REGION). It must be a region where SES receives mail
--allow-non-euoffAccept a region outside the EU and the UK on a deployment with PM_JURISDICTION = "eu". Without it such a region is refused. For the SES region, eu means “EU or UK” (the UK has an EU GDPR adequacy decision), so eu-west-2 (London) needs no flag; Cloudflare’s own eu jurisdiction for D1, R2 and Durable Objects means the EU only
--prefixpylota-identity-{aws-account-id}-{dep}, where {dep} is 8 hex characters derived from the API hostPrefix of the S3 bucket that holds incoming mail until it is ingested ({prefix}-inbound)
--yesoffApply the IAM policy without asking. Without it, the policy is printed and you are asked first

What it does, reading each resource first and changing only what is missing or different: checks the region and that your SES account has production access (if it does not, it prints the AWS console steps to request it and stops, having created nothing); warns if the account is on the Essentials plan; stops, having created nothing, if the account and region already serve another deployment (a pm-deliver rule writing to another bucket, or a resource of its names tagged for another API host); creates the inbound S3 bucket, the SNS topic, the SQS backstop queue, the receipt rule pm-deliver (in your active rule set if you already have one), the configuration set and its event topic, and the SES identity of the platform domain, each tagged pylota-identity:api-host with your API host where AWS accepts tags; sets SignatureVersion = 2 on both SNS topics; prints the IAM policy of the user pylota-identity-worker-{dep} for review and applies it; creates that user’s access key and uploads it with wrangler secret put as PM_SES_ACCESS_KEY_ID and PM_SES_SECRET_ACCESS_KEY (never written to disk or printed); writes PM_SES_REGION, PM_SES_INBOUND_BUCKET, PM_SES_INBOUND_TOPIC_ARN, PM_SES_INBOUND_QUEUE_URL, PM_SES_RULE_SET and PM_SES_SNS_TOPIC_ARN into deploy/wrangler.toml; deploys; and subscribes the Worker to both topics. Safe to run again. The full list is in Domains on any DNS host.

Exit codes: 2 for a region that cannot receive mail, a region outside the EU and the UK on an EU deployment without --allow-non-eu, a deployment on another version than the CLI (run idvy upgrade first), or a policy review you declined or (without --yes) could not be asked; 3 without AWS or Cloudflare credentials, or without deploy/wrangler.toml (run idvy setup first); 9 when the Worker’s /health does not answer; 10 when Wrangler or the Cloudflare API fails; 13 when the subscriptions are not confirmed within 5 minutes; 14 when an AWS call fails, the account has no production access, or the account and region hold another deployment’s rule or resources (use a separate AWS account).

idvy setup ses --region eu-west-2

setup phone

Connects the deployment to its Telnyx account once. Reads the Telnyx API key from stdin, checks the account level (a Verified-only read answered with 10038 means not Verified) and records it through POST /v1/platform/phone/probe, reads the webhook public key you paste from the Telnyx portal, uploads PM_TELNYX_API_KEY as a Worker secret, writes PM_TELNYX_PUBLIC_KEY (public, not secret) into deploy/wrangler.toml as a variable, creates the account’s notification profile and a webhook channel to https://{PM_API_HOST}/hooks/telnyx for number orders, requirement groups, porting orders and port-outs, and prints what remains manual (data locality, the reseller annex, the account level). It writes nothing else to the account: tenant resources are created per tenant. idvy doctor re-checks every item and the signature of a Telnyx test webhook.

idvy setup phone [--account-id <telnyx-org-id>] [--api-base us|eu] [--profile <name>]
idvy setup phone --api-base eu < telnyx-key.txt

deploy

Downloads the Worker release for the CLI’s version from GitHub Releases, verifies its signature and checksum, renders deploy/wrangler.toml, applies D1 migrations, and deploys with Wrangler 4.139.0, installed with npm ci --ignore-scripts from the lockfile inside the signed release (never fetched by name). Needs Node.js 22 or later with npm.

idvy deploy [--version <v>] [--from-source [--source-dir <path>]] [--gradual] [--stages <list>]
             [--stage-wait <duration>] [--force] [--dir <path>]
FlagDefaultMeaning
--versionthe CLI’sDeploy this release, for example to roll back. It cannot be newer than the CLI
--from-sourceoffBuild from a repository checkout instead of downloading. It still needs crates.io (or vendored crates) and npm for Wrangler
--source-dir.The checkout that --from-source builds
--gradualoffShift traffic in stages, checking health and alerts at each, and roll back on failure
--stages10,50,100Percentages for --gradual
--stage-wait10mTime at each stage
--forceoffDeploy even when nothing changed

Right after idvy setup, deploy has nothing to do and exits 0: setup performed the first deploy. An invalid PM_DOCS_URL (not https, a query or fragment, over 200 bytes) is refused. deploy refuses a release whose signature or checksum does not match (exit 11); there is no option to skip the check. Operator settings under [vars] in deploy/wrangler.toml (for example PM_TRUSTED_AUTHSERV_ID) are kept. Changing PM_EMBED_MODEL there starts a background re-embed on the next deploy (Search design).

idvy deploy
idvy deploy --version 1.0.0

upgrade

Deploys the CLI’s version when the deployment runs an older one, as a gradual deployment (10% → 50% → 100%), then runs doctor. Install the new CLI first: upgrade stops if a newer release exists than the CLI you are running.

idvy upgrade [--stages <list>] [--stage-wait <duration>] [--no-gradual] [--dir <path>]
idvy upgrade

To roll back, deploy the previous version with idvy deploy --version <previous-version>.

doctor

Checks DNS, routing, sending, event subscriptions, bindings, secrets, alerts, dead-letter queues, quota, SES (when configured), the Web Bot Auth key directory (when it is on) and the account’s zone count, and prints a fix for each failure.

idvy doctor [--mail-test] [--check <name>]… [--dir <path>]
FlagMeaning
--mail-testAlso send a message from the platform domain to itself and check it arrives with verdict: pass. Prints the Authentication-Results authserv-id to set as PM_TRUSTED_AUTHSERV_ID. The test messages are erased afterwards. Needs a key with identities:read, identities:write, messages:send, messages:read, search:read and erasure:manage in the default tenant (the platform key from setup has them)
--checkRun only the named checks: dns.platform, routing.catch_all, sending.domains, sending.event_subscriptions, bindings, secrets, observability, worker.version, health, alerts, dlq, quota, ses, cloudflare.zones, security_txt, web_bot_auth, mail_test
idvy doctor --mail-test
pass  dns.platform                 MX, SPF, DKIM, DMARC match on both resolvers
pass  routing.catch_all            catch-all → pylota-identity
warn  security_txt                 PM_SECURITY_CONTACT is not set
pass  mail_test                    delivered in 6 s, verdict pass; authserv-id: <printed value>
…
13 passed, 1 warning, 0 failed

Some checks only warn:

  • secrets warns while a secrets rotate-master has not finished re-sealing (run it again with --resume to follow it).
  • quota warns when PM_DAILY_SEND_QUOTA is not set, and when your Cloudflare token lacks Account Analytics · Read, which it needs to read the quota errors (Self-hosting › step 2).
  • ses runs only when PM_SES_REGION is set and AWS credentials are available. It fails without SES production access, when sending is paused, when inbound mail goes through SES and the active receipt rule set is not the one setup ses configured (PM_SES_RULE_SET) or lacks pm-deliver, when the region cannot receive mail, or at 10,000 SES identities in the region (the SES limit). It warns (ses_identities_90pct) from 9,000, and when the region is outside the EU and the UK on an EU deployment.
  • cloudflare.zones prints how many zones the Cloudflare account holds and warns above 1,000: ask Cloudflare then to confirm the account’s limit, because it is not published.

web_bot_auth runs only when PM_WEB_BOT_AUTH = "on": it fetches the key directory and fails unless it is served with the right content type, lists one to three keys and carries a valid signature for each (Self-hosting › Signed HTTP requests).

Exit 12 when any check fails. A Cloudflare API error inside a check is reported as that check failing, so doctor never exits 10. The checks are listed in Observability › idvy doctor.

destroy

Deletes the deployment: every tenant’s data (through erasure), the Worker, the mail domain’s routing and sending set-up, the Vectorize index, the queues, the R2 buckets (including the backup bucket) and the D1 database. This deletes all mail, keys and configuration permanently.

idvy destroy [--dry-run] [--confirm <platform-domain>] [--skip-erasure] [--keep-dns] [--include-ses]
              [--dir <path>]
FlagMeaning
--dry-runPrint what would be deleted, and change nothing
--confirmThe platform domain, to confirm without a prompt. Required in non-interactive runs; --yes does not replace it
--skip-erasureDo not erase tenants through the API first (use only when the Worker no longer answers)
--keep-dnsLeave the mail domain’s Email Routing DNS records in place
--include-sesAlso delete the AWS resources that setup ses created, with your local AWS credentials, in the reverse order of setup

If you ran setup ses, the plan lists its AWS resources (the S3 bucket, SNS topic, SQS queue, receipt rule, configuration set, the platform domain’s SES identity, and the IAM user pylota-identity-worker-{dep} with its access key). Without --include-ses they are left in place and listed again at the end: delete them in the AWS console, because the IAM user’s access key stays valid until you do. With --include-ses, destroy deletes them itself; an active receipt rule set that was yours before setup ses is kept, without the pm-deliver rule. It needs AWS credentials (exit 3 without them, before anything is deleted), and an AWS failure is exit 14.

Tenant erasure skips threads under a legal hold. If any tenant has held threads, destroy lists them and stops with exit 6 before it deletes anything else, because deleting the storage would destroy held mail. Release the holds (export the mail first if you must keep it) and run destroy again. The R2 bucket can only be deleted when it is empty; if staging objects remain, run destroy again a day later.

idvy destroy --dry-run
idvy destroy --confirm agents.example

secrets rotate-master

Rotates the master key without downtime. The key has two slots: the command writes a new key into the slot that is not in use, switches the Worker to it, and waits while the Worker re-seals every stored secret with it (about 500 a minute). The previous key stays in its slot, so a D1 restore from the last 30 days can still open what it sealed.

idvy secrets rotate-master [--resume] [--discard-previous] [--yes] [--dir <path>]

--resume follows an interrupted rotation to its end; nothing is generated again. A second rotation within 30 days of the end of the previous rotation’s re-seal is refused (exit 15) unless --discard-previous is given (after a suspected leak of the previous key), because it would overwrite the key that a restore to before the last rotation needs. Needs your Cloudflare token and a platform key with audit:read. Identity signing keys and the Web Bot Auth key are re-sealed with everything else; their public keys do not change. The thread, link, cursor and Web Bot Auth signing keys are rotated with keys rotate thread|link|cursor|web_bot_auth. PM_CF_API_TOKEN and the SES keys are rotated with idvy wrangler secret put, as described in Security.

wrangler

Runs Cloudflare’s wrangler CLI, version 4.139.0, installed from the lockfile inside the signed release of the CLI’s version (checked like deploy checks it) with npm ci --ignore-scripts. Use it instead of a Wrangler you install yourself whenever a Cloudflare token is in your shell: nothing is fetched from npm by name and no install script runs.

idvy wrangler [--dir <path>] <wrangler arguments…>

The arguments, stdin, stdout and the exit code pass through unchanged, for example idvy wrangler secret put PM_CF_API_TOKEN --name pylota-identity or idvy wrangler rollback.

Platform operations

Platform keys with platform:ops (ops status: audit:read). These commands call the platform API only and need no Cloudflare credentials, except ops freeze, ops unfreeze and ops restore d1, which also use your Cloudflare token. Every call that changes something is audit-logged.

dlq list

Lists messages that failed every retry and landed in a dead-letter queue. Message bodies are never returned.

idvy dlq list [--queue <name>] [--status open|redriven] [--tenant <tenant>] [--limit <n>] [--all]

--queue is one of pm-inbound, pm-outbound, pm-delivery-events, pm-webhooks, pm-index, pm-screen. --status defaults to open. Items are kept for 14 days.

idvy dlq list --queue pm-inbound

dlq redrive

Puts dead-lettered messages back on their queue. Safe to repeat: every consumer is idempotent. Name the items, or redrive every open item of a queue (you are asked to confirm the count unless --yes).

idvy dlq redrive (<dlq-id>… | --queue <name> [--tenant <tenant>]) [--yes]
idvy dlq redrive dlq_01JA9P2T8CW7X2M5N6P8R0T1YZ
idvy dlq redrive --queue pm-inbound --yes

keys rotate thread|link|cursor|web_bot_auth

Rotates one of the keys the Worker uses to sign thread tokens (thread), download links, console tokens and OAuth state (link), search cursors (cursor), or Web Bot Auth HTTP signatures and their key directory (web_bot_auth). The Worker generates the new key; no key is ever shown.

idvy keys rotate thread|link|cursor|web_bot_auth [--revoke-previous] [--yes]
PurposeThe previous key keeps verifying for
thread90 days
link7 days
cursor24 hours
web_bot_auth7 days, listed in the key directory

--revoke-previous deletes the previous key at once instead. Use it after a suspected leak, then run idvy secrets rotate-master. Tokens the old key signed stop working: replies to old thread tokens fall back to header threading; open download and sign-in links, invitations, console sessions and Google or GitHub sign-ins in progress fail; open search cursors fail; and HTTP signatures made with the old web_bot_auth key fail once verifiers fetch the directory again (they may cache it for up to 24 hours). You are asked to confirm unless --yes.

web_bot_auth works only while PM_WEB_BOT_AUTH is on; otherwise the API answers 422 web_bot_auth_disabled (exit 7). Its key IDs are 43-character JWK thumbprints. See Self-hosting › Signed HTTP requests.

The output shows the purpose, the new key ID (kid), and the previous kid with the time it stops verifying, or revoked:

Rotated thread key: new kid 4 (2026-10-09T10:00:00Z)
Previous kid 3 verifies until 2027-01-07T10:00:00Z

An argument that starts with key_ rotates an API key instead (keys rotate).

idvy keys rotate link --yes
idvy keys rotate web_bot_auth

jobs start

Starts a maintenance job over one tenant: reparse (parse messages again from the raw MIME, for example after a parser fix), reembed (chunk and embed them again into the vector index), reindex (rebuild the keyword index) or event_log_rebuild (rebuild the tenant’s event log in a new epoch, which resets every cursor and consumer of the tenant: Event feed § 9.3).

idvy jobs start reparse|reembed|reindex --tenant <tenant> [--identity <identity>]… [--after <time>]
                 [--before <time>]
idvy jobs start event_log_rebuild --tenant <tenant>

--tenant is required: neither the profile’s tenant nor the default tenant stands in for it, because a job over the wrong tenant is costly to undo. Without --identity, the job covers every identity of the tenant. event_log_rebuild takes the tenant only: --identity, --after or --before with it is exit 2. It prints the job with its ID.

idvy jobs start reparse --tenant brightwell --after 2026-09-01
idvy jobs start event_log_rebuild --tenant brightwell

jobs get

Shows a job’s status (queued, running, completed, failed or canceled) and, once it ends, its counts.

idvy jobs get job_01JA9Q3V9DW7X2M5N6P8R0T1Z0

waitlist invite

Invites the oldest confirmed people on the waitlist (PM_SIGNUP = "waitlist"). Each gets a sign-up link valid for 7 days. --count is 1–500; --plan invites only people who chose that plan.

idvy waitlist invite --count <n> [--plan <plan-id>]
idvy waitlist invite --count 50 --plan developer
Invited 50; 262 still waiting.

ops status

Shows the deployment’s operational state from GET /v1/platform/status (a platform key with audit:read): whether it is frozen, the switches, whether an alert email address is configured, the firing alerts, the master-key slots with the rotation’s progress, and the D1, vector and tenant counts against their limits.

idvy ops status

ops switch

Sets a deployment-wide switch (PUT /v1/platform/switches, a platform key with platform:ops). read_only refuses writes from every key but platform keys and holds outbound sends; free_sending off stops sends from workspaces on the Free plan or still in the send ramp; emergency_prune shortens the retention of event and delivery logs to 7 days; agent_signup off stops new agent sign-ups and their mail (Agent sign-up); phone is on, paused_purchases (orders, ports, registration fees, emergency registrations and voice-route changes refused; SMS, calls and inbound continue) or paused (outbound SMS and calls refused too); it never releases a number (Phone numbers § 30); vault_redeem off makes vault redemption, write-back and ticket minting refuse while reads and approvals continue (Vault § 15). The automatic containment rules set these switches too (Observability › Automatic containment).

idvy ops switch read_only|free_sending|emergency_prune|agent_signup on|off [--reason <text>]
idvy ops switch phone on|paused_purchases|paused [--reason <text>]
idvy ops switch vault_redeem on|off [--reason <text>]

ops freeze and ops unfreeze

Freezes the whole deployment for a restore, or ends the freeze. freeze sets PM_FREEZE = "on" in deploy/wrangler.toml and redeploys the deployed version; unfreeze sets it back to off. While frozen, inbound mail gets a temporary failure (senders retry), queued work waits, and only platform keys can use the API. Uses your Cloudflare token.

idvy ops freeze
idvy ops unfreeze

ops restore

Runs the restore steps of the restore runbook. Every subcommand refuses unless the deployment is frozen.

idvy ops restore d1 --at <time> [--exclude <table>[.<column>]]… [--exclude-row <table>:<key>]… [--yes]
idvy ops restore d1 --replay-only <dir>
idvy ops restore mailbox <identity> (--at <time> | --bookmark <bookmark>)
idvy ops restore reconcile --tenant <tenant> --identity <identity>… --after <time>
idvy ops restore cleanup
  • d1 exports the database, restores it with D1 Time Travel, exports it again, and re-applies every change made after --at except the excluded tables, columns and rows. It prints a summary and the bookmark that undoes the restore, and asks before it applies the changes. Uses your Cloudflare token.
  • mailbox restores one identity’s mailbox to --at (or undoes a restore with --bookmark) through POST /v1/platform/identities/{identity_id}/restore.
  • reconcile starts the restore_reconcile job for the restored mailboxes and then re-applies every erasure that completed after --after (POST /v1/platform/erasure-requests/{erasure_id}/reapply), waiting until all of them complete.
  • cleanup deletes the working files the restore wrote (they hold every D1 row).

Profiles

login

Asks for the API URL and a key, checks the key with GET /v1/me, and saves both in the profile named by --profile (default default, whatever default_profile or PYLOTA_IDENTITY_PROFILE say). Without a terminal, pass --url and put the key in PYLOTA_IDENTITY_KEY.

idvy login [--profile <name>] [--url <url>] [--key-env <NAME> | --key-command <cmd>]

A key in PYLOTA_IDENTITY_KEY outranks the one saved in a profile, so while that variable is set the CLI keeps using it; login warns when it differs from the key you saved. Unset it to use the profile.

idvy login
idvy login --profile staging --url https://mail-staging.example.com --key-env PYLOTA_IDENTITY_STAGING_KEY

config show

Prints the resolved URL, key (prefix only), profile, identity and tenant, and where each came from.

idvy config show

config set

Sets url, identity, tenant, account_id, key_env, key_command or default_profile. To store a key, use idvy login.

idvy config set <setting> <value> [--profile <name>]
idvy config set identity bookings@acme.example.com

mcp config

Prints MCP client configuration for the current profile’s URL. It never prints the key; the configuration reads PYLOTA_IDENTITY_KEY from the environment. It also lists the tools the current key would see.

idvy mcp config [--client generic|claude-code|claude-desktop|cursor|codex|agent-sdk] [--name <server-name>]

claude-desktop prints the mcp stdio bridge block for claude_desktop_config.json, codex the ~/.codex/config.toml block, and agent-sdk the Claude Agent SDK snippet. The tool list it prints for the current key also applies the key’s mcp_tools.

idvy mcp config --client claude-code

See MCP server › Connect a client.


Agent tooling

mcp stdio

A local (stdio) MCP server that forwards every request to the deployment’s /mcp, for clients that run only local servers, such as Claude Desktop without request headers. It is part of the idvy binary, so it needs no Node.js and fetches nothing at start-up.

idvy mcp stdio [--tools <names>] [--profile <name>] [--verbose]
  • The key comes from PYLOTA_IDENTITY_KEY or the profile (key, key_env, key_command), never from --key, which this command refuses (exit 2), so the key never sits in a client’s configuration file or the process list. At start it calls GET /v1/me; a 401 or 403 writes the error to stderr and exits 4 before reading stdin.
  • It reads newline-delimited JSON-RPC from stdin and writes only MCP messages to stdout, one per line. Logs go to stderr only with --verbose: method, tool, status and duration, never arguments.
  • --tools a,b,c hides every other tool and answers calls to them with -32602 Unknown tool. It can only narrow what the key sees.
  • tools/call is never retried by the bridge: when the connection drops before the result arrives, it answers with a tool error cli_outcome_unknown (retryable) telling the model to retry the same call with the same idempotency_key. Listing and initialize are retried once on a network error, a 5xx or a short 429. A body over 7 MiB is refused locally with payload_too_large.
  • End of input lets requests in flight finish, then exits 0.
{ "mcpServers": { "pylota-identity": { "command": "idvy", "args": ["mcp", "stdio", "--profile", "agents"] } } }

skills generate

Writes the agent skills compiled into this idvy: Markdown that teaches a coding agent safe sending, untrusted mail, verification codes, drafts, search and events.

idvy skills generate [--output-dir <dir>] [--agent claude-code|codex|cursor|agents] [--for-current-key] [--force]
  • --agent picks the directory: claude-code → ./.claude/skills; codex, cursor and agents → ./.agents/skills. --output-dir overrides it (for example ~/.agents/skills for every project).
  • It writes .pylota-identity-skills.json with the CLI version and the SHA-256 of every file written. A later run replaces only files whose hash still matches; a file someone edited is left alone and reported, and the command exits 6 unless --force. Files of skills a newer version dropped are removed only when unmodified.
  • --for-current-key calls GET /v1/me and writes only the skills whose tools the key can use, plus references/deployment.md with the API URL. It never writes a key.
  • --json prints { "version", "written", "unchanged", "skipped_modified", "removed" }.
idvy skills generate --agent claude-code --for-current-key

skills list

Lists the skills compiled into this idvy, and which of them are written in the output directory.

idvy skills list [--output-dir <dir>]

Tenants

Keys with tenants:manage: a platform key manages every tenant, and a partner key the tenants its partner’s keys created. A tenant key can get its own tenant.

tenants create

idvy tenants create --slug <slug> --name <name> [--mode live|test] [--timezone <iana>]
                     [--address-suffix <suffix>] [--policy-file <file>]
                     [--owner-email <email>] [--owner-name <name>] [--billing-mode metered|exempt|disabled]
FlagMeaning
--slug^[a-z0-9][a-z0-9-]{1,31}$
--modelive (default) or test. A test tenant never sends mail outside the deployment
--address-suffixDefaults to . + slug
--policy-fileJSON merged over the policy defaults (Configuration › Tenant policy)
--owner-email, --owner-nameCreates the workspace’s console owner and emails a sign-in link
--billing-modePlatform keys only. A tenant a partner key creates takes the partner’s default billing mode, and --billing-mode with a partner key is refused (403 scope_denied, exit 4)
idvy tenants create --slug acme --name "Acme Car Hire"
idvy tenants create --slug acme-test --name "Acme Car Hire (test)" --mode test

tenants list

idvy tenants list [--status active|suspended|erasing|erased] [--mode live|test] [--partner <partner_id>]
                   [--limit <n>] [--all]

--partner lists the tenants a partner’s keys created. A partner key always lists only its own tenants.

idvy tenants list --status active

tenants get

idvy tenants get acme

tenants update

idvy tenants update <tenant> [--name <name>] [--timezone <iana>] [--policy-file <file>] [--policy <json>]

--policy-file and --policy deep-merge into the tenant’s policy; null resets a field to its default. quarantine.key_release can be set only with a platform key or the partner key of the tenant’s partner. With a partner key, each policy field is checked by its class: a platform-only field, or a lower-only field above its ceiling, is refused with 403 scope_denied (exit 4) and the field named in details.field (Configuration › Who may change a field).

idvy tenants update acme --policy '{"search":{"agentic_daily_cap":200}}'
idvy tenants update acme --policy '{"quarantine":{"key_release":true}}'

tenants policy

Shows the tenant’s policy with what your key may change, or changes it, through GET/PATCH /v1/tenants/{tenant_id}/policy. Needs policy:write (platform, partner or tenant keys; never identity keys). Without --set or --set-file it prints each field with its class, its ceiling for your key and where the ceiling comes from.

idvy tenants policy <tenant> [--set <json> | --set-file <file>]

With a tenant key, a lower-only field above its ceiling is refused with 403 scope_denied (exit 4, the field, ceiling and source printed), loosening a guard field where only people may is refused with 403 permission_denied (person_required, exit 4), and platform-only fields and quarantine.key_release are refused with 403 scope_denied (not_writable, exit 4) (Configuration › Who may change a field).

idvy tenants policy acme
idvy tenants policy acme --set '{"retention":{"message_days":365},"search":{"refs_packs":["core","uk_vehicle"]}}'

tenants suspend and tenants resume

Suspends a tenant (sends are refused with tenant_suspended; inbound mail is deferred) or resumes it. A partner key cannot resume a tenant that a platform key suspended (403 scope_denied, exit 4).

idvy tenants suspend acme
idvy tenants resume acme

Partners

Platform keys with partners:manage. A partner is an integrator whose partner keys create tenants and act only on them (API › Partners). A partner key cannot run these commands.

partners create

idvy partners create --name <name> [--default-billing-mode exempt|metered] [--max-tenants <n>]
                      [--ramp-exempt true|false]
FlagMeaning
--default-billing-modeDefault metered. The billing mode of every tenant the partner’s keys create
--max-tenantsDefault 25. The most tenants that are not erased the partner may have; the next tenants create with its key gets 403 partner_tenant_limit (exit 4)
--ramp-exemptDefault false. true lets the partner’s new tenants skip the new-workspace send ramp, which they otherwise follow whatever their billing mode
idvy partners create --name Pylota --default-billing-mode exempt

partners list

idvy partners list [--status active|suspended|deleted] [--limit <n>] [--all]

partners get

idvy partners get ptn_01JA2B3C4D5E6F7G8H9J0K1M2N

partners update

idvy partners update <partner_id> [--name <name>] [--status active|suspended]
                      [--default-billing-mode exempt|metered] [--max-tenants <n>] [--ramp-exempt true|false]

--status suspended contains the partner at once: every key of the partner and every API key of its tenants gets 403 partner_suspended, and deliveries to its and its tenants’ webhook endpoints are held until --status active; the tenants’ inbound mail is still stored. A new --default-billing-mode applies only to tenants created afterwards. Lowering --max-tenants below the current count refuses new tenants and changes no existing one.

idvy partners update ptn_01JA2B3C4D5E6F7G8H9J0K1M2N --status suspended

partners delete

Soft-deletes the partner: it stays, with status deleted and an empty name, and its partner keys and partner webhook endpoints are deleted. Its erased tenants keep their partner_id. Asks for confirmation unless --yes. While any of its tenants is not erased the API answers 409 partner_has_tenants (exit 6): erase those tenants first with erasure create and --scope tenant.

idvy partners delete ptn_01JA2B3C4D5E6F7G8H9J0K1M2N --yes

Identities

identities create

idvy identities create --username <name> --display-name <name> [--purpose <tag>]
                        [--owner-name <name>] [--owner-email <email>] [--signature-text <text>]
                        [--domain <domain>] [--client-id <id>] [--metadata <key=value>]… [--tenant <tenant>]
                        [--message-hours <1-8760> | --keep-messages]
FlagMeaning
--username^[a-z0-9][a-z0-9._-]{0,23}$. Reserved and look-alike names are refused
--display-nameThe From display name
--owner-name, --owner-emailThe accountable human. An identity cannot send without one (identity_owner_required)
--domainCreate the primary address on a healthy tenant domain instead of the platform domain
--client-idMakes the create idempotent for your own provisioning
--message-hoursErase each message that many hours after it is stored (needs erasure:manage); --keep-messages sets null

With a platform key and no --tenant, the identity is created in the profile’s tenant, else in the default tenant. A partner key needs --tenant or the profile’s tenant.

idvy identities create --username bookings --display-name "Acme Car Hire"
idvy identities create --username compliance --display-name "Acme Car Hire Compliance" \
  --owner-name "Sam Patel" --owner-email sam@acmecarhire.example --tenant acme

identities list

idvy identities list [--tenant <tenant>] [--status active|paused] [--purpose <tag>] [--client-id <id>] [--all]
idvy identities list --tenant acme

identities get

idvy identities get bookings@acme.example.com

identities update

idvy identities update <identity> [--display-name <name>] [--purpose <tag>] [--owner-name <name>]
                        [--owner-email <email>] [--signature-text <text>] [--metadata <key=value>]…
                        [--daily-cap <n>] [--auto-reply allowed|denied] [--require-known-recipient true|false]
                        [--message-hours <1-8760> | --keep-messages]

--daily-cap, --auto-reply and --require-known-recipient set the identity’s send_policy. --message-hours erases each message that many hours after it is stored (setting it, or lowering it, needs erasure:manage); --keep-messages sets null.

idvy identities update bookings.acme@agents.example \
  --owner-name "Sam Patel" --owner-email sam@acmecarhire.example

identities pause and identities resume

A paused identity cannot send. Resuming an identity paused for abuse needs a tenant, partner or platform key, and only a platform key on a tenant a partner’s key created (403 scope_denied, exit 4).

idvy identities pause bookings@acme.example.com
idvy identities resume bookings@acme.example.com

identities delete

Starts an erasure of the whole mailbox (needs identities:write and erasure:manage). Its addresses can never be given to another identity. Asks you to type the identity’s primary address, or pass --confirm <address>.

idvy identities delete bookings@acme.example.com --confirm bookings@acme.example.com

identities lookup

Finds the identity that owns an address. Unknown, retired or out-of-scope addresses give exit 5.

idvy identities lookup bookings@acme.example.com

Addresses

addresses list

idvy addresses list --identity bookings.acme@agents.example

addresses add

Adds an alias on a tenant domain. It stays pending until the domain is healthy.

idvy addresses add --identity <identity> --local-part <name> --domain <domain>
idvy addresses add --identity bookings.acme@agents.example --local-part bookings --domain acme.example.com

addresses promote

Makes an address the primary. The previous primary keeps working as a retiring alias for --retire-previous-after-days (default 90, 0–365). Promoting a retiring address rolls back.

idvy addresses promote <address-id> --identity <identity> [--retire-previous-after-days <n>]
idvy addresses promote adr_01JA8F5L1VW7X2M5N6P8R0T1YP --identity bookings.acme@agents.example

addresses retire

idvy addresses retire <address-id> --identity <identity> [--after-days <n>]
idvy addresses retire adr_01J9Z3K8V5W7X2M5N6P8R0T1YQ --identity bookings@acme.example.com --after-days 30

addresses delete

Only for a pending address that never received mail; otherwise retire it.

idvy addresses delete adr_01JA8F5L1VW7X2M5N6P8R0T1YP --identity bookings.acme@agents.example

addresses test-forwarding

For an address on a domain whose mail reaches the agent through forwarding (send_only, or smtp_relay with --inbound forward): sends a short test message to the address and checks that your mailbox’s forwarding rule delivers it to the identity. The result appears within 10 minutes as the address’s forwarding (ok or failed) in idvy addresses list. Needs identities:write.

idvy addresses test-forwarding <address> [--identity <identity>]

<address> is the address itself, or an address ID with --identity.

idvy addresses test-forwarding bookings@brightwell.example

Domains

domains add

Connects a domain to a tenant. The --method decides how mail arrives and leaves, and what you change at your DNS host; Custom domains helps you choose, and Domains on any DNS host has the full table.

idvy domains add <name> --method <method> [--tenant <tenant>] [--no-receiving] [--no-sending]
                  [--replace-mx] [--confirm-dedicated] [--claim]
                  [--inbound forward|ses] [--smtp-host <host>] [--smtp-port 465|587]
                  [--smtp-username <name>] [--smtp-password-stdin] [--probe-from <address>]
                  [--local-token]
--methodUse it forYou change at your DNS hostNeeds on the deployment
cloudflare_zoneA domain already on Cloudflare in the deployment’s accountNothingPM_CF_API_TOKEN (an apex works without it with --local-token, see below)
nameserversA new domain used only for mailTwo NS records at your registrarPM_CF_API_TOKEN that can create zones; a platform key, or a tenant whose policy allows zone creation. Not offered on Pylota Identity Cloud
dns_recordsA subdomain (or domain) whose DNS stays where it is, both directionsOne MX, three DKIM CNAMEs, a MAIL FROM MX and TXT, an ownership TXTsetup ses
send_onlySending as your existing addresses; your mailbox forwards to the agentThree DKIM CNAMEs, a MAIL FROM MX and TXT, an ownership TXTsetup ses
smtp_relaySending through your own mail provider’s SMTP serverAn ownership TXTYour relay’s credentials; a passing alignment probe
delegated_subdomainA subdomain delegated to Cloudflare (Enterprise accounts)NS records for the subdomainPM_CF_API_TOKEN, PM_CF_SUBDOMAIN_SETUP = "on"
FlagMethodsMeaning
--replace-mxcloudflare_zone (apex), dns_recordsThe domain already has MX records. For cloudflare_zone, they are replaced and mail to the current provider stops. For dns_records, you confirm you will replace them at your DNS host; until you do, health reports mx_unexpected
--confirm-dedicatednameserversConfirm the domain serves no website or other mail. Without it, a domain with A, AAAA or MX records, or a www record, is refused (domain_not_dedicated, exit 6) and the records found are listed
--inboundsmtp_relay (required)forward (your mailbox forwards to the agent) or ses (also publish the SES MX and DKIM records; needs setup ses)
--smtp-host, --smtp-port, --smtp-usernamesmtp_relay (required)Your provider’s SMTP submission server. The port is 465 (TLS) or 587 (STARTTLS); port 25 is not allowed
--smtp-password-stdinsmtp_relay (required)Read the SMTP password from stdin. The password is never accepted on the command line. On a terminal, idvy asks for it with hidden input
--probe-fromsmtp_relayThe sender address of the alignment probe. Defaults to postmaster@{domain}
--no-receiving, --no-sendingallOnboard only one direction
--claimallClaim a name another workspace holds but never verified, after publishing the TXT record printed by the earlier 409 domain_exists (details.claim). The CLI prints that record and this flag as the fix of every domain_exists that carries details.claim
--local-tokencloudflare_zone (apex)If the deployment has no PM_CF_API_TOKEN, onboard the zone apex with your own CLOUDFLARE_API_TOKEN (below)

A flag that the method does not use is refused (exit 2). Needs domains:write.

A deployment not set up for the method. Without --local-token, idvy checks nothing locally and calls the API. When the deployment or the tenant’s policy lacks what the method needs (for example SES for dns_records, or domains.allow_create_zone for nameservers), the API answers 422 transport_unavailable and idvy exits 3, printing details.reason and its fix. Without PM_CF_API_TOKEN on the deployment, cloudflare_zone, nameservers and delegated_subdomain fail with 422 cf_token_required, also exit 3 with the fix. For a zone apex, add --local-token: idvy checks first that the method is cloudflare_zone, the domain is a zone apex in your account (exit 2 otherwise) and your token and account ID are set (exit 3 otherwise); it then calls the API as usual and, when the API answers cf_token_required, onboards the apex with your local token (catch-all routing, no per-address rules) and registers it in the deployment’s D1 database through the D1 query API, using the account ID (--account-id). A zone subdomain, nameservers and delegated_subdomain always need PM_CF_API_TOKEN on the deployment, because the Worker keeps calling Cloudflare over the domain’s life.

The result is the domain in pending, followed by the records to publish. Each record has a name (the full name) and a host (the name relative to your registered domain). Enter host if your DNS host adds the domain itself, and name if it wants the full name:

TYPE   NAME                                        HOST                          VALUE                                        PURPOSE
TXT    _pylota-identity.agents.brightwell.example      _pylota-identity.agents           pm-verify=8f2k…                              ownership
MX     agents.brightwell.example                   agents                        10 inbound-smtp.eu-west-2.amazonaws.com      mx
CNAME  4kq…._domainkey.agents.brightwell.example   4kq…._domainkey.agents        4kq….{signing zone}                          dkim
MX     pm-bounce.agents.brightwell.example         pm-bounce.agents              10 feedback-smtp.eu-west-2.amazonses.com     return_path
TXT    pm-bounce.agents.brightwell.example         pm-bounce.agents              v=spf1 include:amazonses.com ~all            spf
…

One example per method:

# cloudflare_zone: brightwell.example is a zone in the deployment's Cloudflare account
idvy domains add brightwell.example --method cloudflare_zone --tenant brightwell

# nameservers: a new domain just for agents; set the two NS records it prints at your registrar
idvy domains add brightwell-agents.example --method nameservers --tenant brightwell

# dns_records: a subdomain at any DNS host; brightwell.example keeps its own mail
idvy domains add agents.brightwell.example --method dns_records --tenant brightwell

# send_only: agents send as bookings@brightwell.example; your mailbox forwards to them
idvy domains add brightwell.example --method send_only --tenant brightwell

# smtp_relay: send through your provider, with the password read from stdin
op read "op://vault/brightwell-smtp/password" | idvy domains add brightwell.example --method smtp_relay \
  --tenant brightwell --inbound forward --smtp-host smtp.provider.example --smtp-port 587 \
  --smtp-username agents@brightwell.example --smtp-password-stdin --probe-from agents@brightwell.example

# delegated_subdomain: add the NS records it prints for agents at your DNS host
idvy domains add agents.brightwell.example --method delegated_subdomain --tenant brightwell

domains list

idvy domains list --tenant acme

The platform domain is listed for every key, with no tenant.

domains get

idvy domains get acme.example.com

domains update

Changes how a domain sends. --transport switches between Cloudflare Email Sending and Amazon SES (the Email Sending failover); only platform keys may change it. The --smtp-… flags change an smtp_relay domain’s server or credentials; settings you leave out keep their current values, but the password must always be given on stdin, because it is never shown back. The new values are used only after an alignment probe passes. Needs domains:write.

idvy domains update <domain> [--transport cloudflare|ses] [--smtp-host <host>] [--smtp-port 465|587]
                     [--smtp-username <name>] [--smtp-password-stdin] [--probe-from <address>]
idvy domains update brightwell.example --transport ses
op read "op://vault/brightwell-smtp/password" | idvy domains update brightwell.example --smtp-password-stdin

domains probe

Runs the alignment probe of an smtp_relay domain now (at most once a minute): a message through your relay to the platform domain, which must pass DMARC for your domain. It prints the probe ID; the result shows up in idvy domains health. Needs domains:write.

idvy domains probe brightwell.example

domains records

Re-reads the expected DNS records and checks each against DNS (ok, missing, mismatch, unexpected). --format bind prints them as an RFC 1035 zone fragment instead, with suggested records, records to remove and registrar nameservers as comments.

idvy domains records <domain> [--format json|bind]
idvy domains records dom_01JA9G6M2WW7X2M5N6P8R0T1YR
idvy domains records dom_01JA9G6M2WW7X2M5N6P8R0T1YR --format bind > mail.acmecarhire.example.zone

domains verify

Runs a check now (at most once a minute per domain).

idvy domains verify dom_01JA9G6M2WW7X2M5N6P8R0T1YR

domains health

Shows the state, the issues with their fixes, recent checks and whether sends are falling back to the platform address.

idvy domains health acme.example.com

domains reprove

Issues a new ownership record for a suspended domain.

idvy domains reprove acme.example.com

domains subscribe

Creates the Email Sending event subscription of a domain that reports delivery_events: "manual", using your local CLOUDFLARE_API_TOKEN, and records it on the deployment. The API returns that state, with details.action = "run idvy domains subscribe <domain>", only when the Worker could not create the subscription itself (the spike S9 fallback). Delivery events for the domain start once this has run; until then statuses stop at submitted. Running it again is a no-op. Needs domains:read.

idvy domains subscribe acme.example.com

domains remove

Removes routing, sending and the event subscription. Refused while any address on the domain is active or retiring (domain_in_use).

idvy domains remove acme.example.com --yes

Sending

send

idvy send --identity <identity> --to <recipient>… --subject <text>
           (--text <text> | --text-file <file>) [--html <html> | --html-file <file>]
           [--cc <recipient>]… [--bcc <recipient>]… [--attach <file>]… [--kind transactional|marketing|auto_reply]
           [--thread <thread-id>] [--from-address <address>] [--label <label>]… [--header <"X-Name: value">]…
           [--metadata <key=value>]… [--unsubscribe-url <url>] [--unsubscribe-mailto <address>]
           [--consent-basis <basis> --consent-recorded-at <time>] [--allow-large]
           [--calendar-file <file.ics>] [--calendar-copy | --no-calendar-copy] [--idempotency-key <key>]
FlagMeaning
--to, --cc, --bccaddr@example.net or "Name <addr@example.net>"; repeat the flag or separate with commas. At most 10 in total by default (policy)
--text, --htmlAt least one is required. Text is derived from HTML when missing
--attachAttach a file. Repeatable. Files up to 1 MiB are sent inline; larger files are uploaded first (idvy uploads create) and attached by ID. At most 25 MiB per file and 25 MiB per message. idvy refuses before sending when the message would exceed 5 MiB, unless --allow-large (for tenants that turn large attachments into links)
--calendar-fileAn iCalendar file to send as iMIP (at most 256 KiB); --no-calendar-copy leaves out the invite.ics copy
--kindmarketing needs --unsubscribe-url or --unsubscribe-mailto and the consent flags
--threadContinue an existing thread
--headerOnly X- names matching ^X-[A-Za-z0-9_-]+$, and Importance (high, normal, low), Priority (normal, non-urgent, urgent), Sensitivity (personal, private, company-confidential), Keywords, Comments, Organization, names matched case-insensitively; checked by the API (400 header_not_allowed for a name, 400 invalid_request for a value)
--idempotency-key1–255 printable ASCII characters. Generated and printed when omitted
idvy send --identity bookings@acme.example.com \
  --to renter@example.org --subject "Your booking BK-2291" \
  --text "Your car is ready at 9:00." \
  --idempotency-key bk-2291-confirm

The result is the queued message. Running the same command again returns it with "deduplicated": true and sends nothing.

reply

Replies to the sender of a message, from the address they wrote to, in the same thread.

idvy reply <message-id> --identity <identity> (--text <text> | --text-file <file>) [--html …]
            [--attach <file>]… [--kind transactional|auto_reply]
            [--calendar-file <file.ics>] [--calendar-copy | --no-calendar-copy] [--idempotency-key <key>]
idvy reply msg_01JA6D3J9SW7X2M5N6P8R0T1YL --identity bookings@acme.example.com \
  --text "Friday works. See you at 10." \
  --idempotency-key bk-2291-reply-1

reply-all

As reply, to the sender and every To and Cc recipient except your own addresses. Bcc recipients of the original are never included.

idvy reply-all msg_01JA6D3J9SW7X2M5N6P8R0T1YL --identity bookings@acme.example.com \
  --text "Copying everyone: Friday at 10 is confirmed." --idempotency-key bk-2291-reply-all-1

forward

idvy forward <message-id> --identity <identity> --to <recipient>… [--text <text>] [--no-attachments]
              [--idempotency-key <key>]
idvy forward msg_01JB2C3D4EW7X2M5N6P8R0T1YM --identity compliance@acme.example.com \
  --to claims@insurer.example --text "Forwarding the photos for claim 7781." \
  --idempotency-key claim-7781-photos-fwd

calendar-reply

Answers a verified calendar invitation that names the identity as an attendee: an iTIP REPLY goes to the organizer only, from the attendee’s address, in the invitation’s thread. An invitation that is not verified, quarantined, cancelled, superseded or past, or that does not name the identity, is refused (exit 6).

idvy calendar-reply <message-id> --identity <identity> --partstat accepted|declined|tentative
                     [--comment <text>] [--recurrence-id <time-or-date>] [--idempotency-key <key>] [--dry-run]
idvy calendar-reply msg_01JA9B2C3D4EW7X2M5N6P8R0T0 --identity maintenance.acme@agents.example \
  --partstat accepted --idempotency-key brightwell-mot-accept

cancel

Cancels a send that is still queued. Otherwise exit 6 (not_cancelable).

idvy cancel msg_01JA5D9X2KW7X2M5N6P8R0T1YJ --identity bookings@acme.example.com

resolve

Records the outcome of an uncertain send after you have checked with the recipient or the provider. not_sent marks it failed, after which you can send again with a new idempotency key.

idvy resolve <message-id> --identity <identity> --outcome sent|not_sent
idvy resolve msg_01JA5D9X2KW7X2M5N6P8R0T1YJ --identity bookings@acme.example.com --outcome not_sent

Drafts

Drafts that an agent writes, a person or the operator’s system approves, and the mailbox sends at once or at --send-at (API › Drafts). create, update and delete need drafts:write; list and get need drafts:read; send needs messages:send and drafts:read; approve and reject need drafts:approve, which identity keys cannot hold.

idvy drafts create --identity <identity> [--to <addr>]… [--cc <addr>]… [--bcc <addr>]… [--subject <s>]
                    [--text <s> | --text-file <path>] [--html-file <path>] [--attach <path>]… [--upload <upload_id>]…
                    [--in-reply-to <msg_id> [--reply-all] | --forward-of <msg_id>] [--label <l>]…
                    [--send-at <rfc3339>] [--request-approval] [--client-id <id>]
idvy drafts list (--identity <identity> | --tenant <tenant>) [--status <s>[,<s>…]] [--label <l>]
                  [--thread <thr_id>] [--scheduled-after <t>] [--scheduled-before <t>] [--limit <n>] [--all]
idvy drafts get <draft_id> --identity <identity> [--attachment <att_id> --out <path>]
idvy drafts update <draft_id> --identity <identity> [--if-match <etag>] [the create options]
                    [--remove-attachment <att_id>]… [--unschedule] [--request-approval]
idvy drafts send <draft_id> --identity <identity> [--send-at <rfc3339> | --now] [--dry-run]
                  [--idempotency-key <key>]
idvy drafts approve <draft_id> --identity <identity> --revision <n> [--digest <hex>]
                     (--send | --no-send) [--note <text>] [--on-behalf-of <id>]
idvy drafts reject <draft_id> --identity <identity> --reason <text> [--revision <n>]
idvy drafts delete <draft_id> --identity <identity> [--yes]

idvy drafts send without --idempotency-key reads the draft and derives a key from its ID, revision and approval state (cli:{draft_id}:{revision}:{approval.state}), so re-running the same command never sends twice, and re-running it after a person approved the revision sends it: a run answered pending_approval recorded its key under the state none or requested, and the approval changes the state to approved. list --tenant reads the tenant’s queue. approve where people decide exits 4 (403 permission_denied, person_required); a stale revision exits 6 (409); the draft limit exits 7 (422).

idvy drafts create --identity bookings@acme.example.com --to jo@example.net \
  --subject "Your quote for the Golf, 14–16 November" --text-file quote.txt --request-approval \
  --client-id quote-q118
idvy drafts list --tenant acme --status pending_approval
idvy drafts approve drf_01JA2B3C4D5E6F7G8H9J0K1M2N --identity bookings@acme.example.com --revision 3 --send

Uploads

Files staged once for an identity and attached by ID (API › Uploads). Need messages:send or drafts:write.

idvy uploads create <file> [--identity <identity>] [--filename <name>] [--content-type <type>] [--expires-in <seconds>]
idvy uploads list [--identity <identity>] [--status <status>]
idvy uploads get <upload-id> [--identity <identity>]
idvy uploads delete <upload-id> [--identity <identity>]

create reads the file, computes its size and SHA-256 locally, creates the upload, PUTs the bytes (retrying the PUT on 503 and 409 upload_in_progress after Retry-After, at most 5 times), and prints the upload ID and expires_at. The content type defaults to the file extension’s (application/octet-stream when unknown). send, reply and forward with --attach upload files over 1 MiB themselves.

idvy uploads create FNOL-7781.pdf --identity claims@acme.example.com
idvy drafts create --identity claims@acme.example.com --to claims@insurer.example \
  --subject "Claim 7781" --text "Photos attached." --upload upl_01JAC3Q7W9X2M5N6P8R0T1Y4ZB

Threads and messages

threads list

idvy threads list --identity <identity> [--label <label>] [--category <name>] [--needs-reply-gte <0..1>]
                   [--unread] [--direction inbound|outbound] [--after <time>] [--before <time>]
                   [--archived] [--limit <n>] [--all]
idvy threads list --identity bookings@acme.example.com --needs-reply-gte 0.5

threads get

idvy threads get <thread-id> --identity <identity> [--messages-limit <n>] [--include quoted,html,headers]
idvy threads get thr_01JA5C2H8QW7X2M5N6P8R0T1YB --identity bookings@acme.example.com

threads label

idvy threads label <thread-id> --identity <identity> [--add <label>]… [--remove <label>]…
                    [--read | --unread] [--archive | --unarchive]
idvy threads label thr_01JA5C2H8QW7X2M5N6P8R0T1YB --identity bookings@acme.example.com --add handled --read

threads hold and threads unhold

A legal hold keeps a thread out of retention and erasure until it is removed or expires. Needs erasure:manage; both actions are audit-logged.

idvy threads hold <thread-id> --identity <identity> --reason <text> [--until <time>]
idvy threads unhold <thread-id> --identity <identity>
idvy threads hold thr_01JA5C2H8QW7X2M5N6P8R0T1YB --identity compliance@acme.example.com \
  --reason "PCN dispute WM12345678" --until 2027-10-09

messages list

idvy messages list --identity <identity> [--thread <thread-id>] [--direction inbound|outbound]
                    [--status <status>] [--screening-status pending|clear|suspect|unavailable] [--label <label>]
                    [--after <time>] [--before <time>] [--all]

--status screening lists messages still held by screening, for a key holding quarantine:review; --screening-status filters on the screening record’s verdict.

idvy messages list --identity bookings@acme.example.com --direction outbound --status bounced

messages get

idvy messages get <message-id>… --identity <identity> [--include quoted,html,headers]

More than one ID calls batch-get. The output includes the message’s screening record and calendar object.

idvy messages get msg_01JA5C2H8RW7X2M5N6P8R0T1YE --identity bookings@acme.example.com

messages raw

Saves the original MIME message (kept for retention.raw_days, 90 days by default). Writes to --out, or to stdout when stdout is not a terminal.

idvy messages raw msg_01JA5C2H8RW7X2M5N6P8R0T1YE --identity bookings@acme.example.com --out message.eml

messages attachment

Saves an attachment’s bytes. Attachments flagged as risky need quarantine:review.

idvy messages attachment <message-id> <attachment-id> --identity <identity> --out <file>
idvy messages attachment msg_01JA4B1G7PW7X2M5N6P8R0T1YC att_01JA4B1G7QW7X2M5N6P8R0T1YF \
  --identity bookings@acme.example.com --out INV-88213.pdf

messages attachment-text

Prints an attachment’s extracted text by page.

idvy messages attachment-text <message-id> <attachment-id> --identity <identity> [--pages <1-3>]
idvy messages attachment-text msg_01JA4B1G7PW7X2M5N6P8R0T1YC att_01JA4B1G7QW7X2M5N6P8R0T1YF \
  --identity bookings@acme.example.com --pages 1

messages label

idvy messages label <message-id>… --identity <identity> [--add <label>]… [--remove <label>]…
                     [--read | --unread] [--archive | --unarchive] [--require-absent <label>]…

More than one ID calls batch-update in requests of 100; each request is atomic, the whole command is not (it says so when it splits). --require-absent skips messages that already carry the label and lists them as conflicts: with --add claimed --require-absent claimed, exactly one of two racing callers takes a message.

idvy messages label msg_01JA4B1G7PW7X2M5N6P8R0T1YC --identity bookings@acme.example.com --add invoice

messages feedback and messages feedback-list

Feedback on a message’s screening verdict, and the feedback given so far. feedback needs messages:write, feedback-list messages:read; a quarantined or screening message also needs quarantine:review. Feedback never changes the message.

idvy messages feedback <message-id> --identity <identity> --verdict <correct|false_positive|missed_threat|legitimate_instruction|spam> [--notes <text>]
idvy messages feedback-list <message-id> --identity <identity>

A message that was not screened, or whose verdict is still pending, exits 6; the twenty-first feedback on a message exits 7.

idvy messages feedback msg_01JA4B1G7PW7X2M5N6P8R0T1YC --identity bookings@acme.example.com \
  --verdict false_positive --notes "Our booking system's own confirmation format."

Search and agents

idvy search "<query>" [--identity <identity> | --tenant <tenant> [--identity-ids <id,…>]]
             [--mode keyword|semantic|hybrid|agentic] [--group-by message|thread] [--limit <n>]
             [--snippet-chars <n>] [--direction inbound|outbound] [--label <label>]… [--after <time>]
             [--before <time>] [--no-facets] [--include-quarantined] [--require-mode] [--cursor <cursor>]
FlagMeaning
--modehybrid (default), keyword, semantic, or agentic (the same as idvy ask --no-stream)
--tenantSearch every identity of a tenant (tenant, partner and platform keys); hits show their identity
--group-by threadOne row per conversation
--require-modeFail with search_degraded instead of falling back to keyword search
--include-quarantinedNeeds quarantine:review
--cursorThe next_cursor of the previous page

The query language (from:, ref:, has:attachment, newer_than: and the rest) is in Search.

idvy search "from:@brightwell.example ref:AB12CDE has:attachment" --identity bookings@acme.example.com
idvy search "damage to the rear bumper" --tenant acme --group-by thread

ask

Asks a question and prints an answer in which every sentence cites messages, streaming the progress as it searches. Needs search:read and search:agentic.

idvy ask "<question>" (--identity <identity> | --tenant <tenant>) [--max-steps <2-10>] [--max-seconds <3-30>]
          [--include-quarantined] [--no-stream] [--show-trace] [--stream]
FlagMeaning
--tenantAsk across every identity of a tenant (tenant, partner and platform keys)
--max-steps, --max-secondsThe search budget (defaults 6 steps and 8 seconds, or the tenant’s policy)
--no-streamWait for the whole answer instead of showing progress
--show-tracePrint every step, even when stderr is not a terminal
--streamWith --json: print each event as one JSON line as it arrives
idvy ask "Did the insurer accept the Golf claim?" --identity compliance@acme.example.com
⋯ step 1  search "claim Golf photos" (hybrid) · 7 hits · 412 ms
⋯ step 2  read thread thr_01JA… · 38 ms

Yes. Admiral accepted claim 7781 on 2 October, after the photos sent on 28 September [1][2].

[1] msg_01JA…  2026-10-02  Admiral Claims <claims@admiral.example>  "Claim 7781 – decision"
[2] msg_01JB…  2026-09-28  Acme Car Hire <compliance@acme.example.com>  "Photos for claim 7781"

answered · confidence 0.86 · 3 steps · 2.8 s

The status is answered, insufficient_evidence, budget_exhausted or degraded; all exit 0. --json prints the complete response once it is finished; --json --stream prints each event as a JSON line as it arrives.

wait

Waits for a new matching message, for example a reply or a verification code.

idvy wait --identity <identity> [--from <address|@domain>] [--subject-contains <text>]
           [--thread <thread-id>] [--kind any|reply|verification] [--since <time>] [--timeout <1-60>]

A verification code or link is shown only when --from names the sender’s domain and the message passed authentication. Nothing arriving is exit 13.

idvy wait --identity signups@acme.example.com --from @service.example --kind verification --timeout 60 --quiet

triage list

Lists threads with their triage roll-up (category, needs-reply score, urgency).

idvy triage list --identity <identity> [--category <name>] [--needs-reply-gte <0..1>] [--limit <n>]
idvy triage list --identity bookings@acme.example.com --category customer_request --needs-reply-gte 0.5

triage rerun

Runs triage again for one inbound message. A message.triaged event follows.

idvy triage rerun msg_01JA5C2H8RW7X2M5N6P8R0T1YE --identity bookings@acme.example.com

quarantine list

idvy quarantine list --identity bookings@acme.example.com

quarantine release

Moves a quarantined message into the mailbox and triages it. Needs quarantine:review; audit-logged. Where PM_QUARANTINE_KEY_RELEASE is off (Pylota Identity Cloud), it works only with a platform or partner key on a tenant whose policy has quarantine.key_release: true; elsewhere the API answers 403 permission_denied (exit 4) and a person releases in the console. A message still being screened gets 409 not_quarantined (exit 6); wait for its verdict.

idvy quarantine release <message-id> --identity <identity> --reason <text>
idvy quarantine release msg_01JA8H7N3XW7X2M5N6P8R0T1YS --identity bookings@acme.example.com \
  --reason "Known supplier, DKIM key rotated"

screening summary

Screening verdicts, reasons, outcomes, feedback, and precision and recall from feedback, for one identity or a tenant, over at most 92 days (default the last 30). Needs metrics:read; --tenant needs a tenant, partner or platform key, and --identity-ids when the tenant has more than 100 identities.

idvy screening summary (--identity <identity> | --tenant <tenant> [--identity-ids <id,…>]) [--from <time>] [--to <time>]
idvy screening summary --tenant acme --from 2026-09-17

Webhooks

webhooks create

idvy webhooks create --url <https-url> --events <type,…> [--identity-ids <id,…>] [--description <text>]
                      [--tenant <tenant> | --platform | --partner] [--header 'Name: value']…

--events '*' subscribes to every event type that is not opt-in, including future ones; name message.labels_changed to receive it. --header adds a static request header to every delivery (at most 10; values are write-only). --platform creates a platform-wide endpoint (platform keys). --partner creates a partner endpoint (partner keys), which receives only the events of the partner’s own tenants. The signing secret (whsec_…) is printed once.

idvy webhooks create --url https://api.example.com/webhooks/mail \
  --events message.received,message.bounced

webhooks list and webhooks get

idvy webhooks list --tenant acme
idvy webhooks get whk_01JA9J8P4YW7X2M5N6P8R0T1YT

webhooks update

idvy webhooks update <webhook-id> [--url <url>] [--events <type,…>] [--identity-ids <id,…>]
                      [--description <text>] [--enable | --disable]
idvy webhooks update whk_01JA9J8P4YW7X2M5N6P8R0T1YT --events message.received,message.triaged

webhooks delete

idvy webhooks delete whk_01JA9J8P4YW7X2M5N6P8R0T1YT --yes

webhooks rotate

Issues a new signing secret. During the overlap (0–168 hours, default 24) deliveries carry both signatures.

idvy webhooks rotate whk_01JA9J8P4YW7X2M5N6P8R0T1YT --overlap-hours 24

webhooks test

Sends a webhook.test event now and prints the delivery attempt.

idvy webhooks test whk_01JA9J8P4YW7X2M5N6P8R0T1YT

webhooks deliveries

idvy webhooks deliveries <webhook-id> [--status succeeded|failed|dead] [--event-type <type>] [--after <time>] [--all]
idvy webhooks deliveries whk_01JA9J8P4YW7X2M5N6P8R0T1YT --status dead

webhooks replay

Delivers past events again (up to the tenant’s events_days old, by default 30 days).

idvy webhooks replay <webhook-id> (--event-id <evt_…>… | --since <time> [--until <time>] [--status dead])
idvy webhooks replay whk_01JA9J8P4YW7X2M5N6P8R0T1YT --since 2026-10-08 --until 2026-10-09 --status dead

webhooks verify

Checks a captured delivery’s signature offline, the way your endpoint should. Exit 0 when valid, 11 when not.

idvy webhooks verify --secret-env <NAME> (--headers <file> | --id <id> --timestamp <ts> --signature <sig>)
                      [--body <file>] [--tolerance <seconds>] [--now <unix-seconds>]

--headers reads webhook-id, webhook-timestamp and webhook-signature from a file of Name: value lines. The body is read unchanged from --body or stdin. --tolerance defaults to 300 seconds. --secret whsec_… also works, but other users of the machine can see command lines.

export WEBHOOK_SECRET=whsec_…
idvy webhooks verify --secret-env WEBHOOK_SECRET --headers headers.txt --body body.json

webhooks headers

Sets or removes an endpoint’s custom delivery headers. Values are write-only: the output lists the header names only. --set-stdin <name> reads that header’s value from stdin, so it never appears in the process list. A URL change to another host removes every custom header.

idvy webhooks headers <webhook-id> [--set 'Name: value']… [--set-stdin <name>] [--remove <name>]…
op read "op://vault/ingress/token" | idvy webhooks headers whk_01JA9J8P4YW7X2M5N6P8R0T1YT --set-stdin X-Ingress-Token

Events

Read the tenant’s event log: the same envelopes webhooks deliver, in append order (API › Event feed). Every command needs events:read; platform and partner keys pass --tenant.

idvy events list [--tenant <tenant>] [--after <cursor> | --since <time>] [--types <pattern,…>]
                  [--identity <identity>]… [--limit <1-500>] [--wait <0-60>] [--all]
idvy events tail [--tenant <tenant>] [--after <cursor> | --since <time> | --consumer <name|id>]
                  [--types <pattern,…>] [--identity <identity>]… [--cursor-file <path>]
                  [--transport stream|poll]
idvy events consumers create <name> [--tenant <tenant>] [--types <pattern,…>] [--identity <identity>]…
                  [--start earliest|latest|<cursor>]
idvy events consumers list|get|delete [<name|id>] [--tenant <tenant>]
idvy events consumers read <name|id> [--limit <n>] [--wait <0-60>] [--commit]
idvy events consumers commit <name|id> --cursor <cursor>
idvy events consumers reset <name|id> (--to earliest|latest|<cursor> | --since <time>)
idvy events stream-token [--tenant <tenant>]

events list --all follows has_more into one document; consumers read --commit commits the page’s next_cursor after printing it. A consumer read always starts at the committed position, so without --commit a second read prints the same page; with it, repeated runs walk a backlog page by page. A consumer <name> is resolved to its ID with one list call.

idvy events list --tenant acme --types 'message.*' --after latest --wait 30
idvy events consumers create pylota-reconcile --tenant acme --types 'message.*'
idvy events consumers read pylota-reconcile --tenant acme --commit
idvy events stream-token --tenant acme

events tail

Streams events over the WebSocket with the Authorization header and acknowledges each batch after printing it; --transport poll uses the long poll (wait=60) for networks that block WebSockets. Human output is one line per event (time, type, identity, message ID, and the subject, which is untrusted and neutralised); --json prints NDJSON, one envelope per line; --quiet prints event IDs.

  • --cursor-file is read at start (unless --after or --since is given) and written after each printed batch: to a temporary file in the same directory, mode 0600, then renamed. A crash between printing and writing repeats that batch, so output is at least once. With --consumer the position is the consumer’s, and no file is needed.
  • Reconnects resume from the last cursor with backoff, so nothing appended after it is lost. Only the closes that a later attempt can survive reconnect (1001, 1006, 1011–1013, 4408, and 4429 after 30 seconds); every other close ends the command. A position behind the retained log (close 4410) exits 6 and prints details.oldest_cursor with the fix; 4409 (another tail on the same consumer, or an 11th connection of the key, took this one’s place) exits 6 without reconnecting, so two copies never replace each other in a loop; 4401 or 4403 exits 4; 4404 exits 5; 4400, 1008 or 1009 exits 7; 10 minutes of failed reconnects exits 9; Ctrl-C writes the cursor file and exits 130.
idvy events tail --tenant acme --types 'message.*' --cursor-file ~/.local/state/pylota-identity/acme.cursor

API keys

keys create

idvy keys create --level platform|partner|tenant|identity --name <name> [--partner <partner_id>]
                  [--tenant <tenant>] [--identity <identity>]
                  [--permissions <permission,…>] [--expires-at <time> | --expires-in <duration>]
                  [--mcp-tools <names>] [--save-profile <name>]
FlagMeaning
--levelplatform reaches every tenant; partner the tenants its partner’s keys created; tenant one tenant; identity one identity
--partnerWith --level partner (required there, and refused with any other level): the partner the key acts for. Only a platform key can create a partner key
--permissionsComma-separated (API › Permissions). Required at every level: a platform key has no implicit full set, and --level platform without it is refused (exit 2) with the list of permissions a platform key may hold
--expires-inFor example 90d
--mcp-toolsComma-separated MCP tools the key may see (at most 64), narrowing what its permissions allow; an empty value sends [] (no tools). It limits MCP only: REST follows the permissions
--save-profileAlso store the new key in this CLI profile

The new key cannot exceed your own key’s level, tenant, identity or permissions. Some permissions are refused at some levels (400 invalid_request, permission_not_allowed_for_level, exit 7): identities:sign on a platform or partner key; platform:ops and partners:manage below platform level; tenants:manage on a tenant or identity key; and members:read, members:manage, suppressions:manage, audit:read and usage:read on an identity key. A partner key creates only tenant and identity keys of its own tenants (403 key_scope_exceeded, exit 4, otherwise). The secret (pmk_live_… or pmk_test_…) is printed once. Run interactively with the temporary key that setup stored, idvy offers to save the new platform key in that profile and revoke the temporary one.

The first platform key of a deployment usually holds every permission a platform key may hold, so it can create every other key (setup prints this command for you):

idvy keys create --level platform --name first-key --permissions \
tenants:manage,tenants:erase,partners:manage,platform:ops,keys:manage,identities:read,identities:write,\
domains:read,\
domains:write,messages:read,messages:send,messages:write,attachments:read,search:read,search:agentic,\
quarantine:review,webhooks:read,webhooks:manage,erasure:manage,suppressions:manage,usage:read,\
audit:read,members:read,members:manage
idvy keys create --level identity --identity bookings@acme.example.com --name bookings-agent \
  --permissions messages:read,messages:send,search:read,attachments:read

A partner key for an integrator such as Pylota, created with a platform key:

idvy keys create --level partner --partner ptn_01JA2B3C4D5E6F7G8H9J0K1M2N --name pylota-backend \
  --permissions tenants:manage,tenants:erase,keys:manage,webhooks:manage,quarantine:review,usage:read,\
audit:read,identities:read,identities:write,domains:read,domains:write,messages:read,messages:send,\
messages:write,attachments:read,search:read,search:agentic,erasure:manage,suppressions:manage,members:manage

keys list and keys get

idvy keys list --tenant acme
idvy keys get key_01JA9K9Q5ZW7X2M5N6P8R0T1YV

keys revoke

Revokes a key immediately.

idvy keys revoke key_01JA9K9Q5ZW7X2M5N6P8R0T1YV --yes

keys rotate

Issues a new secret for the same API key; the old one keeps working for the overlap (0–168 hours, default 24).

idvy keys rotate <key-id> [--overlap-hours <0-168>]
idvy keys rotate key_01JA9K9Q5ZW7X2M5N6P8R0T1YV --overlap-hours 24

The first argument decides what is rotated: a key_… ID rotates that API key, and thread, link, cursor or web_bot_auth rotates a signing key (keys rotate thread|link|cursor|web_bot_auth). --overlap-hours with a signing key, or --revoke-previous with an API key, is refused (exit 2).


Service accounts

The service sign-up ledger (API › Service accounts): an agent asks before it creates an account at a third-party service, and an operator approves or rejects. request, list, get and close need accounts:request; approve, reject and delete need accounts:approve, which identity keys cannot hold.

idvy accounts request --identity <identity> --service <domain> --account <identifier> --purpose <text>
                       [--sender-domain <domain>]… [--address <address>]
idvy accounts list (--identity <identity> | --tenant <tenant>) [--status pending_approval|approved|rejected|closed]
                    [--service <domain>] [--limit <n>] [--all]
idvy accounts get <account_id> --identity <identity>
idvy accounts approve|reject|close <account_id> --identity <identity> [--note <text>]
idvy accounts delete <account_id> --identity <identity> [--yes]

approve with an API key works only where keys may take decisions reserved for people (PM_QUARANTINE_KEY_RELEASE = "on", or the tenant’s quarantine.key_release: true with a platform or partner key); otherwise the API answers 403 permission_denied (person_required, exit 4) and a person approves in the console. A key never approves an entry it requested (self_approval). approve or reject on an entry that is no longer pending exits 6 (409 account_not_pending); a request beyond the limits exits 7 (422 account_limit_reached).

idvy accounts request --identity bookings@acme.example.com --service github.com \
  --account acme-bookings --purpose "File issues on the booking widget repository"
idvy accounts list --tenant acme --status pending_approval
idvy accounts approve sac_01JA2B3C4D5E6F7G8H9J0K1M2N --identity bookings@acme.example.com

Identity keys and signing

An identity can prove who it is outside email: with an agent assertion, a short-lived signed token a service checks against the identity’s published keys, or with signed HTTP requests (Web Bot Auth). See Using it from an agent › Agent assertions and the design. Private keys never leave the Worker.

identity-keys list

Lists the identity’s signing keys, newest first, including retired ones: key ID (kid), status (active, retiring or retired), when it was created, and until when a retiring key still verifies. --json adds each public key. Needs identities:read.

idvy identity-keys list --identity <identity> [--status active|retiring|retired] [--limit <n>] [--all]
idvy identity-keys list --identity bookings@acme.example.com

identity-keys create

Creates the identity’s first key. If it already has an active key, that key is shown and nothing changes. Optional: the first signing request creates a key too. Needs identities:write.

idvy identity-keys create --identity bookings@acme.example.com

identity-keys rotate

Makes a new key active. The previous key becomes retiring and stays published, so assertions it signed keep verifying, for PM_IDENTITY_KEY_OVERLAP_DAYS (7 days by default). Needs identities:write.

idvy identity-keys rotate --identity bookings@acme.example.com
Rotated key for bookings@acme.example.com: new kid kPrK_qmxVWaYVA9wwBF6Iuo3vVzz7TxHCTwXBygrS4k
Previous kid 9fT2Lw0…: retiring, verifies until 2026-10-16T09:00:00Z

identity-keys revoke

Retires a key at once, for a suspected leak: it leaves the identity’s published key set, so assertions it signed stop verifying as soon as verifiers fetch the key set again (they cache it for up to 5 minutes). You are asked to confirm unless --yes. An unknown kid is exit 5. Needs identities:write.

idvy identity-keys revoke <kid> --identity <identity> [--yes]
idvy identity-keys revoke kPrK_qmxVWaYVA9wwBF6Iuo3vVzz7TxHCTwXBygrS4k --identity bookings@acme.example.com --yes

Keys can be managed while the identity is paused. A paused identity cannot sign, and its key set is not published until it resumes.

assertions create

Mints an agent assertion: a JWT signed with the identity’s key, naming the identity’s address (and, marked unverified, its display name and workspace), for one audience. Needs identities:sign on a tenant or identity key (platform and partner keys cannot hold it, but can grant it to the keys they create).

idvy assertions create --identity <identity> --audience <audience> [--expires-in <60-600>]
                        [--nonce <nonce>] [--ext <json> | --ext-file <file>]
FlagMeaning
--audienceRequired. The URL or identifier the service expects, 1–256 printable ASCII characters
--expires-inSeconds, 60–600, default 300
--nonceThe service’s challenge, copied into the token (1–128 printable ASCII characters)
--ext, --ext-fileA JSON object of extra claims, at most 2 KB, placed under ext

The result has assertion (the token), kid, expires_at and jwks_uri. --quiet prints only the token. Each call mints a new token; nothing is stored, and no idempotency key is needed.

idvy assertions create --identity bookings@acme.example.com --audience https://portal.supplier.example --quiet

assertions verify

Checks an assertion the way a service should, with the Rust SDK’s verify_assertion. It needs no API key: it fetches the identity’s public keys from {issuer}/.well-known/jwks/{identity}.json.

idvy assertions verify <token> --audience <audience> [--issuer <url>] [--now <unix-seconds>]
FlagMeaning
<token>The assertion, or - to read it from stdin (other users of the machine can see command lines)
--audienceRequired. Your own audience: the token’s aud must equal it
--issuerThe deployment you trust, for example https://mail.example.com. Defaults to the API URL (--url, PYLOTA_IDENTITY_URL or the profile’s url). Keys are never fetched from a URL inside the token
--nowCheck the times against this moment instead of the clock

It checks the algorithm (EdDSA) and type, the issuer, the signature against the published key with the token’s kid, the audience, and the expiry (with 60 seconds of clock skew). It prints valid and the claims (exit 0), or invalid: <reason> (exit 11), where the reason is malformed, unsupported_algorithm, issuer_mismatch, identity_not_found (the identity is unknown, paused, suspended or deleted), unknown_kid, bad_signature, audience_mismatch, expired or not_yet_valid. A network failure while fetching the keys is exit 9. It does not keep a replay cache: a service should remember each jti until exp (Verifying an assertion).

idvy assertions create --identity bookings@acme.example.com --audience https://portal.supplier.example --quiet \
  | idvy assertions verify - --audience https://portal.supplier.example --issuer https://mail.example.com
valid
sub    idn_01J9Z3K8V4QW7X2M5N6P8R0T1Y
email  bookings@acme.example.com
name   Acme Car Hire
org    Acme Car Hire
aud    https://portal.supplier.example
exp    2026-10-09T12:05:00Z

http-sign

Signs an HTTP request as the identity with Web Bot Auth, so a website can tell which agent made it. It returns the headers to attach; the Worker never makes the request. Needs identities:sign on a tenant or identity key, PM_WEB_BOT_AUTH = "on" on the deployment (otherwise 422 web_bot_auth_disabled, exit 7) and the tenant policy web_bot_auth.allowed: true (otherwise 403 policy_denied, exit 4); see Self-hosting › Signed HTTP requests.

idvy http-sign --identity <identity> --url <https-url> [--method <METHOD>] [--expires-in <30-300>]
                [--component @method|@path|@query]…
FlagMeaning
--urlRequired. The https URL of the request, at most 2,048 characters
--methodThe request method, in upper case. Signed only with --component @method
--expires-inSeconds, 30–300, default 60. Sign just before you send
--componentAlso sign @method, @path or @query (repeatable). @authority, signature-agent and from are always signed

It prints the four headers, one Name: value line each; --json prints the response (headers, expires_at).

idvy http-sign --identity bookings@acme.example.com \
  --url "https://www.brightwell.example/fleet/availability?from=2026-10-12" > signature-headers.txt
curl -H @signature-headers.txt "https://www.brightwell.example/fleet/availability?from=2026-10-12"
Signature-Agent: "https://mail.example.com"
From: bookings@acme.example.com
Signature-Input: sig1=("@authority" "signature-agent" "from");created=1791547200;expires=1791547260;keyid="poqkLGiymh_W0uP6PZFw-dvez3QJT5SolqXBCW38r0U";alg="ed25519";nonce="e8N7S2MF…";tag="web-bot-auth"
Signature: sig1=:jdq0SqOwHdyHr9+r5jw3iYZH6aNGKijYp/EstF4RQTQdi5N5YYKrD+mCT1HA1nZDsi6nJKuHxUi/5Syp3rLWBA==:

Assertions and HTTP signatures together are limited to 600 a minute per identity (429 rate_limited, exit 8). They are counted in idvy usage daily but use no plan allowance.


Suppressions and lists

Need suppressions:manage.

suppressions list

idvy suppressions list [--tenant <tenant>] [--address <address>] [--reason <reason>] [--all]
idvy suppressions list --tenant acme --reason hard_bounce

suppressions add

idvy suppressions add <address> [--tenant <tenant>] [--reason manual] [--note <text>]
idvy suppressions add jo@example.net --tenant acme --note "Asked not to be contacted"

suppressions remove

Removing a complaint suppression needs --confirm-complaint-removal and is audit-logged.

idvy suppressions remove jo@example.net --tenant acme

lists list, lists add and lists remove

Allow and block lists for receiving and sending. <direction> is receive or send; <kind> is allow or block; an entry is user@example.com or @example.com. With --identity the entry belongs to that identity and overrides the tenant’s entries for its mail as Parity additions § 3.1 defines.

idvy lists list <direction> <kind> [--tenant <tenant>] [--identity <identity>]
idvy lists add <direction> <kind> <entry> [--tenant <tenant>] [--identity <identity>]
idvy lists remove <direction> <kind> <entry> [--tenant <tenant>] [--identity <identity>]
idvy lists add receive block @spam.example --tenant acme

Privacy

Need erasure:manage.

erasure create

idvy erasure create --scope message|thread|counterparty|identity|tenant --reason <text> [--tenant <tenant>]
                     [--identity <identity>] [--message <message-id>] [--thread <thread-id>]
                     [--address <counterparty-address>] [--wait]

Held threads are skipped and listed in the receipt. --wait polls until the request completes and prints the receipt.

idvy erasure create --scope counterparty --address jo@example.net --tenant acme \
  --reason "Data subject request DSR-1182" --wait

erasure get and erasure list

idvy erasure get era_01JA9M0R6AW7X2M5N6P8R0T1YW
idvy erasure list --tenant acme --status completed --json

erasure retry

Restarts a failed erasure: it submits the same scope and target again, and the new request resumes the failed job at the step that failed and keeps the original 24-hour deadline, for every scope. A counterparty erasure needs the address again, because it is never stored.

idvy erasure retry <erasure-id> [--address <counterparty-address>] [--wait]

erasure reapply

Platform keys only (platform:ops). Runs a completed erasure again from its stored record, after a restore brought erased data back. A counterparty erasure is matched by the address’s keyed hash, so the address is not needed. idvy ops restore reconcile calls it for every erasure after the restore point. A request that did not complete is refused (409 erasure_not_completed, exit 6): resume a failed one with erasure retry.

idvy erasure reapply era_01JA9M0R6AW7X2M5N6P8R0T1YW

export create

A subject-access export: one .eml per message plus messages.json, in a ZIP.

idvy export create --scope counterparty|identity [--tenant <tenant>] [--address <address>] [--identity <identity>]
idvy export create --scope counterparty --address jo@example.net --tenant acme

export get

Prints the export, and with --download <file> saves the ZIP from its signed link (valid for 7 days).

idvy export get exp_01JA9N1S7BW7X2M5N6P8R0T1YX --download dsr-1182.zip

Members

Console users of a workspace. The console is the main place to manage them; these commands let you provision people from a script. members list needs members:read; the others need members:manage (tenant, partner or platform keys).

members list

Lists members with their roles, pending invitations, and seats granted and used.

idvy members list --tenant brightwell

members invite

Emails an invitation to join the workspace. A pending invitation uses a seat; with none left the command fails with billing_limit (exit 8).

idvy members invite --email <email> [--role admin|member|viewer] [--tenant <tenant>]

--role defaults to member. The owner is set when the workspace is created.

idvy members invite --email kim@brightwell.example --role member --tenant brightwell

members remove

Removes a member and ends their console sessions. Takes a user ID (usr_…) or the member’s email. The owner cannot be removed (owner_required, exit 6).

idvy members remove <member> [--tenant <tenant>] [--yes]
idvy members remove kim@brightwell.example --tenant brightwell --yes

invitations revoke

Cancels a pending invitation, freeing its seat. Takes an invitation ID (inv_…) or the invited email.

idvy invitations revoke <invitation> [--tenant <tenant>] [--yes]
idvy invitations revoke kim@brightwell.example --tenant brightwell --yes

Plans and billing

plans list

Prints the plan catalog. Needs no key. On a deployment without billing it says so and lists nothing.

idvy plans list

billing get and billing set

Read or change a workspace’s billing account: its mode (metered, exempt or disabled) and, for a workspace without a Stripe subscription, a complimentary plan. A plan paid through Stripe changes only through Stripe (plan_managed_by_stripe, exit 6). Platform keys with tenants:manage; audit-logged. A partner key can billing get its own tenants; billing set with a partner key is 403 scope_denied (exit 4).

idvy billing get [--tenant <tenant>]
idvy billing set [--tenant <tenant>] [--mode metered|exempt|disabled] [--plan <plan-id>]
idvy billing get --tenant brightwell
idvy billing set --tenant brightwell --mode exempt

Usage and audit

usage

Shows the workspace’s billing mode, plan and every allowance (granted, used, remaining, reset time), from GET /v1/usage. A tenant or identity key reads its own workspace’s usage and needs no permission. A platform or partner key needs usage:read and must name the workspace with --tenant (or the profile’s tenant); it never falls back to the default tenant, and without a tenant the API answers 400 invalid_request (exit 7).

idvy usage [--tenant <tenant>]
idvy usage

usage daily

Prints per-day counts (inbound, outbound, sends, triage, search, agentic, assertions, HTTP signatures, AI neurons, storage), at most 92 days at a time, from GET /v1/usage/daily. Needs usage:read on a platform, partner or tenant key; a platform or partner key names the tenant as for usage.

idvy usage daily [--tenant <tenant>] [--from <date>] [--to <date>]
idvy usage daily --from 2026-09-01 --to 2026-09-30 --tenant acme

audit

Needs audit:read.

idvy audit [--tenant <tenant>] [--action <action>] [--target <id>] [--after <time>] [--limit <n>] [--all]
idvy audit --tenant acme --action quarantine.release

Deliverability metrics

Need metrics:read (API › Deliverability metrics). An identity key reads its own identity’s windows and counts, its tenant’s windows and those of the domains its addresses use.

idvy metrics rates [--identity <identity> | --domain <domain>] [--tenant <tenant>] [--json]
idvy metrics events [--identity <identity> | --domain <domain>] [--tenant <tenant>] [--bucket hour|day]
                     [--from <time>] [--to <time>] [--types sent,delivered,…] [--identity-ids <id,…>] [--json]

--identity sends scope=identity and --domain sends scope=domain. Without either, the command sends no scope and the server’s default applies: the key’s own identity for an identity key, the tenant for every other key (--tenant names the tenant as everywhere else). rates prints one line per window (rule, threshold, now, headroom) with tripped windows first, and exits 16 when a window is tripped or a pause is in effect, so a script can gate a bulk send on it. events prints a table, one row per bucket, and a partial warning on stderr when the response is partial.

idvy metrics rates --identity bookings@acme.example.com
idvy metrics events --bucket day --from 2026-10-01 --types sent,delivered,bounced,complained

Agent sign-up

An agent signs up for its own workspace on Pylota Identity Cloud, and its human verifies it (API › Agent sign-up). create needs no key; the other agent-signup commands act on the sign-up of the profile’s key.

agent-signup create

Calls POST /v1/agent-signup without a key and writes the returned key into the profile (with the config file’s 0600 rules), printing it only with --print-key.

idvy agent-signup create --username <name> --human-email <email> [--agent-name <name>] [--source <text>]
                          --accept-terms [--profile <name>] [--print-key]
idvy agent-signup create --username travel-planner --human-email sam@brightwell.example \
  --agent-name "Travel planner" --accept-terms --profile travel-planner

agent-signup status, verify, resend, set-human and abandon

idvy agent-signup status
idvy agent-signup verify <code>
idvy agent-signup resend
idvy agent-signup set-human <email>
idvy agent-signup abandon

status shows the sign-up’s state, the human’s masked address and the code’s attempts left. verify takes the six-digit code the human received; a wrong code exits 7 (422 signup_code_invalid). resend emails a new code (at most 3 an hour). set-human replaces the human, at most twice before verification. abandon erases the provisional workspace; it asks you to type the inbox’s address first.

idvy agent-signup verify 482913 --profile travel-planner

agent-signups list

Platform keys with platform:ops. Lists agent sign-ups, newest first, without any person’s clear address.

idvy agent-signups list [--state provisional|verified|expired|abandoned|refused] [--since <time>]
                         [--network <hash>]

--since is the earliest creation time, RFC 3339 or a date (Naming identities and tenants); --network takes the 16-hex network hash shown in a row and lists only that network’s sign-ups.

idvy agent-signups list --state provisional --since 2026-10-16
idvy agent-signups list --since 2026-10-17T09:00:00Z --network 3f9a0c1d2e4b5a69

Phone numbers

Behind PM_PHONE. An agent’s key buys inside the tenant’s standing budget or asks; people decide the rest (Phone numbers). Commands that can cost money take --idempotency-key; without it the CLI derives one from the command’s arguments and reuses it on a retry, as send does.

phone countries

idvy phone countries [--tenant <tenant>]

The catalogue rows with the tenant’s standing (eligible, or the reason).

phone setup status and phone setup draft

idvy phone setup status [--tenant <tenant>] [--country <cc>]
idvy phone setup draft --country <cc> --file <draft.json> [--tenant <tenant>]
idvy phone setup draft --country <cc> --delete [--tenant <tenant>]

status prints each country’s status, steps, fees, waits and next step. draft writes the agent’s draft of a registration’s text (what the business does, 2–5 sample messages with the brand name, the opt-in flow, the website, privacy and terms URLs); a person submits it in the console.

idvy phone setup status --tenant brightwell --country US

phone budget get and phone budget set

idvy phone budget get [--tenant <tenant>]
idvy phone budget set [--tenant <tenant>] [--enabled true|false] [--countries <cc,cc>] [--types <t,t>]
                       [--per-identity <n>] [--per-month <n>] [--max-setup <pounds>] [--max-monthly <pounds>]
                       [--expiring-only true|false] [--on-behalf-of <user>]

set reads the current budget, shows the change, and asks for confirmation when it loosens any field (pass --yes in scripts). Loosening needs a platform key or the tenant’s partner key where phone.key_approval is true, with --on-behalf-of; otherwise 403 permission_denied (person_required, exit 4) and a person saves it in the console. Tightening needs phone:manage.

phone buy

idvy phone buy --country <cc> [--identity <identity>] [--type mobile|local|toll_free] [--area-code <nnn>]
                [--number <e164> --quote-token <token>] [--expires-at <rfc3339>] [--primary-for sms,voice]
                [--acknowledge-not-available] [--idempotency-key <key>]

Prints the number and its capability facets (exit 0) when the purchase was covered, or the request and who must act (exit 0, with status and next_step) when it waits. 409 phone_number_taken prints the alternatives (exit 6).

idvy phone buy --country GB --identity bookings@brightwell
idvy phone buy --country US --area-code 512 --expires-at 2026-11-02T00:00:00Z
idvy phone search --country <cc> --type <type> [--contains <digits>] [--starts-with <digits>]
                   [--ends-with <digits>] [--locality <name>] [--region <name>] [--limit <1-20>] [--identity <identity>]

phone request and phone requests

idvy phone request number|port-in|release|route|emergency|a2p|toll-free|compliance [--identity <identity>] ...
idvy phone requests list|get|approve|reject|cancel|resolve [<request_id>] [--tenant <tenant>] [--status <s>]
                    [--digest <digest>] [--note <text>] [--on-behalf-of <user>] [--reason <text>]

requests approve without --digest reads the request, prints the quote (with follow_on) and asks for confirmation; non-interactive use must pass --digest. requests resolve is a platform-key command.

phone numbers

idvy phone numbers list|get|update|move|lookup|adopt [<number>] [--identity <identity>] [--tenant <tenant>]
                   [--primary-for sms,voice] [--expires-at <rfc3339>|none] [--to-identity <identity>]

adopt is a platform-key command.

phone compliance, phone documents and phone export

idvy phone compliance get|update [--tenant <tenant>] [--legal-name ...] [--entity-type ...]
                      [--registration-country <cc>] [--company-number ...] [--company-registry <cc[:region]:name>]
                      [--use-case ...] [--representative-name ...] [--representative-role ...]
idvy phone documents upload <file> --kind <kind> [--valid-until <date>] [--tenant <tenant>]
idvy phone documents list|delete [<document_id>] [--tenant <tenant>]
idvy phone export <profile_id> --reason <text>

documents upload computes the size and SHA-256 locally and PUTs the file. export is a platform-key command.

phone registrations

idvy phone registrations [--tenant <tenant>]
idvy phone registrations otp <registration_id> --pin <code>   # a person, for a US sole-proprietor brand
idvy phone registrations otp-resend <registration_id>

phone connectors and phone route

idvy phone connectors create --kind vapi --region us|eu [--tenant <tenant>]   # reads the Vapi key from stdin
idvy phone connectors list|rotate|delete [<connector_id>] [--tenant <tenant>]
idvy phone route get <number>
idvy phone sms send --to <e164> --text <text> [--from <number>] [--kind transactional|marketing|verification]
                    [--dry-run] [--idempotency-key <key>] [--identity <identity>]
idvy phone sms list|get|wait|resolve|release [<sms_id>] [--identity <identity>] [--from <sender>] [--kind any|verification]
idvy phone calls create --to <e164> --purpose <text> [--assistant <id>] [--idempotency-key <key>]
idvy phone calls list|get [<call_id>]
idvy phone consent get|set --number <e164> [--state opted_out|opted_in] [--purpose marketing] [--evidence <text>]
idvy phone port-outs list|authorize|reject [<port_out_id>] [--reason-code <code>] [--reason <text>]

phone usage, phone charges, phone statement, phone reconcile

idvy phone usage [--identity <identity>] [--month YYYY-MM]
idvy phone charges [--tenant <tenant>] [--month YYYY-MM]
idvy phone statement --partner <partner_id> --month YYYY-MM
idvy phone reconcile [--tenant <tenant> | --platform]

Vault

Every command is a client of the vault routes. Values are read only from standard input or a file, never from an argument, so they never reach shell history; no command prints a value, and an unlock key or a ticket is printed once, to standard output only. There is no reveal command.

vault status

idvy vault status --tenant brightwell

Custody, the tenant key’s kid, counts of items, grants and pending uses, and retiring_versions.

vault items list, get, create, update, archive, restore, delete

idvy vault items create --identity bookings.brightwell@pylotamail.com --kind login \
  --title "TfL road user charging" --account sac_01JA… --origin https://tfl.gov.uk \
  --username compliance.brightwell@pylotamail.com --password-stdin --approval per_run < tfl-password.txt
idvy vault items create --identity … --kind api_key --title "Supplier API" --origin https://api.supplier.example \
  --inject bearer --secret-stdin < key.txt
idvy vault items create --identity … --kind session --title "Supplier portal" --origin https://portal.supplier.example \
  --session-file storage-state.json --ttl-days 7
idvy vault items delete vit_01JAD4…        # asks for the item's title to be typed back unless --yes

--password-stdin, --secret-stdin, --totp-uri-file, --recovery-codes-file, --session-file and --generate [--length N] supply values. update changes metadata only.

vault items rotate

idvy vault items rotate vit_01JAD4… --password-stdin --overlap-hours 24 < new-password.txt

vault grants list, request, approve, deny, revoke

idvy vault grants request --identity … --item vit_01JAD4… --operation fill --origin https://tfl.gov.uk \
    --max-uses 100 --purpose "Check PCN status each morning."
# --operation and --origin repeat; --origin defaults to every origin of the item
idvy vault grants approve vgr_01JAD5… --expires-in 7d --on-behalf-of usr_8812

approve shows the grant’s facts (item, sites, operations, identity, purpose as quoted text) and asks for confirmation unless --yes.

vault uses list, get, approve, deny, cancel

idvy vault uses approve vus_01JAD6… --digest c41a…      # prompts with the digest shown when --digest is omitted

vault consumers list, register, activate, suspend, resume, rotate-keys, revoke

idvy vault consumers register --tenant brightwell --kind browser --name "Browser fleet" \
  --hosting self_hosted --modes cdp --keys ./consumer-keys
idvy vault consumers activate vcn_01JAC2… --note "Reviewed settings and conformance report 2026-11-02"

vault consumer-keys generate

idvy vault consumer-keys generate --out ./consumer-keys

Local only: an Ed25519 signing key and an X25519 encryption key, written with mode 0600; prints the two public JWKs.

vault consumer-check

Signs GET /v1/vault/consumer/self with the keys in a directory and prints the answer, proving the keys and the clock before activation.

vault conformance

idvy vault conformance --consumer ./my-consumer.toml [--fixture proxy_second_form]

Runs the fixture server and the consumer under test against it, and prints a report. Exit 0 only when every fixture passes.

vault custody enrol, release

idvy vault custody enrol --tenant brightwell --slots 2      # partner key; prints two unlock keys once
idvy vault custody release --tenant brightwell --unlock-stdin < unlock.txt

vault rotate-key, vault revoke-all, vault audit

idvy vault rotate-key --tenant brightwell
idvy vault revoke-all --tenant brightwell --shred-sessions     # asks for the tenant's slug to be typed back
idvy vault audit --tenant brightwell --verify                  # exit 1 on a broken chain


Commands at a glance

Deployment   setup · setup ses · deploy · upgrade · doctor · destroy · secrets rotate-master
Platform     dlq list|redrive · keys rotate thread|link|cursor|web_bot_auth · jobs start|get · waitlist invite
             ops status|switch|freeze|unfreeze · ops restore d1|mailbox|reconcile|cleanup · agent-signups list
Profiles     login · config show|set · mcp config
Agents       mcp stdio · skills generate|list · agent-signup create|status|verify|resend|set-human|abandon
Tenants      tenants create|list|get|update|suspend|resume
Partners     partners create|list|get|update|delete
Identities   identities create|list|get|update|pause|resume|delete|lookup
Addresses    addresses list|add|promote|retire|delete|test-forwarding
Domains      domains add|list|get|update|records|verify|probe|health|reprove|subscribe|remove
Sending      send · reply · reply-all · forward · calendar-reply · cancel · resolve
Drafts       drafts create|list|get|update|send|approve|reject|delete
Uploads      uploads create|list|get|delete
Reading      threads list|get|label|hold|unhold · messages list|get|raw|attachment|attachment-text|label
             messages feedback|feedback-list
Search       search · ask · wait · triage list|rerun · quarantine list|release · screening summary
Webhooks     webhooks create|list|get|update|delete|rotate|test|deliveries|replay|verify|headers
Events       events list|tail|stream-token · events consumers create|list|get|delete|read|commit|reset
Keys         keys create|list|get|revoke|rotate
Signing      identity-keys list|create|rotate|revoke · assertions create|verify · http-sign
Lists        suppressions list|add|remove · lists list|add|remove
Privacy      erasure create|get|list|retry|reapply · export create|get
Members      members list|invite|remove · invitations revoke
Billing      plans list · billing get|set
Usage        usage · usage daily · audit · metrics rates|events
Phone        setup phone · phone countries · phone setup status|draft · phone budget get|set · phone buy · phone search
             phone request · phone requests list|get|approve|reject|cancel|resolve · phone numbers list|get|update|move|lookup|adopt
             phone compliance get|update · phone documents upload|list|delete · phone export · phone registrations
             phone connectors create|list|rotate|delete · phone route get · phone sms send|list|get|wait|resolve|release
             phone calls create|list|get · phone consent get|set · phone port-outs list|authorize|reject
             phone usage · phone charges · phone statement · phone reconcile
Vault        vault status · vault items list|get|create|update|archive|restore|delete|rotate
             vault grants list|request|approve|deny|revoke · vault uses list|get|approve|deny|cancel
             vault consumers list|register|activate|suspend|resume|rotate-keys|revoke · vault consumer-keys generate
             vault consumer-check · vault conformance · vault custody enrol|release · vault rotate-key · vault revoke-all · vault audit

Members, invitations, plans and billing can also be managed in the console. Notification preferences (new-mail emails, usage alerts, the daily “needs a person” email) are only in the console, under Settings › Notifications: they belong to people, not API keys, so there is no command or API endpoint for them (Notifications design).