Platform Accounts
List platform accounts, create them one at a time or in batches, and update or delete them. Batch writes always use an items collection.
Showing 5 of 5 endpoints
GET
/account/listList platform accounts
Lists the current team's platform accounts with pagination, including icons and bound windows.
AuthBearer API Key
Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
page | number | Optional | Page number, default 1 |
size | number | Optional | Page size, default 20, server maximum 1000 |
keyword | string | Optional | Keyword, fuzzy-matches username or remark |
Notes
- The response contains plaintext password and key2fa; do not forward it to untrusted callers.
Response fields
| Field | Type | Description |
|---|---|---|
data.count | number | Total number of matching records |
data.size | number | Page size, echoes the request value |
data.page | number | Current page number, echoes the request value |
data.total | number | Total number of pages |
data.data | object[] | Records on the current page |
data.data[].id | number | Platform account primary key ID |
data.data[].userId | number | Owner user ID of the account |
data.data[].teamId | number | Owner team ID of the account |
data.data[].platformUrl | string | Platform site URL |
data.data[].username | string | Platform login name (plaintext) |
data.data[].password | string | Platform login password (plaintext) |
data.data[].key2fa | string | 2FA secret (plaintext) |
data.data[].remark | string | Remark |
data.data[].state | number | Account status: 0 normal, 2 deleted |
data.data[].createdAt | string | Creation time, yyyy-MM-dd HH:mm:ss |
data.data[].updatedAt | string | Update time, yyyy-MM-dd HH:mm:ss |
data.data[].userEmail | string | Owner user email, filled in by the server |
data.data[].icon | string | Platform icon URL, matched by platformUrl |
data.data[].bindScreen | object[] | Windows bound to this account |
data.data[].bindScreen[].id | number | Window primary key ID |
data.data[].bindScreen[].uuid | string | Unique identifier of the window directory |
data.data[].bindScreen[].name | string | Window name |
Response example
{
"code": 0,
"msg": "成功",
"data": {
"count": 1,
"size": 20,
"page": 1,
"total": 1,
"data": [
{
"id": 5001,
"userId": 1001,
"teamId": 2001,
"platformUrl": "https://x.com/",
"username": "demo_account",
"password": "demo-password",
"key2fa": "JBSWY3DPEHPK3PXP",
"remark": "",
"state": 0,
"createdAt": "2026-01-15 10:00:00",
"updatedAt": "2026-06-01 12:30:00",
"icon": "https://oss.nexbrowser.net/images/platform_icon/twitter.png",
"bindScreen": [
{
"id": 8001,
"uuid": "7c2b5e9a41d84f10b6c3e0a95d824fb7",
"name": "示例环境-01"
}
]
}
]
}
}
POST
/account/createCreate platform account
Saves the entire request body as one account entry in the current team.
AuthBearer API Key
Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
platformUrl | string | Required | Platform site URL |
username | string | Optional | Platform login name |
platformName | string | Optional | Platform display name; derived from the platformUrl host name when omitted |
password | string | Optional | Platform login password |
key2fa | string | Optional | 2FA secret, Base32 text |
remark | string | Optional | Remark |
teamId | string | number | Optional | Overwritten by the server with the current team; can be omitted |
Notes
- The request body itself is one account object; do not wrap it in items. To create in batch, use /account/batch_create.
- Legacy alias: platformUrl can also be written as url or platform.url; the platform and platformId fields are dropped before forwarding.
Response fields
| Field | Type | Description |
|---|---|---|
data | object[] | The saved account entry; when created, id is the newly generated primary key |
data[].id | number | Platform account ID |
data[].userId | number | Owner user ID, written by the server |
data[].teamId | number | Owner team ID, written by the server |
data[].platformUrl | string | Platform site URL |
data[].username | string | Platform login name |
data[].password | string | Platform login password, echoed as sent in the request |
data[].key2fa | string | 2FA secret, echoed as sent in the request |
data[].remark | string | Remark |
data[].state | number | Account status, 0 when newly created |
Response example
{
"code": 0,
"msg": "成功",
"data": [
{
"id": 5003,
"userId": 1001,
"teamId": 2001,
"platformUrl": "https://x.com/",
"username": "demo_account",
"password": "demo-password",
"key2fa": "JBSWY3DPEHPK3PXP",
"remark": "示例账号",
"state": 0
}
]
}
POST
/account/batch_createBatch create platform accounts
Saves platform accounts in batch; each entry in items is a separate account.
AuthBearer API Key
Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
items | object[] | Required | Account collection; each entry has the same fields as /account/create |
items[].platformUrl | string | Required | Platform site URL of each entry |
items[].username | string | Optional | Platform login name |
items[].password | string | Optional | Platform login password |
items[].key2fa | string | Optional | 2FA secret |
items[].remark | string | Optional | Remark |
Notes
- When the collection is empty, the backend returns success directly without writing any data.
- Legacy alias: items can also be written as accounts or accountList.
Response fields
| Field | Type | Description |
|---|---|---|
data | object[] | Collection of saved account entries |
data[].id | number | Platform account ID |
data[].teamId | number | Owner team ID, written by the server |
data[].platformUrl | string | Platform site URL |
data[].username | string | Platform login name |
data[].state | number | Account status, 0 when newly created |
Response example
{
"code": 0,
"msg": "成功",
"data": [
{
"id": 5004,
"teamId": 2001,
"platformUrl": "https://x.com/",
"username": "demo_account_1",
"state": 0
},
{
"id": 5005,
"teamId": 2001,
"platformUrl": "https://www.tiktok.com/",
"username": "demo_account_2",
"state": 0
}
]
}
POST
/account/modifyUpdate platform account
Updates one platform account by id; the request body fields match the create endpoint.
AuthBearer API Key
Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
id | number | Required | Platform account ID; if omitted or <1, it is treated as a new account |
platformName | string | Optional | Platform display name |
platformUrl | string | Optional | Platform site URL |
username | string | Optional | Platform login name |
password | string | Optional | Platform login password |
key2fa | string | Optional | 2FA secret |
remark | string | Optional | Remark |
Notes
- If the account does not belong to the current team, the entry is silently skipped and the response still indicates success.
- Legacy alias: id can also be written as accountId.
Response fields
| Field | Type | Description |
|---|---|---|
data | object[] | The saved account entry |
data[].id | number | Platform account ID |
data[].teamId | number | Owner team ID |
data[].platformUrl | string | Platform site URL |
data[].username | string | Platform login name |
data[].remark | string | Remark |
Response example
{
"code": 0,
"msg": "成功",
"data": [
{
"id": 5001,
"teamId": 2001,
"platformUrl": "https://x.com/",
"username": "demo_account",
"remark": "已更新"
}
]
}
POST
/account/deleteDelete platform accounts
Soft-deletes platform accounts (sets state to 2) and removes them from window account bindings.
AuthBearer API Key
Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
items | number[] | Required | Array of account IDs |
teamId | string | number | Optional | Validated by the server against the current team; can be omitted |
Notes
- Non-positive integers are discarded; if the ID set is empty or the accounts do not belong to the current team, the backend returns success directly without deleting any data.
- Legacy alias: items can also be written as accountIds, accountId, or ids; a single value is also accepted.
Response fields
| Field | Type | Description |
|---|---|---|
data | null | No response data; success is indicated by code=0 |
Response example
{
"code": 0,
"msg": "成功",
"data": null
}