Skip to main content
Version: latest

新建分组

接口概述#

  • 功能:新建分组
  • 请求方式:POST
  • 请求地址:/api/contacts/teams/{team_id}/groups

请求参数#

参数名类型必须参数位置描述示例值
namestringbody分组名称测试分组
parent_idintegerbody上级分组ID0
orderintegerbody排序1
remote_idstringbody第三方系统的分组ID,用于关联
team_idintegeruri团队ID30

响应参数#

参数名类型描述
group_idinteger(uint32)分组ID
namestring分组名称

响应示例#

  • 请求成功
{    "code": "OK",    "error": {        "type": ""    },    "data": {        "group_id": 6031,        "name": "测试子组"    },    "request_id": "7c61197c-5682-46b8-9a55-eea533ac2739"}
  • 请求失败
{    "code": "InvalidArgument",    "error": {        "type": "invalid_argument"    },    "data": {},    "request_id": "ddec96d2-165e-4f3e-8a64-2057db116983"}

错误码#

error.type 错误代码错误描述
invalid_argument参数校验不通过
claim_error无权限
contacts_team_not_found
group_too_deep
parent_group_not_found
default_group_be_modified
duplicated_remote_id