Skip to Content
Xeonr Developer Docs
API SpecificationDevices and preferences

Import preferences

POST
/xeonr.notify.v1.DeviceService/ImportPreferences

Writes a person's preference cells for the calling product, as the product's service account, with no user present. For migrating rows a product already holds — a nightly job or a request handler that reaches for this instead of acting for the person is misusing it. The scope is the calling service account's own application (app_slug is not a field): a product cannot import another product's cells or the person's blanket rows. Idempotent: each cell upserts on (subject, app, category, channel), so a re-run is safe. The in-app channel is refused, as it is everywhere.

Required scopes: notify:preferences:import (service-account only)

Authorization

BearerAuth
AuthorizationBearer <token>

An access token from Xeonr Auth, presented as Authorization: Bearer <token>. Its audience must include https://notify.xeonr.io, and it must carry the scope the method lists.

In: header

Header Parameters

Connect-Protocol-Version*number

Define the version of the Connect protocol

Value in1
Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

subjectUrn?string

The person, as a Xeonr Auth user URN (urn:xeonr:auth:uid:user:). string.prefix = "urn:xeonr:auth:uid:user:"

Length1 <= length <= 191
cells?array<>

Up to 200 cells. A category from the product's catalogue, or empty for the product-wide row.

Items1 <= items <= 200
[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://notify.xeonr.io/xeonr.notify.v1.DeviceService/ImportPreferences" \  -H "Connect-Protocol-Version: 1" \  -H "Content-Type: application/json" \  -d '{}'
{
  "written": "2"
}