Create User API
Create new user accounts with profile information through the admin API
Create User API
Create new user accounts with complete profile information. Provision VPN access for customers with account credentials and personal details.
Create Accounts
Provision new users.
Full Profile
Include personal details.
Admin Control
Manage user creation.
Endpoint Overview
/graphqlCreate a new user account with profile information. The admin can specify email, password, reseller assignment, and personal profile details.
Request Parameters
user.emailString!RequiredEmail address for the new user account (used for login).
user.passwordString!RequiredInitial password for the user account.
user.resellerIdIntReseller ID to associate with this user.
userProfile.firstNameStringUser's first name.
userProfile.lastNameStringUser's last name.
userProfile.phoneStringContact phone number.
userProfile.addressStringStreet address.
userProfile.cityStringCity name.
userProfile.countryStringCountry code or name.
userProfile.postalCodeStringPostal/ZIP code.
userProfile.birthDateStringDate of birth (YYYY-MM-DD format).
GraphQL Mutation
mutation createUser($user: UserCreate!, $userProfile: UserProfileEdit) {
createUser(user: $user, userProfile: $userProfile) {
id
email
username
enabled
createdAt
}
}Variables:
{
"user": {
"email": "newuser@example.com",
"password": "SecurePass123!",
"resellerId": 100
},
"userProfile": {
"firstName": "John",
"lastName": "Doe",
"phone": "+1234567890",
"address": "123 Main Street",
"city": "New York",
"country": "US",
"postalCode": "10001",
"birthDate": "1990-05-15"
}
}HTTP Request:
curl -X POST https://api.orbnet.com/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
-d '{
"query": "mutation createUser($user: UserCreate!, $userProfile: UserProfileEdit) { createUser(user: $user, userProfile: $userProfile) { id email username } }",
"variables": {
"user": {
"email": "newuser@example.com",
"password": "SecurePass123!"
},
"userProfile": {
"firstName": "John",
"lastName": "Doe"
}
}
}'Response
{
"data": {
"createUser": {
"id": "user_12345",
"email": "newuser@example.com",
"username": "johndoe",
"enabled": true,
"createdAt": "2024-01-15T10:30:00Z"
}
}
}{
"errors": [
{
"message": "User with this email already exists",
"path": ["createUser"],
"extensions": {
"code": "EMAIL_EXISTS"
}
}
],
"data": null
}Best Practices
Strong Passwords
Require secure passwords that meet security standards.
Validate Email
Ensure email format is valid before creation.
Complete Profile
Collect necessary profile info for support.
Welcome Message
Send credentials to user after creation.
Related Endpoints
Admin Permission Required
This endpoint requires admin-level authentication. Only administrators can create new user accounts.
Need to Create Multiple Users?
Use the Upload Users endpoint for bulk user creation.