Documentation · API reference
POST
/api/v1/admin/invitesMake an invite code
This page as Markdown, or in an AI chatMore ways to read this page
Make an invite code: shown this once, with the link that carries it to sign-up. Operators only.
# Make an invite code
> tidekeeper's API reference: https://tidekeeper.eu/docs/api/post-admin-invites
`POST /api/v1/admin/invites`
Make an invite code: shown this once, with the link that carries it to sign-up. Operators only.
## What to send
`AdminInviteNew`: A new invite code (doc/invites.md): who it is for.
- `note` (string)
## The answer
201, `AdminInviteMade`: An invite code just made: the code itself, shown this once, and the link that carries it to sign-up.
- `code` (string, needed)
- `id` (string, needed)
- `link` (string, needed)
- `note` (string, needed)
## Asking
```sh
curl -X POST https://tidekeeper.eu/api/v1/admin/invites \
-H "Authorization: Bearer $TIDEKEEPER_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
```
What to send
AdminInviteNew A new invite code (doc/invites.md): who it is for.
- note
- string
The answer
Status 201
AdminInviteMade An invite code just made: the code itself, shown this once, and the link that carries it to sign-up.
- code
- stringneeded
- id
- stringneeded
- link
- stringneeded
- note
- stringneeded
Asking
curl -X POST https://tidekeeper.eu/api/v1/admin/invites \ -H "Authorization: Bearer $TIDEKEEPER_TOKEN" \ -H "Content-Type: application/json" \ -d '{}'
const answer = await fetch("https://tidekeeper.eu/api/v1/admin/invites", { method: "POST", headers: { Authorization: `Bearer ${process.env.TIDEKEEPER_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({}), }).then((r) => r.json());