Skip to main content

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.

note

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:

ParameterDefaultDescription
page1Page number (starts at 1)
per_pagevariesItems 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:

CommandDescription
lock_deviceLock the device screen
unlock_deviceUnlock the device
restart_deviceRestart the device
wipe_deviceWipe the device
factory_resetFactory reset the device
install_appInstall an application
uninstall_appUninstall an application
update_configPush a configuration update
collect_logsCollect device logs
run_diagnosticRun a diagnostic
request_bugreportRequest a bug report
install_certificateInstall a certificate
remove_certificateRemove a certificate
remove_work_profileRemove the work profile
add_esimAdd an eSIM
remove_esimRemove an eSIM
amapi_issue_commandIssue an Android Management API command
customCustom 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]