Complete legacy migration

Finalises the migration handoff. Two response modes:

  • mode=create — a brand-new AppUser was created, linked to the legacy account, and returns otpSent=false because the legacy PIN already proved phone possession.
  • mode=merge_required — the supplied username already exists on another app user; the FE must collect the existing-account password and submit to the merge endpoint (out of scope for US-012).

The endpoint is idempotent under the supplied Idempotency-Key header (UUID v4). Retries within 10 minutes return the original response verbatim.

Access: Public endpoint.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
required

Short-lived migration JWT minted by /app-user/migrate/verify-pin. Carries msisdn + legacyVerified=true claims and a 600s TTL.

string
required

Username for the new Prism AppUser (3–30 chars; must start with a lowercase letter; may contain lowercase letters, digits, and the separators _ . - between alphanumeric characters).

string
required
length ≥ 8

Password for the new Prism AppUser. Service-side validation (via PasswordService.validate) enforces lowercase + uppercase + digit + min length. The DTO only enforces the minimum length as a cheap pre-check.

string | null

Optional override for the AppUser first name. Defaults to the legacy_user value when omitted.

string | null

Optional override for the AppUser last name. Defaults to the legacy_user value when omitted.

Headers
string
required

Client-generated UUID v4. Identical retries within 10 minutes return the original response.

Responses

400

WEAK_PASSWORD / MISSING_IDEMPOTENCY_KEY / INVALID_IDEMPOTENCY_KEY / VALIDATION_FAILED — input shape errors.

401

MIGRATION_TOKEN_EXPIRED / MIGRATION_TOKEN_INVALID — re-run verify-pin to mint a fresh token.

409

MSISDN_ALREADY_MIGRATED — race against a concurrent /complete committed first; ACCOUNT_PRIMARY_ON_ANOTHER_APP_USER / ACCOUNT_HAS_OTHER_VERIFIED_LINKS — legacy account is already linked to another app user.

Language
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json