### Get Tag List using Exmail QQ API Source: https://context7.com/context7/exmail_qq_qy_mng_logic_doc/llms.txt Retrieves a list of all tags within the enterprise, including their IDs and names. This API call requires a valid access token. ```bash curl -X GET "https://api.exmail.qq.com/cgi-bin/tag/list?access_token=ACCESS_TOKEN" ``` -------------------------------- ### Get Mail Group Information using Exmail QQ API Source: https://context7.com/context7/exmail_qq_qy_mng_logic_doc/llms.txt Retrieves detailed information about a specific mail group, including its member list and permission settings. Requires the group ID and an access token. ```bash curl -X GET "https://api.exmail.qq.com/cgi-bin/group/get?access_token=ACCESS_TOKEN&groupid=dev-team@company.com" ``` -------------------------------- ### Get Tag Members using Exmail QQ API Source: https://context7.com/context7/exmail_qq_qy_mng_logic_doc/llms.txt Retrieves a list of all members associated with a specific tag. This is useful for querying and managing tag memberships. Requires the tag ID and an access token. ```bash curl -X GET "https://api.exmail.qq.com/cgi-bin/tag/get?access_token=ACCESS_TOKEN&tagid=1" ``` -------------------------------- ### 批量检查账号 (Bash) Source: https://context7.com/context7/exmail_qq_qy_mng_logic_doc/llms.txt 批量检查一个或多个邮箱账号是否已经存在于企业通讯录中。该API常用于在导入新成员前进行账号的有效性验证。 ```bash # 批量检查账号 curl -X POST "https://api.exmail.qq.com/cgi-bin/user/batchcheck?access_token=ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "userlist": [ "zhangsan@company.com", "lisi@company.com", "wangwu@company.com" ] }' ``` -------------------------------- ### POST /cgi-bin/option/get Source: https://context7.com/context7/exmail_qq_qy_mng_logic_doc/llms.txt Retrieves feature configuration options for a specified user. ```APIDOC ## POST /cgi-bin/option/get ### Description Retrieves feature configuration options for a specified user. ### Method POST ### Endpoint https://api.exmail.qq.com/cgi-bin/option/get ### Parameters #### Query Parameters - **access_token** (string) - Required - The access token for authentication. #### Request Body - **userid** (string) - Required - The email address of the user. - **type** (array) - Required - A list of option types to retrieve. - (integer) - Example types: 1 (forwarding), 2 (auto-reply), 3 (vacation reply). ### Request Example ```json { "userid": "zhangsan@company.com", "type": [1, 2, 3] } ``` ### Response #### Success Response (200) - **errcode** (integer) - Error code (0 for success). - **errmsg** (string) - Error message. - **option** (array) - A list of option objects. - **type** (integer) - The type of the option. - **value** (string) - The value of the option. #### Response Example ```json { "errcode": 0, "errmsg": "ok", "option": [ {"type": 1, "value": "1"}, {"type": 2, "value": "0"}, {"type": 3, "value": "vacation@company.com"} ] } ``` ``` -------------------------------- ### 创建成员 (Bash) Source: https://context7.com/context7/exmail_qq_qy_mng_logic_doc/llms.txt 在企业通讯录中创建新的成员账号。需要提供成员的邮箱账号、姓名、所属部门、职位、手机号、性别等详细信息。 ```bash # 创建成员 curl -X POST "https://api.exmail.qq.com/cgi-bin/user/create?access_token=ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "userid": "zhangsan@company.com", "name": "张三", "department": [100, 101], "position": "高级工程师", "mobile": "13800138000", "gender": "1", "enable": 1, "slavelist": ["zhangsan2@company.com"] }' ``` -------------------------------- ### 删除成员 (Bash) Source: https://context7.com/context7/exmail_qq_qy_mng_logic_doc/llms.txt 从企业通讯录中删除指定的成员账号。请注意,此操作将同时删除该成员关联的邮箱数据。 ```bash # 删除成员 curl -X GET "https://api.exmail.qq.com/cgi-bin/user/delete?access_token=ACCESS_TOKEN&userid=zhangsan@company.com" ``` -------------------------------- ### 获取访问凭证 Source: https://context7.com/context7/exmail_qq_qy_mng_logic_doc/llms.txt 获取接口调用凭证 (access_token),该凭证用于后续所有API请求的身份验证。access_token的有效期为7200秒。 ```APIDOC ## 获取访问凭证(access_token) ### Description 获取接口调用凭证,用于后续所有API请求的身份验证。access_token的有效期为7200秒,开发者需要进行妥善保存和定时刷新。 ### Method GET ### Endpoint https://api.exmail.qq.com/cgi-bin/gettoken ### Parameters #### Query Parameters - **corpid** (string) - Required - 企业的CorpID - **corpsecret** (string) - Required - 企业的CorpSecret ### Response #### Success Response (200) - **errcode** (integer) - 错误码 - **errmsg** (string) - 错误信息 - **access_token** (string) - 接口调用凭证 - **expires_in** (integer) - 凭证有效期, 单位秒 #### Response Example ```json { "errcode": 0, "errmsg": "ok", "access_token": "accesstoken000001", "expires_in": 7200 } ``` ``` -------------------------------- ### 获取部门成员列表 (Bash) Source: https://context7.com/context7/exmail_qq_qy_mng_logic_doc/llms.txt 获取指定部门下的所有成员的简要信息。可以通过设置fetch_child参数来选择是否递归获取子部门下的成员。 ```bash # 获取部门成员 curl -X GET "https://api.exmail.qq.com/cgi-bin/user/simplelist?access_token=ACCESS_TOKEN&department_id=100&fetch_child=1" ``` -------------------------------- ### 获取访问凭证 (Bash) Source: https://context7.com/context7/exmail_qq_qy_mng_logic_doc/llms.txt 此API用于获取调用其他腾讯企业邮箱API所需的access_token。access_token有效期为7200秒,需要妥善保存和定时刷新。请求时需提供corpid和corpsecret。 ```bash # 获取access_token curl -X GET "https://api.exmail.qq.com/cgi-bin/gettoken?corpid=YOUR_CORPID&corpsecret=YOUR_CORPSECRET" ``` -------------------------------- ### 获取成员信息 (Bash) Source: https://context7.com/context7/exmail_qq_qy_mng_logic_doc/llms.txt 检索指定成员的详细信息,包括其个人资料、部门归属、职位及邮箱相关设置。用于查询和展示成员的完整信息。 ```bash # 获取成员 curl -X GET "https://api.exmail.qq.com/cgi-bin/user/get?access_token=ACCESS_TOKEN&userid=zhangsan@company.com" ``` -------------------------------- ### 创建部门 (Bash) Source: https://context7.com/context7/exmail_qq_qy_mng_logic_doc/llms.txt 在企业通讯录中创建一个新的组织部门。需要提供部门名称、父部门ID和排序值。该API用于构建和管理企业组织架构。 ```bash # 创建部门 curl -X POST "https://api.exmail.qq.com/cgi-bin/department/create?access_token=ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "研发中心", "parentid": 1, "order": 1, "id": 100 }' ``` -------------------------------- ### 更新成员信息 (Bash) Source: https://context7.com/context7/exmail_qq_qy_mng_logic_doc/llms.txt 修改企业通讯录中现有成员的个人信息、部门归属、职位等。支持批量更新多个字段,以保持成员信息最新。 ```bash # 更新成员 curl -X POST "https://api.exmail.qq.com/cgi-bin/user/update?access_token=ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "userid": "zhangsan@company.com", "name": "张三丰", "department": [100], "position": "技术总监", "mobile": "13900139000" }' ``` -------------------------------- ### 获取部门成员详情 (Bash) Source: https://context7.com/context7/exmail_qq_qy_mng_logic_doc/llms.txt 获取指定部门下所有成员的详细信息,包括职位、手机号等完整资料。同样支持fetch_child参数来递归获取子部门成员。 ```bash # 获取部门成员详情 curl -X GET "https://api.exmail.qq.com/cgi-bin/user/list?access_token=ACCESS_TOKEN&department_id=100&fetch_child=1" ``` -------------------------------- ### 更新部门信息 (Bash) Source: https://context7.com/context7/exmail_qq_qy_mng_logic_doc/llms.txt 修改企业通讯录中已存在的部门信息,包括名称、父部门ID和排序。此API支持动态调整组织架构。 ```bash # 更新部门 curl -X POST "https://api.exmail.qq.com/cgi-bin/department/update?access_token=ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "id": 100, "name": "技术研发中心", "parentid": 1, "order": 2 }' ``` -------------------------------- ### 通讯录管理 - 成员 Source: https://context7.com/context7/exmail_qq_qy_mng_logic_doc/llms.txt 提供成员的创建、更新、删除、查询以及批量操作功能,用于管理企业邮箱账号和用户信息。 ```APIDOC ## 创建成员 ### Description 在企业通讯录中创建新成员,包括邮箱账号、姓名、部门、职位等完整信息。 ### Method POST ### Endpoint https://api.exmail.qq.com/cgi-bin/user/create ### Parameters #### Query Parameters - **access_token** (string) - Required - 接口调用凭证 #### Request Body - **userid** (string) - Required - 成员的邮箱账号 - **name** (string) - Required - 成员姓名 - **department** (array) - Required - 成员所属部门ID列表 - **position** (string) - Optional - 职位 - **mobile** (string) - Optional - 手机号 - **gender** (string) - Optional - 性别 (0表示女, 1表示男) - **enable** (integer) - Optional - 成员启用状态 (0表示禁用, 1表示启用) - **slavelist** (array) - Optional - 成员别名列表 ### Response #### Success Response (200) - **errcode** (integer) - 错误码 - **errmsg** (string) - 错误信息 #### Response Example ```json { "errcode": 0, "errmsg": "created" } ``` ``` ```APIDOC ## 更新成员信息 ### Description 更新企业成员的个人信息、部门归属、职位等属性,支持批量更新多个字段。 ### Method POST ### Endpoint https://api.exmail.qq.com/cgi-bin/user/update ### Parameters #### Query Parameters - **access_token** (string) - Required - 接口调用凭证 #### Request Body - **userid** (string) - Required - 成员的邮箱账号 - **name** (string) - Optional - 成员姓名 - **department** (array) - Optional - 成员所属部门ID列表 - **position** (string) - Optional - 职位 - **mobile** (string) - Optional - 手机号 - **gender** (string) - Optional - 性别 (0表示女, 1表示男) - **enable** (integer) - Optional - 成员启用状态 (0表示禁用, 1表示启用) - **slavelist** (array) - Optional - 成员别名列表 ### Response #### Success Response (200) - **errcode** (integer) - 错误码 - **errmsg** (string) - 错误信息 #### Response Example ```json { "errcode": 0, "errmsg": "updated" } ``` ``` ```APIDOC ## 删除成员 ### Description 删除指定的企业成员账号,该操作会同时删除成员的邮箱数据。 ### Method GET ### Endpoint https://api.exmail.qq.com/cgi-bin/user/delete ### Parameters #### Query Parameters - **access_token** (string) - Required - 接口调用凭证 - **userid** (string) - Required - 成员的邮箱账号 ### Response #### Success Response (200) - **errcode** (integer) - 错误码 - **errmsg** (string) - 错误信息 #### Response Example ```json { "errcode": 0, "errmsg": "deleted" } ``` ``` ```APIDOC ## 获取成员信息 ### Description 获取指定成员的详细信息,包括个人资料、部门归属、邮箱设置等。 ### Method GET ### Endpoint https://api.exmail.qq.com/cgi-bin/user/get ### Parameters #### Query Parameters - **access_token** (string) - Required - 接口调用凭证 - **userid** (string) - Required - 成员的邮箱账号 ### Response #### Success Response (200) - **errcode** (integer) - 错误码 - **errmsg** (string) - 错误信息 - **userid** (string) - 成员的邮箱账号 - **name** (string) - 成员姓名 - **department** (array) - 成员所属部门ID列表 - **position** (string) - 职位 - **mobile** (string) - 手机号 - **gender** (string) - 性别 - **enable** (integer) - 成员启用状态 - **slavelist** (array) - 成员别名列表 #### Response Example ```json { "errcode": 0, "errmsg": "ok", "userid": "zhangsan@company.com", "name": "张三", "department": [100, 101], "position": "高级工程师", "mobile": "13800138000", "gender": "1", "enable": 1, "slavelist": ["zhangsan2@company.com"] } ``` ``` ```APIDOC ## 获取部门成员列表 ### Description 获取指定部门下的所有成员基本信息,支持递归获取子部门成员。 ### Method GET ### Endpoint https://api.exmail.qq.com/cgi-bin/user/simplelist ### Parameters #### Query Parameters - **access_token** (string) - Required - 接口调用凭证 - **department_id** (integer) - Required - 部门ID - **fetch_child** (integer) - Optional - 是否递归获取子部门成员 (1表示是, 0表示否) ### Response #### Success Response (200) - **errcode** (integer) - 错误码 - **errmsg** (string) - 错误信息 - **userlist** (array) - 成员列表 - **userid** (string) - 成员的邮箱账号 - **name** (string) - 成员姓名 - **department** (array) - 成员所属部门ID列表 #### Response Example ```json { "errcode": 0, "errmsg": "ok", "userlist": [ { "userid": "zhangsan@company.com", "name": "张三", "department": [100] }, { "userid": "lisi@company.com", "name": "李四", "department": [100] } ] } ``` ``` ```APIDOC ## 获取部门成员详情 ### Description 获取指定部门下所有成员的详细信息,包括职位、手机号等完整资料。 ### Method GET ### Endpoint https://api.exmail.qq.com/cgi-bin/user/list ### Parameters #### Query Parameters - **access_token** (string) - Required - 接口调用凭证 - **department_id** (integer) - Required - 部门ID - **fetch_child** (integer) - Optional - 是否递归获取子部门成员 (1表示是, 0表示否) ### Response #### Success Response (200) - **errcode** (integer) - 错误码 - **errmsg** (string) - 错误信息 - **userlist** (array) - 成员列表 - **userid** (string) - 成员的邮箱账号 - **name** (string) - 成员姓名 - **department** (array) - 成员所属部门ID列表 - **position** (string) - 职位 - **mobile** (string) - 手机号 - **gender** (string) - 性别 - **enable** (integer) - 成员启用状态 #### Response Example ```json { "errcode": 0, "errmsg": "ok", "userlist": [ { "userid": "zhangsan@company.com", "name": "张三", "department": [100], "position": "高级工程师", "mobile": "13800138000", "gender": "1", "enable": 1 } ] } ``` ``` ```APIDOC ## 批量检查账号 ### Description 批量检查多个邮箱账号是否已存在于企业通讯录中,用于账号导入前的验证。 ### Method POST ### Endpoint https://api.exmail.qq.com/cgi-bin/user/batchcheck ### Parameters #### Query Parameters - **access_token** (string) - Required - 接口调用凭证 #### Request Body - **userlist** (array) - Required - 需要检查的邮箱账号列表 ### Response #### Success Response (200) - **errcode** (integer) - 错误码 - **errmsg** (string) - 错误信息 - **exist** (array) - 已存在的账号列表 - **notexist** (array) - 不存在的账号列表 #### Response Example ```json { "errcode": 0, "errmsg": "ok", "exist": ["zhangsan@company.com", "lisi@company.com"], "notexist": ["wangwu@company.com"] } ``` ``` -------------------------------- ### POST /cgi-bin/log/login Source: https://context7.com/context7/exmail_qq_qy_mng_logic_doc/llms.txt Queries login logs for a specified user within a date range. ```APIDOC ## POST /cgi-bin/log/login ### Description Queries login logs for a specified user within a date range. ### Method POST ### Endpoint https://api.exmail.qq.com/cgi-bin/log/login ### Parameters #### Query Parameters - **access_token** (string) - Required - The access token for authentication. #### Request Body - **begin_date** (string) - Required - The start date for the query (YYYY-MM-DD). - **end_date** (string) - Required - The end date for the query (YYYY-MM-DD). - **userid** (string) - Required - The email address of the user. - **limit** (integer) - Optional - The maximum number of results to return (default 100). - **offset** (integer) - Optional - The number of results to skip (default 0). ### Request Example ```json { "begin_date": "2024-01-01", "end_date": "2024-01-31", "userid": "zhangsan@company.com", "limit": 100, "offset": 0 } ``` ### Response #### Success Response (200) - **errcode** (integer) - Error code (0 for success). - **errmsg** (string) - Error message. - **list** (array) - A list of login log objects. - **userid** (string) - The email address of the user. - **time** (integer) - The timestamp of the login. - **ip** (string) - The IP address of the login. - **type** (string) - The type of login (e.g., 'web'). #### Response Example ```json { "errcode": 0, "errmsg": "ok", "list": [ { "userid": "zhangsan@company.com", "time": 1704067200, "ip": "192.168.1.100", "type": "web" } ] } ``` ``` -------------------------------- ### Create Tag using Exmail QQ API Source: https://context7.com/context7/exmail_qq_qy_mng_logic_doc/llms.txt Creates a new tag for organizing users. Requires an access token and a JSON payload with tag name and ID. The API returns a response indicating success or failure. ```bash curl -X POST "https://api.exmail.qq.com/cgi-bin/tag/create?access_token=ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "tagname": "VIP客户", "tagid": 1 }' ``` -------------------------------- ### POST /cgi-bin/option/update Source: https://context7.com/context7/exmail_qq_qy_mng_logic_doc/llms.txt Updates feature configuration options for a specified user. ```APIDOC ## POST /cgi-bin/option/update ### Description Updates feature configuration options for a specified user. ### Method POST ### Endpoint https://api.exmail.qq.com/cgi-bin/option/update ### Parameters #### Query Parameters - **access_token** (string) - Required - The access token for authentication. #### Request Body - **userid** (string) - Required - The email address of the user. - **option** (array) - Required - A list of option objects to update. - **type** (integer) - Required - The type of the option. - **value** (string) - Required - The new value for the option. ### Request Example ```json { "userid": "zhangsan@company.com", "option": [ {"type": 1, "value": "0"}, {"type": 2, "value": "1"} ] } ``` ### Response #### Success Response (200) - **errcode** (integer) - Error code (0 for success). - **errmsg** (string) - Success message (e.g., "updated"). #### Response Example ```json { "errcode": 0, "errmsg": "updated" } ``` ``` -------------------------------- ### 通讯录管理 - 部门 Source: https://context7.com/context7/exmail_qq_qy_mng_logic_doc/llms.txt 提供部门的创建、更新、删除以及列表查询功能,用于管理企业通讯录中的组织架构。 ```APIDOC ## 创建部门 ### Description 在企业通讯录中创建新的组织部门,支持设置部门名称、父部门ID和排序等属性。 ### Method POST ### Endpoint https://api.exmail.qq.com/cgi-bin/department/create ### Parameters #### Query Parameters - **access_token** (string) - Required - 接口调用凭证 #### Request Body - **name** (string) - Required - 部门名称 - **parentid** (integer) - Required - 父部门ID - **order** (integer) - Optional - 部门排序值 - **id** (integer) - Optional - 部门ID, 如果不指定, 系统会自动生成 ### Response #### Success Response (200) - **errcode** (integer) - 错误码 - **errmsg** (string) - 错误信息 - **id** (integer) - 新创建部门的ID #### Response Example ```json { "errcode": 0, "errmsg": "created", "id": 100 } ``` ``` ```APIDOC ## 更新部门信息 ### Description 修改已存在部门的名称、父部门或排序信息,实现组织架构的动态调整。 ### Method POST ### Endpoint https://api.exmail.qq.com/cgi-bin/department/update ### Parameters #### Query Parameters - **access_token** (string) - Required - 接口调用凭证 #### Request Body - **id** (integer) - Required - 部门ID - **name** (string) - Optional - 部门名称 - **parentid** (integer) - Optional - 父部门ID - **order** (integer) - Optional - 部门排序值 ### Response #### Success Response (200) - **errcode** (integer) - 错误码 - **errmsg** (string) - 错误信息 #### Response Example ```json { "errcode": 0, "errmsg": "updated" } ``` ``` ```APIDOC ## 删除部门 ### Description 删除指定的部门,注意删除部门前需要确保该部门下没有子部门和成员。 ### Method GET ### Endpoint https://api.exmail.qq.com/cgi-bin/department/delete ### Parameters #### Query Parameters - **access_token** (string) - Required - 接口调用凭证 - **id** (integer) - Required - 部门ID ### Response #### Success Response (200) - **errcode** (integer) - 错误码 - **errmsg** (string) - 错误信息 #### Response Example ```json { "errcode": 0, "errmsg": "deleted" } ``` ``` ```APIDOC ## 获取部门列表 ### Description 获取企业的部门列表,可以指定父部门ID来获取其子部门信息。 ### Method GET ### Endpoint https://api.exmail.qq.com/cgi-bin/department/list ### Parameters #### Query Parameters - **access_token** (string) - Required - 接口调用凭证 - **id** (integer) - Optional - 父部门ID, 如果不指定, 则返回根部门下的所有子部门 ### Response #### Success Response (200) - **errcode** (integer) - 错误码 - **errmsg** (string) - 错误信息 - **department** (array) - 部门列表 - **id** (integer) - 部门ID - **name** (string) - 部门名称 - **parentid** (integer) - 父部门ID - **order** (integer) - 部门排序值 #### Response Example ```json { "errcode": 0, "errmsg": "ok", "department": [ { "id": 100, "name": "研发中心", "parentid": 1, "order": 1 }, { "id": 101, "name": "市场部", "parentid": 1, "order": 2 } ] } ``` ``` -------------------------------- ### 获取功能属性 API (curl) Source: https://context7.com/context7/exmail_qq_qy_mng_logic_doc/llms.txt 获取企业邮箱的功能配置属性,如邮件转发、自动回复等设置。需要提供访问令牌、用户ID和要查询的功能类型列表。返回包含功能类型和对应值的列表。 ```curl curl -X POST "https://api.exmail.qq.com/cgi-bin/option/get?access_token=ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "userid": "zhangsan@company.com", "type": [1, 2, 3] }' ``` -------------------------------- ### 获取部门列表 (Bash) Source: https://context7.com/context7/exmail_qq_qy_mng_logic_doc/llms.txt 获取企业通讯录中的部门列表。可以指定父部门ID来检索特定的子部门信息,用于展示或同步部门层级结构。 ```bash # 获取部门列表 curl -X GET "https://api.exmail.qq.com/cgi-bin/department/list?access_token=ACCESS_TOKEN&id=1" ``` -------------------------------- ### 删除部门 (Bash) Source: https://context7.com/context7/exmail_qq_qy_mng_logic_doc/llms.txt 从企业通讯录中删除指定的部门。在执行删除操作前,请确保该部门下不包含任何子部门或成员。 ```bash # 删除部门 curl -X GET "https://api.exmail.qq.com/cgi-bin/department/delete?access_token=ACCESS_TOKEN&id=100" ``` -------------------------------- ### Create Public Mailbox using Exmail QQ API Source: https://context7.com/context7/exmail_qq_qy_mng_logic_doc/llms.txt Creates a new enterprise public mailbox for shared email management by departments or projects. Requires the mailbox email address, name, admin list, and member list in the JSON payload, along with an access token. ```bash curl -X POST "https://api.exmail.qq.com/cgi-bin/publicmail/create?access_token=ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "email": "support@company.com", "name": "客服邮箱", "adminlist": ["zhangsan@company.com"], "memberlist": ["lisi@company.com", "wangwu@company.com"] }' ``` -------------------------------- ### 更改功能属性 API (curl) Source: https://context7.com/context7/exmail_qq_qy_mng_logic_doc/llms.txt 修改企业成员的邮箱功能配置,如开启或关闭特定功能。需要提供访问令牌、用户ID和要更改的功能属性列表(包含类型和值)。返回操作结果信息。 ```curl curl -X POST "https://api.exmail.qq.com/cgi-bin/option/update?access_token=ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "userid": "zhangsan@company.com", "option": [ {"type": 1, "value": "0"}, {"type": 2, "value": "1"} ] }' ``` -------------------------------- ### 获取邮件未读数 API (curl) Source: https://context7.com/context7/exmail_qq_qy_mng_logic_doc/llms.txt 获取指定成员的邮件未读数量。需要提供访问令牌和用户ID。返回包含用户ID和未读邮件数的对象。 ```curl curl -X POST "https://api.exmail.qq.com/cgi-bin/mail/newcount?access_token=ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "userid": "zhangsan@company.com" }' ``` -------------------------------- ### POST /cgi-bin/log/mail Source: https://context7.com/context7/exmail_qq_qy_mng_logic_doc/llms.txt Queries mail logs for a specified user within a date range. ```APIDOC ## POST /cgi-bin/log/mail ### Description Queries mail logs for a specified user within a date range. ### Method POST ### Endpoint https://api.exmail.qq.com/cgi-bin/log/mail ### Parameters #### Query Parameters - **access_token** (string) - Required - The access token for authentication. #### Request Body - **begin_date** (string) - Required - The start date for the query (YYYY-MM-DD). - **end_date** (string) - Required - The end date for the query (YYYY-MM-DD). - **userid** (string) - Required - The email address of the user. - **mailtype** (integer) - Optional - The type of mail to query (e.g., 1 for sent mail). - **limit** (integer) - Optional - The maximum number of results to return (default 100). - **offset** (integer) - Optional - The number of results to skip (default 0). ### Request Example ```json { "begin_date": "2024-01-01", "end_date": "2024-01-31", "userid": "zhangsan@company.com", "mailtype": 1, "limit": 100, "offset": 0 } ``` ### Response #### Success Response (200) - **errcode** (integer) - Error code (0 for success). - **errmsg** (string) - Error message. - **list** (array) - A list of mail objects. - **mailid** (string) - The ID of the mail. - **subject** (string) - The subject of the mail. - **sender** (string) - The sender's email address. - **receiver** (array) - A list of receiver email addresses. - **time** (integer) - The timestamp when the mail was sent. - **size** (integer) - The size of the mail in bytes. #### Response Example ```json { "errcode": 0, "errmsg": "ok", "list": [ { "mailid": "12345678", "subject": "项目进度汇报", "sender": "zhangsan@company.com", "receiver": ["lisi@company.com"], "time": 1704067200, "size": 102400 } ] } ``` ``` -------------------------------- ### Create Mail Group using Exmail QQ API Source: https://context7.com/context7/exmail_qq_qy_mng_logic_doc/llms.txt Creates a new enterprise mail group for bulk email sending and team collaboration. Requires a group ID, group name, user list, and other configurations in the JSON payload, along with an access token. ```bash curl -X POST "https://api.exmail.qq.com/cgi-bin/group/create?access_token=ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "groupid": "dev-team@company.com", "groupname": "研发团队", "userlist": ["zhangsan@company.com", "lisi@company.com"], "grouplist": [], "allow_type": 3, "allow_userlist": [] }' ``` -------------------------------- ### POST /cgi-bin/service/get_login_url Source: https://context7.com/context7/exmail_qq_qy_mng_logic_doc/llms.txt Generates a single sign-on (SSO) URL for accessing Exmail. ```APIDOC ## POST /cgi-bin/service/get_login_url ### Description Generates a single sign-on (SSO) URL for accessing Exmail. ### Method POST ### Endpoint https://api.exmail.qq.com/cgi-bin/service/get_login_url ### Parameters #### Query Parameters - **access_token** (string) - Required - The access token for authentication. #### Request Body - **userid** (string) - Required - The email address of the user. ### Request Example ```json { "userid": "zhangsan@company.com" } ``` ### Response #### Success Response (200) - **errcode** (integer) - Error code (0 for success). - **errmsg** (string) - Error message. - **login_url** (string) - The generated SSO login URL. - **expires_in** (integer) - The expiration time of the URL in seconds. #### Response Example ```json { "errcode": 0, "errmsg": "ok", "login_url": "https://exmail.qq.com/cgi-bin/login?sid=xxx&target=https://exmail.qq.com/", "expires_in": 600 } ``` ``` -------------------------------- ### 获取单点登录URL API (curl) Source: https://context7.com/context7/exmail_qq_qy_mng_logic_doc/llms.txt 获取企业邮箱单点登录URL,用于实现与企业内部系统的身份认证集成。需要提供访问令牌和用户ID。返回包含登录URL、有效期等信息的对象。 ```curl curl -X POST "https://api.exmail.qq.com/cgi-bin/service/get_login_url?access_token=ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "userid": "zhangsan@company.com" }' ``` -------------------------------- ### Email Group Management API Source: https://context7.com/context7/exmail_qq_qy_mng_logic_doc/llms.txt APIs for creating, updating, deleting, and retrieving information about email groups. ```APIDOC ## POST /cgi-bin/group/create ### Description Creates an enterprise email group for bulk email sending and team collaboration. ### Method POST ### Endpoint https://api.exmail.qq.com/cgi-bin/group/create ### Parameters #### Query Parameters - **access_token** (string) - Required - The access token for authentication. #### Request Body - **groupid** (string) - Required - The unique ID for the email group (e.g., "dev-team@company.com"). - **groupname** (string) - Required - The display name of the email group. - **userlist** (array) - Optional - A list of user IDs to be members of the group. - (string) - User ID. - **grouplist** (array) - Optional - A list of other group IDs that are members of this group. - (string) - Group ID. - **allow_type** (integer) - Optional - Specifies who can send mail to this group. (e.g., 3 for "all users"). - **allow_userlist** (array) - Optional - A list of specific user IDs allowed to send mail to this group. - (string) - User ID. ### Request Example ```json { "groupid": "dev-team@company.com", "groupname": "研发团队", "userlist": ["zhangsan@company.com", "lisi@company.com"], "grouplist": [], "allow_type": 3, "allow_userlist": [] } ``` ### Response #### Success Response (200) - **errcode** (integer) - 0 for success. - **errmsg** (string) - "created" on success. #### Response Example ```json { "errcode": 0, "errmsg": "created" } ``` ## POST /cgi-bin/group/update ### Description Updates the members, name, or sending permissions of an email group. ### Method POST ### Endpoint https://api.exmail.qq.com/cgi-bin/group/update ### Parameters #### Query Parameters - **access_token** (string) - Required - The access token for authentication. #### Request Body - **groupid** (string) - Required - The ID of the email group to update. - **groupname** (string) - Optional - The new display name for the email group. - **userlist** (array) - Optional - The updated list of user IDs for the group. - (string) - User ID. ### Request Example ```json { "groupid": "dev-team@company.com", "groupname": "技术研发团队", "userlist": ["zhangsan@company.com", "lisi@company.com", "wangwu@company.com"] } ``` ### Response #### Success Response (200) - **errcode** (integer) - 0 for success. - **errmsg** (string) - "updated" on success. #### Response Example ```json { "errcode": 0, "errmsg": "updated" } ``` ## GET /cgi-bin/group/delete ### Description Deletes a specified email group. The group address will no longer be available. ### Method GET ### Endpoint https://api.exmail.qq.com/cgi-bin/group/delete ### Parameters #### Query Parameters - **access_token** (string) - Required - The access token for authentication. - **groupid** (string) - Required - The ID of the email group to delete. ### Response #### Success Response (200) - **errcode** (integer) - 0 for success. - **errmsg** (string) - "deleted" on success. #### Response Example ```json { "errcode": 0, "errmsg": "deleted" } ``` ## GET /cgi-bin/group/get ### Description Retrieves detailed information about a specified email group, including its member list and permission settings. ### Method GET ### Endpoint https://api.exmail.qq.com/cgi-bin/group/get ### Parameters #### Query Parameters - **access_token** (string) - Required - The access token for authentication. - **groupid** (string) - Required - The ID of the email group to retrieve. ### Response #### Success Response (200) - **errcode** (integer) - 0 for success. - **errmsg** (string) - "ok" on success. - **groupid** (string) - The ID of the email group. - **groupname** (string) - The display name of the email group. - **userlist** (array) - A list of user IDs in the group. - (string) - User ID. - **allow_type** (integer) - The send permission type. #### Response Example ```json { "errcode": 0, "errmsg": "ok", "groupid": "dev-team@company.com", "groupname": "研发团队", "userlist": ["zhangsan@company.com", "lisi@company.com"], "allow_type": 3 } ``` ``` -------------------------------- ### 查询邮件 API (curl) Source: https://context7.com/context7/exmail_qq_qy_mng_logic_doc/llms.txt 通过此API查询指定日期范围内的企业邮箱邮件记录。需要提供访问令牌、日期范围、用户ID、邮件类型、限制和偏移量。返回包含邮件ID、主题、发件人、收件人、时间等信息的列表。 ```curl curl -X POST "https://api.exmail.qq.com/cgi-bin/log/mail?access_token=ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "begin_date": "2024-01-01", "end_date": "2024-01-31", "userid": "zhangsan@company.com", "mailtype": 1, "limit": 100, "offset": 0 }' ``` -------------------------------- ### 查询成员登录日志 API (curl) Source: https://context7.com/context7/exmail_qq_qy_mng_logic_doc/llms.txt 查询企业成员的登录记录,包括登录时间、IP地址和登录类型。需要提供访问令牌、日期范围、用户ID、限制和偏移量。返回包含用户ID、时间、IP地址和类型的列表。 ```curl curl -X POST "https://api.exmail.qq.com/cgi-bin/log/login?access_token=ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "begin_date": "2024-01-01", "end_date": "2024-01-31", "userid": "zhangsan@company.com", "limit": 100, "offset": 0 }' ```