Pin, archive, move or eject a thread in the caller's list
Changes how the caller's own list shows one thread (ADR 0042): a change of the thread's row, written to no event of its log (the log is the conversation, which a fork copies, an export carries and the readers of a share see: none of them sees or inherits it), so version, updatedAt and the thread's events do not change. At least one member is given, and an unknown one is a 400:
pinned:truepins the thread and puts it on top of the pinned;falseunpins it and puts it on top of the rest. Pinning a thread that is pinned writes nothing.archived:truearchives the thread (it leaves the listlistThreadsgives by default and is listed witharchived=only),falsebrings it back in the place it had. Archiving does not touch a share: the link keeps working, andsharestays on the thread.nested:falseejects a thread nested under another (a fork made nested under its parent): it becomes a thread of the list's own level, right after the block it left (on top of the unpinned when that block is pinned or archived). ItsforkedFromis untouched: ejecting is display grouping, not history. A thread that is not nested has nothing to eject.nested: trueis a 422: nesting a thread by moving it is not built.place: where a thread of the list's own level goes among the caller's:"top"(on top of its section),{"before": id}or{"after": id}(right before, or right after, that thread). The server makes the place; a client never sends a key. The anchor must be a thread of the caller's that is on the list's own level, not archived and not the thread itself, else 422bad_anchor; a client that gets it reads the list again. Withnested: falsethe place is where the ejected thread goes. A thread nested under another is not pinned and not placed: 422nested_row(eject it first, or givenested: falsewith the place).
Changing a row to the state it already has is a 200 that writes nothing. Two arrangements at once may leave two threads of one place: they are ordered newest first, and nothing errors. It needs the thread to be the caller's and thread.read, not thread.write: it changes nothing in the conversation and nobody else sees it, the way taking a share down needs only ownership. Another person's thread is a 404 indistinguishable from one that does not exist, whatever the caller's roles.
Authorizations
A JWT signed by the configured issuer (RS256, RS384, ES256 or EdDSA), with the configured audience. Read when auth.mode is jwt or jwt_or_proxy_header. A missing or refused token gets 401 with WWW-Authenticate: Bearer; an issuer whose keys cannot be fetched gets 503.
A JWT as bearerToken, bound to the key of the client (cnf.jkt, RFC 7638), sent as Authorization: DPoP <token> with one DPoP header holding a proof signed by that key (RFC 9449, ADR 0054). Read only when auth.dpop is configured. A bad proof gets 401 with WWW-Authenticate: DPoP error="invalid_dpop_proof", algs="ES256 EdDSA", a bad or unbound token error="invalid_token".
Set by oauth2-proxy after OIDC login; requests without it get 401. Read when auth.mode is proxy_header (the default) or jwt_or_proxy_header without a bearer token.
Request Body
Responses
The thread as it is now, with pinned, archived and nestedUnder where they hold