API referenceCLI sign-in
Start a CLI sign-in
POST
Starts a browser-approved sign-in for the laptop CLI. Show userCode, open verificationUrl, then call cliLogin.poll with deviceCode every intervalSeconds until it is no longer pending.
Needs no sign-in. Not available to MCP clients or the assistant.
application/json- body
clientName*stringLength
1 <= length <= 100Success.
application/json- response
userCode*stringMatch
^[A-HJKMNP-Z2-9]{4}-[A-HJKMNP-Z2-9]{4}$deviceCode*stringLength
20 <= length <= 200verificationUrl*stringintervalSeconds*integerRange
1 <= valueexpiresAt*stringFormat
date-timecurl -X POST 'https://example.com/api/v1/cliLogin.start' \ -H 'Content-Type: application/json' \ -d '{ "clientName": "string"}'Example Response
{ "userCode": "string", "deviceCode": "stringstringstringst", "verificationUrl": "string", "intervalSeconds": 1, "expiresAt": "2019-08-24T14:15:22Z"}Check a CLI sign-in POST
Polls a CLI sign-in with its device code. Approved returns the API key once (status used afterwards); send it as Authorization: Bearer <token>. Needs no sign-in. Not available to MCP clients or the assistant.
Get a service's Cloudflare tunnel GET
Returns the Cloudflare tunnel of a service: on or off, quick or token mode, its public URL and state. Needs `tunnels.view` on the service (a grant on its project covers it). Available to MCP clients and the assistant.