---
title: "Merge sightings."
method: PUT
path: "/sightings"
tags: ["Sightings"]
---

# Merge sightings.

`PUT /sightings`

## Request

- Base URL: `https://animalchecklist.com/api/v1`
- URL: `https://animalchecklist.com/api/v1/sightings`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `ac_session`

Merges the sent list into the stored list, last writer wins on `updatedAt`, and answers the merged list. Repeating the same body changes nothing, so a retry after a network failure is safe. At most 2000 entries.

## Headers

- `X-Account-Id` string, uuid

## Request body

- object
  - `sightings` Sighting[], required
    - `animalId` string, required: Slug of the animal taxon, for example `red-fox`.
    - `seenAt` string, date-time, required
    - `updatedAt` string, date-time, required: Merge key, last writer wins.
    - `deleted` boolean, required: Tombstone. Other devices drop the row.

## Response `200`

The merged list.

- object
  - `data` Sighting[], required
    - `animalId` string, required: Slug of the animal taxon, for example `red-fox`.
    - `seenAt` string, date-time, required
    - `updatedAt` string, date-time, required: Merge key, last writer wins.
    - `deleted` boolean, required: Tombstone. Other devices drop the row.

## Other responses

- `400`: Invalid input.
- `401`: Missing or unknown sync code.
- `404`: Not found.
- `413`: Body too large.
- `429`: Rate limited.
- `500`: Unexpected error.

---

[API](https://skmtc.dev/animalchecklist/apis/animal-checklist-api.md) · [All operations](https://skmtc.dev/animalchecklist/apis/animal-checklist-api/llms.txt) · [OpenAPI document](https://skmtc.dev/animalchecklist/apis/animal-checklist-api/revisions/0910760ad25b?raw)
