---
title: "Exchanges a one-time pairing code for a Firebase custom token for the device."
method: POST
path: "/public/devices/pair"
tags: ["PublicDevicePairing"]
---

# Exchanges a one-time pairing code for a Firebase custom token for the device.

`POST /public/devices/pair`

## Request

- Base URL: `https://api.clinicos.vet/backend/business`
- URL: `https://api.clinicos.vet/backend/business/public/devices/pair`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1/docs/public/devices/pair/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- PairDeviceRequest
  - `code` string, nullable: The 8-character code, any case; spaces and hyphens are ignored.

## Response `200`

OK

- PairDeviceResponse: What a tablet gets for a good code: a Firebase custom token for its device uid in the clinic's Firebase tenant. The web sets `auth.tenantId = firebaseTenantId` and calls `signInWithCustomToken(customToken)`.
  - `customToken` string, required
  - `firebaseTenantId` string, required
  - `device` PairedDeviceSummaryDto, required
    - `id` string, required
    - `name` string, required

## Other responses

- `400`: Bad Request
- `404`: Not Found
- `429`: Too Many Requests
- `503`: Service Unavailable

## Changes

- **2026-10-21** `85ee96c0bb96`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1/changes/public/devices/pair/post.md)

---

[API](https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1.md) - [All operations](https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1/revisions/099cf36186e0?raw)
