Start a CLI sign-in
Begin a device-authorization sign-in for the CLI. Returns a device code for the CLI to poll and exchange, a short user code for the person to confirm in the browser, the verification URL, and the polling cadence.
Headers
Controls how timestamp fields are serialized in JSON response bodies.
Default (header omitted or any other value): epoch milliseconds as integers.
iso8601: UTC ISO 8601 strings of the form YYYY-MM-DDTHH:MM:SSZ.
Example: with X-Timestamp-Format: iso8601, the field value 1704067200000 becomes "2024-01-01T00:00:00Z".
Affected fields (recursively, in dicts and arrays): any field whose name ends in _at, plus the literal field names timestamp, period_start, and period_end. All other fields are passed through unchanged.
Only iso8601 is recognized. Any other value (or omitting the header) yields the default epoch-ms representation; the server does not reject unknown values, so this is documented as an example rather than an enum to keep generated clients permissive.
"iso8601"
Body
Body for POST /v0/cli/device-codes.
Both fields are optional, so the body itself is optional — a bare POST starts a sign-in with no client label.
Optional human-readable label for the device requesting sign-in.
255Response
Sign-in started
Response to starting a CLI sign-in.
Carries the device code (the CLI's bearer secret for polling and exchange), the short user code the human confirms in the browser, the verification URL, and the polling parameters.
HAL-style hypermedia links for navigation and available actions.
Bearer secret the CLI uses to poll status and exchange for a token.
Short code the user confirms in the browser to approve.
Browser URL where the user approves the sign-in.
Verification URL pre-filled with the device and user codes for convenience.
Seconds until the device code expires.
Minimum seconds the CLI should wait between status polls.