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 Name | Type | Required | Location | Description | Example |
---|---|---|---|---|---|
name | string | Yes | body | Group Name | Test Group |
parent_id | integer | No | body | Parent Group ID | 0 |
order | integer | No | body | Sort Order | 1 |
remote_id | string | No | body | Third-party System Group ID for Association | |
team_id | integer | Yes | uri | Team ID | 30 |
Response Parameters
Parameter Name | Type | Description |
---|---|---|
group_id | integer(uint32) | Group ID |
name | string | Group 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 Code | Description |
---|---|
invalid_argument | Parameter Validation Failed |
claim_error | No Permission |
contacts_team_not_found | Team Not Found |
group_too_deep | Group Hierarchy Too Deep |
parent_group_not_found | Parent Group Not Found |
default_group_be_modified | Default Group Cannot Be Modified |
duplicated_remote_id | Duplicate Remote ID |