Blossom icon

Blossom

Interact with Blossom LMS/LXP API - manage users, groups, memberships, and learning data

User → Set Avatar

AI-generated

Summary

Sets or removes a user's avatar in Blossom.

Inputs

  • domain (required) — Domain ID or name
  • userIdentifier (required) — User identifier: one of external_id, user_id, user_name, identity_num
  • avatarFile — Avatar file content or file path (JPG/PNG). Sent only when removeAvatar is false.
  • removeAvatar — If true, removes the current avatar without uploading a new one.

Output shape

The Blossom API response body, typically the updated user object.

When removeAvatar is false and avatarFile is provided, the avatarfile is uploaded as a JPEG. When removeAvatar is true, no avatarFile is sent and the API flag is set to 1.

Examples

Example 1: Set avatar for user by external ID

domain=1, userIdentifier.external_id=12345, avatarFile=/path/to/avatar.png

Example 2: Remove current avatar

domain=1, userIdentifier.user_id=67890, removeAvatar=true

Discussion