Skip to content
docs
Browse the docsCLI

API reference

CLI API

The device flow the dna CLI signs in with. Every cli endpoint with its scope, parameters, body and an example answer.

Base URL https://api.dissolve.email. These endpoints take no bearer token.

EndpointSummary
POST /api/cli/deviceStart the CLI device flow
POST /api/cli/tokenPoll for the CLI's key

Start the CLI device flow

POST/api/cli/device

Asks for a one-time code to show the person and a device code to poll with. The person opens verification_url, checks the code and approves. Ten a minute per address.

curl -X POST "https://api.dissolve.email/api/cli/device"

Response 200

JSON
{
  "device_code": "dc_...",
  "user_code": "WDJB-MJHT",
  "verification_url": "https://app.dissolve.email/cli/auth",
  "expires_in": 600,
  "interval": 5
}

Poll for the CLI's key

POST/api/cli/token

Answers 400 authorization_pending until the person approves, then once with a new sk_live_ key (Pro and Business). access_denied and expired_token end the flow.

Body (application/json)

NameTypeRequiredDescription
device_codestringyesFrom POST /api/cli/device.
curl -X POST "https://api.dissolve.email/api/cli/token" \
  -H "Content-Type: application/json" \
  -d '{"device_code":"dc_..."}'

Response 200

JSON
{
  "api_key": "sk_live_..."
}

Something wrong or missing on this page? Tell us at support@dissolve.email.View as Markdown