CLI Authentication
x-internal
Create a new CLI session with auth code
Generates a new CLI session with a random 6-character code. This endpoint is the first step in the CLI authentication flow, creating a session that can later be linked to a user account. The generated code is displayed to the user in the CLI and should be entered in the web interface to complete authentication. Optionally accepts a scope ('project' or 'user') and a source string.
post/api/v3.1/cli/create-session
Request body
Response
CLI session created successfully with a unique ID and temporary authentication code
Example response
{
"code": "ABC123",
"expiresAt": "2023-01-01T12:00:00.000Z",
"status": "pending",
"scope": "project"
}