REST API
IronWifi REST API enables programmatic access to your WiFi network infrastructure. Automate user management, generate access vouchers, retrieve usage analytics, and seamlessly integrate IronWifi with your existing HR, billing, building access, and visitor management systems.
Overview
The API allows you to:
- Manage users and groups programmatically
- Generate vouchers
- Retrieve reports and analytics
- Configure networks and captive portals
- Integrate with billing, HR, and access control systems
Full API documentation with interactive examples is available at api.ironwifi.com
Base URL
The primary API endpoint is:
https://console.ironwifi.com/api
Regional endpoints for lower latency:
- US East:
https://us-east1.ironwifi.com/api - US West:
https://us-west1.ironwifi.com/api - Europe:
https://europe-west2.ironwifi.com/api
Authentication
All requests require an API key in the Authorization header.
Authorization: Bearer YOUR_API_KEY
See Authentication for details on generating API keys.
Request Format
- Use HTTPS for all requests
- Send JSON payloads with
Content-Type: application/json - UTF-8 encoding required
Example: List Users
<?php
$api_key = "your_api_key_here";
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://console.ironwifi.com/api/users",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => array(
"Authorization: Bearer " . $api_key
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
Example: Create User
<?php
$api_key = "your_api_key_here";
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://console.ironwifi.com/api/users",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
"username" => "john.doe",
"email" => "john@example.com",
"fullname" => "John Doe"
]),
CURLOPT_HTTPHEADER => array(
"Authorization: Bearer " . $api_key,
"Content-Type: application/json"
),
));
$response = curl_exec($curl);
curl_close($curl);
$user = json_decode($response);
echo "Created user ID: " . $user->id;
?>
Example: Set User Password
<?php
$api_key = "your_api_key_here";
$user_id = 12345;
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://console.ironwifi.com/api/attributes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
"userid" => $user_id,
"attribute" => "Cleartext-Password",
"operator" => ":=",
"value" => "SecurePassword123",
"table" => "radcheck"
]),
CURLOPT_HTTPHEADER => array(
"Authorization: Bearer " . $api_key,
"Content-Type: application/json"
),
));
$response = curl_exec($curl);
curl_close($curl);
?>
Common Use Cases
Building Access Control
Automatically enable/disable WiFi access based on building access events.
Human Resources
Create user accounts when employees are onboarded, disable when they leave.
Visitor Management
Generate time-limited access for visitors from your check-in system.
Billing Systems
Create users and manage access based on subscription status.
Hotel PMS
Integrate with property management systems for guest WiFi access.
Rate Limits
- 100 requests per minute per API key
- Bulk operations count as single requests
- Contact support for higher limits
Error Handling
API errors return JSON with error details:
{
"error": true,
"message": "User not found",
"code": 404
}
Common HTTP status codes:
200- Success201- Created400- Bad request401- Unauthorized404- Not found429- Rate limited500- Server error
Next Steps
- Authentication - Generate and manage API keys
- API Endpoints - Complete endpoint reference
- Full Documentation - Interactive API explorer