---
title: "Pair device"
method: POST
path: "/v2/pilotpair"
tags: ["openpilot auth"]
---

# Pair device

`POST /v2/pilotpair`

## Request

- Base URL: `https://api.comma.ai`
- URL: `https://api.comma.ai/v2/pilotpair`
- Auth: HTTP bearer

Pair a device to the authenticated user's account.

## Request body `application/x-www-form-urlencoded`

- object
  - `pair_token` string, required: JWT signed by your device private key. Payload contains `{"identity": <dongle-id>, "pair": true}`

## Response `200`

JSON object containing pairing result

- object
  - `first_pair` boolean, required: True if the device was unpaired prior to this call. False if the device was previously paired by an authenticated user.

## Changes

- **2022-11-27** `c955909ce683`: 1 info
  - the response property `first_pair` became required for the status `200`
- **2022-11-27** `5b1478ce801f`: 1 info
  - api tag `openpilot auth` added
- **2022-11-27** `04af598547de`: 1 info
  - the endpoint scheme security `AuthUser` was added to the API

[Operation history](https://skmtc.dev/comma/apis/comma-api/changes/v2/pilotpair/post.md)

---

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