---
title: "调整账号排序"
method: PATCH
path: "/api/v2/channels/account-groups/{groupId}/accounts/rank"
tags: ["渠道管理/账号分组"]
---

# 调整账号排序

`PATCH /api/v2/channels/account-groups/{groupId}/accounts/rank`

## Request

- Base URL: `https://aitoearn.cn`
- URL: `https://aitoearn.cn/api/v2/channels/account-groups/{groupId}/accounts/rank`
- Auth: API key in header `X-Api-Key`
- TypeScript: <https://skmtc.dev/aitoearn/apis/aitoearn-api/docs/api/v2/channels/account-groups/:groupId/accounts/rank/patch.ts> (a function with typed inputs; its response is checked against the schema)

接口说明：更新指定分组内的账号排序。

`groupId` 必须是现有分组 ID，`list[n].id` 必须是该分组下的账号 ID；`list` 为必填且至少包含一个账号。分组与账号不匹配时会返回 `12600`。

## Path parameters

- `groupId` string, required

## Request body

- object
  - `list` object[], required: 排序列表，至少包含一个属于该分组的账号
    - `id` string, required: 账号 ID
    - `rank` number, required: 排序值

## Response `200`

请求已被服务处理。业务是否成功以响应体 code === 0 为准。

- object
  - `data` boolean
  - `code` integer, required: 业务状态码。0 表示成功，非 0 表示业务错误。
  - `message` string, required: 响应消息。
  - `requestId` string: 请求 ID。
  - `timestamp` integer: 错误响应时间戳，Unix 毫秒。

## Changes

- **2026-11-03** `7cc8f21c4c96`: 2 breaking
  - the `list` request property's minItems was increased to `1`
  - the `data` response's property type changed from no type to `boolean` for status `200`

[Operation history](https://skmtc.dev/aitoearn/apis/aitoearn-api/changes/api/v2/channels/account-groups/:groupId/accounts/rank/patch.md)

---

[API](https://skmtc.dev/aitoearn/apis/aitoearn-api.md) - [All operations](https://skmtc.dev/aitoearn/apis/aitoearn-api/llms.txt) - [OpenAPI document](https://skmtc.dev/aitoearn/apis/aitoearn-api/revisions/7cc8f21c4c96?raw)
