On this page

    1. Home
    2. API
    3. API Reference
    4. Network Create

    Network Create

    This endpoint is used to create a new network and associate it with a user authority (email, phone, or third-party JWT). A user authority can only be associated with one network at a time.


    POST /auth/network-create

    Create a new URnetwork account and network configuration.

    Request

    POST /auth/network-create

    Headers:

    {
      "Host": "api.bringyour.com",
      "Content-Type": "application/json",
      "Accept": "application/json"
    }

    Body:

    {
      "user_name": "string",
      "user_auth": "string",
      "auth_jwt": "string",
      "auth_jwt_type": "google",
      "password": "string",
      "network_name": "string",
      "terms": true,
      "referral_code": "string",
      "balance_code": "string",
      "wallet_auth": {
        "wallet_address": "string",
        "wallet_message": "string",
        "wallet_signature": "string",
        "blockchain": "SOL"
      }
    }

    Fields

    FieldTypeDescription
    user_namestringThe display name for the new account.
    user_authstringThe primary identifier (email or phone number).
    auth_jwt_typestringOptional. One of google, apple, or un.
    passwordstringThe account password. Required if not using third-party JWT.
    network_namestringRequired. The unique name for your network. Must be domain-compatible.
    termsbooleanRequired. Must be true to accept the Terms of Service.
    referral_codestringOptional. Code of the network that referred you.
    balance_codestringOptional. A top-up code to add initial data balance.
    wallet_authobjectOptional. Parameters for linking a blockchain wallet during signup.

    Response

    200 Success

    Status: 200 OK

    Content-Type: application/json

    {
      "network": {
        "by_jwt": "string",
        "network_id": "uuid",
        "network_name": "string"
      },
      "verification_required": {
        "user_auth": "string"
      },
      "error": {
        "message": "string"
      }
    }

    Fields

    FieldTypeDescription
    networkobjectDetails of the successfully created network.
    network.by_jwtstringThe authentication token for the new network.
    network.network_idstringUnique UUID assigned to the network.
    verification_requiredobjectPresent if email or phone verification is needed before completion.
    errorobjectDetails if creation failed (e.g., name taken).

    Example

    HTTP Request

    POST /auth/network-create HTTP/1.1
    Host: api.bringyour.com
    Content-Type: application/json
     
    {
      "user_name": "Alice Smith",
      "user_auth": "alice@example.com",
      "password": "secure-password-123",
      "network_name": "alices-net",
      "terms": true
    }

    Successful HTTP Response

    {
      "network": {
        "by_jwt": "eyJhbGciOi...",
        "network_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
        "network_name": "alices-net"
      },
      "verification_required": {
        "user_auth": "alice@example.com"
      }
    }


    Powered by Sudoc v2.5.0
    Hide table of contents