[beta] Pair gateways to devices
Reassign one or more gateways to different devices in a single call. Mirrors the dashboard's "Pair Gateway" flow and accepts up to 50 gateway-device pairs per request. Works for any device type: vehicles, assets, equipment, trailers, industrial machines, and asset tags. By default, devices that the reassigned gateways were previously linked to remain in their current group. Pass removeOrphanDevices: true to move those orphaned devices to the unassigned group and clear their tags. The endpoint is currently in Beta and gated behind a feature configuration; contact your Samsara representative to enable access.
<b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
To use this endpoint, select Write Gateways under the Setup & Administration category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
Submit Feedback: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.
Request
- Base URLhttps://api.samsara.com
- AuthHTTP bearer
Request body
Example request
{
"pairs": [
{
"deviceSerial": "GFRV-43N-VGX",
"gatewaySerial": "GFRV-43N-VGX"
}
],
"removeOrphanDevices": true
}Response
OK response.
Example response
{
"data": [
{
"device": {
"id": "8393848111",
"name": "Truck 17",
"serial": "ABCD-123-EFG",
"type": "vehicle"
},
"displacedGateway": {
"id": "8393848111",
"model": "VG34",
"serial": "GFRV-43N-VGX"
},
"gateway": {
"id": "8393848111",
"model": "VG34",
"serial": "GFRV-43N-VGX"
},
"previousDevice": {
"id": "8393848111",
"name": "Truck 17",
"serial": "ABCD-123-EFG",
"type": "vehicle"
}
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.