Users API

Get User Groups

GET /core/v1/users/<user_id>/groups

Parameter

Type

Description

auth_token_type

String

Required, values: jwt

auth_token

String

Required, values: {“user_id”: <admin_id>}

user_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

auth_token_type

String

Required, values: jwt

auth_token

String

Required, values: {“user_id”: <admin_id>}

user_id

Number

Required

group_slug

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

auth_token_type

String

Required, values: jwt

auth_token

String

Required, values: {“user_id”: <admin_id>}

user_id

Number

Required

group_slug

String

Required

200 OK

{}