Skip to main content

Case Documents

Pin a document to a case so it survives rebuilds, or remove a wrongly linked document from it. Both curator decisions persist across future case rebuilds.

Manage document membership within a case. Pin a document to lock it into the case: pinned documents survive rebuilds even when the rebuild would otherwise drop them. Remove a document to detach it from the case when it was linked incorrectly.

Both operations are curator overrides, and both persist. A removed document is tombstoned on the case, so the next rebuild does not re-add it even if linking edges still connect it. Pinning a document that is not currently a member adds it to the case, provided the document belongs to your workspace.

Each endpoint returns the updated membership record for the document. The pin state is also visible as the pinned flag on each entry of the documents array in GET /v1/cases/:key. Removed documents disappear from that array immediately — the tombstone is kept internally so rebuilds honour it, but reads no longer show the document as a member.

Both routes validate ownership before writing. The docId must be a document in your workspace: pinning or removing an unknown or foreign document UUID returns a 404, so a typo cannot create a phantom membership row. Pinning a document that was previously removed clears the removal and restores membership in one call — the two flags are mutually exclusive on a membership record.

Use pin and remove for surgical, single-document corrections. When a whole subset of documents is wrongly grouped, POST /v1/cases/:key/split moves them into their own case in one operation, and POST /v1/cases/merge combines two cases — both build on the same persistent-override machinery, so all curator decisions survive rebuilds together.

Pin proactively when membership matters downstream. Cases are rebuilt whenever synthesis recomputes — triggered manually or as part of ingestion with case building enabled — and a rebuild re-derives membership from the current linking evidence. A document a reviewer has verified as belonging to the case should be pinned so a weaker evidence picture after new ingests cannot silently drop it.

Removing a document from a case does not delete the document itself. The document remains in your workspace and can still appear in other cases; only its membership in this case is tombstoned.
POST/v1/cases/:key/documents/:docId/pin

Request

curl -X POST https://api.talonic.com/v1/cases/5c7fa78c-4d92-4613-9f42-9fe74458d8a9/documents/doc_uuid_1/pin \
  -H "Authorization: Bearer $TALONIC_API_KEY"

Response

Response fields

document_idstringUUID of the pinned document.
pinnedbooleanTrue after a pin.
removedbooleanFalse: pinning clears a previous removal.

Response

{
  "document_id": "doc_uuid_1",
  "pinned": true,
  "removed": false
}
DELETE/v1/cases/:key/documents/:docId

Request

curl -X DELETE https://api.talonic.com/v1/cases/5c7fa78c-4d92-4613-9f42-9fe74458d8a9/documents/doc_uuid_1 \
  -H "Authorization: Bearer $TALONIC_API_KEY"

Response

Response

{
  "document_id": "doc_uuid_1",
  "pinned": false,
  "removed": true
}

Errors

Error responses

400bad_requestInvalid case key or document ID format.
401unauthorizedMissing or invalid API key.
404not_foundCase not found, or the document does not belong to your workspace.
429rate_limitedToo many requests. Retry after the period indicated in the Retry-After header.

Frequently asked questions

Does removing a document delete it?+
No. Removing a document only detaches it from this case. The document remains in your workspace and can still appear in other cases; the removal is remembered so a rebuild does not re-add it here.
What does pinning a document do?+
Pinning locks the document into the case: it survives case rebuilds even when the rebuild would drop it. The pinned flag is visible on the documents array of the case detail response.
Can I pin a document that is not in the case?+
Yes. Pinning a non-member adds it to the case as a curator override, as long as the document belongs to your workspace. Pinning a document that was previously removed also restores its membership.
What happens if the document UUID is wrong?+
Both routes verify the document exists in your workspace before writing, so an unknown or foreign UUID returns a 404 rather than creating a phantom membership. A malformed (non-UUID) id returns a 400.
Is there an unpin endpoint?+
Not on the public API. The pin route always pins, and DELETE removes the membership entirely (clearing any pin with it). Releasing a pin while keeping the document a regular member is done in the platform's Business Cases view.