API: Join
Sign up to write along. Stored for administrators, never public.
Every HTML route returns JSON with Accept: application/json. Authentication: session cookie, X-API-KEY, Authorization: Bearer or Basic.
GET
Join form
/joinguestcurl -X GET -H 'Accept: application/json' 'http://staging.app.molodetz.nl/join'
const response = await fetch("/join", { method: "GET", headers: { "Accept": "application/json" } });
console.log(await response.json());
import httpx
print(httpx.request("GET", BASE + "/join", headers={"Accept": "application/json", "X-API-KEY": API_KEY}).json())
{
"submitted": false
}
Not sent yet.
POST
I'm in
/joinguestStores a join request: name, contact and an optional repo link.
| Field | Type | Location | Required |
|---|---|---|---|
name | string | body | yes |
contact | string | body | yes |
repo_url | string | body | no |
message | string | body | no |
curl -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' -d '{"name": "Probe", "contact": "probe@example.com"}' 'http://staging.app.molodetz.nl/join'
const response = await fetch("/join", { method: "POST", headers: { "Accept": "application/json" } });
console.log(await response.json());
import httpx
print(httpx.request("POST", BASE + "/join", headers={"Accept": "application/json", "X-API-KEY": API_KEY}).json())
{
"data": {
"uid": "0190..."
},
"ok": true,
"redirect": "/join?ok=1"
}
Not sent yet.
GET
Invite claim form
/invite/{token}guestShows the claim form for a live invite; unknown, used and expired links answer 404 with the same message.
| Field | Type | Location | Required |
|---|---|---|---|
token | string | path | yes |
curl -X GET -H 'Accept: application/json' 'http://staging.app.molodetz.nl/invite/unknown-token'
const response = await fetch("/invite/{token}", { method: "GET", headers: { "Accept": "application/json" } });
console.log(await response.json());
import httpx
print(httpx.request("GET", BASE + "/invite/{token}", headers={"Accept": "application/json", "X-API-KEY": API_KEY}).json())
{
"email": "ada@example.com",
"email_locked": true,
"username": "ada",
"valid": true
}
Not sent yet.
POST
Claim invite
/invite/{token}guestCreates the Member account, logs in and marks the join request accepted. Single use.
| Field | Type | Location | Required |
|---|---|---|---|
token | string | path | yes |
username | string | body | yes |
email | string | body | yes |
password | string | body | yes |
password_confirm | string | body | yes |
terms | boolean | body | yes |
curl -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' -d '{"username": "Probe", "email": "probe@example.com", "password": "probe-pass-1", "password_confirm": "probe-pass-1", "terms": true}' 'http://staging.app.molodetz.nl/invite/unknown-token'
const response = await fetch("/invite/{token}", { method: "POST", headers: { "Accept": "application/json" } });
console.log(await response.json());
import httpx
print(httpx.request("POST", BASE + "/invite/{token}", headers={"Accept": "application/json", "X-API-KEY": API_KEY}).json())
{
"data": {
"username": "ada"
},
"ok": true,
"redirect": "/"
}
Not sent yet.