Start service: data plans, network groups and LAN settings
Bring a device into service with the Partner API: find your data plans and network groups, activate or deactivate it, move it between them and set its LAN address and MTU.
Put a device into service, choose which data plan and network group it runs on, and set its LAN details — all from your own systems.
Every call here takes the device's id from GET/v1/devices. Reading needs devices:read; changing anything needs devices:write. Your account needs the Devices module.
Before you start
Some of these calls also need a capability switched on for your account. Without it you get a 403 with the code not_entitled. GET/v1/me lists yours under entitlements.devices.
| Call | Scope | Capability your account needs |
|---|---|---|
| GET/v1/data_plans, GET/v1/network_groups, GET/v1/devices/{uuid}/network | devices:read | — |
| POST/v1/devices/{uuid}/actions/activate | devices:write | Device activation |
| POST/v1/devices/{uuid}/actions/deactivate | devices:write | Device deactivation |
| PATCH/v1/devices/{uuid} with a data plan | devices:write | Device plan changes |
| PATCH/v1/devices/{uuid} with a network group, PATCH/v1/devices/{uuid}/network | devices:write | Device networking |
Find your data plans and network groups
A device runs on a data plan and a network group. Both lists are small and come back whole.
curl https://cloud.mergewifi.com/v1/data_plans \
-H "Authorization: Bearer $MERGEWIFI_API_KEY"
curl https://cloud.mergewifi.com/v1/network_groups \
-H "Authorization: Bearer $MERGEWIFI_API_KEY"{
"object": "list",
"data": [
{ "object": "network_group", "id": "4c1d2e3f-5a6b-4c7d-8e9f-0a1b2c3d4e5f", "name": "Nationwide" }
],
"has_more": false,
"next_cursor": null
}- GET/v1/data_plans lists the data plans a device can be assigned.
- GET/v1/network_groups lists the network groups a device can be activated on or moved to.
Pass the id from these lists — never a name — to the calls below. A device's own data_plan and network_group give their names, so match by name to find where it is today.
Activate a device
POST/v1/devices/{uuid}/actions/activate brings a device into service on the network group you choose:
curl https://cloud.mergewifi.com/v1/devices/0d5102c1-b8d2-4ba4-b6aa-43ed91d768c0/actions/activate \
-X POST \
-H "Authorization: Bearer $MERGEWIFI_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "network_group_id": "4c1d2e3f-5a6b-4c7d-8e9f-0a1b2c3d4e5f" }'{
"object": "device_action",
"action": "activate",
"status": "accepted",
"requested_at": "2026-08-04T21:15:40.000Z"
}202 accepted means the request reached the device platform, not that the device is live yet. The device's activated flag turns true in GET/v1/devices/{uuid} after our next inventory refresh, which runs every 15 minutes.
Move it to another plan or network group
Change a device's data plan or network group with PATCH/v1/devices/{uuid}:
curl https://cloud.mergewifi.com/v1/devices/0d5102c1-b8d2-4ba4-b6aa-43ed91d768c0 \
-X PATCH \
-H "Authorization: Bearer $MERGEWIFI_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "data_plan_id": "7b2f1a90-2c31-4c0e-9f77-1a2b3c4d5e6f" }'Send data_plan_id and network_group_id in separate requests. They're applied one at a time, so a combined request could half-succeed — it's refused with a 400 instead. The response shows the device as we last synced it, so the change can take up to 15 minutes to appear.
Set LAN settings
GET/v1/devices/{uuid}/network reads the device's LAN address and MTU live from the device:
curl https://cloud.mergewifi.com/v1/devices/0d5102c1-b8d2-4ba4-b6aa-43ed91d768c0/network \
-H "Authorization: Bearer $MERGEWIFI_API_KEY"{ "object": "device_network", "lan_ip": "192.168.1.1", "mtu": 1500, "mtu_interface": "wan" }A value that couldn't be read — because the device is switched off, say — comes back null. lan_ip in particular often reads as null even when it's set.
Change either with PATCH/v1/devices/{uuid}/network:
curl https://cloud.mergewifi.com/v1/devices/0d5102c1-b8d2-4ba4-b6aa-43ed91d768c0/network \
-X PATCH \
-H "Authorization: Bearer $MERGEWIFI_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "mtu": 1400 }'lan_ipmust be an IPv4 address, like192.168.1.1.mtumust be a whole number from 1000 to 1500.
Take a device out of service
POST/v1/devices/{uuid}/actions/deactivate takes a device out of service. It stays on your account.
curl https://cloud.mergewifi.com/v1/devices/0d5102c1-b8d2-4ba4-b6aa-43ed91d768c0/actions/deactivate \
-X POST \
-H "Authorization: Bearer $MERGEWIFI_API_KEY"A device that's switched off or out of coverage returns 409 with the code device_unreachable. A 409 with invalid_state_transition means the device platform didn't complete the action — the device may be offline, or in a state that doesn't allow it. Check activated before you deactivate.
Related: Manage a device · Port forwarding, dedicated IPs and bridged IPs · Diagnose a device · Track orders and the devices they ship

