Skip to content

Approve a CLI authorization

POST
/v1/cli/authorizations/{authorizationId}/approve
curl --request POST \
--url https://api.aetherpush.com/v1/cli/authorizations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/approve \
--header 'Authorization: Bearer <token>'

Binds the request to the signed-in account and, for the loopback flow, arms a 60-second authorization code. The response never contains a credential: the browser only learns where to send the code.

When the account has MFA and the dashboard session is older than the freshness window, this answers 403 with code reauth_required. The page should send the user back through sign-in and return here.

When the account passed its two-factor setup deadline with MFA still off, this answers 403 with code mfa_setup_required and no credential is ever minted for it.

authorizationId
required
string format: uuid

Approved.

Media typeapplication/json
object
status
required
string
Allowed values: approved
mode
required
string
Allowed values: pkce device
redirectUri

Present for pkce only. The browser navigates here to hand the CLI its authorization code. Carries the code and state, never a credential.

string
Example
{
"status": "approved",
"mode": "pkce",
"redirectUri": "http://127.0.0.1:49152/callback?code=rGYPU1M&state=u8Kq3rN1sVx2"
}

The bearer token is missing, invalid, or expired.

Media typeapplication/json
object
error
required

Human-readable error message.

string
requestId

Unique identifier for the request, also exposed as the X-Request-Id response header.

string
Example
{
"error": "The requested resource was not found.",
"requestId": "req_abc123"
}

API keys and named access keys receive a plain 403. A login session that is not a dashboard login session receives code dashboard_session_required; an old session receives reauth_required; and an account past its two-factor setup deadline receives mfa_setup_required.

Media typeapplication/json
One of:
object
error
required

Human-readable error message.

string
requestId

Unique identifier for the request, also exposed as the X-Request-Id response header.

string
Example
{
"error": "The requested resource was not found.",
"requestId": "req_abc123"
}

No pending request with that id.

Media typeapplication/json
object
error
required

Human-readable error message.

string
requestId

Unique identifier for the request, also exposed as the X-Request-Id response header.

string
Example
{
"error": "The requested resource was not found.",
"requestId": "req_abc123"
}

The request stopped being pending before the approval landed.

Media typeapplication/json
object
error
required

Human-readable error message.

string
requestId

Unique identifier for the request, also exposed as the X-Request-Id response header.

string
Example
{
"error": "The requested resource was not found.",
"requestId": "req_abc123"
}

Internal server error.

Media typeapplication/json
object
error
required

Human-readable error message.

string
requestId

Unique identifier for the request, also exposed as the X-Request-Id response header.

string
Example
{
"error": "The requested resource was not found.",
"requestId": "req_abc123"
}