Add organization member
POST
/manage/organizations/:id/membersAdd an existing user as an organization member. Admins only.
| Auth | Login required |
|---|
Path parameters
idstringrequiredOrganization ID.
Request body
userIdstringrequiredUser ID to add (required).
rolestringOne of ADMIN / MEMBER.
titlestringJob title; no length limit.
startDate / endDatestringMembership period in YYYY-MM format.
currentbooleanWhether the membership is current.
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/organizations/ID/members \-X POST \-H "Authorization: Bearer 4s_at_..." \-H "Content-Type: application/json" \-d '{"userId": "a1b2c3d4-...","role": "MEMBER","title": "Software Engineer"}'
Example response
{"id": "om1a2b3c-...","role": "ADMIN","title": "Software Engineer","startDate": "2024-04-01","endDate": null,"current": true,"user": { "id": "a1b2c3d4-...", "slug": "taro", "firstName": "太郎", "lastName": "山田", "avatarUrl": "https://.../avatar.png" }}