Update an account
Partially update an account the current user can edit. Omitted fields retain their current values; explicit null clears nullable fields. When switching between preset and custom types, the corresponding platform_id must also be supplied.
Request parameters
Authorization Bearer Token
Include your API Key as a Bearer token in the Authorization request header.
Authorization: Bearer <api-key>Path parameters
1"account_01JABCDEF1234567890"minLength: 1Body parameters
requiredapplication/jsonAccountUpdateRequestpreset means a system preset platform; custom means a user-defined platform.minLength: 1maxLength: 255maxLength: 255maxLength: 255maxLength: 255maxLength: 5000Generated from the schema; not a live response.
{
"type": "preset",
"platform_id": "string",
"name": "string",
"username": "string"
}Request code examples
JavaScript / TypeScript: Node.js 18+ with fetch; PHP: cURL extension; Go: 1.16+; Java: JDK 11+. Replace the token and example parameter values before running.
curl -X PUT -H 'Authorization: Bearer <TOKEN>' -H 'Content-Type: application/json' -d '{
"type": "preset",
"platform_id": "string",
"name": "string",
"username": "string"
}' 'http://local.zhongyibrowser.com:39025/api/v1/accounts/account_01JABCDEF1234567890'Responses
Success: code = 0. Failure: code > 0. Select a status to view its fields and example. Expand objects to inspect nested fields. Optional fields may be omitted.
Updated account details
Body
application/jsonAccountDetailSuccessResponseobjectrequiredEndpoint business dataAdditional fields are not allowed.
Additional fields are not allowed.
Generated from the schema; not a live response.
{
"code": 0,
"message": "success",
"data": {
"id": "account_01JABCDEF1234567890",
"type": "preset",
"name": "string",
"username": "string",
"password": "string",
"twofa_key": "string",
"remark": "string",
"owner": "string",
"editable": true,
"platform": {
"id": "string",
"website": "string",
"icon_url": "string",
"platform_code": "string",
"platform_name": "string",
"category_code": "string",
"category_name": "string",
"region_code": "string",
"region_name": "string"
},
"browser_count": 0,
"created_at": "2024-01-15T09:30:00Z",
"updated_at": "2024-01-15T09:30:00Z",
"browser_ids": [
"env_01JABCDEF1234567890"
]
}
}