Use ITFlow's API to work with ITFlow in scripts and 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
We are in the process of creating dedicated API documentation accessible at: https://developer.itflow.org
limit and offset parameters.client_id parameter is always required if the API key used has scope/access to all clientsCurrent 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"}]
}
/api/v1/{module}/{function}.php?api_key=YOUR_KEYsuccess, message, count, data fieldslimit and offset parametersapplication/json for POST requests{
"success": "True|False",
"message": "Descriptive status message",
"count": 50,
"data": [
{
"id": 123,
"field": "value"
}
]
}
{
"success": "True",
"count": "1",
"data": [
{
"insert_id": 123
}
]
}
?api_key=YOUR_KEY for GET, or in JSON body for POSTPurpose: Computer and equipment inventory management
Available Endpoints:
GET /read.php - List/get asset informationPOST /create.php - Create new asset recordPOST /update.php - Update existing assetPOST /delete.php - Delete asset recordRead Parameters (GET):
| Parameter | Type | Description |
|---|---|---|
| asset_id | integer | Get specific asset by ID |
| asset_type | string | Filter by asset type (auto-capitalized) |
| asset_name | string | Filter by exact asset name |
| asset_serial | string | Filter by serial number |
| asset_mac | string | Filter by MAC address (searches primary interface) |
| asset_uri | string | Filter by URI |
Create/Update Parameters (POST):
| Parameter | Type | Required (Create) | Description |
|---|---|---|---|
| api_key | string | Yes | API authentication key |
| client_id | integer | Yes* | Required if API key has all-client access |
| asset_name | string | Yes | Asset name/hostname |
| asset_description | string | No | Asset description |
| asset_type | string | No | Type (Laptop, Desktop, Server, etc.) |
| asset_make | string | No | Manufacturer |
| asset_model | string | No | Model name/number |
| asset_serial | string | No | Serial number |
| asset_os | string | No | Operating system |
| asset_ip | string | No | IP address (stored in primary interface) |
| asset_mac | string | No | MAC address (stored in primary interface) |
| asset_uri | string | No | Management URL |
| asset_status | string | No | Status (Deployed, Spare, etc.) |
| asset_purchase_date | date | No | Purchase date (YYYY-MM-DD) |
| asset_warranty_expire | date | No | Warranty expiration date |
| asset_install_date | date | No | Installation date |
| asset_notes | string | No | Notes |
| asset_vendor_id | integer | No | Associated vendor ID |
| asset_location_id | integer | No | Associated location ID |
| asset_contact_id | integer | No | Associated contact ID |
| asset_network_id | integer | No | Network ID for primary interface |
Update Additional Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| asset_id | integer | Yes | ID of asset to update |
Delete Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| asset_id | integer | Yes | ID of asset to delete |
<wrap em>Note: Deleting an asset also removes all associated network interfaces.</wrap>
Example - Create Asset:
curl -X POST "https://itflow.example.com/api/v1/assets/create.php" \ -H "Content-Type: application/json" \ -d '{ "api_key": "YOUR_API_KEY", "client_id": 1, "asset_name": "DESKTOP-001", "asset_type": "Desktop", "asset_make": "Dell", "asset_model": "OptiPlex 7090", "asset_serial": "ABC123XYZ", "asset_os": "Windows 11 Pro", "asset_ip": "192.168.1.100", "asset_mac": "00:11:22:33:44:55", "asset_status": "Deployed" }'
Purpose: SSL/TLS certificate management and expiration tracking
Available Endpoints:
GET /read.php - List/get certificate informationPOST /create.php - Create certificate record<wrap em>Note: Update and delete endpoints are not implemented.</wrap>
Read Parameters (GET):
| Parameter | Type | Description |
|---|---|---|
| certificate_id | integer | Get specific certificate by ID |
| certificate_name | string | Filter by certificate name |
Create Parameters (POST):
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | API authentication key |
| client_id | integer | Yes* | Required if API key has all-client access |
| certificate_name | string | Yes | Certificate friendly name |
| certificate_domain | string | Yes | Domain the certificate covers |
| certificate_description | string | No | Description |
| certificate_issued_by | string | No | Issuing authority (e.g., Let's Encrypt) |
| certificate_expire | date | No | Expiration date (YYYY-MM-DD) |
| certificate_public_key | string | No | Certificate content/public key |
| certificate_notes | string | No | Additional notes |
| certificate_domain_id | integer | No | Link to domains table |
Purpose: Customer/company management
Available Endpoints:
GET /read.php - List/get client informationPOST /create.php - Create new clientPOST /update.php - Update client detailsPOST /archive.php - Archive clientPOST /unarchive.php - Unarchive client<wrap em>Note: Delete endpoint is not implemented. Use archive instead.</wrap>
Read Parameters (GET):
| Parameter | Type | Description |
|---|---|---|
| client_name | string | Get specific client by exact name |
Create Parameters (POST):
<wrap em>Important: Creating clients requires an API key with “All Clients” scope (client_id = 0).</wrap>
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | API authentication key (must be all-client scope) |
| client_name | string | Yes | Client/company name |
| client_type | string | No | Business type/category |
| client_website | string | No | Website URL (https:// prefix auto-removed) |
| client_referral | string | No | Referral source |
| client_rate | decimal | No | Hourly rate |
| client_currency_code | string | No | Currency code (e.g., USD) |
| client_net_terms | integer | No | Payment terms in days |
| client_tax_id_number | string | No | Tax ID/EIN |
| client_abbreviation | string | No | Short code (max 6 chars) |
| client_is_lead | integer | No | Lead flag (0 or 1) |
| client_notes | string | No | Additional notes |
Update Additional Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| client_id | integer | Yes | ID of client to update |
Archive/Unarchive Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| client_id | integer | Yes | ID of client (from API key scope) |
<wrap em>Note: Archiving a client automatically stops all recurring invoices for that client.</wrap>
Purpose: Individual contact management within client organizations
Available Endpoints:
GET /read.php - List/get contact informationPOST /create.php - Create new contactPOST /update.php - Update contact detailsPOST /delete.php - Delete contact recordPOST /archive.php - Archive contactPOST /unarchive.php - Unarchive contactRead Parameters (GET):
| Parameter | Type | Description |
|---|---|---|
| contact_id | integer | Get specific contact by ID |
| contact_email | string | Get contact by email address |
| contact_phone_or_mobile | string | Get contact by phone or mobile number |
Create Parameters (POST):
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | API authentication key |
| client_id | integer | Yes* | Required if API key has all-client access |
| contact_name | string | Yes | Full name |
| contact_email | string | Yes | Email address (must be unique per client) |
| contact_title | string | No | Job title |
| contact_department | string | No | Department |
| contact_phone | string | No | Phone number (non-digits stripped) |
| contact_extension | string | No | Phone extension |
| contact_mobile | string | No | Mobile number (non-digits stripped) |
| contact_notes | string | No | Notes |
| contact_primary | integer | No | Primary contact flag (0 or 1) |
| contact_important | integer | No | Important flag (0 or 1) |
| contact_billing | integer | No | Billing contact flag (0 or 1) |
| contact_technical | integer | No | Technical contact flag (0 or 1) |
| contact_location_id | integer | No | Associated location ID |
<wrap em>Note: Setting contact_primary = 1 will remove primary flag from other contacts for that client.</wrap>
Update Additional Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| contact_id | integer | Yes | ID of contact to update |
Delete Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| contact_id | integer | Yes | ID of contact to delete |
Archive/Unarchive Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| contact_id | integer | Yes | ID of contact to archive/unarchive |
<wrap em>Note: Archiving a contact also archives their associated user account if one exists.</wrap>
Purpose: Password and login management (encrypted storage)
Available Endpoints:
GET /read.php - List/get credential informationPOST /create.php - Create new credential recordPOST /update.php - Update credential details<wrap em>Note: Delete endpoint is not implemented.</wrap>
<wrap em>Important: The api_key_decrypt_password parameter is required for ALL credential operations.</wrap>
Read Parameters (GET):
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key_decrypt_password | string | Yes | Decryption password for the API key |
| credential_id | integer | No | Get specific credential by ID |
Create Parameters (POST):
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | API authentication key |
| api_key_decrypt_password | string | Yes | Decryption password |
| client_id | integer | Yes* | Required if API key has all-client access |
| credential_name | string | Yes | Credential name/label |
| credential_password | string | Yes | Password (will be encrypted) |
| credential_description | string | No | Description |
| credential_uri | string | No | Login URL |
| credential_uri_2 | string | No | Secondary URL |
| credential_username | string | No | Username (will be encrypted) |
| credential_otp_secret | string | No | TOTP/2FA secret |
| credential_note | string | No | Additional notes |
| credential_important | integer | No | Important flag (0 or 1) |
| credential_contact_id | integer | No | Associated contact ID |
| credential_vendor_id | integer | No | Associated vendor ID |
| credential_asset_id | integer | No | Associated asset ID |
| credential_software_id | integer | No | Associated software ID |
Update Additional Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| credential_id | integer | Yes | ID of credential to update |
| api_key_decrypt_password | string | Yes | Decryption password |
<wrap em>Note: Updating the password field automatically updates the password_changed_at timestamp.</wrap>
Purpose: Internal documentation and knowledge base articles
Available Endpoints:
GET /read.php - List/get document informationPOST /create.php - Create new documentPOST /update.php - Update document<wrap em>Note: Delete endpoint is not implemented.</wrap>
Read Parameters (GET):
| Parameter | Type | Description |
|---|---|---|
| document_id | integer | Get specific document by ID |
Create Parameters (POST):
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | API authentication key |
| client_id | integer | Yes* | Required if API key has all-client access |
| document_name | string | Yes | Document title |
| document_content | string | Yes | Document content (HTML supported) |
| document_description | string | No | Brief description |
| document_folder_id | integer | No | Folder ID for organization |
Update Additional Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| document_id | integer | Yes | ID of document to update |
Purpose: Domain name management and renewal tracking
Available Endpoints:
GET /read.php - List/get domain information<wrap em>Note: Create, update, and delete endpoints are not implemented.</wrap>
Read Parameters (GET):
| Parameter | Type | Description |
|---|---|---|
| domain_id | integer | Get specific domain by ID |
| domain_name | string | Get domain by exact name |
Response Fields:
| Field | Type | Description |
|---|---|---|
| domain_id | integer | Primary key |
| domain_name | string | Domain name |
| domain_description | string | Description |
| domain_expire | date | Expiration date |
| domain_ip | string | IP address(es) |
| domain_name_servers | string | Name servers |
| domain_mail_servers | string | MX records |
| domain_txt | string | TXT records |
| domain_raw_whois | string | Raw WHOIS data |
| domain_notes | string | Notes |
| domain_registrar | integer | Registrar vendor ID |
| domain_webhost | integer | Web host vendor ID |
| domain_dnshost | integer | DNS host vendor ID |
| domain_mailhost | integer | Mail host vendor ID |
| domain_client_id | integer | Client ID |
Purpose: Track business expenses
Available Endpoints:
GET /read.php - List/get expense information<wrap em>Note: Create, update, and delete endpoints are not implemented.</wrap>
<wrap em>Important: Expenses require an API key with “All Clients” scope.</wrap>
Read Parameters (GET):
| Parameter | Type | Description |
|---|---|---|
| expense_id | integer | Get specific expense by ID |
Purpose: Access invoice records
Available Endpoints:
GET /read.php - List/get invoice information<wrap em>Note: Create, update, and delete endpoints are not implemented.</wrap>
Read Parameters (GET):
| Parameter | Type | Description |
|---|---|---|
| invoice_id | integer | Get specific invoice by ID |
Purpose: Retrieve line items associated with invoices
Available Endpoints:
GET /read.php - List/get invoice line items| Parameter | Type | Description |
|---|---|---|
| invoice_id | integer | Filter items by invoice ID |
| item_id | integer | Get a specific line item by ID |
| Field | Type | Description |
|---|---|---|
| item_id | integer | Unique line item ID |
| item_name | string | Name/title of the line item |
| item_description | string | Description or notes |
| item_quantity | decimal | Quantity billed |
| item_price | decimal | Unit price |
| item_subtotal | decimal | quantity × price |
| item_tax | decimal | Tax amount applied |
| item_total | decimal | subtotal + tax |
| item_order | integer | Display sort order |
| item_tax_id | integer | Associated tax rate ID (0 = no tax) |
| item_product_id | integer | Associated product ID (0 = ad-hoc item) |
| item_invoice_id | integer | Parent invoice ID |
| item_created_at | datetime | Record creation timestamp |
| item_updated_at | datetime | Last update timestamp |
| item_archived_at | datetime | Archive timestamp (null if active) |
curl "https://itflow.example.com/api/v1/invoice_items/read.php?api_key=YOUR_KEY&invoice_id=101"
{
"success": "True",
"count": 2,
"data": [
{
"item_id": "184",
"item_name": "make pizza",
"item_description": "Do it",
"item_quantity": "1.00",
"item_price": "100.00",
"item_subtotal": "100.00",
"item_tax": "0.00",
"item_total": "100.00",
"item_order": "1",
"item_tax_id": "0",
"item_product_id": "0",
"item_invoice_id": "101",
"item_created_at": "2026-03-10 13:11:30",
"item_updated_at": null,
"item_archived_at": null
}
]
}
Purpose: Manage client office/site locations
Available Endpoints:
GET /read.php - List/get location informationPOST /create.php - Create new location<wrap em>Note: Update and delete endpoints are not implemented.</wrap>
Read Parameters (GET):
| Parameter | Type | Description |
|---|---|---|
| location_id | integer | Get specific location by ID |
Create Parameters (POST):
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | API authentication key |
| client_id | integer | Yes* | Required if API key has all-client access |
| location_name | string | Yes | Location name |
| location_description | string | No | Description |
| location_country | string | No | Country |
| location_address | string | No | Street address |
| location_city | string | No | City |
| location_state | string | No | State/province |
| location_zip | string | No | ZIP/postal code |
| location_hours | string | No | Business hours |
| location_notes | string | No | Notes |
| location_primary | integer | No | Primary location flag (0 or 1) |
<wrap em>Note: Setting location_primary = 1 will remove primary flag from other locations for that client.</wrap>
Purpose: Network infrastructure documentation
Available Endpoints:
GET /read.php - List/get network information<wrap em>Note: Create, update, and delete endpoints are not implemented.</wrap>
Read Parameters (GET):
| Parameter | Type | Description |
|---|---|---|
| network_id | integer | Get specific network by ID |
| network_name | string | Get network by exact name |
Purpose: Access payment records
Available Endpoints:
GET /read.php - List/get payment information<wrap em>Note: Create, update, and delete endpoints are not implemented.</wrap>
<wrap em>Important: Payments require an API key with “All Clients” scope.</wrap>
Read Parameters (GET):
| Parameter | Type | Description |
|---|---|---|
| payment_id | integer | Get specific payment by ID |
| payment_invoice_id | integer | Get all payments for an invoice |
Purpose: Access product/service catalog
Available Endpoints:
GET /read.php - List/get product information<wrap em>Note: Create, update, and delete endpoints are not implemented.</wrap>
<wrap em>Important: Products require an API key with “All Clients” scope.</wrap>
Read Parameters (GET):
| Parameter | Type | Description |
|---|---|---|
| product_id | integer | Get specific product by ID |
Purpose: Access sales quote records
Available Endpoints:
GET /read.php - List/get quote information<wrap em>Note: Create, update, and delete endpoints are not implemented.</wrap>
Read Parameters (GET):
| Parameter | Type | Description |
|---|---|---|
| quote_id | integer | Get specific quote by ID |
Purpose: Software license and application tracking
Available Endpoints:
GET /read.php - List/get software information<wrap em>Note: Create, update, and delete endpoints are not implemented.</wrap>
Read Parameters (GET):
| Parameter | Type | Description |
|---|---|---|
| software_id | integer | Get specific software by ID |
| software_name | string | Get by exact name |
| software_type | string | Filter by type |
Purpose: Help desk and issue tracking
Available Endpoints:
GET /read.php - List/get ticket informationPOST /create.php - Create new ticketPOST /resolve.php - Resolve/close ticket<wrap em>Note: Update and delete endpoints are not implemented.</wrap>
Read Parameters (GET):
| Parameter | Type | Description |
|---|---|---|
| ticket_id | integer | Get specific ticket by ID (includes status information) |
Create Parameters (POST):
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | API authentication key |
| client_id | integer | No | Client ID (defaults to 0 if not provided) |
| ticket_subject | string | Yes | Ticket subject/title |
| ticket_details | string | No | Ticket description |
| ticket_priority | string | No | Priority (Low, Medium, High) - defaults to “Low” |
| ticket_contact_id | integer | No | Contact ID (auto-selects primary contact if not provided) |
| ticket_asset_id | integer | No | Related asset ID |
| ticket_vendor_id | integer | No | Escalation vendor ID |
| ticket_vendor_ticket_id | integer | No | Vendor's ticket number |
| ticket_assigned_to | integer | No | Assigned user ID |
| ticket_billable | integer | No | Billable flag (0 or 1) |
<wrap em>Note: Ticket number is auto-generated based on system settings. Ticket source is set to “API”.</wrap>
Resolve Parameters (POST):
| Parameter | Type | Required | Description |
|---|---|---|---|
| ticket_id | integer | Yes | ID of ticket to resolve |
<wrap em>Note: Resolving sets status to Resolved and records the resolution timestamp. Also sets first response time if not already set.</wrap>
Example - Create Ticket:
curl -X POST "https://itflow.example.com/api/v1/tickets/create.php" \ -H "Content-Type: application/json" \ -d '{ "api_key": "YOUR_API_KEY", "client_id": 456, "ticket_subject": "Printer offline", "ticket_details": "Office printer not responding to print jobs", "ticket_priority": "Medium" }'
Purpose: Manage vendor/supplier records
Available Endpoints:
GET /read.php - List/get vendor information<wrap em>Note: Create, update, and delete endpoints are not implemented.</wrap>
Read Parameters (GET):
| Parameter | Type | Description |
|---|---|---|
| vendor_id | integer | Get specific vendor by ID |
Location: /api/v1/custom/
ITFlow supports custom API endpoints. Place custom PHP files in the custom directory to extend API functionality.
| Code | Description |
|---|---|
| 200 | Success - Request completed successfully |
| 401 | Unauthorized - Invalid or missing API key |
| 405 | Method Not Allowed - Only GET and POST supported |
| Message | Cause |
|---|---|
| “Authentication failed. API key is invalid or has expired.” | Invalid or expired API key |
| “No resource (for this client and company) with the specified parameter(s).” | Record not found or access denied |
| “Auth success but insert query failed…” | Missing required fields or duplicate data |
| “Auth success but update query failed…” | Invalid ID or no matching record |
| “Auth success but delete query failed…” | Invalid ID or client mismatch |
client_id parameter for scoped keys/var/log/apache2/error.logList 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" = "Latitude 5520" "client_id" = "1" } | ConvertTo-Json Invoke-RestMethod -Method Post -Uri $uri -Body $body -ContentType "application/json"
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)
<?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); ?>
# Get all assets for a client curl "https://itflow.example.com/api/v1/assets/read.php?api_key=YOUR_KEY&limit=10" # Create a contact curl -X POST "https://itflow.example.com/api/v1/contacts/create.php" \ -H "Content-Type: application/json" \ -d '{ "api_key": "YOUR_KEY", "client_id": 1, "contact_name": "John Smith", "contact_email": "john@example.com", "contact_phone": "5551234567", "contact_primary": 1 }'
| Module | Read | Create | Update | Delete | Archive | Other |
|---|---|---|---|---|---|---|
| Assets | ✓ | ✓ | ✓ | ✓ | - | - |
| Certificates | ✓ | ✓ | - | - | - | - |
| Clients | ✓ | ✓ | ✓ | - | ✓ | unarchive |
| Contacts | ✓ | ✓ | ✓ | ✓ | ✓ | unarchive |
| Credentials | ✓ | ✓ | ✓ | - | - | - |
| Documents | ✓ | ✓ | ✓ | - | - | - |
| Domains | ✓ | - | - | - | - | - |
| Expenses | ✓ | - | - | - | - | - |
| Invoices | ✓ | - | - | - | - | - |
| Invoice Items | ✓ | - | - | - | - | - |
| Locations | ✓ | ✓ | - | - | - | - |
| Networks | ✓ | - | - | - | - | - |
| Payments | ✓ | - | - | - | - | - |
| Products | ✓ | - | - | - | - | - |
| Quotes | ✓ | - | - | - | - | - |
| Software | ✓ | - | - | - | - | - |
| Tickets | ✓ | ✓ | - | - | - | resolve |
| Vendors | ✓ | - | - | - | - | - |