Skip to main content

Create sign-in background upload session

Create sign-in background upload session. POST /api/openapi/v1/personalization/login-background-upload-sessions, scope admin.v1.personalization.manage.

  • Scope: admin.v1.personalization.manage
  • Permission: Manage Personalization
  • Action: manage
  • Endpoint: POST/api/openapi/v1/personalization/login-background-upload-sessions
Use 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.
NameLocationTypeRequiredDescriptionExample
Idempotency-KeyheaderstringYesIdempotency-Key; maxLength=255-
media_typebodystringYesmedia type; enum=["image/png", "image/jpeg"] Values: "image/jpeg", "image/png"-
size_bytesbodyinteger · int64Yessize bytes; format="int64", minimum=1, maximum=5242880-

Response statuses

HTTP statusTriggerResponse structureClient action
201Request succeededSee “Response” on this pageRead the response.
defaultOther authentication, authorization, validation or dependency errorsSee “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
NameTypeRequiredDescriptionExample
max_size_bytesinteger · int64Yesmax size bytes; format="int64"-
upload_headersobjectYesupload headers-
upload_idstringYesupload id-
upload_methodstringYesupload method-
upload_urlstring · uriYesupload url; format="uri"-
upload_url_expires_atstring · date-timeYesupload url expires at; format="date-time"-

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.