Skip to content
Last updated

⚙️ iVALT Admin Portal APIs

Overview

The Admin Portal APIs let you manage your organization programmatically: users, roles, authentication rules, and security policies. Control every aspect of your iValt deployment through code.


🚀 Quick Start: Manage Your Organization

Step 1: Get Organization Details

Retrieve your organization information and configuration using user ID and org code.

Endpoint: GET /user/{user_id}/organizations/{org_code}

Step 2: Manage Users

Create, update, or delete users within your organization.

Endpoints: POST /organization/{orgId}/create/user, PUT /organization/{orgId}/update/user/{userId}

Step 3: Configure Geo-Fences & Time Slots

Define location-based and time-based authentication policies for users.

Endpoints: PUT /user/{userId}/geofences/update, PUT /user/{userId}/timeslots/update

Step 4: List Organizations

View all organizations and their details for management and monitoring.

Endpoint: GET /organizations


💻 Code Examples: Common Admin Tasks

Get Organization Information

// JavaScript/Node.js Example
const axios = require('axios');

const getOrganization = async (apiKey, userId, orgCode) => {
  const response = await axios.get(
    `https://api.ivalt.com/admin/public/api/user/${userId}/organizations/${orgCode}`,
    {
      headers: {
        'x-api-key': apiKey,
        'Content-Type': 'application/json'
      }
    }
  );
  
  return response.data;
};

// Usage
const org = await getOrganization('YOUR_API_KEY', 123, 'ORG001');
console.log('Organization:', org.data);
console.log('Status:', org.status);
# Python Example
import requests

def get_organization(api_key, user_id, org_code):
    headers = {
        'x-api-key': api_key,
        'Content-Type': 'application/json'
    }
    
    response = requests.get(
        f'https://api.ivalt.com/admin/public/api/user/{user_id}/organizations/{org_code}',
        headers=headers
    )
    
    return response.json()

# Usage
org = get_organization('YOUR_API_KEY', 123, 'ORG001')
print(f"Organization: {org['data']}")
print(f"Status: {org['status']}")
# cURL Example
curl -X GET https://api.ivalt.com/admin/public/api/user/123/organizations/ORG001 \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json"

Create a New User

// JavaScript/Node.js Example
const createUser = async (apiKey, orgId, userData) => {
  const response = await axios.post(
    `https://api.ivalt.com/admin/public/api/organization/${orgId}/create/user`,
    {
      email: userData.email,
      country_code: userData.countryCode,
      mobile: userData.mobile,
      first_name: userData.firstName,
      last_name: userData.lastName
    },
    {
      headers: {
        'x-api-key': apiKey,
        'Content-Type': 'application/json'
      }
    }
  );
  
  return response.data;
};

// Usage
const newUser = await createUser('YOUR_API_KEY', 123, {
  email: 'john.doe@example.com',
  countryCode: '+1',
  mobile: '2345678901',
  firstName: 'John',
  lastName: 'Doe'
});

console.log('User created:', newUser.status);
console.log('Message:', newUser.message);
# Python Example
def create_user(api_key, org_id, user_data):
    headers = {
        'x-api-key': api_key,
        'Content-Type': 'application/json'
    }
    
    response = requests.post(
        f'https://api.ivalt.com/admin/public/api/organization/{org_id}/create/user',
        headers=headers,
        json={
            'email': user_data['email'],
            'country_code': user_data['country_code'],
            'mobile': user_data['mobile'],
            'first_name': user_data['first_name'],
            'last_name': user_data['last_name']
        }
    )
    
    return response.json()

# Usage
new_user = create_user('YOUR_API_KEY', 123, {
    'email': 'john.doe@example.com',
    'country_code': '+1',
    'mobile': '2345678901',
    'first_name': 'John',
    'last_name': 'Doe'
})

print(f"User created: {new_user['status']}")
print(f"Message: {new_user['message']}")
# cURL Example
curl -X POST https://api.ivalt.com/admin/public/api/organization/123/create/user \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "john.doe@example.com",
    "country_code": "+1",
    "mobile": "2345678901",
    "first_name": "John",
    "last_name": "Doe"
  }'

