API

AuthCli

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
POST /api/v1/auth/cli/complete create CLI login completed, or waiting for the user to choose an organization
POST /api/v1/auth/cli/exchange create Approved connection
POST /api/v1/auth/cli/install create Install grant valid for 45 minutes; the organization becomes the CLI default
POST /api/v1/auth/cli/start create CLI approval request

Fields

Field Type Required Description

create

POST /api/v1/auth/cli/complete

Operation ID: api_v1_auth_cli_complete.

Authentication: bearer token (bearerAuth).

Request body

application/json

Property Type Required Description
login_id string Yes
organization_id string No Public ID of the organization the CLI saves as its default.

Responses

200: CLI login completed, or waiting for the user to choose an organization

application/json

Property Type Required Description
app_return_url string (uri) No Fixed native iOS return link, present only after successful approval. Contains no credential or polling token.
client_kind enum: cli, desktop, android, ios Yes
organization object or null Yes The organization the CLI saves as its default; null when there is none or a choice is required.
status enum: complete, organization_required, organization_setup_required Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

POST /api/v1/auth/cli/exchange

Operation ID: api_v1_auth_cli_exchange.

Authentication: bearer token (bearerAuth).

Request body

application/json

The request body is object.

Responses

200: Approved connection

application/json

Property Type Required Description
api_base_url string (uri) Yes
api_token string Yes
organization object or null Yes
status enum: complete Yes
user object Yes
user.commit_author_email string Yes
user.email string Yes
user.id string Yes
user.name string,null Yes
user.picture_url string,null Yes
202: Waiting for browser approval

application/json

Property Type Required Description
status enum: pending Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

POST /api/v1/auth/cli/install

Operation ID: api_v1_auth_cli_install.

Authentication: bearer token (bearerAuth).

Request body

application/json

Property Type Required Description
organization_slug string Yes

Responses

201: Install grant valid for 45 minutes; the organization becomes the CLI default

application/json

Property Type Required Description
expires_at string (date-time) Yes
install_token string Yes Single-use secret. Return only to the user who requested it.

POST /api/v1/auth/cli/start

Operation ID: api_v1_auth_cli_start.

Authentication: bearer token (bearerAuth).

Request body

application/json

Property Type Required Description
client_kind enum: cli, desktop, android, android_dev, ios, ios_dev No android_dev and ios_dev return to their separate local apps using server-owned callback URLs. Clients cannot supply arbitrary callback URLs.
intent enum: signin, signup No
name string No

Responses

200: CLI approval request

application/json

Property Type Required Description
expires_at string (date-time) Yes
login_id string Yes
poll_interval_seconds integer Yes
polling_token string Yes
verification_url string (uri) Yes
201: CLI approval request created

application/json

Property Type Required Description
expires_at string (date-time) Yes
login_id string Yes
poll_interval_seconds integer Yes
polling_token string Yes
verification_url string (uri) Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway