Varsler

Enhetene som får varsler fra Bryti.4 operasjoner

Hoder på hvert svar

Hvert svar på denne siden har disse hodene.
X-Trace-Id
— The W3C trace id of this request — the same id in the log and in the traceId of a problem. Quote it when reporting.
Server-Timing
— Where the time went: total, db;dur=…;desc="N queries", and every step the handler named (ADR-163).
X-Diagnostics
— Only when the request asked with X-Diagnostics: 1 or ?diagnostics=1: the same breakdown as one JSON object, with the trace id (ADR-163).

Operasjoner

PUT/api/v1/me/devices

Register this phone's push token for the signed-in login

Idempotent per token: a token already known is marked seen and handed to the caller's login — a reinstall, or a new login on the same phone — never duplicated (#198). platform is ios or android; provider defaults to expo. A device belongs to the person, not to a household.

Parametre

Ingen parametre

Forespørselskropp

application/jsonPåkrevdRegisterPushDeviceRequest

Svar

200OK
application/jsonPushDeviceResponse
400Bad Request
application/problem+jsonProblemDetails
401No session, or the session is no longer valid.
application/problem+jsonProblemDetails
426The build named in X-App-Version is below its platform's version floor (ADR-070). Problem type app-version-unsupported; the only way forward is the store. Callers without the header are never turned away.
application/problem+jsonProblemDetails
429Too many calls in the window; Retry-After says how long.
application/problem+jsonProblemDetails
Hoder
Retry-After
— Seconds to wait when a rate limit answered, or an HTTP date when the household's AI is paused. Absent when the household's AI quota for the period is used up — that resets by itself.

Eksempel

curl -b "bryti_session=…" \
  -X PUT \
  "https://bryti.app/api/v1/me/devices" \
  -H "Content-Type: application/json" \
  -d '{"token":"string","platform":"string","provider":"string"}'

Eksempel på svar

200application/json
{
  "token": "string",
  "platform": "string",
  "provider": "string",
  "listChanges": false,
  "householdNews": false,
  "runDone": false,
  "reminders": false,
  "lastSeenAt": "2026-09-07T16:30:00Z"
}
GET/api/v1/me/devices/{token}

Read a registered phone and its notification switches

404 when the token is not registered to the caller's login.

Parametre

NavnHvorTypePåkrevdBeskrivelse
tokenpathstringPåkrevd—

Svar

200OK
application/jsonPushDeviceResponse
401No session, or the session is no longer valid.
application/problem+jsonProblemDetails
404Not Found
application/problem+jsonProblemDetails
426The build named in X-App-Version is below its platform's version floor (ADR-070). Problem type app-version-unsupported; the only way forward is the store. Callers without the header are never turned away.
application/problem+jsonProblemDetails
429Too many calls in the window; Retry-After says how long.
application/problem+jsonProblemDetails
Hoder
Retry-After
— Seconds to wait when a rate limit answered, or an HTTP date when the household's AI is paused. Absent when the household's AI quota for the period is used up — that resets by itself.

Eksempel

curl -b "bryti_session=…" \
  "https://bryti.app/api/v1/me/devices/string"

Eksempel på svar

200application/json
{
  "token": "string",
  "platform": "string",
  "provider": "string",
  "listChanges": false,
  "householdNews": false,
  "runDone": false,
  "reminders": false,
  "lastSeenAt": "2026-09-07T16:30:00Z"
}
PATCH/api/v1/me/devices/{token}

Set which notifications reach this phone

listChanges, householdNews, runDone and reminders. reminders left out keeps its current value, so an older app's three-switch PATCH does not turn Bryti's nudges off behind the person's back (#385). 404 when the token is not the caller's.

Parametre

NavnHvorTypePåkrevdBeskrivelse
tokenpathstringPåkrevd—

Forespørselskropp

application/jsonPåkrevdUpdatePushDeviceRequest

Svar

200OK
application/jsonPushDeviceResponse
400The request could not be read as the route needs it: a body that is not the documented shape (a required field left out, a null where none is allowed, a value too long for its field), a parameter that does not parse, or a NUL character anywhere (#3540, #3541, #3543). Code validation_failed or value_too_long.
application/problem+jsonProblemDetails
401No session, or the session is no longer valid.
application/problem+jsonProblemDetails
404Not Found
application/problem+jsonProblemDetails
426The build named in X-App-Version is below its platform's version floor (ADR-070). Problem type app-version-unsupported; the only way forward is the store. Callers without the header are never turned away.
application/problem+jsonProblemDetails
429Too many calls in the window; Retry-After says how long.
application/problem+jsonProblemDetails
Hoder
Retry-After
— Seconds to wait when a rate limit answered, or an HTTP date when the household's AI is paused. Absent when the household's AI quota for the period is used up — that resets by itself.

Eksempel

curl -b "bryti_session=…" \
  -X PATCH \
  "https://bryti.app/api/v1/me/devices/string" \
  -H "Content-Type: application/json" \
  -d '{"listChanges":false,"householdNews":false,"runDone":false}'

Eksempel på svar

200application/json
{
  "token": "string",
  "platform": "string",
  "provider": "string",
  "listChanges": false,
  "householdNews": false,
  "runDone": false,
  "reminders": false,
  "lastSeenAt": "2026-09-07T16:30:00Z"
}
DELETE/api/v1/me/devices/{token}

Forget this phone: nothing more is sent to it

Sign-out on the phone. 404 when the token is not the caller's.

Parametre

NavnHvorTypePåkrevdBeskrivelse
tokenpathstringPåkrevd—

Svar

204No Content
401No session, or the session is no longer valid.
application/problem+jsonProblemDetails
404Not Found
application/problem+jsonProblemDetails
426The build named in X-App-Version is below its platform's version floor (ADR-070). Problem type app-version-unsupported; the only way forward is the store. Callers without the header are never turned away.
application/problem+jsonProblemDetails
429Too many calls in the window; Retry-After says how long.
application/problem+jsonProblemDetails
Hoder
Retry-After
— Seconds to wait when a rate limit answered, or an HTTP date when the household's AI is paused. Absent when the household's AI quota for the period is used up — that resets by itself.

Eksempel

curl -b "bryti_session=…" \
  -X DELETE \
  "https://bryti.app/api/v1/me/devices/string"

Skjema

ProblemDetails

FeltTypePåkrevd
typestring | null—
titlestring | null—
statusinteger (int32) | null—
detailstring | null—
instancestring | null—
codestring | null—

PushDeviceResponse

FeltTypePåkrevd
tokenstringPåkrevd
platformstringPåkrevd
providerstringPåkrevd
listChangesbooleanPåkrevd
householdNewsbooleanPåkrevd
runDonebooleanPåkrevd
remindersbooleanPåkrevd
lastSeenAtstring (date-time)Påkrevd

RegisterPushDeviceRequest

FeltTypePåkrevd
tokenstringPåkrevd
platformstringPåkrevd
providerstring | nullPåkrevd

UpdatePushDeviceRequest

FeltTypePåkrevd
listChangesbooleanPåkrevd
householdNewsbooleanPåkrevd
runDonebooleanPåkrevd
remindersboolean | null—