Set cover photo
Current Home
Set cover photo
Promote one of the caller’s listing photos to be the cover. Idempotent.
PATCH
Set cover photo
Overview
Marks the photo identified byphotoId as the cover photo on the caller’s current-home listing. In a single atomic write the server sets isCover: false on every other photo and isCover: true on the target — there is always exactly one cover photo while photos.length > 0.
The endpoint is idempotent: calling it with the current cover photo’s id is a no-op that returns the same listing.
The cover photo is the one used as the gallery thumbnail in match cards and in conversation post-share previews — it has no effect on matching scores.
Authentication
Bearer <accessToken> required. Scope: user.
Path parameters
| Field | Type | Required | Notes / Constraints | Example |
|---|---|---|---|---|
photoId | string | yes | 24-char ObjectId of an existing embedded photo on the caller’s listing. | 66400a8f1c2b4d5e6f7a8d02 |
Query parameters
None.Request body
None.Response — 200 OK
Returns the updated Home object. Exactly one photo will haveisCover: true.
Error responses
| Status | Code | Meaning |
|---|---|---|
| 400 | VALIDATION_FAILED | photoId is not a 24-char hex ObjectId. |
| 401 | UNAUTHENTICATED | Missing, malformed, or expired access token. |
| 404 | NOT_FOUND | The user has no current_homes listing, or photoId does not match any photo on this listing. |
Example error — 404
Side effects
$setsphotos.$[].isCover = falsefor every photo on the listing, then$setsisCover = trueon the matched photo — both in one Mongo update.updatedAtis bumped.- No
match.recomputeis triggered (cover photo does not affect matching).