---
title: "Bulk Replace Entries"
method: PUT
path: "/v1/dictionaries/{dict_id}/entries"
---

# Bulk Replace Entries

`PUT /v1/dictionaries/{dict_id}/entries`

Replace all entries in the dictionary with the supplied list.

Atomic semantics: upsert every supplied entry by
``(dictionary_id, word)``, then delete any existing entries whose
word is not in the payload. The cache is invalidated once at the
end.

## Path parameters

- `dict_id` integer, required

## Query parameters

- `project_id` integer, nullable

## Request body

- BulkReplaceEntriesRequest — Atomic upsert + delete-missing replacement of all entries in a dictionary. Idempotent: callers sending the same payload twice converge to the same final state. Entries in the existing dictionary whose ``word`` is not in ``entries`` are deleted; entries whose ``word`` matches are upserted.
  - `entries` EntryPayload[], required
    - `word` string, required
    - `replacement` string, required
    - `ipa` string, nullable
    - `case_sensitive` boolean

## Response `200`

Successful Response

- BulkReplaceResponse — Counts of what changed during bulk replace.
  - `upserted` integer, required
  - `deleted` integer, required
  - `total` integer, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/kugelaudio/apis/kugelaudio-tts-api.md) · [All operations](https://skmtc.net/kugelaudio/apis/kugelaudio-tts-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kugelaudio/kugelaudio-tts-api/revisions/9ecca94b0377/schema)
