Account authorization
Get authentication state
Returns the current authentication flow state, including code, QR, password, Passkey, session import, or an authenticated terminal state. Passkey states include passkey_required, passkey_pending, passkey_confirmation, and passkey_confirmation_sent; auth_payload may contain WebAuthn public_key material.
https://api.unifyport.ai/v1/accounts/{account_id}/authBefore you call
Use a server-side X-Api-Key for the workspace that owns the resource. Replace every placeholder before running a sample.
Prepare your parameters
- account_id
- Use data.id from account creation or an account query. Account identifiers belong to the workspace selected by X-Api-Key. Get account
Request parameters
Headers
X-Api-KeyWorkspace API key. The workspace is resolved from this header.
Path parameters
account_idIdentifier used in the authentication route.
Request body
This endpoint does not require a JSON request body.
Understand the result
Use the documented response fields and HTTP status. Successful 204 responses have no body; use X-Request-Id for diagnosis. Follow the related operations for the next step.
Response 200 OK
{
"request_id": "<REQUEST_ID>",
"data": {
"account_id": "acc_example",
"status": "awaiting_qr_scan",
"auth_fields": [
{
"type": "qr_code",
"required": true
}
],
"auth_payload": {
"qr_code": "https://example.com/qr"
},
"expires_at": "2026-01-01T00:00:00Z",
"last_error": ""
}
}
Response body
account_idProvider account this response refers to.
statusCurrent authorization flow status, for example pending_auth, awaiting_qr_scan, awaiting_code, pending, passkey_required, passkey_pending, passkey_confirmation, passkey_confirmation_sent, authorized, or failed.
auth_fields[]object[]Describes what the next step requires — each entry carries a type and whether it is required.
auth_fields[]Describes what the next step requires — each entry carries a type and whether it is required.
typeInput type required by the next authentication step, such as code or password.
requiredWhether the authentication input must be provided.
labelProvider-supplied display label for the input, when available.
placeholderProvider-supplied input placeholder, when available.
auth_payloadStandard payload needed for the current step. QR uses qr_code; code verification uses type=code; Passkey uses type=passkey and public_key. Mutually exclusive step payloads do not appear together.
expires_atRFC3339 timestamp after which the current auth_payload is no longer valid.
format: date-time
last_errorMost recent authentication error, or an empty string when there is none.
Responses
200200 OK
Request succeeded. See the example response body.
401Unauthorized
The X-Api-Key header is missing or invalid.
500Internal Server Error
The service encountered an unexpected error.
If the request fails
Inspect HTTP status and error.code/numeric_code, and keep request_id for diagnosis. Correct invalid parameters, complete required authorization or check runtime state as appropriate. Confirm the outcome before retrying a send or another write. Error reference
- invalid_request · 10000 · 400
- Check required fields, formats and channel conditions, then correct the request.
- invalid_api_key · 11001 · 401
- Check X-Api-Key and whether the workspace is active.