Search documentation

Type a word or phrase to search documentation.

    Reference

    Account authentication

    Website sign-in and wallet authority

    Start website sign-in at Legra account sign-in. The available identity providers depend on the environment's configuration. A provider login identifies a Legra account. It does not select a wallet or grant permission to sign wallet operations.

    Wallet signing requires device proof. Workspace access still requires the applicable permissions; signing in does not grant access to every workspace.

    Merge account sign-ins

    The account merge flow requires fresh proof of both accounts and an explicit choice of the Legra identity to keep. Email equality is not proof that two accounts belong to the same person.

    Both provider sign-ins resolve to the surviving identity after confirmation. Existing sessions become invalid, and the flow establishes a new sign-in. Merging sign-ins does not transfer wallet keys or workspace ownership.

    Associate a wallet with the surviving account

    Wallet association requires a separate approval using an enrolled device and proof of the selected wallet. Review the destination Legra account and any existing association before approving. Provider sign-in alone cannot approve this change.

    The association changes which Legra account is linked to the wallet. It does not replace wallet keys, grant workspace permissions or combine organization roles. If another approval has changed the association, read its current state before making a new choice.

    A timeout leaves the outcome unconfirmed. Check the wallet's record for the original operation before submitting another approval. A recorded operation may have succeeded and later been replaced; check the current association as well.

    Choose a primary email

    Open account sign-in methods to see the provider accounts linked to your Legra identity. Select a verified email and choose Use this email. The page confirms the change after reading the updated profile.

    Signing in through another linked provider does not automatically change this selection. If the selected provider no longer verifies that email, it cannot be used as the account's verified primary email. Choose another verified address.

    Changing the primary email does not grant wallet-signing permissions. A website may evaluate the verified address alongside its own access policy and grants.

    Website integration endpoints

    These paths belong to https://legra.ai, not a gateway. They use host-only, HttpOnly cookies. Mutations require the website's exact Origin.

    RequestPurpose
    POST /api/account-auth/merge/preparationPrepare fixed correlation for a merge
    POST /api/account-auth/mergeStart or retry the prepared operation
    GET /api/account-auth/mergeRead its current state and configured providers
    POST /api/account-auth/merge/proofStart a provider proof for one account
    POST /api/account-auth/merge/confirmationConfirm the selected surviving identity
    POST /api/account-auth/merge/cancellationCancel an uncompleted merge
    GET /api/account-auth/profileRead the account's current verified primary email
    GET /api/account-auth/profile/provider-accountsRead a page of linked provider accounts
    PUT /api/account-auth/profile/primary-emailSelect an explicitly chosen verified email
    POST /api/account-auth/wallet-associationPrepare explicit wallet-association consent
    POST /api/account-auth/wallet-association/proofSubmit the approved original device proof once

    Preparation, creation and cancellation take no request body. Proof requests use JSON with role (source or candidate) and a configured provider_id. Confirmation uses survivor and expected_confirmation_digest from the current preview's selected choice. Do not construct or change that digest.

    Keep the original cookies for retries. Do not place merge credentials in URLs, browser storage or logs. A timeout does not prove whether a mutation completed; read the operation before presenting an outcome. Cancellation leaves the existing sign-in intact. A confirmed merge cannot be undone by cancelling it.

    Profile management requires an active website account session with email consent. Provider-account pages contain at most 64 entries. Pass a returned next_cursor unchanged as the next request's after query parameter; do not construct a cursor.

    The primary-email request contains expected_account_revision, provider, email, observed_at and expected_selection. Copy these from the current page and the chosen entry: email is its verified_email, and expected_selection is the page's selection, including null when no email is selected. Entries without a verified email cannot be selected. A conflict requires reading the current page before making another choice. These requests never accept account credentials or a replacement account identity from the browser.

    Wallet-association preparation returns the exact consent and a short-lived proof challenge. Sign only the reviewed consent. Keep the preparation cookie for proof submission; do not retry the mutation automatically after an uncertain response. Reading the resulting wallet record requires separate wallet authorization.

    For gateway-side integration, use the issuer endpoints in your gateway's /openapi.json. Gateway HTTPS APIs use port 4242; browser interaction and provider callback pages belong to Apex.