Create New User by Admin API

Admin endpoint for creating users with full control over group, reseller, and device assignments

Admin

Create New User by Admin API

Create users with full administrative control. Assign groups, resellers, device limits, and complete profile information in a single operation.

Full Control

All user settings available.

Group Assignment

Assign to any group.

Reseller Assignment

Associate with resellers.


Endpoint Overview

MUTATION/graphql

Create a new user with comprehensive admin options including group assignment, reseller association, device limits, and full profile details.

Authentication:Bearer Token
Required scopes:admin

Request Parameters

groupIdInt!Required

The ID of the subscription group for the new user.

emailString!Required

Email address for the new user account.

userNameString!Required

Username for the new user.

firstNameString!Required

User's first name.

lastNameString!Required

User's last name.

resellerIdInt

Reseller ID to associate with this user.

devicesString

Maximum number of devices allowed.

countryString

User's country code.

phoneString

Contact phone number.


GraphQL Mutation

mutation createNewUserByAdmin(
  $groupId: Int!,
  $resellerId: Int,
  $firstName: String!,
  $lastName: String!,
  $userName: String!,
  $email: String!,
  $devices: String,
  $country: String,
  $phone: String
) {
  createNewUserByAdmin(
    groupId: $groupId,
    resellerId: $resellerId,
    firstName: $firstName,
    lastName: $lastName,
    userName: $userName,
    email: $email,
    devices: $devices,
    country: $country,
    phone: $phone
  ) {
    id
    email
    username
    resellerId
    role
    enabled
    radAccess
    createdAt
    updatedAt
  }
}

Variables:

{
  "groupId": 100,
  "resellerId": 50,
  "firstName": "John",
  "lastName": "Smith",
  "userName": "johnsmith",
  "email": "john.smith@example.com",
  "devices": "5",
  "country": "US",
  "phone": "+1234567890"
}

HTTP Request:

curl -X POST https://api.orbnet.com/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
  -d '{
    "query": "mutation createNewUserByAdmin($groupId: Int!, $firstName: String!, $lastName: String!, $userName: String!, $email: String!) { createNewUserByAdmin(groupId: $groupId, firstName: $firstName, lastName: $lastName, userName: $userName, email: $email) { id email username enabled } }",
    "variables": {
      "groupId": 100,
      "firstName": "John",
      "lastName": "Smith",
      "userName": "johnsmith",
      "email": "john.smith@example.com"
    }
  }'

Response

200User Created Successfully
{
  "data": {
    "createNewUserByAdmin": {
      "id": "user_12345",
      "email": "john.smith@example.com",
      "username": "johnsmith",
      "resellerId": "50",
      "role": "user",
      "enabled": true,
      "radAccess": "generated_access_key",
      "createdAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-01-15T10:30:00Z"
    }
  }
}
400Invalid Group
{
  "errors": [
    {
      "message": "Group with ID 100 not found",
      "path": ["createNewUserByAdmin"],
      "extensions": {
        "code": "INVALID_GROUP"
      }
    }
  ],
  "data": null
}

Configuration Options

Group Assignment

Select subscription plan and features.

Reseller Link

Associate with reseller account.

Device Limits

Set maximum connected devices.

Location Data

Store country and contact info.


Use Cases

Enterprise Provisioning

Create users for corporate accounts.

Reseller Allocation

Assign users to reseller groups.

Trial Accounts

Create trial users with specific limits.

VIP Users

Set up premium accounts manually.



Generated Credentials

When no password is specified, the system generates secure credentials. The radAccess field contains the generated access key for VPN authentication.

Need to Create Many Users?

Use the Upload Users endpoint for bulk user provisioning.

Upload Users