Device Sync Endpoint
Version V1
Partners can retrieve the full list of devices associated with a Molecule site or controller using the Device Sync API. This endpoint returns all downstream devices known to the Molecule controller, along with their types and identifiers.
This is typically used during onboarding, periodic reconciliation, or whenever the partner needs to refresh its internal device registry.
Endpoint
GET https://webhooks.moleculesystems.com/<API version>/api/gateway/<molecule_id>/devicesync
Replace <molecule_id> with the unique identifier for the Molecule site or controller.
Security Requirements
Partners must include their API key:
X-API-Key: <your-api-key>
Access to webhooks.moleculesystems.com is IP-restricted.
Response Payload Structure
The endpoint returns a JSON object containing:
- The Molecule site/controller ID
- A list of all devices associated with that site
- Device type and subtype information
Top-Level Fields
| Field | Type | Description |
|---|---|---|
| molecule_id | string | Unique identifier for the Molecule site or controller. |
| devices | array | List of device objects. |
Device Object Fields
| Field | Type | Description |
|---|---|---|
| device_id | string | Unique identifier for the downstream device. |
| device_type | integer | Type code representing the specific device class (see table below). |
| name | string (optional) | Human-friendly device name. |
| capabilities | array (optional) | Supported command or telemetry capabilities. |
Device Sub-Type Codes
These values map to the internal Molecule controller device classifications:
| Type Code | Meaning |
|---|---|
| 0 | Unknown |
| 1 | No control |
| 10 | Inverter – Battery |
| 11 | Inverter – PV |
| 12 | Meter |
| 13 | Thermostat |
| 14 | On/Off Switch |
| 30 | Zigbee Switch |
| 31 | Zigbee Thermostat |
| 40 | GPIO Input |
| 41 | GPIO Output |
Sample Response
{
"molecule_id": "fecd0001c031e7e8",
"devices": [
{
"device_id": "20000",
"device_type": 10,
"name": "Battery Inverter 1",
"capabilities": ["charge", "discharge", "telemetry"]
},
{
"device_id": "21000",
"device_type": 14,
"name": "Main Relay",
"capabilities": ["on", "off", "telemetry"]
},
{
"device_id": "22000",
"device_type": 12,
"name": "Grid Meter",
"capabilities": ["telemetry"]
}
]
}
Usage Notes
- This endpoint is read-only.
- Partners may call it at startup, periodically, or whenever device configuration changes are expected.
- Device sub-types allow partners to understand what commands and telemetry each device supports.
- The list may grow over time as new devices are added to the site.