---
title: "[beta] Pair gateways to devices"
method: POST
path: "/gateways/pair"
tags: ["Beta APIs"]
---

# \[beta\] Pair gateways to devices

`POST /gateways/pair`

## Request

- Base URL: `https://api.samsara.com`
- URL: `https://api.samsara.com/gateways/pair`
- Auth: HTTP bearer

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 body

- GatewaysPairGatewaysRequestBody
  - `pairs` PairGatewayPairObjectRequestBody[], required: Gateway-device pairs to apply.
    - `deviceSerial` string, required: The serial of the target device to pair the gateway with, in the standard Samsara serial format (e.g. GFRV-43N-VGX). All Samsara device types -- vehicle, asset, equipment, trailer, industrial, and asset tag (AT) -- expose their currently-paired gateway's serial as the device serial, so the same format applies regardless of device type.
    - `gatewaySerial` string, required: The serial of the gateway to reassign. The gateway must already be activated in the organization.
  - `removeOrphanDevices` boolean: When true, devices that the reassigned gateways were previously linked to are moved to the unassigned group and have their tags cleared as a side-effect of the pairing. The previousDevice fields in the response describe each orphaned device as it existed immediately before the pairing was applied, so they remain stable regardless of this flag. Defaults to false.

## Response `200`

OK response.

- GatewaysPairGatewaysResponseBody
  - `data` PairGatewayResultObjectResponseBody[], required: The outcome for each gateway pair, in the same order as the request.
    - `device` PairResultDeviceObjectResponseBody, required: Identifying information for a device involved in a pairing operation.
      - `id` string, required: The unique Samsara ID of the device.
      - `name` string: The name of the device.
      - `serial` string, required: The serial number of the device.
      - `type` 'vehicle' | 'asset' | 'equipment' | 'trailer' | 'industrial' | 'assetTag', required: The type of the device. Valid values: `vehicle`, `asset`, `equipment`, `trailer`, `industrial`, `assetTag`
    - `displacedGateway` PairResultGatewayObjectResponseBody: Identifying information for a gateway involved in a pairing operation.
      - `id` string, required: The unique Samsara ID of the gateway.
      - `model` 'AG15' | 'AG24' | 'AG24EU' | 'AG26' | 'AG26EU' | 'AG41' | 'AG41EU' | 'AG45' | 'AG45EU' | 'AG46' | 'AG46EU' | 'AG46P' | 'AG46PEU' | 'AG51' | 'AG51EU' | 'AG52' | 'AG52EU' | 'AG53' | 'AG53EU' | 'AT11' | 'AT11X' | 'AT12' | 'AT12X' | 'AT13' | 'IG15' | 'IG21' | 'IG41' | 'IG61' | 'SG1' | 'SG1B' | 'SG1G' | 'SG1G32' | 'SG1x' | 'VG32' | 'VG33' | 'VG34' | 'VG34EU' | 'VG34FN' | 'VG34M' | 'VG54ATT' | 'VG54EU' | 'VG54FN' | 'VG54NA' | 'VG54NAE' | 'VG54NAH' | 'VG55EU' | 'VG55FN' | 'VG55NA', required: The model of the gateway. Valid values: `AG15`, `AG24`, `AG24EU`, `AG26`, `AG26EU`, `AG41`, `AG41EU`, `AG45`, `AG45EU`, `AG46`, `AG46EU`, `AG46P`, `AG46PEU`, `AG51`, `AG51EU`, `AG52`, `AG52EU`, `AG53`, `AG53EU`, `AT11`, `AT11X`, `AT12`, `AT12X`, `AT13`, `IG15`, `IG21`, `IG41`, `IG61`, `SG1`, `SG1B`, `SG1G`, `SG1G32`, `SG1x`, `VG32`, `VG33`, `VG34`, `VG34EU`, `VG34FN`, `VG34M`, `VG54ATT`, `VG54EU`, `VG54FN`, `VG54NA`, `VG54NAE`, `VG54NAH`, `VG55EU`, `VG55FN`, `VG55NA`
      - `serial` string, required: The serial number of the gateway.
    - `gateway` PairResultGatewayObjectResponseBody, required: Identifying information for a gateway involved in a pairing operation.
      - `id` string, required: The unique Samsara ID of the gateway.
      - `model` 'AG15' | 'AG24' | 'AG24EU' | 'AG26' | 'AG26EU' | 'AG41' | 'AG41EU' | 'AG45' | 'AG45EU' | 'AG46' | 'AG46EU' | 'AG46P' | 'AG46PEU' | 'AG51' | 'AG51EU' | 'AG52' | 'AG52EU' | 'AG53' | 'AG53EU' | 'AT11' | 'AT11X' | 'AT12' | 'AT12X' | 'AT13' | 'IG15' | 'IG21' | 'IG41' | 'IG61' | 'SG1' | 'SG1B' | 'SG1G' | 'SG1G32' | 'SG1x' | 'VG32' | 'VG33' | 'VG34' | 'VG34EU' | 'VG34FN' | 'VG34M' | 'VG54ATT' | 'VG54EU' | 'VG54FN' | 'VG54NA' | 'VG54NAE' | 'VG54NAH' | 'VG55EU' | 'VG55FN' | 'VG55NA', required: The model of the gateway. Valid values: `AG15`, `AG24`, `AG24EU`, `AG26`, `AG26EU`, `AG41`, `AG41EU`, `AG45`, `AG45EU`, `AG46`, `AG46EU`, `AG46P`, `AG46PEU`, `AG51`, `AG51EU`, `AG52`, `AG52EU`, `AG53`, `AG53EU`, `AT11`, `AT11X`, `AT12`, `AT12X`, `AT13`, `IG15`, `IG21`, `IG41`, `IG61`, `SG1`, `SG1B`, `SG1G`, `SG1G32`, `SG1x`, `VG32`, `VG33`, `VG34`, `VG34EU`, `VG34FN`, `VG34M`, `VG54ATT`, `VG54EU`, `VG54FN`, `VG54NA`, `VG54NAE`, `VG54NAH`, `VG55EU`, `VG55FN`, `VG55NA`
      - `serial` string, required: The serial number of the gateway.
    - `previousDevice` PairResultDeviceObjectResponseBody: Identifying information for a device involved in a pairing operation.
      - `id` string, required: The unique Samsara ID of the device.
      - `name` string: The name of the device.
      - `serial` string, required: The serial number of the device.
      - `type` 'vehicle' | 'asset' | 'equipment' | 'trailer' | 'industrial' | 'assetTag', required: The type of the device. Valid values: `vehicle`, `asset`, `equipment`, `trailer`, `industrial`, `assetTag`

## Other responses

- `401`: Unauthorized response.
- `404`: Not Found response.
- `405`: Method Not Allowed response.
- `413`: Content Too Large response.
- `429`: Too Many Requests response.
- `500`: Internal Server Error response.
- `501`: Not Implemented response.
- `502`: Bad Gateway response.
- `503`: Service Unavailable response.
- `504`: Gateway Timeout response.
- `default`: Bad Request response.

---

[API](https://skmtc.dev/samsara/apis/samsara-api.md) - [All operations](https://skmtc.dev/samsara/apis/samsara-api/llms.txt) - [OpenAPI document](https://skmtc.dev/samsara/apis/samsara-api/revisions/a9e35d4999be?raw)
