---
title: "Reorder the gallery of this person; the first photo becomes the cover"
method: PATCH
path: "/api/v1/contacts/{id}/dating-photos"
---

# Reorder the gallery of this person; the first photo becomes the cover

`PATCH /api/v1/contacts/{id}/dating-photos`

## Request

- Base URL: `https://memchats.com`
- URL: `https://memchats.com/api/v1/contacts/{id}/dating-photos`
- Auth: HTTP bearer

`order` must list the ids of ALL the photos of this contact, each once, in the new order; otherwise 400 `photo_order_mismatch` and nothing changes (the gallery changed elsewhere: reload it). Positions are rewritten 0..n-1 in one transaction and the first photo is marked `isCover`. Rejected for demo sessions.

## Path parameters

- `id` integer, required

## Request body

- object
  - `order` integer[], required

## Response `200`

The photos in their new order

- object
  - `photos` DatingPhoto[]
    - `id` integer
    - `position` integer, nullable
    - `hasFace` boolean, nullable
    - `caption` string, nullable
    - `width` integer, nullable
    - `height` integer, nullable
    - `source` 'auto' | 'manual': `manual` when the user cropped it by hand from a screenshot.
    - `screenshotId` integer, nullable: The original screenshot it came from (GET /contact-screenshots/{screenshotId}/image); null for photos saved before 2026-10-05.
    - `isCover` boolean: The cover the user chose: after a reorder, the first photo.

## Other responses

- `400`: `invalid_order` (not a list of ids) or `photo_order_mismatch` (not exactly the photos of this contact)
- `401`: No session
- `403`: Demo session (read only)
- `404`: Contact not found

---

[API](https://skmtc.dev/memchats/apis/memchats-api.md) · [All operations](https://skmtc.dev/memchats/apis/memchats-api/llms.txt) · [OpenAPI document](https://skmtc.dev/memchats/apis/memchats-api/revisions/e62bca06f785?raw)
