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.
| Endpoint | Summary |
|---|---|
POST /api/cli/device | Start the CLI device flow |
POST /api/cli/token | Poll for the CLI's key |
Start the CLI device flow
POST
/api/cli/deviceAsks 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"import os, requests
response = requests.post("https://api.dissolve.email/api/cli/device")
print(response.json())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/tokenAnswers 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)
| Name | Type | Required | Description |
|---|---|---|---|
device_code | string | yes | From POST /api/cli/device. |
curl -X POST "https://api.dissolve.email/api/cli/token" \
-H "Content-Type: application/json" \
-d '{"device_code":"dc_..."}'import os, requests
response = requests.post("https://api.dissolve.email/api/cli/token", json={
"device_code": "dc_..."
})
print(response.json())Response 200
JSON
{
"api_key": "sk_live_..."
}Something wrong or missing on this page? Tell us at support@dissolve.email.View as Markdown