渠道管理/账号分组
调整账号排序
接口说明:更新指定分组内的账号排序。
PATCH
/
api
/
v2
/
channels
/
account-groups
/
{groupId}
/
accounts
/
rank
调整账号排序
curl --request PATCH \
--url https://aitoearn.cn/api/v2/channels/account-groups/{groupId}/accounts/rank \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"list": [
{
"id": "<string>",
"rank": 123
}
]
}
'import requests
url = "https://aitoearn.cn/api/v2/channels/account-groups/{groupId}/accounts/rank"
payload = { "list": [
{
"id": "<string>",
"rank": 123
}
] }
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({list: [{id: '<string>', rank: 123}]})
};
fetch('https://aitoearn.cn/api/v2/channels/account-groups/{groupId}/accounts/rank', 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}/accounts/rank"
payload := strings.NewReader("{\n \"list\": [\n {\n \"id\": \"<string>\",\n \"rank\": 123\n }\n ]\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": "string"
}⌘I
调整账号排序
curl --request PATCH \
--url https://aitoearn.cn/api/v2/channels/account-groups/{groupId}/accounts/rank \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"list": [
{
"id": "<string>",
"rank": 123
}
]
}
'import requests
url = "https://aitoearn.cn/api/v2/channels/account-groups/{groupId}/accounts/rank"
payload = { "list": [
{
"id": "<string>",
"rank": 123
}
] }
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({list: [{id: '<string>', rank: 123}]})
};
fetch('https://aitoearn.cn/api/v2/channels/account-groups/{groupId}/accounts/rank', 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}/accounts/rank"
payload := strings.NewReader("{\n \"list\": [\n {\n \"id\": \"<string>\",\n \"rank\": 123\n }\n ]\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": "string"
}
