# Creating an organization could replace one

> A catalog worker's new organization silently replaced the record another worker had written under the same id, because the admin API's create was an upsert. Creating now refuses an organization that exists, and updating is its own call.

Source: https://talira.ai/dev-log/organization-overwrite
All of Talira's documentation: https://talira.ai/llms.txt

22 November 2026

**What went wrong:** Two catalog workers wrote the same organization. The second sent what it thought was a new record, and the admin API stored it over the first one's without a word. The first worker's facts were left only in the organization's version history.

## Evidence

- [The tests for creating, reading and updating an organization](https://github.com/talira-ai/talira/blob/main/server/tests/catalog_writers.rs)
- [The listing queue's guide for workers](https://github.com/talira-ai/talira/blob/main/docs/QUEUE.md)

## Why

`POST /api/v1/admin/organizations` (and the admin MCP tool `upsert_organization`) took a record and wrote it under its
id whether or not that id was taken, so "create" and "update" were the same call. With several workers researching
leads at once, two of them reached the same maker, and the later write won.

Now a create answers 409 `organization_exists` when an organization already has the record's id (ignoring case and
hyphens) or website (with or without a trailing slash), and the answer carries that organization's whole record.
Updating is `PUT /api/v1/admin/organizations/{uid}` after reading it with `GET`, or the MCP tool with a `uid`, so a
worker changes a record it has read. Listings got the same read: `GET /api/v1/admin/listings/{uid}` returns the stored
record with its sources, so an update starts from what's there.
