Add saved accounts
Append platform accounts to the existing saved-account list.
Definition: ApiFox POST · Checked on 2026-10-21.
Request
POST /api/addAccountUse the base URL and api-key shown on the client API screen. All examples use 9000 only as a placeholder port; see Overview for authentication.
JSON body
Apifox supplies these fields through examples; required fields below are supplemented from the current client.
| Field | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Profile ID |
accounts | object[] | Yes | Account objects appended to existing records, rewriting the login database; [] adds none; close and back up first |
cURL example
curl --request POST 'http://127.0.0.1:9000/api/addAccount' \
--header 'api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"id": 1,
"accounts": [
{
"origin_url": "https://example.com/",
"username_value": "EXAMPLE_USER_1",
"password_value": "EXAMPLE_PASSWORD",
"display_name": "示例账号1"
},
{
"origin_url": "https://example.com/",
"username_value": "EXAMPLE_USER_2",
"password_value": "EXAMPLE_PASSWORD",
"display_name": "测试账号2"
}
]
}'Response example
{
"success": true
}Current client response fields
| Field | Type | Usage |
|---|---|---|
success | boolean | Request processing succeeded; not a guarantee that every item was written |
Account item fields
| Field | Type | Description |
|---|---|---|
accounts[].origin_url | string | Nonempty site URL, e.g. https://example.com; missing values skip the item |
accounts[].action_url | string | Optional; defaults to origin_url |
accounts[].username_value | string | Nonempty username; missing values skip the item |
accounts[].password_value | string | Password string; optional, defaults to empty; never publish real passwords |
accounts[].display_name | string | Optional display name; defaults to an empty string |
Usage notes
- Apifox supplies account fields through an example. Current clients require id and an accounts array. Stop the profile before writing and replace example passwords with your own values.
For failed requests, check both HTTP status and the error body. See Errors & troubleshooting.
Write behavior and privacy
Each entry should contain nonempty origin_url and username_value; action_url defaults to origin_url and an omitted password_value becomes empty. Entries missing the site or username are skipped, so success does not prove every entry was imported.
The current implementation reads existing records, merges the list and rewrites the browser login database; it is not an in-place append. Rewriting can change creation timestamps and lose unexported metadata or password notes. Stop the profile, back up its complete data and test on a disposable profile first. Responses and logs can contain plaintext credentials; never publish them.



