Publish sign-in page configuration. POST /api/openapi/v1/personalization/configs/login/publications, scope admin.v1.personalization.manage.
- Scope:
admin.v1.personalization.manage - Permission: Manage Personalization
- Action: manage
- Endpoint: POST
/api/openapi/v1/personalization/configs/login/publications
Authorization: Bearer \<API_KEY\>. The application must have subject_scope={"mode":"all"}; restricted scopes return 403. Scopes are independently granted. Do not cache responses.
Reuses the UI personalization service. Publication replaces the entire section and requires its current expected_revision; stale revisions return 409. Read and preserve other homepage fields when changing welcome messages.
For a sign-in background, create a session with media_type and size_bytes, upload directly using the returned URL, method and headers, then publish login config.backgroundUploadId referencing upload_id.
PNG/JPEG only, at most 5 MiB and at least 720×720. Sessions are bound to the organization and uploader and require Idempotency-Key. Only login, homepage and input-placeholder are exposed.
Common request headers
Apply the “Authentication and headers” section in “Configure the QwenWork console through APIs”: Authorization is required and X-Request-Id is optional. See this page for the required scope.
Whether Idempotency-Key applies and is required is specified in this page’s request parameters; a tracing identifier does not replace an idempotency key.
Request parameters
Request body: required; Content-Type: application/json.
| Name | Location | Type | Required | Description | Example |
|---|---|---|---|---|---|
config | body | object | Yes | Section configuration; initially {} | - |
expected_revision | body | integer · int64 | Yes | Revision from the latest read; format="int64", minimum=0 | - |
body.config fields
| Field | Type | Required | Description |
|---|---|---|---|
backgroundKey | string | No | Server-managed background object key; preserve when editing |
backgroundUploadId | string · uuid | No | Upload session ID used only in publication requests; format="uuid" |
backgroundUrl | string | No | Background image URL; UI fallback is the branded background |
description | object | null | No | Description text |
enabled | boolean | No | Background enabled; UI fallback true |
welcomeTitle | object | null | No | Welcome title; omission preserves it, null clears it |
body.config.description fields
| Field | Type | Required | Description |
|---|---|---|---|
en | string | No | English text; maxLength=160 |
zh-CN | string | No | Simplified Chinese text; maxLength=160 |
body.config.welcomeTitle fields
| Field | Type | Required | Description |
|---|---|---|---|
en | string | No | English text; maxLength=80 |
zh-CN | string | No | Simplified Chinese text; maxLength=80 |
Response statuses
| HTTP status | Trigger | Response structure | Client action |
|---|---|---|---|
201 | Request succeeded | See “Response” on this page | Read the response. |
default | Other authentication, authorization, validation or dependency errors | See “General error” in “Configure the QwenWork console through APIs” | Handle the status and code; verify the result and idempotency requirements before retrying writes. |
Response
Content-Type: application/json
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
config | object | Yes | Section configuration; initially {} | - |
product_edition | string | No | Product deployment edition; enum=["vpc", "k8s"] Values: "k8s", "vpc" | - |
publication_id | string | Yes | Publication ID | - |
published_at | string · date-time | Yes | Publication time; format="date-time" | - |
revision | integer · int64 | Yes | Current revision for concurrency control; format="int64" | - |
section | string | Yes | Personalization section | - |
success | boolean | Yes | success | - |
config
| Field | Type | Required | Description |
|---|---|---|---|
backgroundKey | string | No | Server-managed background object key; preserve when editing |
backgroundUrl | string | No | Background image URL; UI fallback is the branded background |
description | object | null | No | Description text |
enabled | boolean | No | Background enabled; UI fallback true |
welcomeTitle | object | null | No | Welcome title; omission preserves it, null clears it |
config.description
| Field | Type | Required | Description |
|---|---|---|---|
en | string | No | English text; maxLength=160 |
zh-CN | string | No | Simplified Chinese text; maxLength=160 |
config.welcomeTitle
| Field | Type | Required | Description |
|---|---|---|---|
en | string | No | English text; maxLength=80 |
zh-CN | string | No | Simplified Chinese text; maxLength=80 |
Runtime limits and contract notes
HTTP 409 / personalization_revision_conflict includes optional integer current_revision when known by the server. If omitted, read the latest config; do not assume zero.
For login background publication, 422 / personalization_asset_size_mismatch includes required integers declared_size_bytes and actual_size_bytes (bytes). 422 / personalization_asset_dimensions_invalid includes required integers minimum_width and minimum_height (pixels).
Distinguish these details by code; they do not apply together to every 422.
Errors and retries
Existing UI error codes and validation are preserved. 401/403 indicate authentication or authorization failure; 409 requires rereading before retry; 413 indicates an oversized request; 400/422 indicate invalid input; 503 indicates an unavailable dependency.
The response and machine contract are authoritative. Retry idempotent creates with the same Idempotency-Key and payload.
Config fields and defaults
The config remains an open JSON object; this describes existing UI fields without adding required server fields.
Other locale keys and non-string copy values are rejected. Omitted login copy is preserved on publication; explicit null clears it. Initial stored config is {}; UI fallback values are not API defaults. Background validation uses the existing upload session.
The following is a config fragment, not a complete request or response.