Skip to content
Local APIPlatform accounts

Create a custom account platform ​

Version overview
POST
/api/v1/account-platforms

Create a custom account platform for the current user. website must be a valid URL including the http:// or https:// scheme. A user cannot create duplicate platforms with the same URL. This endpoint does not support creating system preset platforms.

Request parameters

Authorization Bearer Token

Include your API Key as a Bearer token in the Authorization request header.

Authorization: Bearer <api-key>

Body parameters

requiredapplication/jsonAccountPlatformCreateRequest
Fields
stringrequired
Custom platform website; must include the http:// or https:// scheme
Example"https://example.com"
format: "uri"maxLength: 500
Example

Generated from the schema; not a live response.

{
  "website": "https://example.com"
}

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 POST -H 'Authorization: Bearer <TOKEN>' -H 'Content-Type: application/json' -d '{
  "website": "https://example.com"
}' 'http://local.zhongyibrowser.com:39025/api/v1/account-platforms'

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.

Created custom account platform

Body

application/jsonAccountPlatformCreateSuccessResponse
Fields
numberrequired
Business status code; always 0 on success
Enum
stringrequired
Business status message; always success on success
Enum
objectrequired
Endpoint business data

Additional fields are not allowed.

Example

Generated from the schema; not a live response.

{
  "code": 0,
  "message": "success",
  "data": {
    "id": "string",
    "type": "preset",
    "website": "string",
    "icon_url": "string",
    "platform_code": "string",
    "platform_name": "string",
    "category": {
      "code": "string",
      "name": "string"
    },
    "region": {
      "code": "string",
      "name": "string"
    }
  }
}

View all business error codes and HTTP statuses

ZYBrowser Local API documentation