---
title: "Pre-assign devices to locations"
method: POST
path: "/v1/device-preassignments"
tags: ["device-preassignments"]
---

# Pre-assign devices to locations

`POST /v1/device-preassignments`

## Request

- Base URL: `https://api.brixsignage.com`
- URL: `https://api.brixsignage.com/v1/device-preassignments`
- Auth: HTTP bearer

Pre-assign device serial numbers to locations, identified by Location ID or `nodeId`, so each device pairs automatically into its assigned location the first time it is plugged in. Submit up to 1000 rows in one request; all rows are validated before any are saved. Re-uploading the same rows is safe and does not create duplicates, and `dryRun` validates rows without saving them. A serial number already assigned to another workspace is refused with a conflict error, and the action is recorded in the activity log.

## Request body

- object
  - `rows` object[], required
    - `serial` string, required: The device serial number.
    - `locationId` string: The location's Location ID (case-insensitive). Give this or `nodeId`.
    - `nodeId` string
    - `name` string: Screen name; default: the location name and the serial's last 4 characters.
  - `dryRun` boolean: True: check and report, change nothing (answers 200).

## Response `200`

Success: a dry run (`dryRun: true`): the same report, nothing changed.

- object
  - `data` object, required
    - `dryRun` boolean, required
    - `counts` object, required
      - `claimed` integer, required
      - `created` integer, required
      - `updated` integer, required
      - `unchanged` integer, required
    - `rows` object[], required
      - `index` integer, required
      - `serial` string, required: The serial's last 4 characters.
      - `outcome` 'claimed' | 'created' | 'updated' | 'unchanged', required
      - `nodeId` string, required
      - `locationName` string, required
      - `locationId` string, nullable, required
      - `name` string, required

## Other responses

- `201`: Success.
- `401`: Missing, expired or revoked bearer token.
- `403`: The token lacks the permission this operation needs (see `x-brix-permission`).
- `409`: A serial is held by another workspace, or the data region does not support pre-assignment.
- `422`: No rows, too many rows, or a row is invalid; `data.errors` lists each by `index` and `code`.
- `5XX`: Server error. The body carries a `requestId` to quote to support.

---

[API](https://skmtc.dev/brixsignage/apis/brix-api.md) · [All operations](https://skmtc.dev/brixsignage/apis/brix-api/llms.txt) · [OpenAPI document](https://skmtc.dev/brixsignage/apis/brix-api/revisions/02fd3665dc7d?raw)
