---
title: "Registers a device to a site"
method: POST
path: "/api/device/register"
tags: ["Device Communications"]
---

# Registers a device to a site

`POST /api/device/register`

## Request

- Base URL: `https://passivelogic.com` (the document declares no server; this is the origin it was published from)
- URL: `https://passivelogic.com/api/device/register`
- Auth: one of:
  - API key in header `X-PL-AUTH`
  - API key in header `Authorization: PL-API-KEY`
  - API key in header `PL-API-KEY`
  - HTTP basic
- TypeScript: <https://skmtc.dev/passivelogic/apis/passivelogic-http-api/docs/api/device/register/post.ts> (a function with typed inputs; its response is checked against the schema)

Registers a PassiveLogic device to a site and returns the auth group the device now belongs to.

The caller must prove they are allowed to add the device to the site in one of two ways:
- Provide a `userJWT` from a user who has access to the site. The device making the request is the one being registered.
- Provide a `followerSerialNumber` when a leader device is bringing a follower onto its site.

If the device is already registered, its auth group is updated instead of creating a duplicate registration.

This call must be made on the device itself over mTLS authentication.

Only call this endpoint for devices provisioned by a webserver on v9.1.1 or older, where provisioning does not register the device correctly when `initiate` is called. Newer devices are registered automatically and do not need this call.

## Request body

- DeviceRegistrationRequest
  - `followerSerialNumber` string, nullable
  - `siteID` string, uuid, required
  - `userJWT` string, nullable

## Response `200`

OK

- DeviceRegistrationResponse
  - `deviceSerialNumber` string, required
  - `authGroupID` string, uuid, required

---

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