---
title: "Citations endpoints"
description: "Cite a source for a fact, person or family, edit or remove a citation, cite many at once, and list the facts no source backs yet."
canonical: "https://kleiobase.com/developers/docs/reference/citations"
---

# Citations endpoints

Cite a source for a fact, person or family, edit or remove a citation, cite many at once, and list the facts no source backs yet.

Paths are relative to https://kleiobase.com/api/v1. Request and response schemas are in the OpenAPI document at https://kleiobase.com/api/v1/openapi.json.

## Cite a source

`POST /workspaces/{workspace_id}/citations`

Cite exactly one fact (person_fact_id), person (person_id) or family (family_id). Every plan can give a page; quality, information_type, entry_date, excerpt, access_layer, cites_layer and fields need the citation manager. Replays of an Idempotency-Key return the original body and request_id; headers are not replayed.

Parameters:

- `workspace_id` (path, required): The workspace (project) id.
- `Idempotency-Key` (header, optional): Makes the write safe to retry (1-255 characters, kept 24 hours). Same key and same request replays the original response; a different request with the same key is a 409.

Takes a request body; see the OpenAPI document for its schema.

Responses:

- `201`: The created citation.
- `401`: Missing, malformed, unknown or revoked API key.
- `403`: The key's account is not on the Professional plan, or the key is read-only (a read_write key is required). Also: a field that needs the citation manager.
- `404`: The workspace does not exist or is not visible to this key's owner. Also: The source or the cited item is not in this workspace.
- `409`: The workspace is archived (writes are refused). Also: Idempotency-Key was reused with a different request, or a request with it is still in progress. Also: that citation already exists.
- `422`: Validation failed. A bad Idempotency-Key (1-255 characters) is also a 422. Also: Invalid body.
- `429`: Rate limit exceeded. Wait the number of seconds in Retry-After.
- `500`: Unexpected error. Retry later and quote request_id if it persists.

## Update a citation

`PATCH /workspaces/{workspace_id}/citations/{citation_id}`

Every plan can change the page; the other fields need the citation manager. Replays of an Idempotency-Key return the original body and request_id; headers are not replayed.

Parameters:

- `workspace_id` (path, required): The workspace (project) id.
- `citation_id` (path, required): The citation id.
- `Idempotency-Key` (header, optional): Makes the write safe to retry (1-255 characters, kept 24 hours). Same key and same request replays the original response; a different request with the same key is a 409.

Takes a request body; see the OpenAPI document for its schema.

Responses:

- `200`: The citation.
- `401`: Missing, malformed, unknown or revoked API key.
- `403`: The key's account is not on the Professional plan, or the key is read-only (a read_write key is required). Also: a field that needs the citation manager.
- `404`: The workspace does not exist or is not visible to this key's owner. Also: The citation is not in this workspace.
- `409`: The workspace is archived (writes are refused). Also: Idempotency-Key was reused with a different request, or a request with it is still in progress.
- `422`: Validation failed. A bad Idempotency-Key (1-255 characters) is also a 422. Also: Invalid body.
- `429`: Rate limit exceeded. Wait the number of seconds in Retry-After.
- `500`: Unexpected error. Retry later and quote request_id if it persists.

## Remove a citation

`DELETE /workspaces/{workspace_id}/citations/{citation_id}`

The source, the record and the fact are kept. Replays of an Idempotency-Key return the original body and request_id; headers are not replayed.

Parameters:

- `workspace_id` (path, required): The workspace (project) id.
- `citation_id` (path, required): The citation id.
- `Idempotency-Key` (header, optional): Makes the write safe to retry (1-255 characters, kept 24 hours). Same key and same request replays the original response; a different request with the same key is a 409.

Responses:

- `200`: Removed.
- `401`: Missing, malformed, unknown or revoked API key.
- `403`: The key's account is not on the Professional plan, or the key is read-only (a read_write key is required).
- `404`: The workspace does not exist or is not visible to this key's owner. Also: The citation is not in this workspace.
- `409`: The workspace is archived (writes are refused). Also: Idempotency-Key was reused with a different request, or a request with it is still in progress.
- `422`: Validation failed. A bad Idempotency-Key (1-255 characters) is also a 422.
- `429`: Rate limit exceeded. Wait the number of seconds in Retry-After.
- `500`: Unexpected error. Retry later and quote request_id if it persists.

## Cite a source for many items

`POST /workspaces/{workspace_id}/citations/bulk`

One source and page on up to 100 targets. A target with person_id and fact_type cites that person's preferred facts of that type. record_id (for every target, or per target) adds the record as the evidence: a citation of this source with no record yet gets the record attached (attached), a target already cited from that record is left alone (skipped). Needs the citation manager. Replays of an Idempotency-Key return the original body and request_id; headers are not replayed.

Parameters:

- `workspace_id` (path, required): The workspace (project) id.
- `Idempotency-Key` (header, optional): Makes the write safe to retry (1-255 characters, kept 24 hours). Same key and same request replays the original response; a different request with the same key is a 409.

