---
title: "Patch Faction"
method: PATCH
path: "/v1/factions/{faction_id}"
tags: ["factions"]
---

# Patch Faction

`PATCH /v1/factions/{faction_id}`

## Request

- Base URL: `https://api.myarchivist.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.myarchivist.ai/v1/factions/{faction_id}`
- Auth: HTTP bearer

Partially update a faction.

## Path parameters

- `faction_id` string, required

## Headers

- `x-api-key` string, nullable

## Request body

- FactionUpdate
  - `name` string, nullable
  - `aliases` string[], nullable
  - `type` string, nullable
  - `description` string, nullable
  - `image` string, nullable
  - `tcg_image` string, nullable

## Response `200`

Successful Response

- FactionRead: Read view of a stored faction. The constrained fields from FactionBase are redeclared here without their limits on purpose. FactionBase exists to validate *incoming* writes, but FactionRead validates rows that already exist, and those rows are also written by the Next.js app straight through Prisma, which enforces none of these limits. Inheriting them made pydantic reject legacy rows on read, so `GET /v1/factions/{id}` answered 500 for every faction whose stored description was longer than the create/update cap. `CharacterRead` has always relaxed its own text fields for this reason; these types had not.
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, nullable
  - `id` string, required
  - `name` string, required
  - `aliases` string[]
  - `type` string, nullable
  - `description` string, nullable
  - `image` string, nullable
  - `tcg_image` string, nullable
  - `campaign_id` string, required
  - `merge` boolean

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/myarchivist/apis/archivist-public-api.md) · [All operations](https://skmtc.dev/myarchivist/apis/archivist-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/myarchivist/apis/archivist-public-api/revisions/3ea6ca7efc56?raw)
