Skip to content

Verify proof and register the guest while retaining the subject.

POST
/api/account/guest-upgrade/complete
Code sample: Shell / cURL
curl --request POST \
--url https://auth.example.com/api/account/guest-upgrade/complete \
--header 'Content-Type: application/json' \
--cookie authrim_session=<authrim_session> \
--data '{ "operation_id": "example", "upgrade_token": "example", "code": "example", "passkey_response": {}, "preserve_sub": true }'

Requires the initiating browser session, opaque token and CSRF protection. Email codes allow at most five attempts. Passkeys require user verification and the original origin and relying-party ID. Permissions are rechecked before registration is admitted. Existing identities return identity_already_registered without merging accounts. Passing the deletion deadline does not prevent registration until deletion starts. Accepted operations can be retried after a transient failure, including after proof expiry. Completion cancels guest retention without increasing previously granted scopes.

Media type application/json
object
operation_id
required
string
<= 100 characters
upgrade_token
required
string
/^[a-f0-9]{64}$/
code

Required for the initial email proof.

string
/^[0-9]{6}$/
passkey_response

WebAuthn RegistrationResponseJSON for the initial passkey proof.

object
preserve_sub
boolean
default: true

Registration completed with the original subject.

Media type application/json
object
success
required
boolean
user_id
required
string
preserve_sub
required
boolean
Example
{
"success": true,
"preserve_sub": true
}

Registration is in progress. Retry the same operation and token.

Media type application/json
object
status
string
Allowed values: in_progress
Example
{
"status": "in_progress"
}

Error response.

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

Stable Authrim error category that can be provided to support.

string
/^AR[0-9]{6}$/
error_id

Opaque occurrence identifier that can be provided to support for correlation.

string format: uuid
key
additional properties
Example generated
{
"error": "example",
"message": "example",
"error_description": "example",
"error_code": "example",
"error_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

Error response.

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

Stable Authrim error category that can be provided to support.

string
/^AR[0-9]{6}$/
error_id

Opaque occurrence identifier that can be provided to support for correlation.

string format: uuid
key
additional properties
Example generated
{
"error": "example",
"message": "example",
"error_description": "example",
"error_code": "example",
"error_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

Error response.

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

Stable Authrim error category that can be provided to support.

string
/^AR[0-9]{6}$/
error_id

Opaque occurrence identifier that can be provided to support for correlation.

string format: uuid
key
additional properties
Example generated
{
"error": "example",
"message": "example",
"error_description": "example",
"error_code": "example",
"error_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

Registration is unavailable or the identity already belongs to an account. identity_already_registered includes existing_login_available=true so the UI can offer a separate login.

Media type application/json
object
error
required
string
existing_login_available
boolean
Example generated
{
"error": "example",
"existing_login_available": true
}

Error response.

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

Stable Authrim error category that can be provided to support.

string
/^AR[0-9]{6}$/
error_id

Opaque occurrence identifier that can be provided to support for correlation.

string format: uuid
key
additional properties
Example generated
{
"error": "example",
"message": "example",
"error_description": "example",
"error_code": "example",
"error_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

Error response.

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

Stable Authrim error category that can be provided to support.

string
/^AR[0-9]{6}$/
error_id

Opaque occurrence identifier that can be provided to support for correlation.

string format: uuid
key
additional properties
Example generated
{
"error": "example",
"message": "example",
"error_description": "example",
"error_code": "example",
"error_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}