POST
/api/v1/invites/acceptJoin a household with an invite code
Any signed-in user; no household membership needed. Safe to retry: a caller who already belongs to the household answers 200 with the existing membership and the code stays unused. 400 when the code is unknown, expired or already used. A code made for a named person links the new account to them, unless that person has since been claimed or removed — then the join is unlinked. Everyone in the household gets a «joined» push (#254).
Parametre
Ingen parametre
Forespørselskropp
Svar
- 200OK
application/jsonMembershipResponse- 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.
Problemkoder
`code` i problemkroppen er den du forgreiner på. `detail` er engelsk, skrevet for loggen.
invite_not_usable- — Den invitasjonen er utløpt eller allerede brukt. Be om en ny.
Eksempel
curl -b "bryti_session=…" \
-X POST \
"https://bryti.app/api/v1/invites/accept" \
-H "Content-Type: application/json" \
-d '{"code":"string"}'Eksempel på svar
200
application/json{
"householdId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"householdName": "string",
"role": "Owner",
"memberId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}