Skip to content

Complete router-side initial setup.

POST
/api/admin-init-setup/complete
Code sample: Shell / cURL
curl --request POST \
--url https://auth.example.com/api/admin-init-setup/complete \
--header 'Content-Type: application/json' \
--data '{}'

Validates the temporary setup session, permanently disables router-side setup, cleans up setup CSRF state, and returns Admin UI passkey setup handoff details.

Media type application/json

Requires X-Setup-Session header; JSON body is ignored.

object
key
additional properties
Example
{}

Successful JSON response.

Media type application/json
object
success
required
boolean
user
required
object
id
string
email
string format: email
name
Any of:
string
role
string
message
required
string
admin_ui_url
Any of:
string format: uri
admin_ui_setup_url
Any of:
string format: uri
setup_token
required
string
cli_fallback
required
string
Example
{
"success": true,
"user": {
"id": "admin_123",
"email": "[email protected]",
"name": "Admin User",
"role": "system_admin"
},
"message": "Administrator account created. Please complete passkey registration on Admin UI.",
"admin_ui_url": "https://admin.example.com",
"admin_ui_setup_url": "https://admin.example.com/setup/complete?token=admin_setup_token_123",
"setup_token": "admin_setup_token_123",
"cli_fallback": "If the Admin UI setup URL does not work, run: npx @authrim/setup admin-passkey --env <env>"
}

Error response.

Media type application/json
object
error
string
error_description
string
message
string
webauthn_signal

Optional browser-side WebAuthn Signal API hint. When unknown_credential is true, clients that just received a WebAuthn credential assertion may call PublicKeyCredential.signalUnknownCredential() for that credential ID.

object
unknown_credential
boolean
key
additional properties
Example generated
{
"error": "example",
"error_description": "example",
"message": "example",
"webauthn_signal": {
"unknown_credential": true
}
}

Error response.

Media type application/json
object
error
string
error_description
string
message
string
webauthn_signal

Optional browser-side WebAuthn Signal API hint. When unknown_credential is true, clients that just received a WebAuthn credential assertion may call PublicKeyCredential.signalUnknownCredential() for that credential ID.

object
unknown_credential
boolean
key
additional properties
Example generated
{
"error": "example",
"error_description": "example",
"message": "example",
"webauthn_signal": {
"unknown_credential": true
}
}

Error response.

Media type application/json
object
error
string
error_description
string
message
string
webauthn_signal

Optional browser-side WebAuthn Signal API hint. When unknown_credential is true, clients that just received a WebAuthn credential assertion may call PublicKeyCredential.signalUnknownCredential() for that credential ID.

object
unknown_credential
boolean
key
additional properties
Example generated
{
"error": "example",
"error_description": "example",
"message": "example",
"webauthn_signal": {
"unknown_credential": true
}
}