渠道管理/账号分组
更新分组
接口说明:根据 groupId 更新分组信息。
PATCH
/
api
/
v2
/
channels
/
account-groups
/
{groupId}
更新分组
curl --request PATCH \
--url https://aitoearn.cn/api/v2/channels/account-groups/{groupId} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"name": "<string>",
"rank": 123,
"ip": "<string>",
"location": "<string>",
"countryCode": "<string>",
"proxyIp": "<string>",
"browserConfig": {}
}
'import requests
url = "https://aitoearn.cn/api/v2/channels/account-groups/{groupId}"
payload = {
"name": "<string>",
"rank": 123,
"ip": "<string>",
"location": "<string>",
"countryCode": "<string>",
"proxyIp": "<string>",
"browserConfig": {}
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
rank: 123,
ip: '<string>',
location: '<string>',
countryCode: '<string>',
proxyIp: '<string>',
browserConfig: {}
})
};
fetch('https://aitoearn.cn/api/v2/channels/account-groups/{groupId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://aitoearn.cn/api/v2/channels/account-groups/{groupId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"rank\": 123,\n \"ip\": \"<string>\",\n \"location\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"proxyIp\": \"<string>\",\n \"browserConfig\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"code": 0,
"message": "请求成功",
"data": {
"id": "string",
"name": "string",
"hasBrowserConfig": true,
"rank": 1,
"ip": "string",
"location": "string",
"countryCode": "string",
"proxyIp": "string",
"isDefault": true,
"createdAt": "2026-07-02T12:00:00.000Z",
"updatedAt": "2026-07-02T12:00:00.000Z"
}
}
授权
需要从 AiToEarn 获取 API Key。点击前往「API Key 获取教程」。
路径参数
分组 ID
请求体
application/json
响应
200 - application/json
请求已被服务处理。业务是否成功以响应体 code === 0 为准。
业务状态码。0 表示成功,非 0 表示业务错误。
响应消息。
Hide child attributes
Hide child attributes
请求 ID。
错误响应时间戳,Unix 毫秒。
⌘I
更新分组
curl --request PATCH \
--url https://aitoearn.cn/api/v2/channels/account-groups/{groupId} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"name": "<string>",
"rank": 123,
"ip": "<string>",
"location": "<string>",
"countryCode": "<string>",
"proxyIp": "<string>",
"browserConfig": {}
}
'import requests
url = "https://aitoearn.cn/api/v2/channels/account-groups/{groupId}"
payload = {
"name": "<string>",
"rank": 123,
"ip": "<string>",
"location": "<string>",
"countryCode": "<string>",
"proxyIp": "<string>",
"browserConfig": {}
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
rank: 123,
ip: '<string>',
location: '<string>',
countryCode: '<string>',
proxyIp: '<string>',
browserConfig: {}
})
};
fetch('https://aitoearn.cn/api/v2/channels/account-groups/{groupId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://aitoearn.cn/api/v2/channels/account-groups/{groupId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"rank\": 123,\n \"ip\": \"<string>\",\n \"location\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"proxyIp\": \"<string>\",\n \"browserConfig\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"code": 0,
"message": "请求成功",
"data": {
"id": "string",
"name": "string",
"hasBrowserConfig": true,
"rank": 1,
"ip": "string",
"location": "string",
"countryCode": "string",
"proxyIp": "string",
"isDefault": true,
"createdAt": "2026-07-02T12:00:00.000Z",
"updatedAt": "2026-07-02T12:00:00.000Z"
}
}

