Create Devices
/unified/mdm/devices
Query Parameters
Refer Specifying query parameters in Truto APIs
The type/category of the device
desktoplaptopmobileotherservertabletvirtual_machineworkstation
1 supported1 required
mobiledesktopShow Truto-specific parameters
The ID of the integrated account to use for the request.
62f44730-dd91-461e-bd6a-aedd9e0ad79dThe format of the response.
unifiedreturns the response with unified mappings applied.rawreturns the unprocessed, raw response from the remote API.normalizedapplies the unified mappings and returns the data in a normalized format.streamreturns the response as a stream, which is ideal for transmitting large datasets, files, or binary data. Using streaming mode helps to efficiently handle large payloads or real-time data flows without requiring the entire data to be buffered in memory.debugreturns the final unified result alongside raw remote fetch information. The response is an envelope containingresult(identical to unified mode output) anddebug(withrequestUrl,requestOptions,data,responseHeaders, and for list operations:nextCursor,isLooping,isEmptyResult,resultCount).debugisnullfor static responses or whentruto_skip_api_call=true.
Defaults to unified.
unifiedunifiedrawnormalizedstreamdebug
Excludes the remote_data attribute from the response.
Validates the request body against this method's request_body_schema before the request is sent to the underlying integration. When a field marked required is missing, Truto responds 400 with the missing field names under truto_error_insight.missing_required_body_fields instead of forwarding the call. Only the fields documented in request_body_schema are checked. A body carrying a non-empty remote_data object is forwarded unchecked, because remote_data is merged into the provider request and may already carry the required values. A field the mapping always supplies through its default body is treated as present, and a field that is only conditionally required is reported under truto_error_insight.conditionally_required_body_fields rather than rejected. Some integrations declare fields required on update that the provider only requires on create; check meta/{method} for the resource before enabling this on update calls. If you sent an Idempotency-Key and the request was rejected, use a fresh key when you retry with a corrected body: the idempotency cache is keyed on the integrated account, path and key only — it ignores the query string and the body — so reusing the key replays the rejection. Defaults to false, which forwards the request as-is.
Array of fields to exclude from the response.
truto_exclude_fields[]=id&truto_exclude_fields[]=nameQuery parameters to pass to the underlying API without any transformations. Refer this guide to see how to structure the query parameters.
remote_query[foo]=barRequest Body
Refer Writing data using Unified APIs
Whether a management agent is installed
The management agent version
Approval state if the provider requires approval
approvedpendingrejectedunknownapprovedpendingrejectedunknown
The asset tag / inventory tag of the device
The date and time the last backup succeeded
Total backup usage in bytes
The number of critical severity vulnerabilities detected on the device
Provider or customer specific fields mapped into a flexible key-value object
Whether the disk encryption is enabled on the device
The DNS name of the device
Whether an endpoint detection and response (EDR) agent is installed or detected on the device
The health/status of the EDR agent on the device, when available from the underlying product
healthyunhealthydegradedunknownhealthyunhealthydegradedunknown
Enrollment state of the device in the provider
enrolledpendingremovedmissingunknownenrolledpendingremovedmissingunknown
Whether the host firewall is enabled on the device
The number of high severity vulnerabilities detected on the device
The host/system name of the device
The private IP addresses of the device
Whether the device is corporate-owned (as opposed to personally-owned/BYOD)
Whether the device is currently offline
The date and time the device was most recently enrolled
Pass this value only when type is desktop.
The maintenance reason message
The maintenance status
nonependingactivecompletedunknownnonependingactivecompletedunknown
The hardware manufacturer of the device
Whether MDM management is enabled on the device
The hardware model of the device
The display name of the device
1 supported1 required
The NetBIOS name of the device (Windows)
Notes attached to the device
The note's unique identifier
The note's content
The note's owner
1 property
The note's owner's unique identifier
The note's title
The organization/account the device belongs to
The unique identifier for an organization
The name of the organization
The operating system build identifier
The operating system name
The operating system version
Additional operating system version information
The assigned owner of the device
The emails of the user
3 properties
The email address
Whether the email address is primary
The type of email address
The unique identifier for a user
The name of the user
The patch compliance status of the device, based on signals available in the underlying product
up_to_dateupdates_availableunknownup_to_dateupdates_availableunknown
The platform family of the device
windowsmacoslinuxiosipadosandroidchromeosunknownwindowsmacoslinuxiosipadosandroidchromeosunknown+ 4 more
The applied policy / blueprint
The unique identifier for a policy
The name of the policy
The public IP address of the device
Any additional data that should be passed as part of the request body. This data is not transformed by Truto and is passed as is to the remote API.
The serial number of the device
The device's tags
The tag's unique identifier
The tag's name
The type/category of the device
workstationservermobiletabletlaptopdesktopvirtual_machineotherworkstationservermobiletabletlaptopdesktopvirtual_machineother+ 4 more
Pass this value only when type is desktop.
Response Body
The unique identifier for the device
Whether a management agent is installed
The management agent version
Approval state if the provider requires approval
approvedpendingrejectedunknown
The asset tag / inventory tag of the device
The date and time the last backup failed
The date and time the last backup succeeded
Total backup usage in bytes
The date and time the device record was created
The number of critical severity vulnerabilities detected on the device
Provider or customer specific fields mapped into a flexible key-value object
Whether the disk encryption is enabled on the device
The DNS name of the device
Whether an endpoint detection and response (EDR) agent is installed or detected on the device
The health/status of the EDR agent on the device, when available from the underlying product
healthyunhealthydegradedunknown
Enrollment state of the device in the provider
enrolledpendingremovedmissingunknown
Whether the host firewall is enabled on the device
The date and time the device was first enrolled
The number of high severity vulnerabilities detected on the device
The host/system name of the device
The private IP addresses of the device
Whether the device is corporate-owned (as opposed to personally-owned/BYOD)
Whether the device is currently offline
The date and time of the last recorded activity for the device
The date and time the device was most recently enrolled
The date and time the device was last scanned for vulnerabilities or security posture signals, when supported by the underlying product
The MAC addresses of the device
The date and time maintenance ends
The maintenance reason message
The date and time maintenance starts
The maintenance status
nonependingactivecompletedunknown
The hardware manufacturer of the device
Whether MDM management is enabled on the device
The hardware model of the device
The display name of the device
The NetBIOS name of the device (Windows)
Notes attached to the device
The note's unique identifier
The note's content
The note's owner
1 property
The note's owner's unique identifier
The note's title
The organization/account the device belongs to
The unique identifier for an organization
The name of the organization
The operating system build identifier
The operating system name
The operating system version
Additional operating system version information
The assigned owner of the device
The emails of the user
3 properties
The email address
Whether the email address is primary
The type of email address
The unique identifier for a user
The name of the user
The patch compliance status of the device, based on signals available in the underlying product
up_to_dateupdates_availableunknown
The platform family of the device
windowsmacoslinuxiosipadosandroidchromeosunknown
The applied policy / blueprint
The unique identifier for a policy
The name of the policy
The public IP address of the device
Raw data returned from the remote API call.
The serial number of the device
The device's tags
The tag's unique identifier
The tag's name
The type/category of the device
workstationservermobiletabletlaptopdesktopvirtual_machineother
The date and time the device record was last updated
The date and time warranty ends
The manufacturer fulfillment date
The date and time warranty starts
truto unified mdm devices \
-m create \
-a '<integrated_account_id>' \
-b '{
"name": "your_name",
"serial_number": "your_serial_number",
"asset_tag": "your_asset_tag",
"mac_addresses": [],
"warranty_start_at": "your_warranty_start_at",
"mdm_enabled": true,
"last_enrolled_at": "your_last_enrolled_at",
"platform": "windows",
"backup_last_success_at": "your_backup_last_success_at",
"firewall_enabled": true,
"hostname": "your_hostname",
"dns_name": "your_dns_name",
"netbios_name": "your_netbios_name",
"type": "workstation",
"is_corporate_owned": true,
"model": "your_model",
"manufacturer": "your_manufacturer",
"os_name": "your_os_name",
"os_version": "your_os_version",
"os_build": "your_os_build",
"os_version_extra": "your_os_version_extra",
"disk_encryption": true,
"agent_installed": true,
"agent_version": "your_agent_version",
"enrollment_status": "enrolled",
"approval_status": "approved",
"is_offline": true,
"organization": {},
"owner": {},
"policy": {},
"edr_installed": true,
"edr_status": "healthy",
"critical_vuln_count": 0,
"high_vuln_count": 0,
"patch_status": "up_to_date",
"maintenance_status": "none",
"maintenance_reason": "your_maintenance_reason",
"backup_total_bytes": 0,
"public_ip": "your_public_ip",
"ip_addresses": [],
"tags": [],
"notes": [],
"custom_fields": {},
"remote_data": {}
}' \
-o jsonimport Truto from '@truto/truto-ts-sdk';
const truto = new Truto({
token: '<your_api_token>',
});
const result = await truto.unifiedApi.create(
'mdm',
'devices',
{
"name": "your_name",
"serial_number": "your_serial_number",
"asset_tag": "your_asset_tag",
"mac_addresses": [],
"warranty_start_at": "your_warranty_start_at",
"mdm_enabled": true,
"last_enrolled_at": "your_last_enrolled_at",
"platform": "windows",
"backup_last_success_at": "your_backup_last_success_at",
"firewall_enabled": true,
"hostname": "your_hostname",
"dns_name": "your_dns_name",
"netbios_name": "your_netbios_name",
"type": "workstation",
"is_corporate_owned": true,
"model": "your_model",
"manufacturer": "your_manufacturer",
"os_name": "your_os_name",
"os_version": "your_os_version",
"os_build": "your_os_build",
"os_version_extra": "your_os_version_extra",
"disk_encryption": true,
"agent_installed": true,
"agent_version": "your_agent_version",
"enrollment_status": "enrolled",
"approval_status": "approved",
"is_offline": true,
"organization": {},
"owner": {},
"policy": {},
"edr_installed": true,
"edr_status": "healthy",
"critical_vuln_count": 0,
"high_vuln_count": 0,
"patch_status": "up_to_date",
"maintenance_status": "none",
"maintenance_reason": "your_maintenance_reason",
"backup_total_bytes": 0,
"public_ip": "your_public_ip",
"ip_addresses": [],
"tags": [],
"notes": [],
"custom_fields": {},
"remote_data": {}
},
{ integrated_account_id: '<integrated_account_id>' }
);
console.log(result);import asyncio
from truto_python_sdk import TrutoApi
truto_api = TrutoApi(token="<your_api_token>")
async def main():
result = await truto_api.unified_api.create(
"mdm",
"devices",
{
"name": "your_name",
"serial_number": "your_serial_number",
"asset_tag": "your_asset_tag",
"mac_addresses": [],
"warranty_start_at": "your_warranty_start_at",
"mdm_enabled": True,
"last_enrolled_at": "your_last_enrolled_at",
"platform": "windows",
"backup_last_success_at": "your_backup_last_success_at",
"firewall_enabled": True,
"hostname": "your_hostname",
"dns_name": "your_dns_name",
"netbios_name": "your_netbios_name",
"type": "workstation",
"is_corporate_owned": True,
"model": "your_model",
"manufacturer": "your_manufacturer",
"os_name": "your_os_name",
"os_version": "your_os_version",
"os_build": "your_os_build",
"os_version_extra": "your_os_version_extra",
"disk_encryption": True,
"agent_installed": True,
"agent_version": "your_agent_version",
"enrollment_status": "enrolled",
"approval_status": "approved",
"is_offline": True,
"organization": {},
"owner": {},
"policy": {},
"edr_installed": True,
"edr_status": "healthy",
"critical_vuln_count": 0,
"high_vuln_count": 0,
"patch_status": "up_to_date",
"maintenance_status": "none",
"maintenance_reason": "your_maintenance_reason",
"backup_total_bytes": 0,
"public_ip": "your_public_ip",
"ip_addresses": [],
"tags": [],
"notes": [],
"custom_fields": {},
"remote_data": {}
},
{"integrated_account_id": "<integrated_account_id>"}
)
print(result)
asyncio.run(main())curl -X POST 'https://api.truto.one/unified/mdm/devices?integrated_account_id=<integrated_account_id>' \
-H 'Authorization: Bearer <your_api_token>' \
-H 'Content-Type: application/json' \
-d '{
"name": "your_name",
"serial_number": "your_serial_number",
"asset_tag": "your_asset_tag",
"mac_addresses": [],
"warranty_start_at": "your_warranty_start_at",
"mdm_enabled": true,
"last_enrolled_at": "your_last_enrolled_at",
"platform": "windows",
"backup_last_success_at": "your_backup_last_success_at",
"firewall_enabled": true,
"hostname": "your_hostname",
"dns_name": "your_dns_name",
"netbios_name": "your_netbios_name",
"type": "workstation",
"is_corporate_owned": true,
"model": "your_model",
"manufacturer": "your_manufacturer",
"os_name": "your_os_name",
"os_version": "your_os_version",
"os_build": "your_os_build",
"os_version_extra": "your_os_version_extra",
"disk_encryption": true,
"agent_installed": true,
"agent_version": "your_agent_version",
"enrollment_status": "enrolled",
"approval_status": "approved",
"is_offline": true,
"organization": {},
"owner": {},
"policy": {},
"edr_installed": true,
"edr_status": "healthy",
"critical_vuln_count": 0,
"high_vuln_count": 0,
"patch_status": "up_to_date",
"maintenance_status": "none",
"maintenance_reason": "your_maintenance_reason",
"backup_total_bytes": 0,
"public_ip": "your_public_ip",
"ip_addresses": [],
"tags": [],
"notes": [],
"custom_fields": {},
"remote_data": {}
}'const integratedAccountId = '<integrated_account_id>';
const body = {
"name": "your_name",
"serial_number": "your_serial_number",
"asset_tag": "your_asset_tag",
"mac_addresses": [],
"warranty_start_at": "your_warranty_start_at",
"mdm_enabled": true,
"last_enrolled_at": "your_last_enrolled_at",
"platform": "windows",
"backup_last_success_at": "your_backup_last_success_at",
"firewall_enabled": true,
"hostname": "your_hostname",
"dns_name": "your_dns_name",
"netbios_name": "your_netbios_name",
"type": "workstation",
"is_corporate_owned": true,
"model": "your_model",
"manufacturer": "your_manufacturer",
"os_name": "your_os_name",
"os_version": "your_os_version",
"os_build": "your_os_build",
"os_version_extra": "your_os_version_extra",
"disk_encryption": true,
"agent_installed": true,
"agent_version": "your_agent_version",
"enrollment_status": "enrolled",
"approval_status": "approved",
"is_offline": true,
"organization": {},
"owner": {},
"policy": {},
"edr_installed": true,
"edr_status": "healthy",
"critical_vuln_count": 0,
"high_vuln_count": 0,
"patch_status": "up_to_date",
"maintenance_status": "none",
"maintenance_reason": "your_maintenance_reason",
"backup_total_bytes": 0,
"public_ip": "your_public_ip",
"ip_addresses": [],
"tags": [],
"notes": [],
"custom_fields": {},
"remote_data": {}
};
const response = await fetch(`https://api.truto.one/unified/mdm/devices?integrated_account_id=${integratedAccountId}`, {
method: 'POST',
headers: {
'Authorization': 'Bearer <your_api_token>',
'Content-Type': 'application/json',
},
body: JSON.stringify(body),
});
const data = await response.json();
console.log(data);import requests
url = "https://api.truto.one/unified/mdm/devices"
headers = {
"Authorization": "Bearer <your_api_token>",
"Content-Type": "application/json",
}
params = {
"integrated_account_id": "<integrated_account_id>"
}
payload = {
"name": "your_name",
"serial_number": "your_serial_number",
"asset_tag": "your_asset_tag",
"mac_addresses": [],
"warranty_start_at": "your_warranty_start_at",
"mdm_enabled": True,
"last_enrolled_at": "your_last_enrolled_at",
"platform": "windows",
"backup_last_success_at": "your_backup_last_success_at",
"firewall_enabled": True,
"hostname": "your_hostname",
"dns_name": "your_dns_name",
"netbios_name": "your_netbios_name",
"type": "workstation",
"is_corporate_owned": True,
"model": "your_model",
"manufacturer": "your_manufacturer",
"os_name": "your_os_name",
"os_version": "your_os_version",
"os_build": "your_os_build",
"os_version_extra": "your_os_version_extra",
"disk_encryption": True,
"agent_installed": True,
"agent_version": "your_agent_version",
"enrollment_status": "enrolled",
"approval_status": "approved",
"is_offline": True,
"organization": {},
"owner": {},
"policy": {},
"edr_installed": True,
"edr_status": "healthy",
"critical_vuln_count": 0,
"high_vuln_count": 0,
"patch_status": "up_to_date",
"maintenance_status": "none",
"maintenance_reason": "your_maintenance_reason",
"backup_total_bytes": 0,
"public_ip": "your_public_ip",
"ip_addresses": [],
"tags": [],
"notes": [],
"custom_fields": {},
"remote_data": {}
}
response = requests.post(url, headers=headers, params=params, json=payload)
print(response.json())