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
| Field | Type | Description |
|---|---|---|
user_name | string | The display name for the new account. |
user_auth | string | The primary identifier (email or phone number). |
auth_jwt_type | string | Optional. One of google, apple, or un. |
password | string | The account password. Required if not using third-party JWT. |
network_name | string | Required. The unique name for your network. Must be domain-compatible. |
terms | boolean | Required. Must be true to accept the Terms of Service. |
referral_code | string | Optional. Code of the network that referred you. |
balance_code | string | Optional. A top-up code to add initial data balance. |
wallet_auth | object | Optional. 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
| Field | Type | Description |
|---|---|---|
network | object | Details of the successfully created network. |
network.by_jwt | string | The authentication token for the new network. |
network.network_id | string | Unique UUID assigned to the network. |
verification_required | object | Present if email or phone verification is needed before completion. |
error | object | Details 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"
}
}