You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/docs/public-api/members.mdx
+61-1Lines changed: 61 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,54 @@ Organization members are users who have access to your Capgo organization. Each
32
32
33
33
## Endpoints
34
34
35
+
### POST
36
+
37
+
`https://api.capgo.app/organization/members/`
38
+
39
+
Add a new member to an organization or update an existing member's role. Note that you can only invite users who already have a Capgo account - the email must correspond to an existing Capgo user.
- When adding a new member, they will receive an invitation email. Their role will be prefixed with "invite_" until they accept the invitation.
81
+
- The user must already have a Capgo account before they can be invited. If they don't have an account, they should first create one at https://web.capgo.app/register/
82
+
35
83
### GET
36
84
37
85
`https://api.capgo.app/organization/members/`
@@ -155,11 +203,23 @@ Common error scenarios and their responses:
155
203
"error": "Cannot remove the last admin from the organization",
156
204
"status": "KO"
157
205
}
206
+
207
+
// Invalid email
208
+
{
209
+
"error": "Invalid email format",
210
+
"status": "KO"
211
+
}
212
+
213
+
// Member already exists
214
+
{
215
+
"error": "Member already exists in organization",
216
+
"status": "KO"
217
+
}
158
218
```
159
219
160
220
## Common Use Cases
161
221
162
222
1.**Team Expansion**: Adding new team members with appropriate roles
163
223
2.**Access Control**: Managing member permissions as responsibilities change
164
224
3.**Security Audit**: Reviewing member list and roles periodically
165
-
4.**Team Restructuring**: Updating roles during organizational changes
225
+
4.**Team Restructuring**: Updating roles during organizational changes
0 commit comments