Use ITFlow's API to work with ITFlow in scripts third-party applications.
The current version of the ITFlow API is v1. It can be accessed at itflow.example.com/api/v1/{module}/{function}.php
limit
and offset
parameters.client_id
parameter is always required if the API key used has scope/access to all clientsDocumentation / an example of how to use a module API endpoint is shown on that module's doc page. Additional examples are available here.
Current API v1 Endpoints, Authentication, Examples, and Integration Guide
curl "https://itflow.yourdomain.com/api/v1/clients/read.php?api_key=YOUR_KEY&limit=1"
{ "success": "True", "count": 1, "data": [{"client_id": "123", "client_name": "Example Corp"}] }
Source: ITFlow official documentation at docs.itflow.org/api
/api/v1/{module}/{function}.php
?api_key=YOUR_KEY
success
, message
, count
, data
fieldslimit
and offset
parametersapplication/json
for POST requestsSource: ITFlow official API documentation
{ "success": "True|False", "message": "Descriptive status message", "count": 50, "data": [ { "id": 123, "field": "value" } ] }
client_id
required)?api_key=YOUR_KEY
Source: MSP community recommendations and security standards
Source: ITFlow official API documentation confirms these modules have API support:
Purpose: Computer and equipment inventory management
Source: ITFlow Assets Documentation
GET /read.php
- List/get asset informationPOST /create.php
- Create new asset recordPOST /update.php
- Update existing assetPOST /delete.php
- Delete asset recordComplete Fields (from ITFlow Assets API Documentation):
{ "asset_id": 123, "client_id": 456, "asset_name": "Sample Laptop", "asset_type": "Laptop", "asset_make": "Dell", "asset_model": "Optiplex", "asset_serial": "XYZ", "asset_os": "Win 10", "asset_ip": "", "asset_mac": "", "asset_status": "Deployed", "asset_purchase_date": "0000-00-00", "asset_warranty_expire": "0000-00-00", "install_date": "0000-00-00", "asset_notes": "", "asset_vendor_id": "", "asset_location_id": "", "asset_contact_id": "", "asset_network_id": "" }
Purpose: SSL/TLS certificate management and expiration tracking
Source: ITFlow Certificates Documentation
GET /read.php
- List/get certificate informationPOST /create.php
- Create certificate recordPOST /update.php
- Update certificate detailsPOST /delete.php
- Delete certificate recordComplete Fields (from ITFlow Certificates API Documentation):
{ "certificate_id": 123, "client_id": 456, "certificate_name": "ITFlow Demo", "certificate_domain": "demo.itflow.org", "certificate_issued_date": "2024-01-01", "certificate_expire_date": "2025-01-01", "certificate_issuer": "Let's Encrypt", "certificate_public_key": "[Certificate content]", "certificate_notes": "Auto-renewal enabled" }
Purpose: Customer/company management
Source: ITFlow Clients Documentation
GET /read.php
- List/get client informationPOST /create.php
- Create new clientPOST /update.php
- Update client detailsPOST /delete.php
- Delete client recordComplete Fields (from ITFlow Clients API Documentation):
{ "client_id": 111, "client_lead": 0, "client_name": "Let it burn Inc", "client_type": "Safety and Fire", "client_website": "example.com" }
<wrap em>Note: Full field list is partially documented. The API returns numbered keys alongside named keys in the response format.</wrap>
Purpose: Individual contact management within client organizations
Source: ITFlow official API documentation lists contacts as supported module
GET /read.php
- List/get contact informationPOST /create.php
- Create new contactPOST /update.php
- Update contact detailsPOST /delete.php
- Delete contact record
Available Fields: Contact table structure includes fields like contact_department
as confirmed by GitHub Issue #458, but complete API field specification is not fully documented.
Purpose: Password and login management (encrypted storage)
Source: ITFlow official API documentation lists credentials (logins) as supported module
GET /read.php
- List/get credential informationPOST /create.php
- Create new credential recordPOST /update.php
- Update credential detailsPOST /delete.php
- Delete credential record
Available Fields: Database migration scripts confirm login_folder_id
field addition, but complete API field specification requires further documentation.
Purpose: Domain name management and renewal tracking
Source: ITFlow Domains Documentation
GET /read.php
- List/get domain informationPOST /create.php
- Create domain recordPOST /update.php
- Update domain detailsPOST /delete.php
- Delete domain recordComplete Fields (from ITFlow Domains API Documentation):
{ "domain_id": 123, "client_id": 456, "domain_name": "itflow.org", "domain_registrar": "GoDaddy", "domain_webhost": "SiteGround", "domain_expire": "2025-03-15", "domain_ip": "192.168.1.1", "domain_name_servers": "ns1.example.com, ns2.example.com", "domain_mail_servers": "mx1.example.com", "domain_notes": "Auto-renewal enabled" }
Purpose: Network infrastructure documentation
Source: ITFlow official API documentation lists networks as supported module
GET /read.php
- List/get network informationPOST /create.php
- Create network recordPOST /update.php
- Update network detailsPOST /delete.php
- Delete network recordAvailable Fields: Database migration scripts show network interface relationships, but complete API field specification requires further documentation.
Purpose: Software license and application tracking
Source: ITFlow official API documentation lists software as supported module
GET /read.php
- List/get software informationPOST /create.php
- Create software recordPOST /update.php
- Update software detailsPOST /delete.php
- Delete software recordStatus: Module confirmed as available but dedicated documentation page not found. Database includes software table as confirmed by installation scripts.
Purpose: Help desk and issue tracking
Source: ITFlow Tickets Documentation
GET /read.php
- List/get ticket informationPOST /create.php
- Create new ticketPOST /update.php
- Update ticket detailsPOST /delete.php
- Delete ticket recordComplete Fields (from ITFlow Tickets API Documentation):
{ "ticket_id": 3, "ticket_prefix": "TCK-", "ticket_number": 3, "ticket_category": null, "ticket_subject": "Computer broken" }
<wrap em>Note: Full field list is partially documented. The API returns numbered keys alongside named keys in the response format.</wrap>
client_id
- Filter by specific clientlimit
- Number of records to return (default: 50)offset
- Number of records to skip for pagination{ "success": "True|False", "message": "Descriptive message", "count": 1, "data": [ { // Record data with both numbered and named keys } ] }
?api_key=YOUR_API_KEY
GET /api/v1/clients/read.php?api_key=YOUR_KEY
GET /api/v1/assets/read.php?api_key=YOUR_KEY&asset_id=123
POST /api/v1/tickets/create.php Content-Type: application/json { "api_key": "YOUR_KEY", "client_id": 456, "ticket_subject": "Printer offline", "ticket_details": "Office printer not responding", "ticket_priority": "Medium" }
GET /api/v1/assets/read.php?api_key=YOUR_KEY&client_id=456
Source: HTTP standard codes - ITFlow API observed behavior
Source: Observed API responses
{ "success": "False", "message": "Invalid API key", "count": 0, "data": [] }
Source: Community experience and ITFlow Installation Documentation
client_id
parameter for scoped keys/var/log/apache2/error.log
Source: ITFlow admin settings and ITFlow FAQ
Enable PHP error reporting in ITFlow settings for detailed error messages during development.
Source: ITFlow PowerShell Repository
List All Clients:
$apiKey = "YOUR-API-KEY" $baseUrl = "https://itflow.yourdomain.com" $uri = "$baseUrl/api/v1/clients/read.php?api_key=$apiKey" Invoke-RestMethod -Uri $uri | ConvertTo-Json
Create New Asset:
$uri = "https://itflow.yourdomain.com/api/v1/assets/create.php" $body = @{ "api_key" = "YOUR-API-KEY" "asset_name" = "Sample Laptop" "asset_type" = "Laptop" "asset_make" = "Dell" "asset_model" = "Optiplex" "client_id" = "1" } | ConvertTo-Json Invoke-RestMethod -Method Post -Uri $uri -Body $body -ContentType "application/json"
<?php $api_key = 'YOUR_API_KEY'; $base_url = 'https://itflow.yourdomain.com/api/v1/'; // Get clients $url = $base_url . 'clients/read.php?api_key=' . $api_key; $response = file_get_contents($url); $data = json_decode($response, true); print_r($data); ?>
import requests api_key = "YOUR_API_KEY" base_url = "https://itflow.yourdomain.com/api/v1/" # Get all clients response = requests.get(f"{base_url}clients/read.php?api_key={api_key}") data = response.json() print(data) # Create new ticket ticket_data = { "api_key": api_key, "client_id": 456, "ticket_subject": "Network issue", "ticket_details": "Unable to access shared drive", "ticket_priority": "High" } response = requests.post(f"{base_url}tickets/create.php", json=ticket_data) result = response.json() print(result)