Channel Management/Account Groups
Update Account Order
Interface description: Update the account sorting within the specified group.
groupId must be an existing group ID, and list[n].id must be an account ID belonging to that group. list is required and must contain at least one account. If the group and account do not match, the endpoint returns 12600.
PATCH
/
api
/
v2
/
channels
/
account-groups
/
{groupId}
/
accounts
/
rank
Update Account Order
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": "account-id-in-group",
"rank": 1
}
]
}
'import requests
url = "https://aitoearn.cn/api/v2/channels/account-groups/{groupId}/accounts/rank"
payload = { "list": [
{
"id": "account-id-in-group",
"rank": 1
}
] }
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: 'account-id-in-group', rank: 1}]})
};
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\": \"account-id-in-group\",\n \"rank\": 1\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))
}{
"data": "boolean",
"code": 0,
"message": "Request succeeded",
"requestId": "string"
}Authorizations
Need to get API Key from AiToEarn. Click to go to "API Key Obtaining Tutorial".
Path Parameters
Group ID
Example:
"group-id-from-create-response"
Body
application/json
Response
200 - application/json
The request has been processed by the service. Business success is determined by whether the response body has code === 0.
Last modified on September 29, 2026
⌘I
Update Account Order
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": "account-id-in-group",
"rank": 1
}
]
}
'import requests
url = "https://aitoearn.cn/api/v2/channels/account-groups/{groupId}/accounts/rank"
payload = { "list": [
{
"id": "account-id-in-group",
"rank": 1
}
] }
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: 'account-id-in-group', rank: 1}]})
};
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\": \"account-id-in-group\",\n \"rank\": 1\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))
}{
"data": "boolean",
"code": 0,
"message": "Request succeeded",
"requestId": "string"
}
