Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pages/creating-updating-users/creating-updating-users.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ You can create a user without an email address, however, you will not be able to
include the users last name when creating/updating as this field is required. Any other role specific required
fields are specified on the endpoint description.

Profile photos can optionally be added for all user roles — [Agents](#agents), [Clients](#clients), [Contractors](#contractors), and [Recipients](#recipients) during creation — by providing a `photo` field with a valid image URL when creating or updating a user. If the URL points to a valid and accessible image, it will be downloaded and processed into thumbnails, and the response will include the processed photo URL. If the image is invalid, corrupted, or the URL is inaccessible, the request will fail with a `400 Bad Request` and an appropriate error message.

You can also update the photo for all user roles by providing a new image URL in the `photo` field when making an update request to the relevant role’s endpoint (e.g., updating via the [Client](#clients), [Contractor](#contractors), [Agent](#agents), or [Recipient](#recipients) update endpoint). If the image is valid and accessible, it will be processed and replace any existing photo. If the `photo` field is omitted, the current photo remains unchanged. To remove an existing photo, set the `photo` field to `null`. Invalid or inaccessible image URLs will result in a `400 Bad Request` response with a relevant error message.
3 changes: 2 additions & 1 deletion pages/creating-updating-users/creating-updating-users.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
data = {
'user': {
'email': '[email protected]',
'last_name': 'Bob'
'last_name': 'Bob',
'photo': 'https://picsum.photos/200/300'
# ...
},
# ...
Expand Down