Skip to main content

Collections

List, create, rename and delete collections, named groups of documents filled by rules and by hand, and see which collections are assigned to you.

A collection is a named group of documents. Rules fill it automatically (every document of a source, of a document type, or of a case), and you can add documents by hand. A collection can be assigned to people or groups, so each person works in the documents that concern them. The routes below are the API side of the Collections settings in the web app.

A collection of kind: account is an account: a client or portfolio company, where each document belongs to at most one account. Accounts can carry aliases, the other names the company goes by. GET /v1/accounts remains the narrow, read-only view of accounts; the collection routes manage both kinds.

GET /v1/collections lists every collection of the workspace with how many rules, hand-added documents and assignments it has. GET /v1/collections/mine lists the collections assigned to the key's person, and says whether those assignments limit what the person sees (restricted). GET /v1/collections/counts counts the documents in each collection that the key's person can see. GET /v1/collections/{id}/preview shows how many documents a collection holds under its current rules, with a sample of five.

Who can call these routes. Reads need the read scope (or documents:read), and any member of the workspace may call them, except preview, which is Admin only as in the web app. Creating, changing and deleting collections, their rules, documents and assignments need documents:write, and the key's person must be an Admin of the workspace; anyone else gets 403 insufficient_role. Every change is recorded in the audit trail under the key's person.

GET/v1/collections

Collection fields

iduuidThe collection.
name / descriptionstringIts name and optional description.
kindstringcollection or account.
aliasesstring[]Other names an account goes by.
created_by / created_at / updated_atstringWho created it, and when it was created and last changed.
rule_countintegerRules that fill it.
manual_document_countintegerDocuments added by hand.
user_assignment_count / group_assignment_countintegerPeople and groups it is assigned to.
GET/v1/collections/mine
GET/v1/collections/counts

Response (200) — GET /v1/collections/counts

{
  "collections": [
    { "id": "3c9e1a2b-5d4f-4e6a-8b7c-9d0e1f2a3b4c", "name": "Acme Holding", "kind": "account", "document_count": 412 },
    { "id": "6f1e9a2b-4c3d-4e5f-8a7b-9c0d1e2f3a4b", "name": "Q3 audit", "kind": "collection", "document_count": 87 }
  ],
  "unassigned": 19
}
POST/v1/collections

Body parameters

name*stringUp to 200 characters, unique in the workspace.
descriptionstringUp to 2000 characters.
kindstringcollection, or account for a client or portfolio company (one account per document). Default: collection
aliasesstring[]Other names the account goes by, at most 50, each up to 200 characters.

Create an account

curl -X POST https://api.talonic.com/v1/collections \
  -H "Authorization: Bearer $TALONIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Acme Holding", "kind": "account", "aliases": ["Acme GmbH", "ACME"]}'

Response (201)

{
  "id": "3c9e1a2b-5d4f-4e6a-8b7c-9d0e1f2a3b4c",
  "customer_id": "8d7c6b5a-4f3e-4d2c-9b1a-0f9e8d7c6b5a",
  "name": "Acme Holding",
  "description": null,
  "kind": "account",
  "aliases": ["Acme GmbH", "ACME"],
  "created_by": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e",
  "created_at": "2026-11-25T09:12:00.000Z",
  "updated_at": "2026-11-25T09:12:00.000Z"
}
GET/v1/collections/{id}/preview
PATCH/v1/collections/{id}
DELETE/v1/collections/{id}

Errors

Error responses

400validation_errorBad body, or a write made from the all-workspaces view.
403forbiddenreason: insufficient_scope, insufficient_role, no_person, person_inactive or workspace_read_only.
404not_foundThe collection does not exist in your workspace.
409duplicate_resourceName taken, or an account still owns documents.

Frequently asked questions

What is the difference between a collection and an account?+
Both group documents. An account (kind: account) stands for one client or portfolio company, so a document belongs to at most one account. A plain collection has no such limit: a document can be in many collections.
Does deleting a collection delete its documents?+
No. Deleting a collection removes the collection, its rules, its hand-added list and its assignments. The documents stay in the workspace.
Why do counts differ between two people?+
Counts include only documents the person behind the key can see, and a person who is not an Admin only gets the collections assigned to them.
Can a member create a collection?+
No. Creating and changing collections is Admin only, as in the web app. A member's key gets 403 insufficient_role even with the documents:write scope.