POST/api/guilds/register
「学生団体・ベンチャー」の分類の、新しく作る、または操作を実行するために内容を送る API。ログインした本人として呼ぶ。
- 要約
学生団体(ギルド)を登録する(mode = new / claim)。運営の承認で公開・申請者が owner
- 呼び方と印
ログイン
送るもの(本文)application/json
送る本文の欄。「必須」の印がある欄は省けない。
basicProfile任意objectnameKana任意string | null長さ ≤240organizationType任意string | null長さ ≤80baseUniversities任意array<string>件数 ≤20foundedYearMonth任意string | null/^(19[5-9]\d|20\d\d|2100)-(0[1-9]|1[0-2])$/studentMemberCount任意integer | null0–100000activitySummary任意string | null長さ ≤2000catchphrase任意string | null長さ ≤40mode必須"new" | "claim"claimGuildId任意string(uuid) | nullname必須string長さ 1–80referrer任意string | null長さ ≤60links任意array<object>件数 ≤18kind必須enum(8)- "website"
- "x"
- "instagram"
- "youtube"
- "tiktok"
- "facebook"
- "note"
- "discord"
url必須string長さ ≤2048title任意string長さ ≥1memberCount任意integer | null1–100000genres任意array<enum(38)>件数 ≤38 · 既定 []areas任意array<enum(47)>件数 ≤8 · 既定 []description任意string | null長さ ≤400logoImageId任意string(uuid) | nullcontentPlan任意string | null長さ ≤400orgKind任意"university" | "highschool" | nulluniversityCode任意string | null/^[A-Z0-9]{4,16}$/universityName任意string | null長さ ≤80myRole任意enum(6)- "founder"
- "president"
- "vice_president"
- "exec"
- "member"
- "advisor"
myTitle任意string | null長さ ≤40myJoinedYear任意integer | null1950–2100contact任意string | null長さ ≤60academic必須objectgradYear必須integer | null1950–2100gradMonth任意integer | null1–12enrollmentStatus必須enum(5)- "active"
- "on_leave"
- "graduated"
- "withdrawn"
- "unknown"
schoolCode任意string | null/^[A-Z0-9]{4,16}$/schoolName任意string | null長さ ≤80nextLeader任意object | nulluserId任意string(uuid) | nullname必須string長さ 1–40email任意string(email) | null長さ ≤254school任意string | null長さ ≤80title任意string | null長さ ≤40instagram任意string | null長さ ≤2048gradYear任意integer | null1950–2100role必須enum(6)- "founder"
- "president"
- "vice_president"
- "exec"
- "member"
- "advisor"
term任意"current" | "next"既定 "current"invites任意array<object>件数 ≤8userId任意string(uuid) | nullname必須string長さ 1–40email任意string(email) | null長さ ≤254school任意string | null長さ ≤80title任意string | null長さ ≤40instagram任意string | null長さ ≤2048gradYear任意integer | null1950–2100role必須enum(6)- "founder"
- "president"
- "vice_president"
- "exec"
- "member"
- "advisor"
term任意"current" | "next"既定 "current"consent必須true
返るもの(応答)201 · application/json
成功したときに返る形。入れ子の欄は、その行を押すと開く・閉じる。「任意」の印がある欄は返らないことがある。
applicationIdstringkind"guild" | "venture"idstringslugstring
失敗したとき(エラー)
失敗したときの状態コードと、その意味。本文の error の値で、プログラムが失敗の種類を見分けられる。
- 400入力の誤り(error = invalid_input など)
- 401未ログイン(unauthorized)/ Bearer が無効(invalid_token。WWW-Authenticate 付き)
- 403権限が無い
- invalid_input
- guild_exists
- guild_not_found
- application_pending
- already_manager
- unknown_school
- image_not_found
呼び出しの見本
そのまま試せる呼び出しの例。curl と fetch をタブで切り替える。ID やトークンは自分の値に置き換える。
curl -X POST "https://bounty.spikes.4s.link/api/guilds/register" \
-H "Authorization: Bearer $BEARER_AUTH" \
-H "Content-Type: application/json" \
-d '{
"mode": "new",
"name": "string",
"academic": {
"gradYear": 1950,
"enrollmentStatus": "active"
},
"consent": true
}'