Takes a request body; see the OpenAPI document for its schema.

Responses:

- `201`: Created.
- `401`: Missing, malformed, unknown or revoked API key.
- `403`: The key's account is not on the Professional plan, or the key is read-only (a read_write key is required). Also: the plan does not include the citation manager.
- `404`: The workspace does not exist or is not visible to this key's owner. Also: A target or the source is not in this workspace.
- `409`: The workspace is archived (writes are refused). Also: Idempotency-Key was reused with a different request, or a request with it is still in progress.
- `422`: Validation failed. A bad Idempotency-Key (1-255 characters) is also a 422. Also: Invalid body.
- `429`: Rate limit exceeded. Wait the number of seconds in Retry-After.
- `500`: Unexpected error. Retry later and quote request_id if it persists.

## Set a record's source

`PATCH /workspaces/{workspace_id}/records/{record_id}/source`

Say which source a record is a page of (source_id; null clears it) and where in it (source_page). Leaving source_page out keeps the current page if the source is unchanged and clears it if the record moves to another source; null clears it. Citations made from the record itself follow its source and page, and when the record has no page they use the folio and reference number read from the scan. Citations whose page was edited by hand, and citations made with cite or cite_bulk, are not changed. Every plan. Replays of an Idempotency-Key return the original body and request_id; headers are not replayed.

Parameters:

- `workspace_id` (path, required): The workspace (project) id.
- `record_id` (path, required): The record id.
- `Idempotency-Key` (header, optional): Makes the write safe to retry (1-255 characters, kept 24 hours). Same key and same request replays the original response; a different request with the same key is a 409.

Takes a request body; see the OpenAPI document for its schema.

Responses:

- `200`: Updated.
- `401`: Missing, malformed, unknown or revoked API key.
- `403`: The key's account is not on the Professional plan, or the key is read-only (a read_write key is required).
- `404`: The workspace does not exist or is not visible to this key's owner. Also: The record or the source is not in this workspace.
- `409`: The workspace is archived (writes are refused). Also: Idempotency-Key was reused with a different request, or a request with it is still in progress.
- `422`: Validation failed. A bad Idempotency-Key (1-255 characters) is also a 422. Also: Invalid body.
- `429`: Rate limit exceeded. Wait the number of seconds in Retry-After.
- `500`: Unexpected error. Retry later and quote request_id if it persists.

## Set the source of several records

`POST /workspaces/{workspace_id}/records/source`

Put up to 500 records into one source at once, with one page. Leaving source_page out keeps each record's page if it stays in the same source and clears it if it moves; null clears it. More than one record needs the citation manager. Replays of an Idempotency-Key return the original body and request_id; headers are not replayed.

Parameters:

- `workspace_id` (path, required): The workspace (project) id.
- `Idempotency-Key` (header, optional): Makes the write safe to retry (1-255 characters, kept 24 hours). Same key and same request replays the original response; a different request with the same key is a 409.

Takes a request body; see the OpenAPI document for its schema.

Responses:

- `200`: Updated.
- `401`: Missing, malformed, unknown or revoked API key.
- `403`: The key's account is not on the Professional plan, or the key is read-only (a read_write key is required). Also: more than one record and the plan does not include the citation manager.
- `404`: The workspace does not exist or is not visible to this key's owner. Also: No record or the source is not in this workspace.
- `409`: The workspace is archived (writes are refused). Also: Idempotency-Key was reused with a different request, or a request with it is still in progress.
- `422`: Validation failed. A bad Idempotency-Key (1-255 characters) is also a 422. Also: Invalid body.
- `429`: Rate limit exceeded. Wait the number of seconds in Retry-After.
- `500`: Unexpected error. Retry later and quote request_id if it persists.

## List unsourced facts

`GET /workspaces/{workspace_id}/unsourced-facts`

People with facts that no source backs, most unsourced first, each with those facts and where each fact came from. Needs the citation manager.

Parameters:

- `workspace_id` (path, required): The workspace (project) id.
- `limit` (query, optional): Page size. Default 25, max 100.
- `cursor` (query, optional): The next_cursor of the previous page. Opaque.
- `person_id` (query, optional): Only this person.
- `origin` (query, optional): Only facts from gedcom (a GEDCOM import), extraction (a record) or manual entry.

Responses:

- `200`: People with unsourced facts.
- `401`: Missing, malformed, unknown or revoked API key.
- `403`: The key's account is not on the Professional plan. Also: the plan does not include the citation manager.
- `404`: The workspace does not exist or is not visible to this key's owner.
- `422`: Invalid limit, cursor, person_id or origin.
- `429`: Rate limit exceeded. Wait the number of seconds in Retry-After.
- `500`: Unexpected error. Retry later and quote request_id if it persists.

Canonical: https://kleiobase.com/developers/docs/reference/citations
