Skip to main content

Create Group

Important Note

This feature is available in the Business plan. If you haven't upgraded yet, please upgrade before using this feature.

API Overview

  • Function: Create Group
  • Request Method: POST
  • Request URL: /api/contacts/teams/{team_id}/groups?appid={appid}&access_token={access_token}

Request Parameters

Parameter NameTypeRequiredLocationDescriptionExample
namestringYesbodyGroup NameTest Group
parent_idintegerNobodyParent Group ID0
orderintegerNobodySort Order1
remote_idstringNobodyThird-party System Group ID for Association
team_idintegerYesuriTeam ID30

Response Parameters

Parameter NameTypeDescription
group_idinteger(uint32)Group ID
namestringGroup Name

Response Examples

  • Successful Request
{
"code": "OK",
"error": {
"type": ""
},
"data": {
"group_id": 6031,
"name": "Test Subgroup"
},
"request_id": "7c61197c-5682-46b8-9a55-eea533ac2739"
}
  • Failed Request
{
"code": "InvalidArgument",
"error": {
"type": "invalid_argument"
},
"data": {},
"request_id": "ddec96d2-165e-4f3e-8a64-2057db116983"
}

Error Codes

error.type CodeDescription
invalid_argumentParameter Validation Failed
claim_errorNo Permission
contacts_team_not_foundTeam Not Found
group_too_deepGroup Hierarchy Too Deep
parent_group_not_foundParent Group Not Found
default_group_be_modifiedDefault Group Cannot Be Modified
duplicated_remote_idDuplicate Remote ID