Add community member
POST
/manage/communities/:id/membersAdd an existing user as a community member. Admins only.
| Auth | Login required |
|---|
Path parameters
idstringrequiredCommunity ID or slug.
Request body
userIdstringrequiredUser ID to add (required).
rolestringOne of ADMIN / MEMBER.
titlestringTitle; no length limit.
Notes
When accessed with an OAuth access token, `email` fields are recursively removed from the response JSON (they are retained for session-authenticated dashboard access).
Request
curl https://api.4s.link/manage/communities/ID/members \-X POST \-H "Authorization: Bearer 4s_at_..." \-H "Content-Type: application/json" \-d '{"userId": "a1b2c3d4-...","role": "MEMBER"}'
Example response
{"id": "cm1a2b3c-...","role": "MEMBER","status": "APPROVED","title": null,"user": { "id": "a1b2c3d4-...", "slug": "taro", "firstName": "太郎", "lastName": "山田", "avatarUrl": "https://.../avatar.png" }}