---
title: "Admin Articles Dedupe By Slug"
method: POST
path: "/v1/admin/articles/dedupe-by-slug"
---

# Admin Articles Dedupe By Slug

`POST /v1/admin/articles/dedupe-by-slug`

## Request

- Base URL: `https://api.storyflo.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.storyflo.com/v1/admin/articles/dedupe-by-slug`
- Auth: none declared

D-12/13 · find + merge duplicate Article rows that share a
(publisher_id, slug). Keeps the oldest row (most accumulated FKs),
rewrites every dependent FK on the 10 child tables to point at the
keeper, then deletes the duplicates. Idempotent: a re-run after a
clean pass reports zero groups.

Once this runs to zero, the matching alembic migration that adds a
UNIQUE constraint on (publisher_id, slug) can apply without error.

## Headers

- `x-storyflo-email-token` string, nullable

## Request body

- DedupeArticlesBody
  - `dry_run` boolean
  - `limit` integer

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/storyflo/apis/storyflo-inference-router.md) · [All operations](https://skmtc.dev/storyflo/apis/storyflo-inference-router/llms.txt) · [OpenAPI document](https://skmtc.dev/storyflo/apis/storyflo-inference-router/revisions/c3a1a735ac7a?raw)
