v63

latestOpenAPI 3.0.0Proprietaryraw.githubusercontent.com2026-08-0110571.8 MB
CLI Authentication
x-internal

Get CLI session details by ID or code

Retrieves the current state of a CLI session using either the session ID (UUID) or the 6-character code. This endpoint is used by both the CLI client to check if the session has been linked, and by the web interface to display session details before linking.

get/api/v3.1/cli/get-session

Query parameters

idstring required

The CLI session ID or code to check

Example:ABC123

CLI session ID (UUID format) or 6-character code to check. Both formats are supported for flexibility in client implementations.

Response

CLI session retrieved successfully. Returns full session details including linked account information if available.

idstring required

The unique identifier for the CLI session

codestring required

The 6-character hexadecimal code used for CLI login

status'pending' | 'linked' required

The current status of the session

expiresAtstring required

The ISO timestamp when the session expires

api_keystring nullable required

The API key for the linked account

scope'project' | 'user' nullable required

The key scope for this session

Example response

{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "code": "ABC123",
  "status": "pending",
  "expiresAt": "2023-01-01T12:00:00.000Z",
  "account": {
    "id": "user_12345",
    "email": "user@example.com",
    "name": "John Doe"
  },
  "api_key": "1234567890",
  "scope": "project"
}