Reading values

Last updated 2 September 2026.

The same link/status call answers with what the player has chosen to share with you. It is the only read in the protocol, it is a POST, and you make it when you render — not on a timer.

POST /api/link/status   { "subject": "u_8f31c2" }

{
  "linked": true,
  "trivelaUserId": "7c0e…", "handle": "coach", "linkedAt": "…",
  "connections": [ { "service": "gpl", "name": "GOALS Pro League", "label": "coach", "linkedAt": "…" } ],

  "sync": {
    "avatar":      { "state": "overlay", "value": "https://cdn.discordapp.com/…" },
    "nationality": { "state": "overlay", "value": "se" },
    "club":        { "state": "overlay", "value": "b3c1a708",
                     "payload": { "clubId": "b3c1a708", "name": "ThePretorians", "sr": 1678, "rank": 4, … } },
    "playstation": { "state": "none" }
  },
  "shared": { … }
}

Identity

trivelaUserId, the current handle, and connections — the other services this player has linked, by name and display label, oldest first. Never their id on those services: two services cannot correlate their users through Trivela.connections is only present when linked is true, so nothing can be learned about an account you are not already joined to.

Values

One entry per field you registered to read. Each is the value the player has settled on — their own pick when two services disagreed — and it arrives only if they have switched sharing to you on. No entry ever says which service it came from; that would tell every service which other services the player uses.

stateDo this
overlayShow value instead of your own. Write it to a column of its own and read coalesce(field_trivela, field); your own value is never touched, so switching off restores it.
noneClear that overlay column. The player's own value on your site reappears. This is never an instruction to delete anything they set with you.

Why a separate column. The player can turn sharing to you off at any time, and when they do, what they had set with you must come straight back. That is only possible if you never overwrote it.

Fields with a payload

A field that is an object arrives as its identifier in value and the rest of the record in payload beside it, as its source last reported. The payload is present only when its identifier matches value; otherwise it is withheld rather than shown under the wrong name. Compose your own links from the identifiers — a payload never carries a URL. Which fields, and their keys, are in the catalogue.

Parsing

Walk your list of fields, not the keys in the response. Drop an entry you cannot parse rather than failing the call. A field you do not know yet is not an error; it is a column you have not added. And a field that is missing from the block means “leave that column alone” — never “clear everything”.

The last rule matters on the day a field is added for you: it will be missing from sync until the registry names it, and a reader that treats missing as a clear wipes every overlay on the first call.