Create a User Group

Create a user group.

Request URL

POST {base_url}/services/openapi/v1.0/user/group_create

Request parameters

Body parameters
Parameter Required Type Description
groupName String Yes User group name.
memberIds Array <Long> No The member ID(s) of the user(s) that belong to the group.
Note:
  • You can query the user's member ID using Query Multiple Users interface.
  • Use a comma to separate multiple IDs. For example, [1001,1002].

Response parameters

Parameter Type Description
data Object <Details> The detailed information.
status String The result of the request.
  • Success
  • Failed
requestId String The ID of the request, which can be used to quickly locate the request.
Details
Parameter Type Description
groupId Long User group ID.

Example

Request example

Create a user group:
  • Group name: "API Test Group".
  • Group members' IDs: 466 and 23996.
POST /services/openapi/v1.0/user/group_create HTTP/1.1
Host: test.smartoffice.yeastar.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJncmFudF90eXBlIjoiY2xpZW50X2NyZWRlbnRpYWxzIiwic2NvcGUiOlsiL29wZW5hcGkvIl0sImVudGVycHJpc2VfaWQiOjEwMDQzMywicmVnaW9uIjoiR0wiLCJhdXRob3JpdGllcyI6WyJST0xFX0NMSUVOVCJdLCJqdGkiOiJjZjc3NTg4OC1mM2QwLTRkNDMtODJiYy00NjQ4NWZjYTY0MzIiLCJjbGllbnRfaWQiOiI3OTU2OGFhMC0wYjBkLTQyZjYtOGRiNC03OWExNmQ3MzQ3MmEiLCJ0cyI6MTY4OTkwNTE3MCwiZXhwX2luIjo4NjQwMH0.QULcMVk5CJWNnZFrHp2TYH-P1cdvPoFn4jYYEwSs0Ps
Content-Type: application/json

{
    "groupName": "API Test Group",
    "memberIds": [466,23996]
}
Response example
HTTP/1.1 200 OK
{
    "data": {
        "groupId": 1001391
    },
    "status": "Success",
    "requestId": "4d491cbd89668ec388456aab627f9753"
}