Documentation · API reference
POST
/api/v1/auth/invitationAccept an invitation: the member is made and signed in
This page as Markdown, or in an AI chatMore ways to read this page
Accept an invitation: the member is made and signed in.
# Accept an invitation: the member is made and signed in
> tidekeeper's API reference: https://tidekeeper.eu/docs/api/post-auth-invitation
`POST /api/v1/auth/invitation`
Accept an invitation: the member is made and signed in.
## What to send
`InvitationAccept`
- `accept` (boolean)
- `adult` (boolean): Someone new says they are 18 or older, and accepts what this deployment publishes, as on onboarding's first step (doc/sign-in-services.md, B).
- `name` (string)
- `password` (string): Empty from someone who already signs in here and is signed in.
- `token` (string, needed)
## The answer
201, `Me`
- `account_id` (string, needed)
- `account_name` (string, needed)
- `accounts` (list of MeAccount): Every account they are in. One is the account this answer is about; a person in one account has one here.
- `email` (string, needed)
- `features` (FeatureSet, needed)
- `invite_needed` (boolean): Another account of theirs needs an invite code (doc/invites.md).
- `may` (list of string): What this request may do: `read`, `events`, `manage`, `visitors`, `own`. A page hides what would be refused.
- `name` (string): What they are called. Empty until they say.
- `operator` (boolean): Whoever runs this tidekeeper: the operator's console is theirs.
- `role` (string, needed)
- `second_step_missing` (boolean): The account's owner asked that every member has a second step at sign-in, and this member has not set one up.
- `some_sites` (boolean): Given some of the account's sites, not all.
- `user_id` (string, needed)
## Asking
```sh
curl -X POST https://tidekeeper.eu/api/v1/auth/invitation \
-H "Authorization: Bearer $TIDEKEEPER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"token": "…"}'
```
What to send
InvitationAccept
- accept
- boolean
- adult
- booleanSomeone new says they are 18 or older, and accepts what this deployment publishes, as on onboarding's first step (doc/sign-in-services.md, B).
- name
- string
- password
- stringEmpty from someone who already signs in here and is signed in.
- token
- stringneeded
The answer
Status 201
Me
- account_id
- stringneeded
- account_name
- stringneeded
- accounts
- list of MeAccountEvery account they are in. One is the account this answer is about; a person in one account has one here.
- stringneeded
- features
- FeatureSetneeded
- invite_needed
- booleanAnother account of theirs needs an invite code (doc/invites.md).
- may
- list of stringWhat this request may do: `read`, `events`, `manage`, `visitors`, `own`. A page hides what would be refused.
- name
- stringWhat they are called. Empty until they say.
- operator
- booleanWhoever runs this tidekeeper: the operator's console is theirs.
- role
- stringneeded
- second_step_missing
- booleanThe account's owner asked that every member has a second step at sign-in, and this member has not set one up.
- some_sites
- booleanGiven some of the account's sites, not all.
- user_id
- stringneeded
Asking
curl -X POST https://tidekeeper.eu/api/v1/auth/invitation \ -H "Authorization: Bearer $TIDEKEEPER_TOKEN" \ -H "Content-Type: application/json" \ -d '{"token": "…"}'
const answer = await fetch("https://tidekeeper.eu/api/v1/auth/invitation", { method: "POST", headers: { Authorization: `Bearer ${process.env.TIDEKEEPER_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({"token": "…"}), }).then((r) => r.json());