updateUserPhoto
Update an existing user photo record by ID, changing its type (logo, photo, cover_photo) or clearing specified fields. Returns the updated record.
Instructions
Update a user photo - Update an existing userphoto record by ID. Fields omitted are untouched. Writes live data.
Use when: changing a photo's type slot (logo/photo/cover_photo).
Required: photo_id.
Enums: type: logo, photo, cover_photo.
See also: createUserPhoto (add new), deleteUserPhoto (remove permanently).
Returns: { status: "success", message: {...updatedRecord} } - the full updated record after changes applied.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| photo_id | Yes | ||
| type | No | ||
| _clear_fields | No | Column names to clear to empty string. Available on every `update*` operation. Works on base columns AND EAV/`users_meta` rows (rows preserved with `value=""`). To actually clear a field you MUST use this parameter — sending the field with `""` alone is a no-op (BD drops empty values). To remove a `users_meta` row entirely, use `deleteUserMeta`. See **Rule: Clearing fields**. Example: `_clear_fields: ["h2", "hero_link_url"]`. |