Users API¶
Get User Groups¶
GET /core/v1/users/<user_id>/groups
Parameter |
Type |
Description |
---|---|---|
|
String |
Required, values: jwt |
|
String |
Required, values: {“user_id”: <admin_id>} |
|
Number |
Required |
200 OK¶
{
"memberships": [
{
"user_id": 12345,
"group_slug": "some-group-slug",
"owner": { ... }
},
...
],
}
Add User to Group¶
POST /core/v1/users/<user_id>/groups
Parameter |
Type |
Description |
---|---|---|
|
String |
Required, values: jwt |
|
String |
Required, values: {“user_id”: <admin_id>} |
|
Number |
Required |
|
String |
Required |
200 OK¶
{
"membership": {
"user_id": 12345,
"group_slug": "some-group-slug",
"owner": { staff: {} }
}
}
Remove User from Group¶
DELETE /core/v1/users/<user_id>/groups/<group_slug>
Parameter |
Type |
Description |
---|---|---|
|
String |
Required, values: jwt |
|
String |
Required, values: {“user_id”: <admin_id>} |
|
Number |
Required |
|
String |
Required |
200 OK¶
{}