AndroidNexus API
The AndroidNexus API provides programmatic access to manage your Android device fleet. Use it to automate device management, integrate with your existing tools, and build custom solutions.
Base URL
https://api.androidnexus.ai/api/v1
Authentication
Create an API key in the AndroidNexus console and send it as a bearer token on every request:
curl https://api.androidnexus.ai/api/v1/devices \
-H "Authorization: Bearer nxk_..."
Organization admins create and revoke API keys under Settings. Treat a key like a password: store it in a secret manager and rotate it by creating a new key and deleting the old one.
A small number of routes, such as reports and some device diagnostics, are available only to a signed-in console session and refuse API keys.
Response Format
Every response shares one envelope.
Success Response
{
"status": "success",
"data": {},
"metadata": {
"timestamp": "2026-01-01T00:00:00Z",
"request_id": "..."
}
}
Error Response
{
"status": "error",
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request format",
"details": {}
},
"metadata": {
"timestamp": "2026-01-01T00:00:00Z",
"request_id": "..."
}
}
Include the request_id when you contact support about a failed request.
Pagination
List endpoints accept these parameters:
| Parameter | Default | Description |
|---|---|---|
page | 1 | Page number (starts at 1) |
per_page | varies | Items per page (max 100) |
Paginated responses report page, per_page, total and total_pages.
Quick Start Examples
List Devices
curl "https://api.androidnexus.ai/api/v1/devices?page=1&per_page=20" \
-H "Authorization: Bearer $ANDROIDNEXUS_API_KEY"
Get Device Details
curl "https://api.androidnexus.ai/api/v1/devices/$DEVICE_ID" \
-H "Authorization: Bearer $ANDROIDNEXUS_API_KEY"
Send Lock Command
curl -X POST "https://api.androidnexus.ai/api/v1/devices/$DEVICE_ID/commands" \
-H "Authorization: Bearer $ANDROIDNEXUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"command_type": "lock_device"}'
SDK Examples
Python
import os
import requests
BASE_URL = "https://api.androidnexus.ai/api/v1"
session = requests.Session()
session.headers["Authorization"] = f"Bearer {os.environ['ANDROIDNEXUS_API_KEY']}"
devices = session.get(f"{BASE_URL}/devices").json()
session.post(
f"{BASE_URL}/devices/{device_id}/commands",
json={"command_type": "lock_device"},
)
JavaScript
const BASE_URL = 'https://api.androidnexus.ai/api/v1';
const headers = {
Authorization: `Bearer ${process.env.ANDROIDNEXUS_API_KEY}`,
'Content-Type': 'application/json',
};
async function listDevices() {
const response = await fetch(`${BASE_URL}/devices`, { headers });
return response.json();
}
async function sendCommand(deviceId, commandType) {
const response = await fetch(`${BASE_URL}/devices/${deviceId}/commands`, {
method: 'POST',
headers,
body: JSON.stringify({ command_type: commandType }),
});
return response.json();
}
Command Types
POST /devices/{deviceId}/commands accepts these command_type values:
| Command | Description |
|---|---|
lock_device | Lock the device screen |
unlock_device | Unlock the device |
restart_device | Restart the device |
wipe_device | Wipe the device |
factory_reset | Factory reset the device |
install_app | Install an application |
uninstall_app | Uninstall an application |
update_config | Push a configuration update |
collect_logs | Collect device logs |
run_diagnostic | Run a diagnostic |
request_bugreport | Request a bug report |
install_certificate | Install a certificate |
remove_certificate | Remove a certificate |
remove_work_profile | Remove the work profile |
add_esim | Add an eSIM |
remove_esim | Remove an eSIM |
amapi_issue_command | Issue an Android Management API command |
custom | Custom command |
An optional priority (low, normal, high, urgent) and payload object can accompany any command.
Need Help?
- API Reference: Browse the complete API documentation in this section
- Support: Contact [email protected]