Skip to main content

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/list

List platform accounts

Lists the current team's platform accounts with pagination, including icons and bound windows.

AuthBearer API Key

Request parameters

FieldTypeRequiredDescription
pagenumberOptionalPage number, default 1
sizenumberOptionalPage size, default 20, server maximum 1000
keywordstringOptionalKeyword, fuzzy-matches username or remark

Notes

  • The response contains plaintext password and key2fa; do not forward it to untrusted callers.

Response fields

FieldTypeDescription
data.countnumberTotal number of matching records
data.sizenumberPage size, echoes the request value
data.pagenumberCurrent page number, echoes the request value
data.totalnumberTotal number of pages
data.dataobject[]Records on the current page
data.data[].idnumberPlatform account primary key ID
data.data[].userIdnumberOwner user ID of the account
data.data[].teamIdnumberOwner team ID of the account
data.data[].platformUrlstringPlatform site URL
data.data[].usernamestringPlatform login name (plaintext)
data.data[].passwordstringPlatform login password (plaintext)
data.data[].key2fastring2FA secret (plaintext)
data.data[].remarkstringRemark
data.data[].statenumberAccount status: 0 normal, 2 deleted
data.data[].createdAtstringCreation time, yyyy-MM-dd HH:mm:ss
data.data[].updatedAtstringUpdate time, yyyy-MM-dd HH:mm:ss
data.data[].userEmailstringOwner user email, filled in by the server
data.data[].iconstringPlatform icon URL, matched by platformUrl
data.data[].bindScreenobject[]Windows bound to this account
data.data[].bindScreen[].idnumberWindow primary key ID
data.data[].bindScreen[].uuidstringUnique identifier of the window directory
data.data[].bindScreen[].namestringWindow 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",
"userEmail": "[email protected]",
"icon": "https://oss.nexbrowser.net/images/platform_icon/twitter.png",
"bindScreen": [
{
"id": 8001,
"uuid": "7c2b5e9a41d84f10b6c3e0a95d824fb7",
"name": "示例环境-01"
}
]
}
]
}
}
POST/account/create

Create platform account

Saves the entire request body as one account entry in the current team.

AuthBearer API Key

Request parameters

FieldTypeRequiredDescription
platformUrlstringRequiredPlatform site URL
usernamestringOptionalPlatform login name
platformNamestringOptionalPlatform display name; derived from the platformUrl host name when omitted
passwordstringOptionalPlatform login password
key2fastringOptional2FA secret, Base32 text
remarkstringOptionalRemark
teamIdstring | numberOptionalOverwritten 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

FieldTypeDescription
dataobject[]The saved account entry; when created, id is the newly generated primary key
data[].idnumberPlatform account ID
data[].userIdnumberOwner user ID, written by the server
data[].teamIdnumberOwner team ID, written by the server
data[].platformUrlstringPlatform site URL
data[].usernamestringPlatform login name
data[].passwordstringPlatform login password, echoed as sent in the request
data[].key2fastring2FA secret, echoed as sent in the request
data[].remarkstringRemark
data[].statenumberAccount 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_create

Batch create platform accounts

Saves platform accounts in batch; each entry in items is a separate account.

AuthBearer API Key

Request parameters

FieldTypeRequiredDescription
itemsobject[]RequiredAccount collection; each entry has the same fields as /account/create
items[].platformUrlstringRequiredPlatform site URL of each entry
items[].usernamestringOptionalPlatform login name
items[].passwordstringOptionalPlatform login password
items[].key2fastringOptional2FA secret
items[].remarkstringOptionalRemark

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

FieldTypeDescription
dataobject[]Collection of saved account entries
data[].idnumberPlatform account ID
data[].teamIdnumberOwner team ID, written by the server
data[].platformUrlstringPlatform site URL
data[].usernamestringPlatform login name
data[].statenumberAccount 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/modify

Update platform account

Updates one platform account by id; the request body fields match the create endpoint.

AuthBearer API Key

Request parameters

FieldTypeRequiredDescription
idnumberRequiredPlatform account ID; if omitted or <1, it is treated as a new account
platformNamestringOptionalPlatform display name
platformUrlstringOptionalPlatform site URL
usernamestringOptionalPlatform login name
passwordstringOptionalPlatform login password
key2fastringOptional2FA secret
remarkstringOptionalRemark

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

FieldTypeDescription
dataobject[]The saved account entry
data[].idnumberPlatform account ID
data[].teamIdnumberOwner team ID
data[].platformUrlstringPlatform site URL
data[].usernamestringPlatform login name
data[].remarkstringRemark

Response example

{
"code": 0,
"msg": "成功",
"data": [
{
"id": 5001,
"teamId": 2001,
"platformUrl": "https://x.com/",
"username": "demo_account",
"remark": "已更新"
}
]
}
POST/account/delete

Delete platform accounts

Soft-deletes platform accounts (sets state to 2) and removes them from window account bindings.

AuthBearer API Key

Request parameters

FieldTypeRequiredDescription
itemsnumber[]RequiredArray of account IDs
teamIdstring | numberOptionalValidated 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

FieldTypeDescription
datanullNo response data; success is indicated by code=0

Response example

{
"code": 0,
"msg": "成功",
"data": null
}