Configure User Geo-Fences

// JavaScript/Node.js Example
const updateUserGeofences = async (apiKey, userId, geofences) => {
  const response = await axios.put(
    `https://api.ivalt.com/admin/public/api/user/${userId}/geofences/update`,
    {
      geofences: geofences
    },
    {
      headers: {
        'x-api-key': apiKey,
        'Content-Type': 'application/json'
      }
    }
  );
  
  return response.data;
};

// Usage
const result = await updateUserGeofences('YOUR_API_KEY', 123, [
  {
    name: 'Office Location',
    latitude: 37.7749,
    longitude: -122.4194,
    radius: 500,
    enabled: true
  }
]);

console.log('Geo-fences updated:', result.status);
console.log('Message:', result.message);
# Python Example
def update_user_geofences(api_key, user_id, geofences):
    headers = {
        'x-api-key': api_key,
        'Content-Type': 'application/json'
    }
    
    response = requests.put(
        f'https://api.ivalt.com/admin/public/api/user/{user_id}/geofences/update',
        headers=headers,
        json={
            'geofences': geofences
        }
    )
    
    return response.json()

# Usage
result = update_user_geofences('YOUR_API_KEY', 123, [
    {
        'name': 'Office Location',
        'latitude': 37.7749,
        'longitude': -122.4194,
        'radius': 500,
        'enabled': True
    }
])

print(f"Geo-fences updated: {result['status']}")
print(f"Message: {result['message']}")
# cURL Example
curl -X PUT https://api.ivalt.com/admin/public/api/user/123/geofences/update \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "geofences": [
      {
        "name": "Office Location",
        "latitude": 37.7749,
        "longitude": -122.4194,
        "radius": 500,
        "enabled": true
      }
    ]
  }'

List All Organizations

// JavaScript/Node.js Example
const listOrganizations = async (apiKey) => {
  const response = await axios.get(
    'https://api.ivalt.com/admin/public/api/organizations',
    {
      headers: {
        'x-api-key': apiKey,
        'Content-Type': 'application/json'
      }
    }
  );
  
  return response.data;
};

// Usage
const orgs = await listOrganizations('YOUR_API_KEY');
console.log('Status:', orgs.status);
console.log('Organizations:', orgs.data);
orgs.data.forEach(org => {
  console.log(`- ${org.name} (${org.slug})`);
});
# Python Example
def list_organizations(api_key):
    headers = {
        'x-api-key': api_key,
        'Content-Type': 'application/json'
    }
    
    response = requests.get(
        'https://api.ivalt.com/admin/public/api/organizations',
        headers=headers
    )
    
    return response.json()

# Usage
orgs = list_organizations('YOUR_API_KEY')
print(f"Status: {orgs['status']}")
print(f"Organizations: {orgs['data']}")
for org in orgs['data']:
    print(f"- {org['name']} ({org['slug']})")
# cURL Example
curl -X GET https://api.ivalt.com/admin/public/api/organizations \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json"

🔧 Key Capabilities

FeatureDescription
Organization ManagementRetrieve org details, auth codes, and configuration settings.
User & Role ManagementCreate, update, delete users and assign roles with granular permissions.
Security RulesConfigure geo-fencing, time windows and device trust policies.
Audit & MonitoringAccess authentication logs, track security events, and monitor user activity.
Bulk OperationsImport/export users, apply rules in bulk, and manage at scale.

🛡️ Available Rule Types

Configure these security policies to control authentication:

Rule TypeDescriptionUse Case
Geo-FenceRestrict authentication to specific geographic locationsOffice-only access, regional restrictions
Time WindowAllow authentication only during specific hours/daysBusiness hours enforcement, scheduled access
Device TrustRequire registered and trusted devices for authenticationBYOD policies, device management
Multi-FactorEnforce additional verification factors beyond biometricsHigh-security environments, compliance

📚 Next Steps

  • Explore the full API reference in the sidebar
  • Learn about authentication in the Authentication APIs
  • Test endpoints using the Try It console on each API page
  • Review best practices for security rule configuration