On this page

    1. Home
    2. API
    3. API Reference
    4. Upgrade Guest

    Upgrade Guest

    This endpoint facilitates the transition of a temporary guest account to a permanent, registered network. This involves providing permanent authentication credentials (like an email and password) and establishing a unique network name.


    POST /auth/upgrade-guest

    Convert a guest session into a full network account.

    Request

    POST /auth/upgrade-guest

    Headers:

    {
      "Host": "api.bringyour.com",
      "Content-Type": "application/json",
      "Authorization": "Bearer <GUEST_JWT_TOKEN>"
    }

    Body:

    {
      "user_auth": "user@example.com",
      "password": "secure-password-123",
      "network_name": "my-permanent-network",
      "auth_jwt_type": "un",
      "wallet_auth": null
    }

    Fields

    FieldTypeDescription
    user_authstringRequired. The permanent email or phone number for the user.
    network_namestringRequired. The unique name for the new network.
    passwordstringThe password for the new account (required if not using third-party JWT).
    auth_jwtstringOptional third-party authentication token (Apple/Google).
    auth_jwt_typestringType of registration token. One of: google, apple, un.
    wallet_authobjectOptional wallet signature data for blockchain-linked accounts.

    Response

    200 Success

    Status: 200 OK

    Content-Type: application/json

    A successful response indicates the upgrade has initiated. Depending on the user_auth provided, verification may be required.

    {
      "network": {
        "by_jwt": "eyJhbGciOiJIUzI1NiI..."
      },
      "verification_required": {
        "user_auth": "user@example.com"
      },
      "error": {
        "message": null
      }
    }

    Fields

    FieldTypeDescription
    networkobjectContains the permanent authorized network session.
    network.by_jwtstringThe new JWT for authorized network requests.
    verification_requiredobjectPresent if the new user_auth needs to be verified (e.g., via email code).
    errorobjectContains error details if the upgrade failed (can be null).

    Example

    HTTP Request

    POST /auth/upgrade-guest HTTP/1.1
    Host: api.bringyour.com
    Content-Type: application/json
    Authorization: Bearer GUEST_TOKEN_HERE
     
    {
      "user_auth": "support@ur.io",
      "network_name": "prod-network-01",
      "password": "temporary-password-999"
    }

    Successful HTTP Response

    {
      "network": {
        "by_jwt": "eyJhbGciOiJIUzI1NiI..."
      },
      "verification_required": {
        "user_auth": "support@ur.io"
      }
    }


    Powered by Sudoc v2.5.0
    Hide table of contents