@talonic/docs 0.21.83 → 0.21.90

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/content.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/content/helpers.ts
2
- function deriveBreadcrumbs(sections87, leafId, domain) {
2
+ function deriveBreadcrumbs(sections88, leafId, domain) {
3
3
  const domainLabels = {
4
4
  api: "API Reference",
5
5
  platform: "Platform Guide",
@@ -10,20 +10,20 @@ function deriveBreadcrumbs(sections87, leafId, domain) {
10
10
  label: domainLabels[domain] ?? domain,
11
11
  slug: domain
12
12
  };
13
- for (const group of sections87) {
13
+ for (const group of sections88) {
14
14
  const child = group.children?.find((c) => c.id === leafId);
15
15
  if (child) {
16
16
  return [root, { label: group.label, slug: group.id }, { label: child.label, slug: child.id }];
17
17
  }
18
18
  }
19
- const topLevel = sections87.find((s) => s.id === leafId);
19
+ const topLevel = sections88.find((s) => s.id === leafId);
20
20
  if (topLevel) {
21
21
  return [root, { label: topLevel.label, slug: topLevel.id }];
22
22
  }
23
23
  return [root];
24
24
  }
25
- function derivePrevNext(sections87, leafId) {
26
- const flat = sections87.flatMap(
25
+ function derivePrevNext(sections88, leafId) {
26
+ const flat = sections88.flatMap(
27
27
  (s) => s.children ?? [{ id: s.id, label: s.label }]
28
28
  );
29
29
  const idx = flat.findIndex((c) => c.id === leafId);
@@ -47,6 +47,10 @@ var generated_nav_default = {
47
47
  id: "ref-schemas",
48
48
  label: "Schemas"
49
49
  },
50
+ {
51
+ id: "ref-jobs-and-batches",
52
+ label: "Jobs & Batches"
53
+ },
50
54
  {
51
55
  id: "ref-sources",
52
56
  label: "Sources"
@@ -95,6 +99,10 @@ var generated_nav_default = {
95
99
  id: "ref-apps",
96
100
  label: "Apps"
97
101
  },
102
+ {
103
+ id: "ref-provenance",
104
+ label: "Provenance"
105
+ },
98
106
  {
99
107
  id: "ref-compliance",
100
108
  label: "Compliance"
@@ -150,6 +158,10 @@ var generated_nav_default = {
150
158
  {
151
159
  id: "ref-suggestions",
152
160
  label: "Suggestions"
161
+ },
162
+ {
163
+ id: "ref-access-and-sharing",
164
+ label: "Access & sharing"
153
165
  }
154
166
  ]
155
167
  };
@@ -160,7 +172,7 @@ var openapi_default = {
160
172
  info: {
161
173
  title: "Talonic API",
162
174
  version: "1.1.0",
163
- description: 'Structure any document into schema-validated data.\n\nThe Talonic API lets you extract structured data from documents (PDFs, images,\nDOCX, CSV, plain text), manage reusable extraction schemas, track async jobs,\nand organise documents through sources.\n\n## Quick Start\n\n**1. Get your API key**\n\nSign up at [app.talonic.com](https://app.talonic.com) \u2192 Settings \u2192 API Keys \u2192 Create key.\nKeys start with `tlnc_`. All examples below use `tlnc_live_abc123` as a placeholder.\n\n**2. Extract your first document**\n\n```bash\ncurl -X POST https://api.talonic.com/v1/extract \\\n -H "Authorization: Bearer tlnc_live_abc123" \\\n -F "file=@invoice.pdf" \\\n -F \'schema={"properties":{"vendor_name":{"type":"string"},"total_amount":{"type":"number"},"invoice_date":{"type":"string"}}}\'\n```\n\n**Python:**\n```python\nimport requests\nresp = requests.post("https://api.talonic.com/v1/extract",\n headers={"Authorization": "Bearer tlnc_live_abc123"},\n files={"file": open("invoice.pdf", "rb")},\n data={"schema": \'{"properties":{"vendor_name":{"type":"string"},"total_amount":{"type":"number"},"invoice_date":{"type":"string"}}}\'})\nprint(resp.json()["data"])\n```\n\n**TypeScript:**\n```typescript\nconst form = new FormData();\nform.append("file", fs.createReadStream("invoice.pdf"));\nform.append("schema", \'{"properties":{"vendor_name":{"type":"string"},"total_amount":{"type":"number"},"invoice_date":{"type":"string"}}}\');\nconst res = await fetch("https://api.talonic.com/v1/extract", {\n method: "POST",\n headers: { Authorization: "Bearer tlnc_live_abc123" },\n body: form,\n}).then(r => r.json());\nconsole.log(res.data);\n```\n\n**3. What you get back**\n\n```json\n{\n "extraction_id": "d1a2b3c4-5678-9abc-def0-1234567890ab",\n "request_id": "req_x7y8z9a0b1c2d3e4",\n "status": "complete",\n "document": {\n "id": "f0e1d2c3-b4a5-9687-8765-432109876543",\n "filename": "invoice.pdf",\n "pages": 2,\n "size_bytes": 184320,\n "type_detected": "Invoice",\n "language_detected": "en"\n },\n "data": {\n "vendor_name": "Acme GmbH",\n "total_amount": 14250.00,\n "invoice_date": "2025-03-15"\n },\n "confidence": {\n "overall": 0.96,\n "fields": {\n "vendor_name": 0.97,\n "total_amount": 0.94,\n "invoice_date": 0.99\n }\n },\n "processing": {\n "duration_ms": 1840,\n "pages_processed": 2,\n "region": "eu-west"\n },\n "links": {\n "self": "/v1/extractions/d1a2b3c4-5678-9abc-def0-1234567890ab",\n "document": "/v1/documents/f0e1d2c3-b4a5-9687-8765-432109876543"\n }\n}\n```\n\n- **`data`** \u2014 extracted fields as key-value pairs matching your schema.\n- **`confidence.fields`** \u2014 per-field score from 0 to 1. Above 0.9 is high confidence; below 0.7 flags for review.\n- **`extraction_id`** \u2014 use this to retrieve, correct, or deliver results later.\n- Full response schema: [ExtractSyncResponse](#/components/schemas/ExtractSyncResponse)\n\n**4. Next steps**\n\n- **50+ pages?** Use async mode \u2014 see [Async Extraction Flow](#section/Async-Extraction-Flow) below.\n- **Reusable schemas** \u2014 save field definitions with `POST /v1/schemas`, then pass `schema_id` on future extractions.\n- **Receive results via webhook** \u2014 configure a delivery destination and listen for `document.extracted` events. See the [Delivery](#tag/Delivery) tag.\n\n---\n\n## Authentication\n\nAll requests require a Bearer token in the `Authorization` header.\nAPI keys are prefixed with `tlnc_` and scoped per customer.\n\n```\nAuthorization: Bearer tlnc_live_abc123...\n```\n\n## Async Extraction Pattern\n\nSmall documents (\u22645 pages) are processed synchronously and return a `200`\nwith the extracted data immediately. Larger documents return a `202 Accepted`\nwith a `poll_url` \u2014 poll `GET /v1/documents/{id}` until `status` transitions\nto `completed`, then fetch results via `GET /v1/documents/{id}/extractions`.\n\nYou can force async processing by passing `options: {"async": true}` on\nany extraction request. Combine with webhooks for a fully event-driven flow:\nconfigure a webhook destination under Delivery and listen for the\n`extraction.complete` event.\n\n**Job status lifecycle:** `pending` \u2192 `processing` \u2192 `complete` | `failed`\n\n## Rate Limits\n\nThe **Free** tier is metered by a recurring **5,000-credit monthly grant**\n(no card required) that refreshes on the 1st of each month (UTC). Free\nrequests run until the monthly credit balance is spent, then return `402`\nuntil the next grant. A generous daily request ceiling is retained purely as\nabuse protection and does not bind a legitimate free user within the monthly\nenvelope. Inspect your balance and reset date via `GET /v1/account`.\n\nPaid tiers are metered per calendar day (UTC):\n\n| Tier | Extract | Platform | Ingest | Operations | Run | Ask |\n|------------|---------|----------|--------|------------|-----|-----|\n| Free | 1,000/day | 2,000/day | 1,000/day | 1,000/day | 1,000/day | 200/day |\n| Pro | 25,000/day | 50,000/day | 25,000/day | 25,000/day | 25,000/day | 5,000/day |\n| Enterprise | Unlimited | Unlimited | Unlimited | Unlimited | Unlimited | Unlimited |\n\nFree workspaces additionally receive 5,000 credits/month; spend is governed\nby credits (402 on exhaustion), with daily ceilings acting as abuse protection.\n\nResponses with a finite limit include rate-limit headers:\n- `X-RateLimit-Limit` \u2014 daily cap for the namespace\n- `X-RateLimit-Remaining` \u2014 requests left today\n- `X-RateLimit-Reset` \u2014 ISO 8601 timestamp when the window resets (midnight UTC)\n\n## Pagination\n\nList endpoints use cursor-based pagination. Pass `limit` (1\u2013100, default 20),\n`cursor` (opaque token from `pagination.next_cursor`), and `order` (`asc` or `desc`, default `desc`).\n\n## Errors\n\nAll errors return a JSON body with `error` (machine-readable code) and `message`\n(human-readable explanation). Additional fields vary by error type.\n\n| Code | Error | Description |\n|------|--------------------|------------------------------------------|\n| 400 | validation_error | Request body is malformed or invalid |\n| 401 | unauthorized | Missing or invalid API key |\n| 403 | insufficient_scope | API key lacks the required scope |\n| 404 | not_found | Resource does not exist |\n| 409 | conflict | Resource state conflict |\n| 413 | payload_too_large | File exceeds 500 MB limit |\n| 422 | extraction_failed | Document could not be processed |\n| 429 | rate_limit_exceeded| Daily rate limit reached |\n| 500 | internal_error | Unexpected server error (retryable) |\n\nEvery error response follows this envelope:\n\n```json\n{\n "statusCode": 400,\n "code": "VALIDATION_ERROR",\n "error": "Bad Request",\n "message": "name is required.",\n "retryable": false,\n "timestamp": "2026-04-25T14:30:00.000Z",\n "path": "/v1/schemas"\n}\n```\n\nThe `code` field is one of: `VALIDATION_ERROR`, `AUTH_REQUIRED`, `TOKEN_EXPIRED`,\n`INSUFFICIENT_PERMISSIONS`, `RESOURCE_NOT_FOUND`, `QUOTA_EXCEEDED`,\n`INSUFFICIENT_CREDITS`, `LLM_RATE_LIMITED`, `LLM_TIMEOUT`, `LLM_UNAVAILABLE`,\n`OCR_FAILED`, `EXTRACTION_FAILED`, `EXTRACTION_TIMEOUT`, `FILE_TOO_LARGE`,\n`DUPLICATE_RESOURCE`, `DATASPACE_RUN_FAILED`, `INTERNAL_ERROR`.\n\n### Refusal reasons\n\nA refusal an integration must branch on also carries `reason`, a stable\ntoken beside `code`. Branch on `reason`, not on `code`, `error` or the\nmessage: `code` says only which HTTP family the refusal belongs to, `error`\nis the HTTP status name on some refusals and a body discriminant on others,\nand messages are prose. The key is present only on refusals; absent means\n"no stable reason, read `message`". Message prefixes (`insufficient_grant:\n\u2026`) are kept for older clients that parse them; where a message carries one it equals `reason`, but not every refusal has a prefix (the Apps-ladder refusals are plain sentences), so branch on `reason`.\n\n| `reason` | Status | What the caller does |\n|---|---|---|\n| `insufficient_grant` | 403 | The app holds no approved grant covering this resource, or the route is not reachable by an app service key at all. Not retryable \u2014 stop and ask the workspace owner to grant it. |\n| `install_pending_approval` | 403 | A newer version of the app awaits owner approval and the install is paused. Poll `GET /v1/apps/{id}/install/status`. |\n| `install_not_ready` | 403 / 409 | The install is not in force (403, no installed binding for this service key) or is parked on an unapproved version / has no bound OAuth client (409). Poll `GET /v1/apps/{id}/install/status`. |\n| `endpoint_not_confirmed` | 400 | The binding would give the install its first subscriptions, or `confirm_subscriptions_endpoint` does not equal the manifest\'s `subscriptions_endpoint`. An owner action \u2014 re-send with the confirmation. |\n| `slot_unbound` | 400 / 409 | A required requirement slot has no binding (400 at install/rebind, 409 when a run resolves an already-installed version). The owner binds the named aliases. |\n| `slot_unknown` | 400 | The request named an alias the manifest declares no slot for. Fix the manifest or the request. |\n| `hosted_manifest_read_only` | 409 | The app\'s manifest is fetched from the vendor\'s URL, so local edits are refused. Edit at the vendor host, then `POST /v1/apps/{id}/refresh`. |\n| `hosted_surface_fixed` | 422 | A hosted app\'s surface URL comes from its manifest and moves only when a new version is approved; drop `surface_url` from the patch. |\n| `manifest_fetch_failed` | 422 | The vendor\'s manifest URL could not be read. `details.violations` carries the fetch reason. Fix it at the vendor host and retry. |\n| `schema_validation_failed` | 422 | A manifest does not validate, on publish or on a hosted fetch. `details.violations` carries `{ pointer, keyword, message }` per failure. |\n| `refresh_failed` | 422 | A hosted refresh did not happen; the failure is recorded on the app and it stays live on its approved version. `details` carries `{ changed, error }`. Fix it at the vendor host. |\n| `insufficient_scope` | 403 | The key or token lacks a required scope. `required_scopes` names the ones that admit. Workspace keys and OAuth clients receive this; an app service key never does, because both scope paths hand an app principal to its grant checks instead. |\n| `unauthenticated` | 403 | The Apps surface saw no authenticated principal. |\n| `workspace_required` | 403 | The Apps surface needs a concrete workspace; a master-view key cannot call it. |\n| `insufficient_tier` | 403 | The caller\'s workspace role (or an OAuth token\'s role claim) ranks below the route\'s tier. `required` names the tier. |\n| `owner_required` | 403 | Grant and OAuth-client management needs a human workspace owner; no machine caller reaches it. |\n| `insufficient_app_grant` | 403 | The API key holds app grants, but none at the level this route needs. `required` names the tier. |\n| `decide_grant_required` | 403 | The decision-task protocol admits only a machine caller holding an explicit `decide` grant on the app. |\n\n## Async Extraction Flow\n\nDocuments \u22645 pages return results synchronously (`200`). Larger documents\n\u2014 or any request with `options: {"async": true}` \u2014 return `202 Accepted`.\n\n**1. Submit extraction:**\n\n```bash\ncurl -X POST https://api.talonic.com/v1/extract \\\n -H "Authorization: Bearer tlnc_live_abc123" \\\n -F "file=@contract.pdf" \\\n -F \'options={"async": true}\'\n```\n\nResponse `202`:\n```json\n{\n "request_id": "req_x7y8z9a0",\n "status": "processing",\n "document": { "id": "f0e1d2c3-b4a5-9687-8765-432109876543" },\n "poll_url": "/v1/documents/f0e1d2c3-b4a5-9687-8765-432109876543"\n}\n```\n\n**2. Poll until complete:**\n\n```bash\ncurl https://api.talonic.com/v1/documents/f0e1d2c3-b4a5-9687-8765-432109876543 \\\n -H "Authorization: Bearer tlnc_live_abc123"\n```\n\nWhile processing: `{ "status": "processing" }`\nWhen done: `{ "status": "completed" }`\n\n**3. Retrieve results:**\n\n```bash\ncurl https://api.talonic.com/v1/documents/f0e1d2c3-b4a5-9687-8765-432109876543/extractions \\\n -H "Authorization: Bearer tlnc_live_abc123"\n```\n\n**Python \u2014 complete async flow with exponential backoff:**\n\n```python\nimport time\nimport requests\n\nAPI_KEY = "tlnc_live_..."\nBASE = "https://api.talonic.com/v1"\nHEADERS = {"Authorization": f"Bearer {API_KEY}"}\n\n# Step 1: Submit async extraction\nresp = requests.post(f"{BASE}/extract",\n headers=HEADERS,\n files={"file": open("contract.pdf", "rb")},\n data={"options": \'{"async": true}\'})\ndoc_id = resp.json()["document"]["id"]\n\n# Step 2: Poll with exponential backoff (2s \u2192 4s \u2192 8s \u2192 16s \u2192 30s cap)\ndelay = 2\nfor _ in range(20):\n time.sleep(delay)\n doc = requests.get(f"{BASE}/documents/{doc_id}", headers=HEADERS).json()\n if doc["status"] == "completed":\n break\n if doc["status"] == "error":\n raise Exception(f"Extraction failed: {doc.get(\'error\')}")\n delay = min(delay * 2, 30)\n\n# Step 3: Retrieve extracted data\nextractions = requests.get(\n f"{BASE}/documents/{doc_id}/extractions", headers=HEADERS).json()\ndata = extractions["data"][0]["data"]\nconfidence = extractions["data"][0]["confidence"]["overall"]\nprint(f"Extracted {len(data)} fields (confidence: {confidence})")\nprint(data)\n# \u2192 {"vendor_name": "Acme Corp", "total_amount": 1250.00, ...}\n```\n\n**TypeScript \u2014 same flow:**\n\n```typescript\nconst API_KEY = "tlnc_live_...";\nconst BASE = "https://api.talonic.com/v1";\nconst headers = { Authorization: `Bearer ${API_KEY}` };\n\n// Step 1: Submit async extraction\nconst form = new FormData();\nform.append("file", fs.createReadStream("contract.pdf"));\nform.append("options", \'{"async": true}\');\nconst { document } = await fetch(`${BASE}/extract`, {\n method: "POST", headers, body: form,\n}).then((r) => r.json());\n\n// Step 2: Poll with exponential backoff\nlet delay = 2000;\nlet doc: any;\nfor (let i = 0; i < 20; i++) {\n await new Promise((r) => setTimeout(r, delay));\n doc = await fetch(`${BASE}/documents/${document.id}`, { headers }).then((r) => r.json());\n if (doc.status === "completed") break;\n if (doc.status === "error") throw new Error(`Extraction failed: ${doc.error}`);\n delay = Math.min(delay * 2, 30_000);\n}\n\n// Step 3: Retrieve extracted data\nconst { data: extractions } = await fetch(\n `${BASE}/documents/${document.id}/extractions`, { headers }\n).then((r) => r.json());\nconsole.log(extractions[0].data);\n// \u2192 { vendor_name: "Acme Corp", total_amount: 1250.00, ... }\n```\n\nRecommended polling: 2s initial, exponential backoff (2\u21924\u21928\u219216\u219230s cap),\ntimeout after 5 minutes.\n\n**Alternative \u2014 Webhooks:** Configure a delivery destination and listen for\n`document.extracted` events. See the Delivery tag.\n\n**Job status state machine:**\n`pending` \u2192 `queued` \u2192 `processing` \u2192 `complete` | `failed`\n\n## Performance\n\n| Document size | Expected latency | Max timeout |\n|---------------|------------------|-------------|\n| 1\u20135 pages | Sync, <3s | 30s |\n| 6\u201350 pages | <30s average | 5 min |\n| 50+ pages | <5 min average | 30 min |\n\n**Uptime SLA:** 99.5% (Build), 99.9% (Scale), custom (Enterprise).\n\n**Max file size:** 500 MB. JSON request bodies (schemas, jobs): 1 MB.\n\n**Idempotency:** Pass `Idempotency-Key` header on POST requests. Keys are\nscoped to your organization (all keys in a workspace share one namespace)\nand at most 64 characters (a longer key is refused with 400\n`invalid_idempotency_key` before any work). Duplicates return the cached\nresponse with `cached: true`.\n',
175
+ description: 'Structure any document into schema-validated data.\n\nThe Talonic API lets you extract structured data from documents (PDFs, images,\nDOCX, CSV, plain text), manage reusable extraction schemas, track async jobs,\nand organise documents through sources.\n\n## Quick Start\n\n**1. Get your API key**\n\nSign up at [app.talonic.com](https://app.talonic.com) \u2192 Settings \u2192 API Keys \u2192 Create key.\nKeys start with `tlnc_`. All examples below use `tlnc_live_abc123` as a placeholder.\n\n**2. Extract your first document**\n\n```bash\ncurl -X POST https://api.talonic.com/v1/extract \\\n -H "Authorization: Bearer tlnc_live_abc123" \\\n -F "file=@invoice.pdf" \\\n -F \'schema={"properties":{"vendor_name":{"type":"string"},"total_amount":{"type":"number"},"invoice_date":{"type":"string"}}}\'\n```\n\n**Python:**\n```python\nimport requests\nresp = requests.post("https://api.talonic.com/v1/extract",\n headers={"Authorization": "Bearer tlnc_live_abc123"},\n files={"file": open("invoice.pdf", "rb")},\n data={"schema": \'{"properties":{"vendor_name":{"type":"string"},"total_amount":{"type":"number"},"invoice_date":{"type":"string"}}}\'})\nprint(resp.json()["data"])\n```\n\n**TypeScript:**\n```typescript\nconst form = new FormData();\nform.append("file", fs.createReadStream("invoice.pdf"));\nform.append("schema", \'{"properties":{"vendor_name":{"type":"string"},"total_amount":{"type":"number"},"invoice_date":{"type":"string"}}}\');\nconst res = await fetch("https://api.talonic.com/v1/extract", {\n method: "POST",\n headers: { Authorization: "Bearer tlnc_live_abc123" },\n body: form,\n}).then(r => r.json());\nconsole.log(res.data);\n```\n\n**3. What you get back**\n\n```json\n{\n "extraction_id": "d1a2b3c4-5678-9abc-def0-1234567890ab",\n "request_id": "req_x7y8z9a0b1c2d3e4",\n "status": "complete",\n "document": {\n "id": "f0e1d2c3-b4a5-9687-8765-432109876543",\n "filename": "invoice.pdf",\n "pages": 2,\n "size_bytes": 184320,\n "type_detected": "Invoice",\n "language_detected": "en"\n },\n "data": {\n "vendor_name": "Acme GmbH",\n "total_amount": 14250.00,\n "invoice_date": "2025-03-15"\n },\n "confidence": {\n "overall": 0.96,\n "fields": {\n "vendor_name": 0.97,\n "total_amount": 0.94,\n "invoice_date": 0.99\n }\n },\n "processing": {\n "duration_ms": 1840,\n "pages_processed": 2,\n "region": "eu-west"\n },\n "links": {\n "self": "/v1/extractions/d1a2b3c4-5678-9abc-def0-1234567890ab",\n "document": "/v1/documents/f0e1d2c3-b4a5-9687-8765-432109876543"\n }\n}\n```\n\n- **`data`** \u2014 extracted fields as key-value pairs matching your schema.\n- **`confidence.fields`** \u2014 per-field score from 0 to 1. Above 0.9 is high confidence; below 0.7 flags for review.\n- **`extraction_id`** \u2014 use this to retrieve, correct, or deliver results later.\n- Full response schema: [ExtractSyncResponse](#/components/schemas/ExtractSyncResponse)\n\n**4. Next steps**\n\n- **50+ pages?** Use async mode \u2014 see [Async Extraction Flow](#section/Async-Extraction-Flow) below.\n- **Reusable schemas** \u2014 save field definitions with `POST /v1/schemas`, then pass `schema_id` on future extractions.\n- **Receive results via webhook** \u2014 configure a delivery destination and listen for `document.extracted` events. See the [Delivery](#tag/Delivery) tag.\n\n---\n\n## Authentication\n\nAll requests require a Bearer token in the `Authorization` header.\nAPI keys are prefixed with `tlnc_` and scoped per customer.\n\n```\nAuthorization: Bearer tlnc_live_abc123...\n```\n\n## Async Extraction Pattern\n\nSmall documents (\u22645 pages) are processed synchronously and return a `200`\nwith the extracted data immediately. Larger documents return a `202 Accepted`\nwith a `poll_url` \u2014 poll `GET /v1/documents/{id}` until `status` transitions\nto `completed`, then fetch results via `GET /v1/documents/{id}/extractions`.\n\nYou can force async processing by passing `options: {"async": true}` on\nany extraction request. Combine with webhooks for a fully event-driven flow:\nconfigure a webhook destination under Delivery and listen for the\n`extraction.complete` event.\n\n**Job status lifecycle:** `pending` \u2192 `processing` \u2192 `complete` | `failed`\n\n## Rate Limits\n\nThe **Free** tier is metered by a recurring **5,000-credit monthly grant**\n(no card required) that refreshes on the 1st of each month (UTC). Free\nrequests run until the monthly credit balance is spent, then return `402`\nuntil the next grant. A generous daily request ceiling is retained purely as\nabuse protection and does not bind a legitimate free user within the monthly\nenvelope. Inspect your balance and reset date via `GET /v1/account`.\n\nPaid tiers are metered per calendar day (UTC):\n\n| Tier | Extract | Platform | Ingest | Operations | Run | Ask |\n|------------|---------|----------|--------|------------|-----|-----|\n| Free | 1,000/day | 2,000/day | 1,000/day | 1,000/day | 1,000/day | 200/day |\n| Pro | 25,000/day | 50,000/day | 25,000/day | 25,000/day | 25,000/day | 5,000/day |\n| Enterprise | Unlimited | Unlimited | Unlimited | Unlimited | Unlimited | Unlimited |\n\nFree workspaces additionally receive 5,000 credits/month; spend is governed\nby credits (402 on exhaustion), with daily ceilings acting as abuse protection.\n\nResponses with a finite limit include rate-limit headers:\n- `X-RateLimit-Limit` \u2014 daily cap for the namespace\n- `X-RateLimit-Remaining` \u2014 requests left today\n- `X-RateLimit-Reset` \u2014 ISO 8601 timestamp when the window resets (midnight UTC)\n\n## Pagination\n\nList endpoints use cursor-based pagination. Pass `limit` (1\u2013100, default 20),\n`cursor` (opaque token from `pagination.next_cursor`), and `order` (`asc` or `desc`, default `desc`).\n\n## Errors\n\nAll errors return a JSON body with `error` (machine-readable code) and `message`\n(human-readable explanation). Additional fields vary by error type.\n\n| Code | Error | Description |\n|------|--------------------|------------------------------------------|\n| 400 | validation_error | Request body is malformed or invalid |\n| 401 | unauthorized | Missing or invalid API key |\n| 403 | insufficient_scope | API key lacks the required scope |\n| 404 | not_found | Resource does not exist |\n| 409 | conflict | Resource state conflict |\n| 413 | payload_too_large | File exceeds 500 MB limit |\n| 422 | extraction_failed | Document could not be processed |\n| 429 | rate_limit_exceeded| Daily rate limit reached |\n| 500 | internal_error | Unexpected server error (retryable) |\n\nEvery error response follows this envelope:\n\n```json\n{\n "statusCode": 400,\n "code": "VALIDATION_ERROR",\n "error": "Bad Request",\n "message": "name is required.",\n "retryable": false,\n "timestamp": "2026-04-25T14:30:00.000Z",\n "path": "/v1/schemas"\n}\n```\n\nThe `code` field is one of: `VALIDATION_ERROR`, `AUTH_REQUIRED`, `TOKEN_EXPIRED`,\n`INSUFFICIENT_PERMISSIONS`, `RESOURCE_NOT_FOUND`, `QUOTA_EXCEEDED`,\n`INSUFFICIENT_CREDITS`, `LLM_RATE_LIMITED`, `LLM_TIMEOUT`, `LLM_UNAVAILABLE`,\n`OCR_FAILED`, `EXTRACTION_FAILED`, `EXTRACTION_TIMEOUT`, `FILE_TOO_LARGE`,\n`DUPLICATE_RESOURCE`, `DATASPACE_RUN_FAILED`, `INTERNAL_ERROR`.\n\n### Refusal reasons\n\nA refusal an integration must branch on also carries `reason`, a stable\ntoken beside `code`. Branch on `reason`, not on `code`, `error` or the\nmessage: `code` says only which HTTP family the refusal belongs to, `error`\nis the HTTP status name on some refusals and a body discriminant on others,\nand messages are prose. The key is present only on refusals; absent means\n"no stable reason, read `message`". Message prefixes (`insufficient_grant:\n\u2026`) are kept for older clients that parse them; where a message carries one it equals `reason`, but not every refusal has a prefix (the Apps-ladder refusals are plain sentences), so branch on `reason`.\n\n| `reason` | Status | What the caller does |\n|---|---|---|\n| `insufficient_grant` | 403 | The app holds no approved grant covering this resource, or the route is not reachable by an app service key at all. Not retryable \u2014 stop and ask the workspace owner to grant it. |\n| `install_pending_approval` | 403 | A newer version of the app awaits owner approval and the install is paused. Poll `GET /v1/apps/{id}/install/status`. |\n| `install_not_ready` | 403 / 409 | The install is not in force (403, no installed binding for this service key) or is parked on an unapproved version / has no bound OAuth client (409). Poll `GET /v1/apps/{id}/install/status`. |\n| `endpoint_not_confirmed` | 400 | The binding would give the install its first subscriptions, or `confirm_subscriptions_endpoint` does not equal the manifest\'s `subscriptions_endpoint`. An owner action \u2014 re-send with the confirmation. |\n| `slot_unbound` | 400 / 409 | A required requirement slot has no binding (400 at install/rebind, 409 when a run resolves an already-installed version). The owner binds the named aliases. |\n| `slot_unknown` | 400 | The request named an alias the manifest declares no slot for. Fix the manifest or the request. |\n| `hosted_manifest_read_only` | 409 | The app\'s manifest is fetched from the vendor\'s URL, so local edits are refused. Edit at the vendor host, then `POST /v1/apps/{id}/refresh`. |\n| `hosted_surface_fixed` | 422 | A hosted app\'s surface URL comes from its manifest and moves only when a new version is approved; drop `surface_url` from the patch. |\n| `manifest_fetch_failed` | 422 | The vendor\'s manifest URL could not be read. `details.violations` carries the fetch reason. Fix it at the vendor host and retry. |\n| `schema_validation_failed` | 422 | A manifest does not validate, on publish or on a hosted fetch. `details.violations` carries `{ pointer, keyword, message }` per failure. |\n| `refresh_failed` | 422 | A hosted refresh did not happen; the failure is recorded on the app and it stays live on its approved version. `details` carries `{ changed, error }`. Fix it at the vendor host. |\n| `insufficient_scope` | 403 | The key or token lacks a required scope. `required_scopes` names the ones that admit. Workspace keys and OAuth clients receive this; an app service key never does, because both scope paths hand an app principal to its grant checks instead. |\n| `unauthenticated` | 403 | The Apps surface saw no authenticated principal. |\n| `workspace_required` | 403 | The Apps surface needs a concrete workspace; a master-view key cannot call it. |\n| `insufficient_tier` | 403 | The caller\'s workspace role (or an OAuth token\'s role claim) ranks below the route\'s tier. `required` names the tier. |\n| `owner_required` | 403 | Grant and OAuth-client management needs a human workspace owner; no machine caller reaches it. |\n| `insufficient_app_grant` | 403 | The API key holds app grants, but none at the level this route needs. `required` names the tier. |\n| `decide_grant_required` | 403 | The decision-task protocol admits only a machine caller holding an explicit `decide` grant on the app. |\n\n## Async Extraction Flow\n\nDocuments \u22645 pages return results synchronously (`200`). Larger documents\n\u2014 or any request with `options: {"async": true}` \u2014 return `202 Accepted`.\n\n**1. Submit extraction:**\n\n```bash\ncurl -X POST https://api.talonic.com/v1/extract \\\n -H "Authorization: Bearer tlnc_live_abc123" \\\n -F "file=@contract.pdf" \\\n -F \'options={"async": true}\'\n```\n\nResponse `202`:\n```json\n{\n "request_id": "req_x7y8z9a0",\n "status": "processing",\n "document": { "id": "f0e1d2c3-b4a5-9687-8765-432109876543" },\n "poll_url": "/v1/documents/f0e1d2c3-b4a5-9687-8765-432109876543"\n}\n```\n\n**2. Poll until complete:**\n\n```bash\ncurl https://api.talonic.com/v1/documents/f0e1d2c3-b4a5-9687-8765-432109876543 \\\n -H "Authorization: Bearer tlnc_live_abc123"\n```\n\nWhile processing: `{ "status": "processing" }`\nWhen done: `{ "status": "completed" }`\n\n**3. Retrieve results:**\n\n```bash\ncurl https://api.talonic.com/v1/documents/f0e1d2c3-b4a5-9687-8765-432109876543/extractions \\\n -H "Authorization: Bearer tlnc_live_abc123"\n```\n\n**Python \u2014 complete async flow with exponential backoff:**\n\n```python\nimport time\nimport requests\n\nAPI_KEY = "tlnc_live_..."\nBASE = "https://api.talonic.com/v1"\nHEADERS = {"Authorization": f"Bearer {API_KEY}"}\n\n# Step 1: Submit async extraction\nresp = requests.post(f"{BASE}/extract",\n headers=HEADERS,\n files={"file": open("contract.pdf", "rb")},\n data={"options": \'{"async": true}\'})\ndoc_id = resp.json()["document"]["id"]\n\n# Step 2: Poll with exponential backoff (2s \u2192 4s \u2192 8s \u2192 16s \u2192 30s cap)\ndelay = 2\nfor _ in range(20):\n time.sleep(delay)\n doc = requests.get(f"{BASE}/documents/{doc_id}", headers=HEADERS).json()\n if doc["status"] == "completed":\n break\n if doc["status"] == "error":\n raise Exception(f"Extraction failed: {doc.get(\'error\')}")\n delay = min(delay * 2, 30)\n\n# Step 3: Retrieve extracted data\nextractions = requests.get(\n f"{BASE}/documents/{doc_id}/extractions", headers=HEADERS).json()\ndata = extractions["data"][0]["data"]\nconfidence = extractions["data"][0]["confidence"]["overall"]\nprint(f"Extracted {len(data)} fields (confidence: {confidence})")\nprint(data)\n# \u2192 {"vendor_name": "Acme Corp", "total_amount": 1250.00, ...}\n```\n\n**TypeScript \u2014 same flow:**\n\n```typescript\nconst API_KEY = "tlnc_live_...";\nconst BASE = "https://api.talonic.com/v1";\nconst headers = { Authorization: `Bearer ${API_KEY}` };\n\n// Step 1: Submit async extraction\nconst form = new FormData();\nform.append("file", fs.createReadStream("contract.pdf"));\nform.append("options", \'{"async": true}\');\nconst { document } = await fetch(`${BASE}/extract`, {\n method: "POST", headers, body: form,\n}).then((r) => r.json());\n\n// Step 2: Poll with exponential backoff\nlet delay = 2000;\nlet doc: any;\nfor (let i = 0; i < 20; i++) {\n await new Promise((r) => setTimeout(r, delay));\n doc = await fetch(`${BASE}/documents/${document.id}`, { headers }).then((r) => r.json());\n if (doc.status === "completed") break;\n if (doc.status === "error") throw new Error(`Extraction failed: ${doc.error}`);\n delay = Math.min(delay * 2, 30_000);\n}\n\n// Step 3: Retrieve extracted data\nconst { data: extractions } = await fetch(\n `${BASE}/documents/${document.id}/extractions`, { headers }\n).then((r) => r.json());\nconsole.log(extractions[0].data);\n// \u2192 { vendor_name: "Acme Corp", total_amount: 1250.00, ... }\n```\n\nRecommended polling: 2s initial, exponential backoff (2\u21924\u21928\u219216\u219230s cap),\ntimeout after 5 minutes.\n\n**Alternative \u2014 Webhooks:** Configure a delivery destination and listen for\n`document.extracted` events. See the Delivery tag.\n\n**Job status state machine:**\n`pending` \u2192 `queued` \u2192 `processing` \u2192 `complete` | `failed`\n\n## Performance\n\n| Document size | Expected latency | Max timeout |\n|---------------|------------------|-------------|\n| 1\u20135 pages | Sync, <3s | 30s |\n| 6\u201350 pages | <30s average | 5 min |\n| 50+ pages | <5 min average | 30 min |\n\n**Uptime SLA:** 99.5% (Build), 99.9% (Scale), custom (Enterprise).\n\n**Max file size:** 500 MB. JSON request bodies (schemas, jobs): 1 MB.\n\n**Idempotency:** Pass an `Idempotency-Key` header (at most 64 characters;\na longer key is refused with 400 `invalid_idempotency_key` before any work)\non endpoints that list it. On write endpoints a retry with the same key,\nrequest and API key returns the first response with its original status\nand `Idempotent-Replayed: true`; the same key on a different request or\nfrom another API key answers 422 `idempotency_key_reused`, and a retry\nwhile the first request runs answers 409 `idempotency_request_in_progress`.\n`POST /v1/extract` returns its cached result with `cached: true` to any key\nof the workspace.\n',
164
176
  contact: {
165
177
  name: "Talonic Support",
166
178
  email: "support@talonic.ai",
@@ -505,6 +517,10 @@ var openapi_default = {
505
517
  {
506
518
  name: "My Data",
507
519
  description: "What you brought into the workspace, who can see it, and your sharing decisions. Always your own data, whichever credential asks."
520
+ },
521
+ {
522
+ name: "Access & sharing",
523
+ description: "Who holds each source, access requests to the holder, and sharing documents or whole sources you hold with members, groups or everyone in the workspace. Always as the credential's person."
508
524
  }
509
525
  ],
510
526
  paths: {
@@ -1961,6 +1977,122 @@ var openapi_default = {
1961
1977
  }
1962
1978
  }
1963
1979
  },
1980
+ "/v1/documents/{id}/mail-originals": {
1981
+ get: {
1982
+ operationId: "getDocumentMailOriginals",
1983
+ "x-audience": "public",
1984
+ tags: [
1985
+ "Documents"
1986
+ ],
1987
+ summary: "Get the original messages of an email document",
1988
+ description: "The original messages an email document was captured from, as they were\nsent: sender, subject, sent time, the HTML body (pictures shown inside the\nmail embedded) and the plain text. Use it to show an email the way its\nsender wrote it.\n\nThe HTML is returned as the sender wrote it. Show it in a sandbox without\nscripts or remote content. An HTML body larger than 1.5 MB is left out\n(`html` is null) and the text stays. A document that was not captured from\nan email answers an empty `originals` list. At most 200 originals are\nreturned.\n\nAnswers only what the key's person may read: a document that is missing,\nin another workspace, or hidden from that person answers the same `404`.\nRequires the `read` scope (or `documents:read`). Any member of the\nworkspace may call it.\n",
1989
+ security: [
1990
+ {
1991
+ BearerAuth: []
1992
+ }
1993
+ ],
1994
+ "x-required-scopes": [
1995
+ "read"
1996
+ ],
1997
+ parameters: [
1998
+ {
1999
+ $ref: "#/components/parameters/ResourceId"
2000
+ }
2001
+ ],
2002
+ responses: {
2003
+ "200": {
2004
+ description: "The original messages, in the order they were stored.",
2005
+ content: {
2006
+ "application/json": {
2007
+ schema: {
2008
+ type: "object",
2009
+ required: [
2010
+ "originals"
2011
+ ],
2012
+ properties: {
2013
+ originals: {
2014
+ type: "array",
2015
+ items: {
2016
+ type: "object",
2017
+ required: [
2018
+ "asset_id",
2019
+ "message_id",
2020
+ "date",
2021
+ "from",
2022
+ "subject",
2023
+ "html",
2024
+ "text"
2025
+ ],
2026
+ properties: {
2027
+ asset_id: {
2028
+ type: "string",
2029
+ format: "uuid",
2030
+ description: "The stored original this message was read from."
2031
+ },
2032
+ message_id: {
2033
+ type: "string",
2034
+ nullable: true,
2035
+ description: "The message's own `Message-ID` header."
2036
+ },
2037
+ date: {
2038
+ type: "string",
2039
+ format: "date-time",
2040
+ nullable: true,
2041
+ description: "When the message was sent."
2042
+ },
2043
+ from: {
2044
+ type: "string",
2045
+ nullable: true
2046
+ },
2047
+ subject: {
2048
+ type: "string",
2049
+ nullable: true
2050
+ },
2051
+ html: {
2052
+ type: "string",
2053
+ nullable: true,
2054
+ description: "The HTML body as sent; null when the mail has none or it is larger than 1.5 MB."
2055
+ },
2056
+ text: {
2057
+ type: "string",
2058
+ nullable: true
2059
+ }
2060
+ }
2061
+ }
2062
+ }
2063
+ }
2064
+ },
2065
+ example: {
2066
+ originals: [
2067
+ {
2068
+ asset_id: "7f1c2b9e-4d3a-4e8b-9a61-0c5d2e8f4b10",
2069
+ message_id: "<CAF9x2k@mail.example.com>",
2070
+ date: "2026-10-02T08:14:00.000Z",
2071
+ from: '"Anna Weber" <anna.weber@example.com>',
2072
+ subject: "Invoice 4471203",
2073
+ html: "<p>Please find the invoice attached.</p>",
2074
+ text: "Please find the invoice attached."
2075
+ }
2076
+ ]
2077
+ }
2078
+ }
2079
+ }
2080
+ },
2081
+ "401": {
2082
+ $ref: "#/components/responses/Unauthorized"
2083
+ },
2084
+ "403": {
2085
+ $ref: "#/components/responses/Forbidden"
2086
+ },
2087
+ "404": {
2088
+ $ref: "#/components/responses/NotFound"
2089
+ },
2090
+ "429": {
2091
+ $ref: "#/components/responses/RateLimitExceeded"
2092
+ }
2093
+ }
2094
+ }
2095
+ },
1964
2096
  "/v1/documents/upload-session": {
1965
2097
  post: {
1966
2098
  operationId: "createUploadSession",
@@ -3170,6 +3302,73 @@ var openapi_default = {
3170
3302
  }
3171
3303
  }
3172
3304
  },
3305
+ "/v1/jobs/{id}/documents/{documentId}": {
3306
+ delete: {
3307
+ tags: [
3308
+ "Jobs & Batches"
3309
+ ],
3310
+ summary: "Take a document out of a structuring run",
3311
+ description: "Removes one document from a structuring run. Held to the web route's tier; a document the caller's person may not change answers like one not in the run (404).\n",
3312
+ operationId: "removeJobDocument",
3313
+ "x-audience": "public",
3314
+ "x-required-scopes": [
3315
+ "runs:write"
3316
+ ],
3317
+ security: [
3318
+ {
3319
+ BearerAuth: []
3320
+ }
3321
+ ],
3322
+ parameters: [
3323
+ {
3324
+ name: "id",
3325
+ in: "path",
3326
+ required: true,
3327
+ schema: {
3328
+ type: "string",
3329
+ format: "uuid"
3330
+ }
3331
+ },
3332
+ {
3333
+ name: "documentId",
3334
+ in: "path",
3335
+ required: true,
3336
+ schema: {
3337
+ type: "string",
3338
+ format: "uuid"
3339
+ }
3340
+ }
3341
+ ],
3342
+ responses: {
3343
+ "200": {
3344
+ description: "Removed",
3345
+ content: {
3346
+ "application/json": {
3347
+ schema: {
3348
+ type: "object",
3349
+ additionalProperties: true
3350
+ }
3351
+ }
3352
+ }
3353
+ },
3354
+ "400": {
3355
+ $ref: "#/components/responses/BadRequest"
3356
+ },
3357
+ "401": {
3358
+ $ref: "#/components/responses/Unauthorized"
3359
+ },
3360
+ "403": {
3361
+ $ref: "#/components/responses/Forbidden"
3362
+ },
3363
+ "404": {
3364
+ $ref: "#/components/responses/NotFound"
3365
+ },
3366
+ "429": {
3367
+ $ref: "#/components/responses/RateLimitExceeded"
3368
+ }
3369
+ }
3370
+ }
3371
+ },
3173
3372
  "/v1/jobs/{id}": {
3174
3373
  get: {
3175
3374
  operationId: "getJob",
@@ -24047,6 +24246,64 @@ var openapi_default = {
24047
24246
  }
24048
24247
  }
24049
24248
  },
24249
+ "/v1/documents/{id}/claims/recompute": {
24250
+ post: {
24251
+ tags: [
24252
+ "Provenance"
24253
+ ],
24254
+ summary: "Rebuild a document's claims",
24255
+ description: "Rebuilds the document's claims from its current captured fields. A document the caller's person may not change answers as a missing one does (`claims: 0`).\n",
24256
+ operationId: "recomputeDocumentClaims",
24257
+ "x-audience": "public",
24258
+ "x-required-scopes": [
24259
+ "documents:write"
24260
+ ],
24261
+ security: [
24262
+ {
24263
+ BearerAuth: []
24264
+ }
24265
+ ],
24266
+ parameters: [
24267
+ {
24268
+ name: "id",
24269
+ in: "path",
24270
+ required: true,
24271
+ schema: {
24272
+ type: "string",
24273
+ format: "uuid"
24274
+ }
24275
+ }
24276
+ ],
24277
+ responses: {
24278
+ "200": {
24279
+ description: "Rebuilt",
24280
+ content: {
24281
+ "application/json": {
24282
+ schema: {
24283
+ type: "object",
24284
+ additionalProperties: true
24285
+ }
24286
+ }
24287
+ }
24288
+ },
24289
+ "400": {
24290
+ $ref: "#/components/responses/BadRequest"
24291
+ },
24292
+ "401": {
24293
+ $ref: "#/components/responses/Unauthorized"
24294
+ },
24295
+ "403": {
24296
+ $ref: "#/components/responses/Forbidden"
24297
+ },
24298
+ "404": {
24299
+ $ref: "#/components/responses/NotFound"
24300
+ },
24301
+ "429": {
24302
+ $ref: "#/components/responses/RateLimitExceeded"
24303
+ }
24304
+ }
24305
+ }
24306
+ },
24050
24307
  "/v1/documents/{id}/claims": {
24051
24308
  get: {
24052
24309
  tags: [
@@ -31229,6 +31486,7 @@ var openapi_default = {
31229
31486
  operationId: "getAppRunEvents",
31230
31487
  "x-audience": "public",
31231
31488
  summary: "Run journal (append-only, ordered)",
31489
+ description: "404 when the run names a document the caller cannot read (the journal carries the decision).",
31232
31490
  tags: [
31233
31491
  "Apps"
31234
31492
  ],
@@ -31246,6 +31504,9 @@ var openapi_default = {
31246
31504
  responses: {
31247
31505
  "200": {
31248
31506
  description: "Journal events."
31507
+ },
31508
+ "404": {
31509
+ $ref: "#/components/responses/NotFound"
31249
31510
  }
31250
31511
  }
31251
31512
  }
@@ -31758,7 +32019,7 @@ var openapi_default = {
31758
32019
  operationId: "getAppRunRecord",
31759
32020
  "x-audience": "public",
31760
32021
  summary: "Sealed decision record (the export; 404 until the run seals)",
31761
- description: "Reading the sealed record is an audited export (app.record_exported).",
32022
+ description: "Reading the sealed record is an audited export (app.record_exported). 404 also when the run names a document the caller cannot read.",
31762
32023
  tags: [
31763
32024
  "Apps"
31764
32025
  ],
@@ -65164,7 +65425,7 @@ var openapi_default = {
65164
65425
  "Documents"
65165
65426
  ],
65166
65427
  summary: "Process a skipped duplicate anyway",
65167
- description: "Creates a new document that reuses an existing document's content and values, without reading the file again. The existing document must be visible to the key's person. Send an `Idempotency-Key` header to make retries safe: the same key within 24 hours answers the first copy (200, `Idempotent-Replayed: true`) instead of creating another; the same key for another existing document answers 409 `idempotency_key_reused`, a retry while the first call still runs 409 `idempotency_in_progress`. Requires the `documents:write` scope. The key's person needs the `ingest` permission (Contract Management and above by default), as in the web app.",
65428
+ description: "Creates a new document that reuses an existing document's content and values, without reading the file again. The existing document must be visible to the key's person. Send an `Idempotency-Key` header to make retries safe: the same request with the same key from the same API key within 24 hours returns the first copy with its original status and `Idempotent-Replayed: true` instead of creating another; the same key with a different body, or from another API key, answers 422 `idempotency_key_reused`; a retry while the first call still runs answers 409 `idempotency_request_in_progress`. Requires the `documents:write` scope. The key's person needs the `ingest` permission (Contract Management and above by default), as in the web app.",
65168
65429
  security: [
65169
65430
  {
65170
65431
  BearerAuth: []
@@ -65175,14 +65436,7 @@ var openapi_default = {
65175
65436
  ],
65176
65437
  parameters: [
65177
65438
  {
65178
- name: "Idempotency-Key",
65179
- in: "header",
65180
- required: false,
65181
- description: "Up to 255 characters; remembered for 24 hours per workspace.",
65182
- schema: {
65183
- type: "string",
65184
- maxLength: 255
65185
- }
65439
+ $ref: "#/components/parameters/IdempotencyKey"
65186
65440
  }
65187
65441
  ],
65188
65442
  requestBody: {
@@ -65220,19 +65474,20 @@ var openapi_default = {
65220
65474
  }
65221
65475
  },
65222
65476
  responses: {
65223
- "200": {
65224
- description: "A retry with the same Idempotency-Key: the first copy, with the header `Idempotent-Replayed: true`.",
65225
- content: {
65226
- "application/json": {
65477
+ "201": {
65478
+ description: "The new document. On a retry with the same Idempotency-Key, the first copy with `Idempotent-Replayed: true`.",
65479
+ headers: {
65480
+ "Idempotent-Replayed": {
65227
65481
  schema: {
65228
- type: "object",
65229
- additionalProperties: true
65230
- }
65482
+ type: "string",
65483
+ enum: [
65484
+ "true",
65485
+ "false"
65486
+ ]
65487
+ },
65488
+ description: "`true` when the body is the stored answer to an earlier request with the same key."
65231
65489
  }
65232
- }
65233
- },
65234
- "201": {
65235
- description: "OK",
65490
+ },
65236
65491
  content: {
65237
65492
  "application/json": {
65238
65493
  schema: {
@@ -65272,13 +65527,13 @@ var openapi_default = {
65272
65527
  $ref: "#/components/responses/Forbidden"
65273
65528
  },
65274
65529
  "409": {
65275
- description: "`idempotency_key_reused` or `idempotency_in_progress` (retry shortly)."
65530
+ description: "`idempotency_request_in_progress`: a request with the same Idempotency-Key is still running; retry shortly."
65531
+ },
65532
+ "422": {
65533
+ description: "`idempotency_key_reused`: the Idempotency-Key was already used for a different request or by another API key."
65276
65534
  },
65277
65535
  "429": {
65278
65536
  $ref: "#/components/responses/RateLimitExceeded"
65279
- },
65280
- "503": {
65281
- description: "`idempotency_unavailable`: a request with an Idempotency-Key cannot be guaranteed right now; retry shortly."
65282
65537
  }
65283
65538
  }
65284
65539
  }
@@ -65588,7 +65843,7 @@ var openapi_default = {
65588
65843
  "Documents"
65589
65844
  ],
65590
65845
  summary: "Tag many documents at once",
65591
- description: "Adds, removes or sets tags on up to 1000 documents. All or nothing: one hidden or missing document refuses the whole batch with 404 and nothing changes. Answers each document's resulting tags and the id of the audit event recorded for the change. Requires the `documents:write` scope. The key's person must be an Admin of the workspace, as in the web app; in a workspace whose model configuration Talonic manages this answers 403 `insufficient_role`.",
65846
+ description: "Adds, removes or sets tags on up to 1000 documents. Tags the documents the key's person may classify; the others (hidden, missing, or on access scopes held by someone else) are listed in `refused` and answer `status: refused` without their tags, and nothing changes on them. Answers each tagged document's resulting tags and the id of the audit event recorded for the change. Requires the `documents:write` scope. The key's person must be an Admin of the workspace, as in the web app; in a workspace whose model configuration Talonic manages this answers 403 `insufficient_role`.",
65592
65847
  security: [
65593
65848
  {
65594
65849
  BearerAuth: []
@@ -65659,6 +65914,13 @@ var openapi_default = {
65659
65914
  type: "string"
65660
65915
  }
65661
65916
  },
65917
+ refused: {
65918
+ type: "array",
65919
+ items: {
65920
+ type: "string",
65921
+ format: "uuid"
65922
+ }
65923
+ },
65662
65924
  results: {
65663
65925
  type: "array",
65664
65926
  items: {
@@ -65671,7 +65933,8 @@ var openapi_default = {
65671
65933
  status: {
65672
65934
  type: "string",
65673
65935
  enum: [
65674
- "updated"
65936
+ "updated",
65937
+ "refused"
65675
65938
  ]
65676
65939
  },
65677
65940
  tags: {
@@ -70629,6 +70892,64 @@ var openapi_default = {
70629
70892
  }
70630
70893
  }
70631
70894
  },
70895
+ "/v1/documents/{id}/relation-claims/recompute": {
70896
+ post: {
70897
+ tags: [
70898
+ "Cases"
70899
+ ],
70900
+ summary: "Rebuild a document's relation claims",
70901
+ description: "Rebuilds the document's relation-claims ledger from its raw extraction, then resolves it when resolution is on. Needs the person's member tier; a document they may not change answers like a missing one (nothing rebuilt).\n",
70902
+ operationId: "recomputeDocumentRelationClaims",
70903
+ "x-audience": "public",
70904
+ "x-required-scopes": [
70905
+ "cases:write"
70906
+ ],
70907
+ security: [
70908
+ {
70909
+ BearerAuth: []
70910
+ }
70911
+ ],
70912
+ parameters: [
70913
+ {
70914
+ name: "id",
70915
+ in: "path",
70916
+ required: true,
70917
+ schema: {
70918
+ type: "string",
70919
+ format: "uuid"
70920
+ }
70921
+ }
70922
+ ],
70923
+ responses: {
70924
+ "200": {
70925
+ description: "Rebuilt",
70926
+ content: {
70927
+ "application/json": {
70928
+ schema: {
70929
+ type: "object",
70930
+ additionalProperties: true
70931
+ }
70932
+ }
70933
+ }
70934
+ },
70935
+ "400": {
70936
+ $ref: "#/components/responses/BadRequest"
70937
+ },
70938
+ "401": {
70939
+ $ref: "#/components/responses/Unauthorized"
70940
+ },
70941
+ "403": {
70942
+ $ref: "#/components/responses/Forbidden"
70943
+ },
70944
+ "404": {
70945
+ $ref: "#/components/responses/NotFound"
70946
+ },
70947
+ "429": {
70948
+ $ref: "#/components/responses/RateLimitExceeded"
70949
+ }
70950
+ }
70951
+ }
70952
+ },
70632
70953
  "/v1/relation-claims/cases": {
70633
70954
  get: {
70634
70955
  operationId: "listReferenceCases",
@@ -81854,6 +82175,107 @@ var openapi_default = {
81854
82175
  }
81855
82176
  }
81856
82177
  },
82178
+ "/v1/me/data/groups": {
82179
+ get: {
82180
+ operationId: "listMeDataGroups",
82181
+ "x-audience": "public",
82182
+ "x-required-scopes": [
82183
+ "documents:read"
82184
+ ],
82185
+ summary: "Group your data",
82186
+ description: "Your uploads or the values read out of them, counted per group (`by` source, document type, month or, for values, field) and per who can see them; narrow with the group parameters.\n",
82187
+ tags: [
82188
+ "My Data"
82189
+ ],
82190
+ parameters: [
82191
+ {
82192
+ name: "kind",
82193
+ in: "query",
82194
+ required: true,
82195
+ schema: {
82196
+ type: "string",
82197
+ enum: [
82198
+ "uploads",
82199
+ "extracted"
82200
+ ]
82201
+ }
82202
+ },
82203
+ {
82204
+ name: "by",
82205
+ in: "query",
82206
+ schema: {
82207
+ type: "string",
82208
+ enum: [
82209
+ "source",
82210
+ "type",
82211
+ "month",
82212
+ "field",
82213
+ "all"
82214
+ ],
82215
+ default: "all"
82216
+ }
82217
+ },
82218
+ {
82219
+ name: "source",
82220
+ in: "query",
82221
+ description: "A source id, or `none`.",
82222
+ schema: {
82223
+ type: "string"
82224
+ }
82225
+ },
82226
+ {
82227
+ name: "type",
82228
+ in: "query",
82229
+ description: "A document type id, or `none`.",
82230
+ schema: {
82231
+ type: "string"
82232
+ }
82233
+ },
82234
+ {
82235
+ name: "month",
82236
+ in: "query",
82237
+ description: "Month, `YYYY-MM`.",
82238
+ schema: {
82239
+ type: "string",
82240
+ pattern: "^\\d{4}-(0[1-9]|1[0-2])$"
82241
+ }
82242
+ },
82243
+ {
82244
+ name: "field",
82245
+ in: "query",
82246
+ description: "A field id, or `none`.",
82247
+ schema: {
82248
+ type: "string"
82249
+ }
82250
+ }
82251
+ ],
82252
+ responses: {
82253
+ "200": {
82254
+ description: "OK",
82255
+ content: {
82256
+ "application/json": {
82257
+ schema: {
82258
+ type: "object",
82259
+ additionalProperties: true
82260
+ }
82261
+ }
82262
+ }
82263
+ },
82264
+ "400": {
82265
+ $ref: "#/components/responses/BadRequest"
82266
+ },
82267
+ "401": {
82268
+ $ref: "#/components/responses/Unauthorized"
82269
+ },
82270
+ "403": {
82271
+ $ref: "#/components/responses/Forbidden"
82272
+ },
82273
+ "429": {
82274
+ $ref: "#/components/responses/RateLimitExceeded"
82275
+ }
82276
+ }
82277
+ }
82278
+ },
81857
82279
  "/v1/me/data/items": {
81858
82280
  get: {
81859
82281
  operationId: "listMeDataItems",
@@ -81862,7 +82284,7 @@ var openapi_default = {
81862
82284
  "documents:read"
81863
82285
  ],
81864
82286
  summary: "List your data items",
81865
- description: "What one kind of your data stands for (`uploads` or `extracted`), a page at a time, or one item by `id`.\n",
82287
+ description: "A page of one group of your uploads or values, newest first: pass the `next` cursor of a page as `after` for the following one. Or one item by `id`.\n",
81866
82288
  tags: [
81867
82289
  "My Data"
81868
82290
  ],
@@ -81886,9 +82308,1638 @@ var openapi_default = {
81886
82308
  type: "string"
81887
82309
  }
81888
82310
  },
82311
+ {
82312
+ name: "source",
82313
+ in: "query",
82314
+ description: "A source id, or `none`.",
82315
+ schema: {
82316
+ type: "string"
82317
+ }
82318
+ },
82319
+ {
82320
+ name: "type",
82321
+ in: "query",
82322
+ description: "A document type id, or `none`.",
82323
+ schema: {
82324
+ type: "string"
82325
+ }
82326
+ },
82327
+ {
82328
+ name: "month",
82329
+ in: "query",
82330
+ description: "Month, `YYYY-MM`.",
82331
+ schema: {
82332
+ type: "string",
82333
+ pattern: "^\\d{4}-(0[1-9]|1[0-2])$"
82334
+ }
82335
+ },
82336
+ {
82337
+ name: "field",
82338
+ in: "query",
82339
+ description: "A field id, or `none`.",
82340
+ schema: {
82341
+ type: "string"
82342
+ }
82343
+ },
82344
+ {
82345
+ name: "vis",
82346
+ in: "query",
82347
+ schema: {
82348
+ type: "string",
82349
+ enum: [
82350
+ "me",
82351
+ "shared",
82352
+ "company"
82353
+ ]
82354
+ }
82355
+ },
82356
+ {
82357
+ name: "after",
82358
+ in: "query",
82359
+ schema: {
82360
+ type: "string"
82361
+ }
82362
+ },
82363
+ {
82364
+ name: "limit",
82365
+ in: "query",
82366
+ schema: {
82367
+ type: "integer",
82368
+ minimum: 1,
82369
+ default: 50
82370
+ }
82371
+ }
82372
+ ],
82373
+ responses: {
82374
+ "200": {
82375
+ description: "OK",
82376
+ content: {
82377
+ "application/json": {
82378
+ schema: {
82379
+ type: "object",
82380
+ additionalProperties: true
82381
+ }
82382
+ }
82383
+ }
82384
+ },
82385
+ "400": {
82386
+ $ref: "#/components/responses/BadRequest"
82387
+ },
82388
+ "401": {
82389
+ $ref: "#/components/responses/Unauthorized"
82390
+ },
82391
+ "403": {
82392
+ $ref: "#/components/responses/Forbidden"
82393
+ },
82394
+ "429": {
82395
+ $ref: "#/components/responses/RateLimitExceeded"
82396
+ }
82397
+ }
82398
+ }
82399
+ },
82400
+ "/v1/me/workspace-data": {
82401
+ get: {
82402
+ operationId: "getMeWorkspaceData",
82403
+ "x-audience": "public",
82404
+ "x-required-scopes": [
82405
+ "documents:read"
82406
+ ],
82407
+ summary: "Count workspace data by owner",
82408
+ description: "The workspace's documents, fields and data points you can see, counted by whose they are: `me`, `shared` with you, or `company`.\n",
82409
+ tags: [
82410
+ "My Data"
82411
+ ],
82412
+ responses: {
82413
+ "200": {
82414
+ description: "OK",
82415
+ content: {
82416
+ "application/json": {
82417
+ schema: {
82418
+ type: "object",
82419
+ additionalProperties: true
82420
+ }
82421
+ }
82422
+ }
82423
+ },
82424
+ "401": {
82425
+ $ref: "#/components/responses/Unauthorized"
82426
+ },
82427
+ "403": {
82428
+ $ref: "#/components/responses/Forbidden"
82429
+ },
82430
+ "429": {
82431
+ $ref: "#/components/responses/RateLimitExceeded"
82432
+ }
82433
+ }
82434
+ }
82435
+ },
82436
+ "/v1/governance/directory": {
82437
+ get: {
82438
+ operationId: "getAccessDirectory",
82439
+ "x-audience": "public",
82440
+ "x-required-scopes": [
82441
+ "access:read"
82442
+ ],
82443
+ summary: "List sources and their holders",
82444
+ description: "Every source and every person's uploads in the workspace with who holds each, and the caller's standing on it (held, through a team, licensed, an open request). Never items or counts.\n",
82445
+ tags: [
82446
+ "Access & sharing"
82447
+ ],
82448
+ responses: {
82449
+ "200": {
82450
+ description: "OK",
82451
+ content: {
82452
+ "application/json": {
82453
+ schema: {
82454
+ type: "object",
82455
+ additionalProperties: true
82456
+ }
82457
+ }
82458
+ }
82459
+ },
82460
+ "401": {
82461
+ $ref: "#/components/responses/Unauthorized"
82462
+ },
82463
+ "403": {
82464
+ $ref: "#/components/responses/Forbidden"
82465
+ },
82466
+ "429": {
82467
+ $ref: "#/components/responses/RateLimitExceeded"
82468
+ }
82469
+ }
82470
+ }
82471
+ },
82472
+ "/v1/governance/access-requests": {
82473
+ get: {
82474
+ operationId: "listAccessRequests",
82475
+ "x-audience": "public",
82476
+ "x-required-scopes": [
82477
+ "access:read"
82478
+ ],
82479
+ summary: "List access requests",
82480
+ description: "The caller's own requests (`mine`), those on scopes they decide on (`for_my_scopes`) and, for the workspace's data protection officer, those waiting for the second decision (`to_second`).\n",
82481
+ tags: [
82482
+ "Access & sharing"
82483
+ ],
82484
+ responses: {
82485
+ "200": {
82486
+ description: "OK",
82487
+ content: {
82488
+ "application/json": {
82489
+ schema: {
82490
+ type: "object",
82491
+ additionalProperties: true
82492
+ }
82493
+ }
82494
+ }
82495
+ },
82496
+ "401": {
82497
+ $ref: "#/components/responses/Unauthorized"
82498
+ },
82499
+ "403": {
82500
+ $ref: "#/components/responses/Forbidden"
82501
+ },
82502
+ "429": {
82503
+ $ref: "#/components/responses/RateLimitExceeded"
82504
+ }
82505
+ }
82506
+ },
82507
+ post: {
82508
+ operationId: "createAccessRequest",
82509
+ "x-audience": "public",
82510
+ "x-required-scopes": [
82511
+ "access:write"
82512
+ ],
82513
+ summary: "Ask for access",
82514
+ description: "Ask the holder of a source, of a person's uploads, or of one document in them for time-limited access. Exactly one of `scope_id` / `source_connection_id`; `document_id` narrows the request to one document. A document that does not exist and one the caller may not see answer alike (404).\n",
82515
+ tags: [
82516
+ "Access & sharing"
82517
+ ],
82518
+ requestBody: {
82519
+ required: true,
82520
+ content: {
82521
+ "application/json": {
82522
+ schema: {
82523
+ type: "object",
82524
+ required: [
82525
+ "purpose",
82526
+ "duration_days"
82527
+ ],
82528
+ properties: {
82529
+ scope_id: {
82530
+ type: "string",
82531
+ pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
82532
+ description: "An access scope (8-4-4-4-12 hex; version digits are arbitrary)."
82533
+ },
82534
+ source_connection_id: {
82535
+ type: "string",
82536
+ format: "uuid"
82537
+ },
82538
+ document_id: {
82539
+ type: "string",
82540
+ format: "uuid"
82541
+ },
82542
+ purpose: {
82543
+ type: "string",
82544
+ maxLength: 500
82545
+ },
82546
+ duration_days: {
82547
+ type: "integer",
82548
+ minimum: 1,
82549
+ maximum: 90
82550
+ },
82551
+ capabilities: {
82552
+ type: "array",
82553
+ items: {
82554
+ type: "string",
82555
+ enum: [
82556
+ "delete",
82557
+ "discover",
82558
+ "read",
82559
+ "write"
82560
+ ]
82561
+ }
82562
+ }
82563
+ }
82564
+ }
82565
+ }
82566
+ }
82567
+ },
82568
+ responses: {
82569
+ "201": {
82570
+ description: "Created",
82571
+ content: {
82572
+ "application/json": {
82573
+ schema: {
82574
+ type: "object",
82575
+ additionalProperties: true
82576
+ }
82577
+ }
82578
+ }
82579
+ },
82580
+ "400": {
82581
+ $ref: "#/components/responses/BadRequest"
82582
+ },
82583
+ "401": {
82584
+ $ref: "#/components/responses/Unauthorized"
82585
+ },
82586
+ "403": {
82587
+ $ref: "#/components/responses/Forbidden"
82588
+ },
82589
+ "404": {
82590
+ $ref: "#/components/responses/NotFound"
82591
+ },
82592
+ "409": {
82593
+ $ref: "#/components/responses/Conflict"
82594
+ },
82595
+ "429": {
82596
+ $ref: "#/components/responses/RateLimitExceeded"
82597
+ }
82598
+ }
82599
+ }
82600
+ },
82601
+ "/v1/governance/access-requests/{id}/approve": {
82602
+ post: {
82603
+ operationId: "approveAccessRequest",
82604
+ "x-audience": "public",
82605
+ "x-required-scopes": [
82606
+ "access:write"
82607
+ ],
82608
+ summary: "Approve an access request",
82609
+ description: "A holder of the request's scope approves: a licence on the scope, or a share of the one document for an item request.\n",
82610
+ tags: [
82611
+ "Access & sharing"
82612
+ ],
82613
+ parameters: [
82614
+ {
82615
+ name: "id",
82616
+ in: "path",
82617
+ required: true,
82618
+ schema: {
82619
+ type: "string",
82620
+ format: "uuid"
82621
+ }
82622
+ }
82623
+ ],
82624
+ responses: {
82625
+ "200": {
82626
+ description: "OK",
82627
+ content: {
82628
+ "application/json": {
82629
+ schema: {
82630
+ type: "object",
82631
+ additionalProperties: true
82632
+ }
82633
+ }
82634
+ }
82635
+ },
82636
+ "400": {
82637
+ $ref: "#/components/responses/BadRequest"
82638
+ },
82639
+ "401": {
82640
+ $ref: "#/components/responses/Unauthorized"
82641
+ },
82642
+ "403": {
82643
+ $ref: "#/components/responses/Forbidden"
82644
+ },
82645
+ "404": {
82646
+ $ref: "#/components/responses/NotFound"
82647
+ },
82648
+ "409": {
82649
+ $ref: "#/components/responses/Conflict"
82650
+ },
82651
+ "429": {
82652
+ $ref: "#/components/responses/RateLimitExceeded"
82653
+ }
82654
+ }
82655
+ }
82656
+ },
82657
+ "/v1/governance/access-requests/{id}/deny": {
82658
+ post: {
82659
+ operationId: "denyAccessRequest",
82660
+ "x-audience": "public",
82661
+ "x-required-scopes": [
82662
+ "access:write"
82663
+ ],
82664
+ summary: "Deny an access request",
82665
+ description: "A holder of the request's scope refuses a pending request, with a reason.\n",
82666
+ tags: [
82667
+ "Access & sharing"
82668
+ ],
82669
+ parameters: [
82670
+ {
82671
+ name: "id",
82672
+ in: "path",
82673
+ required: true,
82674
+ schema: {
82675
+ type: "string",
82676
+ format: "uuid"
82677
+ }
82678
+ }
82679
+ ],
82680
+ requestBody: {
82681
+ required: true,
82682
+ content: {
82683
+ "application/json": {
82684
+ schema: {
82685
+ type: "object",
82686
+ required: [
82687
+ "reason"
82688
+ ],
82689
+ properties: {
82690
+ reason: {
82691
+ type: "string",
82692
+ maxLength: 500
82693
+ }
82694
+ }
82695
+ }
82696
+ }
82697
+ }
82698
+ },
82699
+ responses: {
82700
+ "200": {
82701
+ description: "OK",
82702
+ content: {
82703
+ "application/json": {
82704
+ schema: {
82705
+ type: "object",
82706
+ additionalProperties: true
82707
+ }
82708
+ }
82709
+ }
82710
+ },
82711
+ "400": {
82712
+ $ref: "#/components/responses/BadRequest"
82713
+ },
82714
+ "401": {
82715
+ $ref: "#/components/responses/Unauthorized"
82716
+ },
82717
+ "403": {
82718
+ $ref: "#/components/responses/Forbidden"
82719
+ },
82720
+ "404": {
82721
+ $ref: "#/components/responses/NotFound"
82722
+ },
82723
+ "409": {
82724
+ $ref: "#/components/responses/Conflict"
82725
+ },
82726
+ "429": {
82727
+ $ref: "#/components/responses/RateLimitExceeded"
82728
+ }
82729
+ }
82730
+ }
82731
+ },
82732
+ "/v1/governance/access-requests/{id}/second": {
82733
+ post: {
82734
+ operationId: "secondAccessRequest",
82735
+ "x-audience": "public",
82736
+ "x-required-scopes": [
82737
+ "access:write"
82738
+ ],
82739
+ summary: "Decide an access request as data protection officer",
82740
+ description: "The workspace's data protection officer decides after the holder approved: `ok` true opens it, false refuses it, with `text` as the reason or note.\n",
82741
+ tags: [
82742
+ "Access & sharing"
82743
+ ],
82744
+ parameters: [
82745
+ {
82746
+ name: "id",
82747
+ in: "path",
82748
+ required: true,
82749
+ schema: {
82750
+ type: "string",
82751
+ format: "uuid"
82752
+ }
82753
+ }
82754
+ ],
82755
+ requestBody: {
82756
+ required: true,
82757
+ content: {
82758
+ "application/json": {
82759
+ schema: {
82760
+ type: "object",
82761
+ required: [
82762
+ "ok",
82763
+ "text"
82764
+ ],
82765
+ properties: {
82766
+ ok: {
82767
+ type: "boolean"
82768
+ },
82769
+ text: {
82770
+ type: "string"
82771
+ }
82772
+ }
82773
+ }
82774
+ }
82775
+ }
82776
+ },
82777
+ responses: {
82778
+ "200": {
82779
+ description: "OK",
82780
+ content: {
82781
+ "application/json": {
82782
+ schema: {
82783
+ type: "object",
82784
+ additionalProperties: true
82785
+ }
82786
+ }
82787
+ }
82788
+ },
82789
+ "400": {
82790
+ $ref: "#/components/responses/BadRequest"
82791
+ },
82792
+ "401": {
82793
+ $ref: "#/components/responses/Unauthorized"
82794
+ },
82795
+ "403": {
82796
+ $ref: "#/components/responses/Forbidden"
82797
+ },
82798
+ "404": {
82799
+ $ref: "#/components/responses/NotFound"
82800
+ },
82801
+ "409": {
82802
+ $ref: "#/components/responses/Conflict"
82803
+ },
82804
+ "429": {
82805
+ $ref: "#/components/responses/RateLimitExceeded"
82806
+ }
82807
+ }
82808
+ }
82809
+ },
82810
+ "/v1/governance/access-requests/{id}/stop": {
82811
+ post: {
82812
+ operationId: "stopAccessRequest",
82813
+ "x-audience": "public",
82814
+ "x-required-scopes": [
82815
+ "access:write"
82816
+ ],
82817
+ summary: "Stop an access request",
82818
+ description: "The requester or a holder ends an approved request; its licence or document share is revoked.\n",
82819
+ tags: [
82820
+ "Access & sharing"
82821
+ ],
82822
+ parameters: [
82823
+ {
82824
+ name: "id",
82825
+ in: "path",
82826
+ required: true,
82827
+ schema: {
82828
+ type: "string",
82829
+ format: "uuid"
82830
+ }
82831
+ }
82832
+ ],
82833
+ responses: {
82834
+ "200": {
82835
+ description: "OK",
82836
+ content: {
82837
+ "application/json": {
82838
+ schema: {
82839
+ type: "object",
82840
+ additionalProperties: true
82841
+ }
82842
+ }
82843
+ }
82844
+ },
82845
+ "400": {
82846
+ $ref: "#/components/responses/BadRequest"
82847
+ },
82848
+ "401": {
82849
+ $ref: "#/components/responses/Unauthorized"
82850
+ },
82851
+ "403": {
82852
+ $ref: "#/components/responses/Forbidden"
82853
+ },
82854
+ "404": {
82855
+ $ref: "#/components/responses/NotFound"
82856
+ },
82857
+ "409": {
82858
+ $ref: "#/components/responses/Conflict"
82859
+ },
82860
+ "429": {
82861
+ $ref: "#/components/responses/RateLimitExceeded"
82862
+ }
82863
+ }
82864
+ }
82865
+ },
82866
+ "/v1/governance/sharing": {
82867
+ get: {
82868
+ operationId: "getSharing",
82869
+ "x-audience": "public",
82870
+ "x-required-scopes": [
82871
+ "access:read"
82872
+ ],
82873
+ summary: "List shares",
82874
+ description: "Whether sharing applies in this workspace (`available`), the shares the caller gave (`given`) and the shares naming the caller (`received`).\n",
82875
+ tags: [
82876
+ "Access & sharing"
82877
+ ],
82878
+ responses: {
82879
+ "200": {
82880
+ description: "OK",
82881
+ content: {
82882
+ "application/json": {
82883
+ schema: {
82884
+ type: "object",
82885
+ additionalProperties: true
82886
+ }
82887
+ }
82888
+ }
82889
+ },
82890
+ "401": {
82891
+ $ref: "#/components/responses/Unauthorized"
82892
+ },
82893
+ "403": {
82894
+ $ref: "#/components/responses/Forbidden"
82895
+ },
82896
+ "429": {
82897
+ $ref: "#/components/responses/RateLimitExceeded"
82898
+ }
82899
+ }
82900
+ }
82901
+ },
82902
+ "/v1/governance/documents/{id}/access": {
82903
+ get: {
82904
+ operationId: "getDocumentAccess",
82905
+ "x-audience": "public",
82906
+ "x-required-scopes": [
82907
+ "access:read"
82908
+ ],
82909
+ summary: "What you may do with a document",
82910
+ description: "For a document the caller can read: whether they may share it, write it and classify it (change its tags; a holder of its access scope only), and `pass_on`: whether they may pass it on (a share they received as a person with `may_pass_on`, its chain intact; false while the workspace's sub-shares switch is off). `managed: false` when the workspace is not on access scopes. A hidden document and a missing one answer 404 alike.\n",
82911
+ tags: [
82912
+ "Access & sharing"
82913
+ ],
82914
+ parameters: [
82915
+ {
82916
+ name: "id",
82917
+ in: "path",
82918
+ required: true,
82919
+ schema: {
82920
+ type: "string",
82921
+ format: "uuid"
82922
+ }
82923
+ }
82924
+ ],
82925
+ responses: {
82926
+ "200": {
82927
+ description: "OK",
82928
+ content: {
82929
+ "application/json": {
82930
+ schema: {
82931
+ type: "object",
82932
+ properties: {
82933
+ managed: {
82934
+ type: "boolean"
82935
+ },
82936
+ share: {
82937
+ type: "boolean"
82938
+ },
82939
+ write: {
82940
+ type: "boolean"
82941
+ },
82942
+ classify: {
82943
+ type: "boolean"
82944
+ }
82945
+ }
82946
+ }
82947
+ }
82948
+ }
82949
+ },
82950
+ "401": {
82951
+ $ref: "#/components/responses/Unauthorized"
82952
+ },
82953
+ "403": {
82954
+ $ref: "#/components/responses/Forbidden"
82955
+ },
82956
+ "404": {
82957
+ $ref: "#/components/responses/NotFound"
82958
+ },
82959
+ "429": {
82960
+ $ref: "#/components/responses/RateLimitExceeded"
82961
+ }
82962
+ }
82963
+ }
82964
+ },
82965
+ "/v1/governance/documents/{id}/shares": {
82966
+ get: {
82967
+ operationId: "listDocumentShares",
82968
+ "x-audience": "public",
82969
+ "x-required-scopes": [
82970
+ "access:read"
82971
+ ],
82972
+ summary: "List who a document is shared with",
82973
+ description: "The document shares of a document the caller holds, and the whole-scope shares of its scope. 404 when the caller does not hold it.\n",
82974
+ tags: [
82975
+ "Access & sharing"
82976
+ ],
82977
+ parameters: [
82978
+ {
82979
+ name: "id",
82980
+ in: "path",
82981
+ required: true,
82982
+ schema: {
82983
+ type: "string",
82984
+ format: "uuid"
82985
+ }
82986
+ }
82987
+ ],
82988
+ responses: {
82989
+ "200": {
82990
+ description: "OK",
82991
+ content: {
82992
+ "application/json": {
82993
+ schema: {
82994
+ type: "object",
82995
+ additionalProperties: true
82996
+ }
82997
+ }
82998
+ }
82999
+ },
83000
+ "401": {
83001
+ $ref: "#/components/responses/Unauthorized"
83002
+ },
83003
+ "403": {
83004
+ $ref: "#/components/responses/Forbidden"
83005
+ },
83006
+ "404": {
83007
+ $ref: "#/components/responses/NotFound"
83008
+ },
83009
+ "429": {
83010
+ $ref: "#/components/responses/RateLimitExceeded"
83011
+ }
83012
+ }
83013
+ }
83014
+ },
83015
+ "/v1/governance/shares/documents": {
83016
+ post: {
83017
+ operationId: "shareDocuments",
83018
+ "x-audience": "public",
83019
+ "x-required-scopes": [
83020
+ "access:write"
83021
+ ],
83022
+ summary: "Share documents",
83023
+ description: "Share documents the caller holds with a member, a workspace group or everyone, for reading, for `duration_days` or until stopped. Sharing a document again with the same principal replaces its window and note. Everything else in the workspace's access rules still applies to the recipient.\n",
83024
+ tags: [
83025
+ "Access & sharing"
83026
+ ],
83027
+ requestBody: {
83028
+ required: true,
83029
+ content: {
83030
+ "application/json": {
83031
+ schema: {
83032
+ type: "object",
83033
+ required: [
83034
+ "document_ids",
83035
+ "to"
83036
+ ],
83037
+ properties: {
83038
+ document_ids: {
83039
+ type: "array",
83040
+ minItems: 1,
83041
+ maxItems: 200,
83042
+ items: {
83043
+ type: "string",
83044
+ format: "uuid"
83045
+ }
83046
+ },
83047
+ to: {
83048
+ type: "object",
83049
+ required: [
83050
+ "type"
83051
+ ],
83052
+ properties: {
83053
+ type: {
83054
+ type: "string",
83055
+ enum: [
83056
+ "person",
83057
+ "group",
83058
+ "everyone"
83059
+ ]
83060
+ },
83061
+ id: {
83062
+ type: "string",
83063
+ format: "uuid",
83064
+ description: "The member or group; absent for everyone."
83065
+ }
83066
+ }
83067
+ },
83068
+ duration_days: {
83069
+ type: "integer",
83070
+ minimum: 1,
83071
+ maximum: 365,
83072
+ nullable: true
83073
+ },
83074
+ note: {
83075
+ type: "string",
83076
+ maxLength: 500
83077
+ },
83078
+ allow_pass_on: {
83079
+ type: "boolean",
83080
+ description: "Let the one member shared with pass it on (a person target only; needs the workspace's sub-shares switch). `false` withdraws it and ends what was passed on; omitted leaves it as it is."
83081
+ }
83082
+ }
83083
+ }
83084
+ }
83085
+ }
83086
+ },
83087
+ responses: {
83088
+ "201": {
83089
+ description: "Created",
83090
+ content: {
83091
+ "application/json": {
83092
+ schema: {
83093
+ type: "object",
83094
+ additionalProperties: true
83095
+ }
83096
+ }
83097
+ }
83098
+ },
83099
+ "400": {
83100
+ $ref: "#/components/responses/BadRequest"
83101
+ },
83102
+ "401": {
83103
+ $ref: "#/components/responses/Unauthorized"
83104
+ },
83105
+ "403": {
83106
+ $ref: "#/components/responses/Forbidden"
83107
+ },
83108
+ "404": {
83109
+ $ref: "#/components/responses/NotFound"
83110
+ },
83111
+ "409": {
83112
+ $ref: "#/components/responses/Conflict"
83113
+ },
83114
+ "429": {
83115
+ $ref: "#/components/responses/RateLimitExceeded"
83116
+ }
83117
+ }
83118
+ }
83119
+ },
83120
+ "/v1/governance/shares/pass-on": {
83121
+ post: {
83122
+ operationId: "passOnShare",
83123
+ "x-audience": "public",
83124
+ "x-required-scopes": [
83125
+ "access:write"
83126
+ ],
83127
+ summary: "Pass a share on",
83128
+ description: "Pass on a share the caller received with `may_pass_on` (given to them as a person by the holder): documents of it (`document_ids`), or the whole source (exactly one of `scope_id` / `source_connection_id`), to a member or a workspace group, never everyone. The new share is never wider than the one received: the same or fewer capabilities, ending at the latest when it ends (no `duration_days`: when it ends), and it cannot be passed on further. It holds only while the whole chain behind it does: the received share, its permission to pass on, the caller's membership and an active person holder of the source. The holders hear of it and can stop it. A document holding a sensitive field is not passed on. Needs the caller's member role and the workspace's sub-shares switch (409 while off). Something the caller may not pass on answers 404, like a missing one.\n",
83129
+ tags: [
83130
+ "Access & sharing"
83131
+ ],
83132
+ requestBody: {
83133
+ required: true,
83134
+ content: {
83135
+ "application/json": {
83136
+ schema: {
83137
+ type: "object",
83138
+ required: [
83139
+ "to"
83140
+ ],
83141
+ properties: {
83142
+ document_ids: {
83143
+ type: "array",
83144
+ minItems: 1,
83145
+ maxItems: 200,
83146
+ items: {
83147
+ type: "string",
83148
+ format: "uuid"
83149
+ }
83150
+ },
83151
+ scope_id: {
83152
+ type: "string",
83153
+ pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
83154
+ description: "An access scope (8-4-4-4-12 hex; version digits are arbitrary)."
83155
+ },
83156
+ source_connection_id: {
83157
+ type: "string",
83158
+ format: "uuid"
83159
+ },
83160
+ to: {
83161
+ type: "object",
83162
+ required: [
83163
+ "type",
83164
+ "id"
83165
+ ],
83166
+ properties: {
83167
+ type: {
83168
+ type: "string",
83169
+ enum: [
83170
+ "person",
83171
+ "group"
83172
+ ]
83173
+ },
83174
+ id: {
83175
+ type: "string",
83176
+ format: "uuid",
83177
+ description: "The member or group."
83178
+ }
83179
+ }
83180
+ },
83181
+ duration_days: {
83182
+ type: "integer",
83183
+ minimum: 1,
83184
+ maximum: 365,
83185
+ nullable: true
83186
+ },
83187
+ note: {
83188
+ type: "string",
83189
+ maxLength: 500
83190
+ }
83191
+ }
83192
+ }
83193
+ }
83194
+ }
83195
+ },
83196
+ responses: {
83197
+ "201": {
83198
+ description: "The shares written.",
83199
+ content: {
83200
+ "application/json": {
83201
+ schema: {
83202
+ type: "array",
83203
+ items: {
83204
+ type: "object",
83205
+ additionalProperties: true
83206
+ }
83207
+ }
83208
+ }
83209
+ }
83210
+ },
83211
+ "400": {
83212
+ $ref: "#/components/responses/BadRequest"
83213
+ },
83214
+ "401": {
83215
+ $ref: "#/components/responses/Unauthorized"
83216
+ },
83217
+ "403": {
83218
+ $ref: "#/components/responses/Forbidden"
83219
+ },
83220
+ "404": {
83221
+ $ref: "#/components/responses/NotFound"
83222
+ },
83223
+ "409": {
83224
+ $ref: "#/components/responses/Conflict"
83225
+ },
83226
+ "429": {
83227
+ $ref: "#/components/responses/RateLimitExceeded"
83228
+ }
83229
+ }
83230
+ }
83231
+ },
83232
+ "/v1/governance/shares/scopes": {
83233
+ post: {
83234
+ operationId: "shareScope",
83235
+ "x-audience": "public",
83236
+ "x-required-scopes": [
83237
+ "access:write"
83238
+ ],
83239
+ summary: "Share a whole source",
83240
+ description: "Share a whole source the caller holds in person, or their uploads, for reading: every document of it, new ones included, until stopped or for `duration_days`. Exactly one of `scope_id` / `source_connection_id`.\n",
83241
+ tags: [
83242
+ "Access & sharing"
83243
+ ],
83244
+ requestBody: {
83245
+ required: true,
83246
+ content: {
83247
+ "application/json": {
83248
+ schema: {
83249
+ type: "object",
83250
+ required: [
83251
+ "to"
83252
+ ],
83253
+ properties: {
83254
+ scope_id: {
83255
+ type: "string",
83256
+ pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
83257
+ description: "An access scope (8-4-4-4-12 hex; version digits are arbitrary)."
83258
+ },
83259
+ source_connection_id: {
83260
+ type: "string",
83261
+ format: "uuid"
83262
+ },
83263
+ to: {
83264
+ type: "object",
83265
+ required: [
83266
+ "type"
83267
+ ],
83268
+ properties: {
83269
+ type: {
83270
+ type: "string",
83271
+ enum: [
83272
+ "person",
83273
+ "group",
83274
+ "everyone"
83275
+ ]
83276
+ },
83277
+ id: {
83278
+ type: "string",
83279
+ format: "uuid",
83280
+ description: "The member or group; absent for everyone."
83281
+ }
83282
+ }
83283
+ },
83284
+ duration_days: {
83285
+ type: "integer",
83286
+ minimum: 1,
83287
+ maximum: 365,
83288
+ nullable: true
83289
+ },
83290
+ allow_pass_on: {
83291
+ type: "boolean",
83292
+ description: "Let the one member shared with pass it on (a person target only; needs the workspace's sub-shares switch). `false` withdraws it and ends what was passed on; omitted leaves it as it is."
83293
+ }
83294
+ }
83295
+ }
83296
+ }
83297
+ }
83298
+ },
83299
+ responses: {
83300
+ "201": {
83301
+ description: "Created",
83302
+ content: {
83303
+ "application/json": {
83304
+ schema: {
83305
+ type: "object",
83306
+ additionalProperties: true
83307
+ }
83308
+ }
83309
+ }
83310
+ },
83311
+ "400": {
83312
+ $ref: "#/components/responses/BadRequest"
83313
+ },
83314
+ "401": {
83315
+ $ref: "#/components/responses/Unauthorized"
83316
+ },
83317
+ "403": {
83318
+ $ref: "#/components/responses/Forbidden"
83319
+ },
83320
+ "404": {
83321
+ $ref: "#/components/responses/NotFound"
83322
+ },
83323
+ "409": {
83324
+ $ref: "#/components/responses/Conflict"
83325
+ },
83326
+ "429": {
83327
+ $ref: "#/components/responses/RateLimitExceeded"
83328
+ }
83329
+ }
83330
+ }
83331
+ },
83332
+ "/v1/governance/shares/workspace": {
83333
+ post: {
83334
+ operationId: "setWorkspaceOpen",
83335
+ "x-audience": "public",
83336
+ "x-required-scopes": [
83337
+ "access:write"
83338
+ ],
83339
+ summary: "Open or close a source to the workspace",
83340
+ description: "Where the workspace's governance default is `open`, every member reads what the access rules open to them, unless the holder closes the scope. Open (`open: true`) or close (`open: false`) a source the caller holds in person, or their uploads. Closed, its documents open only to holders, licences and shares. Exactly one of `scope_id` / `source_connection_id`.\n",
83341
+ tags: [
83342
+ "Access & sharing"
83343
+ ],
83344
+ requestBody: {
83345
+ required: true,
83346
+ content: {
83347
+ "application/json": {
83348
+ schema: {
83349
+ type: "object",
83350
+ required: [
83351
+ "open"
83352
+ ],
83353
+ properties: {
83354
+ scope_id: {
83355
+ type: "string",
83356
+ pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
83357
+ description: "An access scope (8-4-4-4-12 hex; version digits are arbitrary)."
83358
+ },
83359
+ source_connection_id: {
83360
+ type: "string",
83361
+ format: "uuid"
83362
+ },
83363
+ open: {
83364
+ type: "boolean"
83365
+ }
83366
+ }
83367
+ }
83368
+ }
83369
+ }
83370
+ },
83371
+ responses: {
83372
+ "200": {
83373
+ description: "The scope, with `open_to_workspace`.",
83374
+ content: {
83375
+ "application/json": {
83376
+ schema: {
83377
+ type: "object",
83378
+ additionalProperties: true
83379
+ }
83380
+ }
83381
+ }
83382
+ },
83383
+ "400": {
83384
+ $ref: "#/components/responses/BadRequest"
83385
+ },
83386
+ "401": {
83387
+ $ref: "#/components/responses/Unauthorized"
83388
+ },
83389
+ "403": {
83390
+ $ref: "#/components/responses/Forbidden"
83391
+ },
83392
+ "404": {
83393
+ $ref: "#/components/responses/NotFound"
83394
+ },
83395
+ "409": {
83396
+ $ref: "#/components/responses/Conflict"
83397
+ },
83398
+ "429": {
83399
+ $ref: "#/components/responses/RateLimitExceeded"
83400
+ }
83401
+ }
83402
+ }
83403
+ },
83404
+ "/v1/governance/shares/{kind}/{id}/stop": {
83405
+ post: {
83406
+ operationId: "stopShare",
83407
+ "x-audience": "public",
83408
+ "x-required-scopes": [
83409
+ "access:write"
83410
+ ],
83411
+ summary: "Stop a share",
83412
+ description: "Stop a share: its granter or a holder ends it; the person it names may remove it from their own access.\n",
83413
+ tags: [
83414
+ "Access & sharing"
83415
+ ],
83416
+ parameters: [
83417
+ {
83418
+ name: "kind",
83419
+ in: "path",
83420
+ required: true,
83421
+ schema: {
83422
+ type: "string",
83423
+ enum: [
83424
+ "document",
83425
+ "scope"
83426
+ ]
83427
+ }
83428
+ },
83429
+ {
83430
+ name: "id",
83431
+ in: "path",
83432
+ required: true,
83433
+ schema: {
83434
+ type: "string",
83435
+ format: "uuid"
83436
+ }
83437
+ }
83438
+ ],
83439
+ responses: {
83440
+ "200": {
83441
+ description: "OK",
83442
+ content: {
83443
+ "application/json": {
83444
+ schema: {
83445
+ type: "object",
83446
+ additionalProperties: true
83447
+ }
83448
+ }
83449
+ }
83450
+ },
83451
+ "400": {
83452
+ $ref: "#/components/responses/BadRequest"
83453
+ },
83454
+ "401": {
83455
+ $ref: "#/components/responses/Unauthorized"
83456
+ },
83457
+ "403": {
83458
+ $ref: "#/components/responses/Forbidden"
83459
+ },
83460
+ "404": {
83461
+ $ref: "#/components/responses/NotFound"
83462
+ },
83463
+ "409": {
83464
+ $ref: "#/components/responses/Conflict"
83465
+ },
83466
+ "429": {
83467
+ $ref: "#/components/responses/RateLimitExceeded"
83468
+ }
83469
+ }
83470
+ }
83471
+ },
83472
+ "/v1/governance/data-points": {
83473
+ get: {
83474
+ operationId: "listMyDataPoints",
83475
+ "x-audience": "public",
83476
+ "x-required-scopes": [
83477
+ "access:read"
83478
+ ],
83479
+ summary: "My data points",
83480
+ description: "The Specs run over the caller's own documents: per field, what the Spec proposes (kind, audience) and the\ncaller's confirmed choice, plus the caller's overlay (hide who it came from, date precision, documents left out).\n`available: false` when the workspace's documents do not follow the access scope model.\n",
83481
+ tags: [
83482
+ "Access & sharing"
83483
+ ],
83484
+ responses: {
83485
+ "200": {
83486
+ description: "OK",
83487
+ content: {
83488
+ "application/json": {
83489
+ schema: {
83490
+ type: "object",
83491
+ additionalProperties: true
83492
+ }
83493
+ }
83494
+ }
83495
+ },
83496
+ "400": {
83497
+ $ref: "#/components/responses/BadRequest"
83498
+ },
83499
+ "401": {
83500
+ $ref: "#/components/responses/Unauthorized"
83501
+ },
83502
+ "403": {
83503
+ $ref: "#/components/responses/Forbidden"
83504
+ },
83505
+ "404": {
83506
+ $ref: "#/components/responses/NotFound"
83507
+ },
83508
+ "409": {
83509
+ $ref: "#/components/responses/Conflict"
83510
+ },
83511
+ "429": {
83512
+ $ref: "#/components/responses/RateLimitExceeded"
83513
+ }
83514
+ }
83515
+ }
83516
+ },
83517
+ "/v1/governance/data-points/shared": {
83518
+ get: {
83519
+ operationId: "listSharedDataPoints",
83520
+ "x-audience": "public",
83521
+ "x-required-scopes": [
83522
+ "access:read"
83523
+ ],
83524
+ summary: "Data points shared with me",
83525
+ description: "Values of Spec fields colleagues shared with the caller, per Spec, lined up per row (`row_key`, opaque) with\ntheir context: document type, a date at the holder's precision, and who it came from unless the holder hides\nit. Never a document id, file name, link, source text or reasoning. At most 500 rows per Spec; `total_rows` and\n`truncated` say when more exist.\n",
83526
+ tags: [
83527
+ "Access & sharing"
83528
+ ],
83529
+ parameters: [
83530
+ {
83531
+ name: "spec_id",
83532
+ in: "query",
83533
+ required: false,
83534
+ schema: {
83535
+ type: "string",
83536
+ format: "uuid"
83537
+ }
83538
+ }
83539
+ ],
83540
+ responses: {
83541
+ "200": {
83542
+ description: "OK",
83543
+ content: {
83544
+ "application/json": {
83545
+ schema: {
83546
+ type: "object",
83547
+ additionalProperties: true
83548
+ }
83549
+ }
83550
+ }
83551
+ },
83552
+ "400": {
83553
+ $ref: "#/components/responses/BadRequest"
83554
+ },
83555
+ "401": {
83556
+ $ref: "#/components/responses/Unauthorized"
83557
+ },
83558
+ "403": {
83559
+ $ref: "#/components/responses/Forbidden"
83560
+ },
83561
+ "404": {
83562
+ $ref: "#/components/responses/NotFound"
83563
+ },
83564
+ "409": {
83565
+ $ref: "#/components/responses/Conflict"
83566
+ },
83567
+ "429": {
83568
+ $ref: "#/components/responses/RateLimitExceeded"
83569
+ }
83570
+ }
83571
+ }
83572
+ },
83573
+ "/v1/governance/data-points/{specId}": {
83574
+ put: {
83575
+ operationId: "confirmDataPoints",
83576
+ "x-audience": "public",
83577
+ "x-required-scopes": [
83578
+ "access:write"
83579
+ ],
83580
+ summary: "Confirm my data points for one Spec",
83581
+ description: "The caller's choices for one Spec run over their own documents: per field an audience (`private`, `people`\nwith `shared_with`, `everyone`) and optionally their own kind; a `sensitive` field stays private. The overlay\n(`hide_holder`, `date_precision`, `excluded_document_ids`) applies to every field of the Spec. Nothing is shared\nbefore this call. 404 when the caller holds no document the Spec ran over.\n",
83582
+ tags: [
83583
+ "Access & sharing"
83584
+ ],
83585
+ parameters: [
83586
+ {
83587
+ name: "specId",
83588
+ in: "path",
83589
+ required: true,
83590
+ schema: {
83591
+ type: "string",
83592
+ format: "uuid"
83593
+ }
83594
+ }
83595
+ ],
83596
+ requestBody: {
83597
+ required: true,
83598
+ content: {
83599
+ "application/json": {
83600
+ schema: {
83601
+ type: "object",
83602
+ required: [
83603
+ "fields"
83604
+ ],
83605
+ properties: {
83606
+ fields: {
83607
+ type: "array",
83608
+ items: {
83609
+ type: "object",
83610
+ required: [
83611
+ "field_key",
83612
+ "audience"
83613
+ ],
83614
+ properties: {
83615
+ field_key: {
83616
+ type: "string"
83617
+ },
83618
+ audience: {
83619
+ type: "string",
83620
+ enum: [
83621
+ "private",
83622
+ "people",
83623
+ "everyone"
83624
+ ]
83625
+ },
83626
+ kind: {
83627
+ type: "string",
83628
+ enum: [
83629
+ "plain",
83630
+ "customer_information",
83631
+ "personal",
83632
+ "sensitive"
83633
+ ],
83634
+ nullable: true
83635
+ },
83636
+ shared_with: {
83637
+ type: "array",
83638
+ items: {
83639
+ type: "string",
83640
+ format: "uuid"
83641
+ }
83642
+ }
83643
+ }
83644
+ }
83645
+ },
83646
+ hide_holder: {
83647
+ type: "boolean"
83648
+ },
83649
+ date_precision: {
83650
+ type: "string",
83651
+ enum: [
83652
+ "day",
83653
+ "month",
83654
+ "year",
83655
+ "none"
83656
+ ]
83657
+ },
83658
+ excluded_document_ids: {
83659
+ type: "array",
83660
+ items: {
83661
+ type: "string",
83662
+ format: "uuid"
83663
+ }
83664
+ }
83665
+ }
83666
+ }
83667
+ }
83668
+ }
83669
+ },
83670
+ responses: {
83671
+ "200": {
83672
+ description: "OK",
83673
+ content: {
83674
+ "application/json": {
83675
+ schema: {
83676
+ type: "object",
83677
+ additionalProperties: true
83678
+ }
83679
+ }
83680
+ }
83681
+ },
83682
+ "400": {
83683
+ $ref: "#/components/responses/BadRequest"
83684
+ },
83685
+ "401": {
83686
+ $ref: "#/components/responses/Unauthorized"
83687
+ },
83688
+ "403": {
83689
+ $ref: "#/components/responses/Forbidden"
83690
+ },
83691
+ "404": {
83692
+ $ref: "#/components/responses/NotFound"
83693
+ },
83694
+ "409": {
83695
+ $ref: "#/components/responses/Conflict"
83696
+ },
83697
+ "429": {
83698
+ $ref: "#/components/responses/RateLimitExceeded"
83699
+ }
83700
+ }
83701
+ }
83702
+ },
83703
+ "/v1/governance/data-points/{specId}/stop": {
83704
+ post: {
83705
+ operationId: "stopDataPoints",
83706
+ "x-audience": "public",
83707
+ "x-required-scopes": [
83708
+ "access:write"
83709
+ ],
83710
+ summary: "Stop sharing a Spec's data points",
83711
+ description: "Stops sharing every field of one Spec from the caller's documents. 404 when the caller shares none of it.\n",
83712
+ tags: [
83713
+ "Access & sharing"
83714
+ ],
83715
+ parameters: [
83716
+ {
83717
+ name: "specId",
83718
+ in: "path",
83719
+ required: true,
83720
+ schema: {
83721
+ type: "string",
83722
+ format: "uuid"
83723
+ }
83724
+ }
83725
+ ],
83726
+ responses: {
83727
+ "200": {
83728
+ description: "OK",
83729
+ content: {
83730
+ "application/json": {
83731
+ schema: {
83732
+ type: "object",
83733
+ additionalProperties: true
83734
+ }
83735
+ }
83736
+ }
83737
+ },
83738
+ "400": {
83739
+ $ref: "#/components/responses/BadRequest"
83740
+ },
83741
+ "401": {
83742
+ $ref: "#/components/responses/Unauthorized"
83743
+ },
83744
+ "403": {
83745
+ $ref: "#/components/responses/Forbidden"
83746
+ },
83747
+ "404": {
83748
+ $ref: "#/components/responses/NotFound"
83749
+ },
83750
+ "409": {
83751
+ $ref: "#/components/responses/Conflict"
83752
+ },
83753
+ "429": {
83754
+ $ref: "#/components/responses/RateLimitExceeded"
83755
+ }
83756
+ }
83757
+ }
83758
+ },
83759
+ "/v1/me/workspace-data/groups": {
83760
+ get: {
83761
+ operationId: "listMeWorkspaceDataGroups",
83762
+ "x-audience": "public",
83763
+ "x-required-scopes": [
83764
+ "documents:read"
83765
+ ],
83766
+ summary: "Group workspace data",
83767
+ description: "The workspace's documents or data points you can see, counted per group (`by` source, document type, month or, for points, field) and per owner; narrow with the group parameters.\n",
83768
+ tags: [
83769
+ "My Data"
83770
+ ],
83771
+ parameters: [
83772
+ {
83773
+ name: "kind",
83774
+ in: "query",
83775
+ required: true,
83776
+ schema: {
83777
+ type: "string",
83778
+ enum: [
83779
+ "documents",
83780
+ "points"
83781
+ ]
83782
+ }
83783
+ },
83784
+ {
83785
+ name: "by",
83786
+ in: "query",
83787
+ schema: {
83788
+ type: "string",
83789
+ enum: [
83790
+ "source",
83791
+ "type",
83792
+ "month",
83793
+ "field",
83794
+ "all"
83795
+ ],
83796
+ default: "all"
83797
+ }
83798
+ },
83799
+ {
83800
+ name: "source",
83801
+ in: "query",
83802
+ description: "A source id, or `none`.",
83803
+ schema: {
83804
+ type: "string"
83805
+ }
83806
+ },
83807
+ {
83808
+ name: "type",
83809
+ in: "query",
83810
+ description: "A document type id, or `none`.",
83811
+ schema: {
83812
+ type: "string"
83813
+ }
83814
+ },
83815
+ {
83816
+ name: "month",
83817
+ in: "query",
83818
+ description: "Month, `YYYY-MM`.",
83819
+ schema: {
83820
+ type: "string",
83821
+ pattern: "^\\d{4}-(0[1-9]|1[0-2])$"
83822
+ }
83823
+ },
83824
+ {
83825
+ name: "field",
83826
+ in: "query",
83827
+ description: "A field id, or `none`.",
83828
+ schema: {
83829
+ type: "string"
83830
+ }
83831
+ }
83832
+ ],
83833
+ responses: {
83834
+ "200": {
83835
+ description: "OK",
83836
+ content: {
83837
+ "application/json": {
83838
+ schema: {
83839
+ type: "object",
83840
+ additionalProperties: true
83841
+ }
83842
+ }
83843
+ }
83844
+ },
83845
+ "400": {
83846
+ $ref: "#/components/responses/BadRequest"
83847
+ },
83848
+ "401": {
83849
+ $ref: "#/components/responses/Unauthorized"
83850
+ },
83851
+ "403": {
83852
+ $ref: "#/components/responses/Forbidden"
83853
+ },
83854
+ "429": {
83855
+ $ref: "#/components/responses/RateLimitExceeded"
83856
+ }
83857
+ }
83858
+ }
83859
+ },
83860
+ "/v1/me/workspace-data/items": {
83861
+ get: {
83862
+ operationId: "listMeWorkspaceDataItems",
83863
+ "x-audience": "public",
83864
+ "x-required-scopes": [
83865
+ "documents:read"
83866
+ ],
83867
+ summary: "List workspace data by owner",
83868
+ description: "The documents or data points of one group and owner, newest first (pass a page's `next` as `after`), or the fields of one owner by `offset`.\n",
83869
+ tags: [
83870
+ "My Data"
83871
+ ],
83872
+ parameters: [
83873
+ {
83874
+ name: "kind",
83875
+ in: "query",
83876
+ required: true,
83877
+ schema: {
83878
+ type: "string",
83879
+ enum: [
83880
+ "documents",
83881
+ "fields",
83882
+ "points"
83883
+ ]
83884
+ }
83885
+ },
83886
+ {
83887
+ name: "owner",
83888
+ in: "query",
83889
+ required: true,
83890
+ schema: {
83891
+ type: "string",
83892
+ enum: [
83893
+ "me",
83894
+ "shared",
83895
+ "company"
83896
+ ]
83897
+ }
83898
+ },
83899
+ {
83900
+ name: "source",
83901
+ in: "query",
83902
+ description: "A source id, or `none`.",
83903
+ schema: {
83904
+ type: "string"
83905
+ }
83906
+ },
83907
+ {
83908
+ name: "type",
83909
+ in: "query",
83910
+ description: "A document type id, or `none`.",
83911
+ schema: {
83912
+ type: "string"
83913
+ }
83914
+ },
83915
+ {
83916
+ name: "month",
83917
+ in: "query",
83918
+ description: "Month, `YYYY-MM`.",
83919
+ schema: {
83920
+ type: "string",
83921
+ pattern: "^\\d{4}-(0[1-9]|1[0-2])$"
83922
+ }
83923
+ },
83924
+ {
83925
+ name: "field",
83926
+ in: "query",
83927
+ description: "A field id, or `none`.",
83928
+ schema: {
83929
+ type: "string"
83930
+ }
83931
+ },
83932
+ {
83933
+ name: "after",
83934
+ in: "query",
83935
+ schema: {
83936
+ type: "string"
83937
+ }
83938
+ },
81889
83939
  {
81890
83940
  name: "offset",
81891
83941
  in: "query",
83942
+ description: "Fields only.",
81892
83943
  schema: {
81893
83944
  type: "integer",
81894
83945
  minimum: 0,
@@ -81903,64 +83954,8 @@ var openapi_default = {
81903
83954
  minimum: 1,
81904
83955
  default: 50
81905
83956
  }
81906
- },
81907
- {
81908
- name: "order",
81909
- in: "query",
81910
- schema: {
81911
- type: "string",
81912
- enum: [
81913
- "time",
81914
- "state"
81915
- ],
81916
- default: "time"
81917
- }
81918
83957
  }
81919
83958
  ],
81920
- responses: {
81921
- "200": {
81922
- description: "OK",
81923
- content: {
81924
- "application/json": {
81925
- schema: {
81926
- type: "object",
81927
- properties: {
81928
- items: {
81929
- type: "array",
81930
- items: {
81931
- type: "object",
81932
- additionalProperties: true
81933
- }
81934
- }
81935
- }
81936
- }
81937
- }
81938
- }
81939
- },
81940
- "401": {
81941
- $ref: "#/components/responses/Unauthorized"
81942
- },
81943
- "403": {
81944
- $ref: "#/components/responses/Forbidden"
81945
- },
81946
- "429": {
81947
- $ref: "#/components/responses/RateLimitExceeded"
81948
- }
81949
- }
81950
- }
81951
- },
81952
- "/v1/me/workspace-data": {
81953
- get: {
81954
- operationId: "getMeWorkspaceData",
81955
- "x-audience": "public",
81956
- "x-required-scopes": [
81957
- "documents:read"
81958
- ],
81959
- summary: "Count workspace data by owner",
81960
- description: "The workspace's documents, fields and data points you can see, counted by whose they are: `me`, `shared` with you, or `company`.\n",
81961
- tags: [
81962
- "My Data"
81963
- ],
81964
83959
  responses: {
81965
83960
  "200": {
81966
83961
  description: "OK",
@@ -81973,95 +83968,8 @@ var openapi_default = {
81973
83968
  }
81974
83969
  }
81975
83970
  },
81976
- "401": {
81977
- $ref: "#/components/responses/Unauthorized"
81978
- },
81979
- "403": {
81980
- $ref: "#/components/responses/Forbidden"
81981
- },
81982
- "429": {
81983
- $ref: "#/components/responses/RateLimitExceeded"
81984
- }
81985
- }
81986
- }
81987
- },
81988
- "/v1/me/workspace-data/items": {
81989
- get: {
81990
- operationId: "listMeWorkspaceDataItems",
81991
- "x-audience": "public",
81992
- "x-required-scopes": [
81993
- "documents:read"
81994
- ],
81995
- summary: "List workspace data by owner",
81996
- description: "The documents, fields or data points behind one of those counts, a page at a time.\n",
81997
- tags: [
81998
- "My Data"
81999
- ],
82000
- parameters: [
82001
- {
82002
- name: "kind",
82003
- in: "query",
82004
- required: true,
82005
- schema: {
82006
- type: "string",
82007
- enum: [
82008
- "documents",
82009
- "fields",
82010
- "points"
82011
- ]
82012
- }
82013
- },
82014
- {
82015
- name: "owner",
82016
- in: "query",
82017
- required: true,
82018
- schema: {
82019
- type: "string",
82020
- enum: [
82021
- "me",
82022
- "shared",
82023
- "company"
82024
- ]
82025
- }
82026
- },
82027
- {
82028
- name: "offset",
82029
- in: "query",
82030
- schema: {
82031
- type: "integer",
82032
- minimum: 0,
82033
- default: 0
82034
- }
82035
- },
82036
- {
82037
- name: "limit",
82038
- in: "query",
82039
- schema: {
82040
- type: "integer",
82041
- minimum: 1,
82042
- default: 50
82043
- }
82044
- }
82045
- ],
82046
- responses: {
82047
- "200": {
82048
- description: "OK",
82049
- content: {
82050
- "application/json": {
82051
- schema: {
82052
- type: "object",
82053
- properties: {
82054
- items: {
82055
- type: "array",
82056
- items: {
82057
- type: "object",
82058
- additionalProperties: true
82059
- }
82060
- }
82061
- }
82062
- }
82063
- }
82064
- }
83971
+ "400": {
83972
+ $ref: "#/components/responses/BadRequest"
82065
83973
  },
82066
83974
  "401": {
82067
83975
  $ref: "#/components/responses/Unauthorized"
@@ -82162,7 +84070,7 @@ var openapi_default = {
82162
84070
  type: "string",
82163
84071
  maxLength: 64
82164
84072
  },
82165
- description: "Unique key for idempotent requests, at most 64 characters (a longer key\nis refused with 400 `invalid_idempotency_key` before any work). If a\nrequest with the same key was already processed, the cached result is\nreturned.\n"
84073
+ description: "Unique key for idempotent requests, at most 64 characters (a longer key\nis refused with 400 `invalid_idempotency_key` before any work). A retry\nwith the same key, request and API key within 24 hours returns the\nfirst response with `Idempotent-Replayed: true`; the same key on a\ndifferent request or from another API key answers 422\n`idempotency_key_reused`. On `POST /v1/extract` the key caches the\nextraction result for the workspace instead: any key of the workspace\nsending it gets that result with `cached: true`.\n"
82166
84074
  },
82167
84075
  SourceConnectionId: {
82168
84076
  name: "connectionId",
@@ -83145,7 +85053,12 @@ var openapi_default = {
83145
85053
  },
83146
85054
  decision: {
83147
85055
  type: "object",
83148
- nullable: true
85056
+ nullable: true,
85057
+ description: "Null while undecided, or when withheld (`decision_withheld`)."
85058
+ },
85059
+ decision_withheld: {
85060
+ type: "boolean",
85061
+ description: "True when the run names a document the caller cannot read: the decision is composed over all of them, so it is not served."
83149
85062
  },
83150
85063
  decided_by: {
83151
85064
  type: "object",
@@ -83247,7 +85160,12 @@ var openapi_default = {
83247
85160
  },
83248
85161
  decision: {
83249
85162
  type: "object",
83250
- nullable: true
85163
+ nullable: true,
85164
+ description: "Null while undecided, or when withheld (`decision_withheld`)."
85165
+ },
85166
+ decision_withheld: {
85167
+ type: "boolean",
85168
+ description: "Present and true when the run names a document the caller cannot read: the decision is composed over all of them, so it is not served."
83251
85169
  },
83252
85170
  decided_by: {
83253
85171
  type: "object",
@@ -116763,7 +118681,7 @@ function endpointKey(method, path) {
116763
118681
  const p2 = path.split("?")[0].replace(/\{[^}]+\}|:[A-Za-z_]\w*/g, "{}").replace(/\/$/, "");
116764
118682
  return `${method.toUpperCase()} ${p2}`;
116765
118683
  }
116766
- function coveredEndpointKeys(sections87) {
118684
+ function coveredEndpointKeys(sections88) {
116767
118685
  const keys = /* @__PURE__ */ new Set();
116768
118686
  const walk = (blocks) => {
116769
118687
  for (const b of blocks) {
@@ -116773,7 +118691,7 @@ function coveredEndpointKeys(sections87) {
116773
118691
  }
116774
118692
  }
116775
118693
  };
116776
- for (const s of sections87) walk(s.content);
118694
+ for (const s of sections88) walk(s.content);
116777
118695
  return keys;
116778
118696
  }
116779
118697
  function tagSlug(tag) {
@@ -117035,7 +118953,7 @@ function buildGeneratedReference(spec, covered) {
117035
118953
  const ib = tagOrder.indexOf(b);
117036
118954
  return (ia < 0 ? 1e6 : ia) - (ib < 0 ? 1e6 : ib) || a.localeCompare(b);
117037
118955
  });
117038
- const sections87 = tags.map((tag) => {
118956
+ const sections88 = tags.map((tag) => {
117039
118957
  const list = byTag.get(tag);
117040
118958
  const intro = [];
117041
118959
  if (tagDesc.get(tag)) intro.push({ type: "paragraph", text: tagDesc.get(tag).replace(/\s*\n\s*/g, " ") });
@@ -117053,11 +118971,11 @@ function buildGeneratedReference(spec, covered) {
117053
118971
  };
117054
118972
  });
117055
118973
  return {
117056
- sections: sections87,
118974
+ sections: sections88,
117057
118975
  nav: {
117058
118976
  id: GENERATED_REFERENCE_GROUP,
117059
118977
  label: "Endpoint Reference",
117060
- children: sections87.map((s) => ({ id: s.slug, label: s.title.replace(/ Endpoint Reference$/, "") }))
118978
+ children: sections88.map((s) => ({ id: s.slug, label: s.title.replace(/ Endpoint Reference$/, "") }))
117061
118979
  },
117062
118980
  generatedKeys: ops.map((o) => endpointKey(o.method, o.path))
117063
118981
  };
@@ -117461,26 +119379,57 @@ console.log(\`Fetched \${all.length} documents\`);`
117461
119379
  slug: "idempotency",
117462
119380
  parentSlug: "overview",
117463
119381
  title: "Idempotency",
117464
- seoTitle: "Idempotency-Key Header: Safe POST Retries \u2014 Talonic Docs",
117465
- description: "Retry POST /v1/extract safely with the Idempotency-Key header: a duplicate request within 24 hours returns the cached response, marked cached: true, free.",
119382
+ seoTitle: "Idempotency-Key Header: Safe Retries \u2014 Talonic Docs",
119383
+ description: "Retry writes safely with the Idempotency-Key header: a retry of the same request by the same key within 24 hours returns the first response, marked Idempotent-Replayed: true, and never applies the write twice.",
117466
119384
  content: [
117467
- { type: "paragraph", text: "Pass an `Idempotency-Key` header on POST requests to safely retry without creating duplicate work. If a request with the same key has already been processed, the API returns the cached response, marked with `cached: true` in the body." },
117468
- { type: "paragraph", text: "Most integrations use idempotency keys when calling `POST /v1/extract` to guard against network timeouts or duplicate submissions. A typical workflow is to generate a UUID per logical operation, attach it as the `Idempotency-Key` header, and retry the same request on failure without risk of double-processing." },
117469
- { type: "paragraph", text: "The cached response is guaranteed for **24 hours** and is scoped to your **organization**, not to the individual API key: any key in the same workspace replaying the idempotency key gets the same cached result, while the same key string used by a different organization is treated independently. A duplicate request within the window returns the original result immediately, with no additional credit cost. Do not rely on reusing a key after the 24-hour window \u2014 mint a fresh key per logical operation instead." },
117470
- { type: "paragraph", text: "A cached replay is a **reduced response**: it carries `extraction_id`, the original `request_id`, `status`, a slim `document` object, the extracted `data`, and `cached: true` \u2014 the `confidence` and `processing` blocks of the original response are not replayed. Document visibility is re-checked on every replay: if a Sources IAM rule has since hidden the underlying document from the calling key, the replay returns the same `404 document_not_found` a fresh request would, rather than leaking the cached content." },
117471
- { type: "paragraph", text: "Idempotency covers the retry side of resilient pipelines; for the delivery side, configure a webhook destination and listen for `extraction.complete` events instead of polling. Note that reusing a key with different request parameters will still return the first request's cached result \u2014 always generate a fresh key for each distinct operation." },
119385
+ { type: "paragraph", text: "Pass an `Idempotency-Key` header to retry a request without doing the work twice, for example after a network timeout. Generate one key (a UUID works well) per logical operation, send it with the request, and send the same request with the same key again if you are unsure whether the first one arrived." },
119386
+ { type: "paragraph", text: "Two families of endpoints honor the header. **Write endpoints** that list `Idempotency-Key` in their reference (creating, changing or deleting cases, reviews, notes, matching configurations, copies of skipped duplicates and more) follow the contract below. `POST /v1/extract` keeps its own cached-result behavior, described under Extract below." },
119387
+ { type: "heading", level: 2, id: "idempotency-write-endpoints", text: "Write endpoints" },
119388
+ { type: "list", items: [
119389
+ "**First request with a key** \u2014 runs as usual. The response carries `Idempotent-Replayed: false`.",
119390
+ "**Retry** (same key, same method, path and body, from the same API key within 24 hours) \u2014 returns the first response with its original status code and `Idempotent-Replayed: true`. Nothing runs again.",
119391
+ "**Same key, different request** \u2014 422 `idempotency_key_reused`. Use a new key for a new request.",
119392
+ "**Same key from a different API key** \u2014 422 `idempotency_key_reused`. A stored response is only ever returned to the credential that made the first request (for OAuth and signed-in callers, the same person too), never to another key in the workspace.",
119393
+ "**Retry while the first request still runs** \u2014 409 `idempotency_request_in_progress`. Retry in a moment to receive the first request's result.",
119394
+ "**First request failed** \u2014 the key is released, so the retry runs for real.",
119395
+ "**After 24 hours** \u2014 the key is forgotten and a request with it runs as new."
119396
+ ] },
117472
119397
  {
117473
119398
  type: "param-table",
117474
119399
  title: "Idempotency details",
117475
119400
  params: [
117476
119401
  { name: "Header", type: "", description: "`Idempotency-Key: <your-unique-key>`" },
117477
- { name: "Supported endpoints", type: "", description: "`POST /v1/extract` (primary use case). Other POST endpoints may honor it in the future." },
117478
- { name: "Key format", type: "", description: "Any string up to 64 characters. UUIDs (36 characters) recommended." },
117479
- { name: "TTL", type: "", description: "24 hours guaranteed. Do not rely on reuse after the window \u2014 generate a fresh key per logical operation." },
117480
- { name: "Scope", type: "", description: "Per organization (workspace). Any API key in the same workspace shares the cache; the same key string used by a different organization is independent." }
119402
+ { name: "Key format", type: "", description: "1 to 64 characters. UUIDs (36 characters) recommended. A longer or empty key answers 400 `invalid_idempotency_key` before any work." },
119403
+ { name: "Window", type: "", description: "24 hours from the first request." },
119404
+ { name: "Scope", type: "", description: "Per workspace and per credential: a key is claimed once per workspace, and its stored response replays only to the API key (and person) that claimed it." },
119405
+ { name: "Replay marker", type: "", description: "Response header `Idempotent-Replayed: true` on a replay, `false` on a first run." }
117481
119406
  ]
117482
119407
  },
117483
- { type: "heading", level: 2, id: "idempotency-behavior", text: "Behavior" },
119408
+ {
119409
+ type: "code",
119410
+ language: "bash",
119411
+ title: "Example \u2014 safe retry of a write",
119412
+ code: `KEY=$(uuidgen)
119413
+
119414
+ curl -X POST https://api.talonic.com/v1/extract/dedup/process-anyway \\
119415
+ -H "Authorization: Bearer $TALONIC_API_KEY" \\
119416
+ -H "Content-Type: application/json" \\
119417
+ -H "Idempotency-Key: $KEY" \\
119418
+ -d '{"existing_document_id": "0b6c1f9e-2d4a-4e8b-9c1d-3f5a7b9c2e10"}'
119419
+
119420
+ # Same request, same key: the first copy comes back with Idempotent-Replayed: true
119421
+ curl -i -X POST https://api.talonic.com/v1/extract/dedup/process-anyway \\
119422
+ -H "Authorization: Bearer $TALONIC_API_KEY" \\
119423
+ -H "Content-Type: application/json" \\
119424
+ -H "Idempotency-Key: $KEY" \\
119425
+ -d '{"existing_document_id": "0b6c1f9e-2d4a-4e8b-9c1d-3f5a7b9c2e10"}'`
119426
+ },
119427
+ { type: "heading", level: 2, id: "idempotency-extract", text: "Extract" },
119428
+ { type: "paragraph", text: "On `POST /v1/extract`, a request with an already-processed key returns the cached response, marked with `cached: true` in the body." },
119429
+ { type: "paragraph", text: "The cached response is guaranteed for **24 hours** and is scoped to your **organization**, not to the individual API key: any key in the same workspace replaying the idempotency key gets the same cached result, while the same key string used by a different organization is treated independently. A duplicate request within the window returns the original result immediately, with no additional credit cost. Do not rely on reusing a key after the 24-hour window \u2014 mint a fresh key per logical operation instead." },
119430
+ { type: "paragraph", text: "A cached replay is a **reduced response**: it carries `extraction_id`, the original `request_id`, `status`, a slim `document` object, the extracted `data`, and `cached: true` \u2014 the `confidence` and `processing` blocks of the original response are not replayed. Document visibility is re-checked on every replay: if a Sources IAM rule has since hidden the underlying document from the calling key, the replay returns the same `404 document_not_found` a fresh request would, rather than leaking the cached content." },
119431
+ { type: "paragraph", text: "Idempotency covers the retry side of resilient pipelines; for the delivery side, configure a webhook destination and listen for `extraction.complete` events instead of polling. Note that on `POST /v1/extract`, reusing a key with different request parameters still returns the first request's cached result \u2014 always generate a fresh key for each distinct operation." },
119432
+ { type: "heading", level: 3, id: "idempotency-behavior", text: "Extract behavior" },
117484
119433
  { type: "list", items: [
117485
119434
  "**First request** \u2014 processed normally. The response and extraction ID are cached against the key.",
117486
119435
  "**Duplicate request** (same key within 24h) \u2014 returns the cached response immediately with HTTP 200 and `cached: true`. No new extraction is created and no credits are consumed.",
@@ -117509,7 +119458,7 @@ console.log(\`Fetched \${all.length} documents\`);`
117509
119458
  {
117510
119459
  type: "code",
117511
119460
  language: "bash",
117512
- title: "Example \u2014 safe retry with idempotency",
119461
+ title: "Example \u2014 safe retry of an extraction",
117513
119462
  code: `# Generate a unique key per logical operation
117514
119463
  IDEMPOTENCY_KEY=$(uuidgen)
117515
119464
 
@@ -117526,7 +119475,7 @@ curl -X POST https://api.talonic.com/v1/extract \\
117526
119475
  -F "file=@invoice.pdf" \\
117527
119476
  -F 'schema={"vendor_name":"string","total_amount":"number"}'`
117528
119477
  },
117529
- { type: "callout", text: "Always use a new idempotency key for each distinct logical operation. Reusing a key with different parameters will return the cached result from the first request, not process the new parameters." }
119478
+ { type: "callout", text: "Always use a new idempotency key for each distinct logical operation. On write endpoints a reused key answers 422 `idempotency_key_reused`; on `POST /v1/extract` it returns the first request's cached result and ignores the new parameters." }
117530
119479
  ],
117531
119480
  related: [
117532
119481
  { label: "POST /v1/extract", slug: "post-extract" },
@@ -117534,13 +119483,15 @@ curl -X POST https://api.talonic.com/v1/extract \\
117534
119483
  { label: "Webhook Events", slug: "webhook-events" }
117535
119484
  ],
117536
119485
  faq: [
119486
+ { question: "What does Idempotent-Replayed mean?", answer: "On write endpoints, Idempotent-Replayed: true says the body is the stored response to an earlier request with the same key, returned with its original status; nothing ran again. Idempotent-Replayed: false marks the first run." },
119487
+ { question: "Can another API key in my workspace receive my stored response?", answer: "Not on write endpoints: a stored response replays only to the API key (and, for OAuth or signed-in callers, the person) that made the first request. Another key sending the same Idempotency-Key gets 422 idempotency_key_reused. On POST /v1/extract the cached result is shared across the keys of the workspace." },
117537
119488
  { question: "How do I prevent duplicate extractions on retry?", answer: "Pass an Idempotency-Key header with a unique value (e.g. UUID) on POST /v1/extract. Retries with the same key return the cached result, marked cached: true, and consume no additional credits." },
117538
119489
  { question: "How long are idempotency keys valid?", answer: "The cached response is guaranteed for 24 hours. Do not build on reuse after the window \u2014 generate a fresh key per logical operation, and treat any replay past 24 hours as undefined." },
117539
- { question: "What happens if I reuse an idempotency key with different parameters?", answer: "The API returns the cached response from the first request; the new parameters are ignored. Generate a fresh key for every distinct logical operation." },
117540
- { question: "Is the idempotency cache shared between my API keys?", answer: "Yes. The cache is scoped to your organization, so any key in the same workspace replaying the idempotency key receives the same cached result. The same key string used by a different organization is completely independent." },
119490
+ { question: "What happens if I reuse an idempotency key with different parameters?", answer: "On write endpoints the API answers 422 idempotency_key_reused and does nothing. On POST /v1/extract it returns the cached response from the first request and ignores the new parameters. Generate a fresh key for every distinct logical operation." },
119491
+ { question: "Is the idempotency cache shared between my API keys?", answer: "On write endpoints, no: each stored response belongs to the key that made it. On POST /v1/extract, yes: the cache is scoped to your organization, so any key in the same workspace replaying the idempotency key receives the same cached result. The same key string used by a different organization is always independent." },
117541
119492
  { question: "Does a cached replay return the full original response?", answer: "No \u2014 it is a reduced shape: extraction_id, the original request_id, status, a slim document object, the extracted data, and cached: true. The confidence and processing blocks are not replayed; fetch them from GET /v1/extractions/{id} if you need them again." }
117542
119493
  ],
117543
- mentions: ["idempotency", "Idempotency-Key", "retry", "duplicate requests", "cached response", "organization scope", "safe retries"]
119494
+ mentions: ["idempotency", "Idempotency-Key", "Idempotent-Replayed", "idempotency_key_reused", "retry", "duplicate requests", "cached response", "safe retries"]
117544
119495
  }
117545
119496
  ];
117546
119497
 
@@ -119289,6 +121240,34 @@ curl -s -o head.bin -H "Range: bytes=0-65535" \\
119289
121240
  },
119290
121241
  { type: "heading", level: 2, id: "document-files-provenance", text: "Provenance fields to feed it" },
119291
121242
  { type: "paragraph", text: "Request `include=provenance` on `GET /v1/pipelines/{id}/results` or `GET /v1/run/{id}/results` to get one provenance entry per field. Every entry carries `kind` (`span`, `assembly_override`, `auto_adjudication`, `human`, `derived`, `legacy`, or `matcher_decision`), `match` (`exact`, `approximate`, or `none`, the grade of the quote against the source), `confidence` (nullable), and `path`, the field path as an array of keys and indexes. Kinds that carry a quote add `text`, `source_document_id`, `page_index` (0-based), and `char_start`/`char_end`, UTF-16 offsets into the document's served markdown. Pass `text` and `page_index` straight to `span-geometry`, and use `match` to decide how much to trust the highlight." },
121243
+ { type: "heading", level: 2, id: "document-files-mail-originals", text: "Show an email as it was sent" },
121244
+ { type: "paragraph", text: "For a document captured from an email, `GET /v1/documents/{id}/mail-originals` returns the original messages it came from: `asset_id`, `message_id`, the sent time as `date`, `from`, `subject`, the HTML body as `html` (pictures shown inside the mail are embedded) and the plain `text`. The HTML is exactly what the sender wrote, so show it in a sandbox without scripts or remote content. An HTML body larger than 1.5 MB comes back as `null` and the text stays. A document that did not come from an email answers an empty `originals` list, and one call returns at most 200 originals. A missing document, one in another workspace, and one hidden from the key's person all answer the same `404`." },
121245
+ {
121246
+ type: "endpoint",
121247
+ method: "GET",
121248
+ path: "/v1/documents/{id}/mail-originals",
121249
+ summary: "The original messages of an email document, parsed for display.",
121250
+ description: "Scope: `read` (or `documents:read`). Any member of the workspace may call it. Returns `{ originals: [...] }`. 404 when the document is missing or hidden from the key's person.",
121251
+ blocks: []
121252
+ },
121253
+ {
121254
+ type: "code",
121255
+ language: "json",
121256
+ title: "Response",
121257
+ code: `{
121258
+ "originals": [
121259
+ {
121260
+ "asset_id": "7f1c2b9e-4d3a-4e8b-9a61-0c5d2e8f4b10",
121261
+ "message_id": "<CAF9x2k@mail.example.com>",
121262
+ "date": "2026-10-02T08:14:00.000Z",
121263
+ "from": "\\"Anna Weber\\" <anna.weber@example.com>",
121264
+ "subject": "Invoice 4471203",
121265
+ "html": "<p>Please find the invoice attached.</p>",
121266
+ "text": "Please find the invoice attached."
121267
+ }
121268
+ ]
121269
+ }`
121270
+ },
119292
121271
  { type: "heading", level: 2, id: "document-files-patch", text: "Tag a document after upload" },
119293
121272
  { type: "paragraph", text: "`PATCH /v1/documents/{id}` updates the caller-owned tags that `POST /v1/run` sets at upload. The body must include at least one of `batch_id` or `metadata`. A string `batch_id` sets it (trimmed), `null` clears it, and a blank string is a 400. `metadata` is **merged** into the existing bag: patch keys win, other keys are kept, and `null` is stored as a value, never treated as a deletion. To retire a key, set it to a value your systems treat as empty. A merged bag that exceeds the metadata caps is rejected whole with a 400. The response is `{ id, updated: true, batch_id, metadata }`, echoing the full merged bag; each tag appears only when set." },
119294
121273
  {
@@ -119316,7 +121295,7 @@ curl -s -o head.bin -H "Range: bytes=0-65535" \\
119316
121295
  { question: "How do I remove a metadata key?", answer: "You cannot delete a key through PATCH /v1/documents/{id}; null is stored as a value. Set the key to a value your systems treat as empty instead." },
119317
121296
  { question: "Why did span-geometry return 429?", answer: "Only one call per organization runs at a time because a cold page needs OCR. Wait for the Retry-After interval (5 seconds) and call it when a user selects a field, not in bulk." }
119318
121297
  ],
119319
- mentions: ["document file", "Range request", "span geometry", "bounding boxes", "provenance", "match grade", "char_start", "PATCH document", "batch_id", "document metadata"]
121298
+ mentions: ["document file", "Range request", "span geometry", "bounding boxes", "provenance", "match grade", "char_start", "PATCH document", "batch_id", "document metadata", "email original", "mail originals"]
119320
121299
  },
119321
121300
  {
119322
121301
  slug: "document-tags",
@@ -119619,7 +121598,7 @@ curl -s -o head.bin -H "Range: bytes=0-65535" \\
119619
121598
  method: "POST",
119620
121599
  path: "/v1/extract/dedup/process-anyway",
119621
121600
  summary: "Create a separate document for a skipped duplicate.",
119622
- description: "Scope: `documents:write`. The key's person must be a Member or above with the ingest permission, as in the web app; a Viewer gets 403 insufficient_role. Returns `{ document: { id, filename, status, links.self } }`. Send an `Idempotency-Key` header to make retries safe: the same key within 24 hours answers the first copy (200, header `Idempotent-Replayed: true`) instead of creating another; the same key for another document answers 409 `idempotency_key_reused`, a retry while the first call still runs 409 `idempotency_in_progress`.",
121601
+ description: "Scope: `documents:write`. The key's person must be a Member or above with the ingest permission, as in the web app; a Viewer gets 403 insufficient_role. Returns `{ document: { id, filename, status, links.self } }`. Send an `Idempotency-Key` header to make retries safe ([Idempotency](idempotency)): the same request with the same key from the same API key within 24 hours returns the first copy with its original status and header `Idempotent-Replayed: true` instead of creating another; the same key with a different body, or from another API key, answers 422 `idempotency_key_reused`; a retry while the first call still runs answers 409 `idempotency_request_in_progress`.",
119623
121602
  blocks: [
119624
121603
  { type: "param-table", title: "Body parameters", params: [
119625
121604
  { name: "existing_document_id", type: "uuid", required: true, description: "The document the upload was a duplicate of (`existing_document_id` in the audit log)." },
@@ -130768,9 +132747,11 @@ var sections25 = [
130768
132747
  { type: "paragraph", text: "Reads need `documents:read`. Sharing decisions need `documents:write`, and the person needs the **ingest** permission. A key that belongs to no person is refused with `403` and `reason: no_person`." },
130769
132748
  { type: "endpoint", method: "GET", path: "/v1/my-data", summary: "Per source and item you brought in, who can see it now.", description: "Requires documents:read.", blocks: [] },
130770
132749
  { type: "endpoint", method: "GET", path: "/v1/me/data", summary: "How much you brought in, per kind.", description: "Requires documents:read.", blocks: [] },
130771
- { type: "endpoint", method: "GET", path: "/v1/me/data/items", summary: "Your uploads, or the values read out of them, a page at a time.", description: "Requires documents:read. Query `kind` (`uploads` or `extracted`), then `offset`, `limit` and `order` (`time` or `state`), or one item with `id`.", blocks: [] },
132750
+ { type: "endpoint", method: "GET", path: "/v1/me/data/groups", summary: "Your uploads, or the values read out of them, counted per group and per who can see them.", description: "Requires documents:read. Query `kind` (`uploads` or `extracted`) and `by` (`source`, `type`, `month`, or `field` for values), narrowed by `source`, `type`, `month` (`YYYY-MM`) and `field`.", blocks: [] },
132751
+ { type: "endpoint", method: "GET", path: "/v1/me/data/items", summary: "Your uploads, or the values read out of them, one group a page at a time, newest first.", description: "Requires documents:read. Query `kind` and the group (`source`, `type`, `month`, `field`, `vis`), then `limit`; pass the `next` of a page as `after` for the following page. Or one item with `id`.", blocks: [] },
130772
132752
  { type: "endpoint", method: "GET", path: "/v1/me/workspace-data", summary: "The workspace's documents, fields and data points you can see, by owner.", description: "Requires documents:read. Counted as `me`, `shared` with you, or `company`.", blocks: [] },
130773
- { type: "endpoint", method: "GET", path: "/v1/me/workspace-data/items", summary: "The items behind one of those counts.", description: "Requires documents:read. Query `kind` (`documents`, `fields`, `points`) and `owner` (`me`, `shared`, `company`).", blocks: [] },
132753
+ { type: "endpoint", method: "GET", path: "/v1/me/workspace-data/groups", summary: "The workspace's documents or data points you can see, counted per group and per owner.", description: "Requires documents:read. Query `kind` (`documents` or `points`) and `by` (`source`, `type`, `month`, or `field` for points), narrowed by `source`, `type`, `month` (`YYYY-MM`) and `field`.", blocks: [] },
132754
+ { type: "endpoint", method: "GET", path: "/v1/me/workspace-data/items", summary: "The items behind one of those counts.", description: "Requires documents:read. Query `kind` (`documents`, `fields`, `points`), `owner` (`me`, `shared`, `company`) and the group; pass the `next` of a page as `after`. Fields page by `offset`.", blocks: [] },
130774
132755
  { type: "heading", level: 2, id: "my-data-sharing", text: "Share and stop sharing" },
130775
132756
  { type: "paragraph", text: "Only the person who connected a source decides who else reads it; for anyone else the source answers `404`. A body field a route does not support is refused with `400` and nothing changes, so a share is never made wider or narrower than you asked." },
130776
132757
  { type: "endpoint", method: "POST", path: "/v1/my-data/sources/:id/share", summary: "Add people to who may read a source you connected.", description: "Requires documents:write. Body `user_ids`.", blocks: [] },
@@ -130832,8 +132813,52 @@ var sections25 = [
130832
132813
  }
130833
132814
  ];
130834
132815
 
130835
- // src/content/api/ask.ts
132816
+ // src/content/api/access-sharing.ts
130836
132817
  var sections26 = [
132818
+ {
132819
+ slug: "access-sharing",
132820
+ parentSlug: "my-data",
132821
+ title: "Access & sharing",
132822
+ seoTitle: "Access & Sharing API: Request Access and Share Documents \u2014 Talonic Docs",
132823
+ description: "Find who holds a source, ask the holder for access, decide on requests to your own sources, and share documents or whole sources you hold, always as yourself.",
132824
+ content: [
132825
+ { type: "paragraph", text: "In a workspace where reads follow **access scopes**, every source and every person's uploads has a holder: the person who connected it or uploaded the files. Nobody else reads it until the holder shares it, or approves an access request. `GET /v1/governance/sharing` answers `available: false` in a workspace that is not on access scopes; the routes below then answer `409`." },
132826
+ { type: "paragraph", text: "A share is for reading: one document, several, or a whole source (new documents included), with one member, a workspace group or everyone, for a number of days or until stopped. Everything else in the workspace's access rules still applies to the person you share with. A document share holds while you hold the document's source: when it moves to someone else, or you leave, your shares of it end. Asking for access to a document that does not exist and to one you may not see answer alike (`404`)." },
132827
+ { type: "paragraph", text: "Reads need `access:read` (any member); asking, deciding and sharing need `access:write`, which works for Contract Management and above, not for a Viewer. The API answers for the person the key or OAuth token belongs to; a key that belongs to no person is refused with `403` and `reason: no_person`." },
132828
+ { type: "endpoint", method: "GET", path: "/v1/governance/directory", summary: "Every source and person's uploads with who holds it, and where you stand on it.", description: "Requires access:read. Never items or counts.", blocks: [] },
132829
+ { type: "endpoint", method: "GET", path: "/v1/governance/access-requests", summary: "Your requests, and those waiting for your decision.", description: "Requires access:read.", blocks: [] },
132830
+ { type: "endpoint", method: "POST", path: "/v1/governance/access-requests", summary: "Ask the holder for access to a source, someone's uploads, or one document.", description: "Requires access:write. Body `source_connection_id` or `scope_id`, optional `document_id`, `purpose`, `duration_days` (1 to 90).", blocks: [] },
132831
+ { type: "endpoint", method: "POST", path: "/v1/governance/access-requests/:id/approve", summary: "Approve a request on a source you hold.", description: "Requires access:write. A request for one document opens that document only.", blocks: [] },
132832
+ { type: "endpoint", method: "POST", path: "/v1/governance/access-requests/:id/deny", summary: "Deny a request, with a reason.", description: "Requires access:write. Body `reason`.", blocks: [] },
132833
+ { type: "endpoint", method: "POST", path: "/v1/governance/access-requests/:id/stop", summary: "End an approved request: yours, or one on your source.", description: "Requires access:write.", blocks: [] },
132834
+ { type: "endpoint", method: "GET", path: "/v1/governance/sharing", summary: "What you shared and what is shared with you.", description: "Requires access:read. `available` says whether sharing applies in the workspace.", blocks: [] },
132835
+ { type: "endpoint", method: "GET", path: "/v1/governance/documents/:id/access", summary: "Whether you may share or change a document you can read.", description: "Requires access:read. `managed: false` outside access scopes.", blocks: [] },
132836
+ { type: "endpoint", method: "GET", path: "/v1/governance/documents/:id/shares", summary: "Who a document you hold is shared with.", description: "Requires access:read. 404 when you do not hold the document.", blocks: [] },
132837
+ { type: "endpoint", method: "POST", path: "/v1/governance/access-requests/:id/second", summary: "Decide a request as the data protection officer of the workspace, after its holder approved.", description: "Requires access:write. Body `ok` (true opens, false refuses) and `text` (reason or note).", blocks: [] },
132838
+ { type: "endpoint", method: "POST", path: "/v1/governance/shares/documents", summary: "Share documents you hold.", description: "Requires access:write. Body `document_ids` (1 to 200), `to` (`{ type: person | group, id }` or `{ type: everyone }`), optional `duration_days` (1 to 365; none = until stopped), `note` and `allow_pass_on` (a person only: they may pass it on; `false` withdraws that and ends what they passed on).", blocks: [] },
132839
+ { type: "endpoint", method: "POST", path: "/v1/governance/shares/scopes", summary: "Share a whole source you hold, or your uploads.", description: "Requires access:write. Body `source_connection_id` or `scope_id`, `to`, optional `duration_days` and `allow_pass_on`.", blocks: [] },
132840
+ { type: "endpoint", method: "POST", path: "/v1/governance/shares/pass-on", summary: "Pass on a share you received with permission to pass it on.", description: "Requires access:write and the member role. Body `document_ids` or one of `source_connection_id` / `scope_id`, `to` (a person or a group, never everyone), optional `duration_days` (at most until your share ends; none = when it ends) and `note`. It holds only while the whole chain behind it does, and cannot be passed on further.", blocks: [] },
132841
+ { type: "endpoint", method: "POST", path: "/v1/governance/shares/:kind/:id/stop", summary: "Stop a share (`kind` document or scope); a share made to you can be removed by you.", description: "Requires access:write.", blocks: [] },
132842
+ { type: "paragraph", text: "Data points share the values of single Spec fields from your own documents, never the documents. The Spec proposes who may read each field; nothing travels until you confirm. A shared value carries its Spec and field, the document type, a date at the precision you choose and your name unless you hide it, and an opaque row key that lines up the shared fields of one record. Sensitive fields stay private." },
132843
+ { type: "endpoint", method: "GET", path: "/v1/governance/data-points", summary: "The Specs run over your documents: per field, what the Spec proposes and what you confirmed.", description: "Requires access:read.", blocks: [] },
132844
+ { type: "endpoint", method: "PUT", path: "/v1/governance/data-points/:specId", summary: "Confirm who may read each field of one Spec, and how your values travel.", description: "Requires access:write. Body `fields` (`field_key`, `audience` private / people / everyone, optional `kind`, `shared_with`), optional `hide_holder`, `date_precision` (day, month, year, none), `excluded_document_ids`.", blocks: [] },
132845
+ { type: "endpoint", method: "POST", path: "/v1/governance/data-points/:specId/stop", summary: "Stop sharing every field of one Spec.", description: "Requires access:write.", blocks: [] },
132846
+ { type: "endpoint", method: "GET", path: "/v1/governance/data-points/shared", summary: "Values colleagues shared with you, per Spec, with their context and without the documents.", description: "Requires access:read. Optional `spec_id`. At most 500 rows per Spec; `total_rows` and `truncated` say when there are more.", blocks: [] }
132847
+ ],
132848
+ related: [
132849
+ { label: "My Data", slug: "my-data-overview" }
132850
+ ],
132851
+ faq: [
132852
+ { question: "Does sharing a source include documents added later?", answer: "Yes. A whole-source share covers every document of the source, including new ones, until it ends." },
132853
+ { question: "What happens to my shares when a source moves to someone else?", answer: "Document shares end when you no longer hold the document's source. The new holder decides who reads it from then on." },
132854
+ { question: "When does a share that was passed on end?", answer: "When any link behind it breaks: the share it came from ends or is stopped, its permission to pass on is withdrawn, the person who passed it on leaves, or the source has no active holder. The holder is told of every share passed on and can stop it." }
132855
+ ],
132856
+ mentions: ["sharing", "access request", "holder", "licence", "directory", "data point"]
132857
+ }
132858
+ ];
132859
+
132860
+ // src/content/api/ask.ts
132861
+ var sections27 = [
130837
132862
  {
130838
132863
  slug: "post-ask",
130839
132864
  parentSlug: "ask",
@@ -131464,7 +133489,7 @@ while (true) {
131464
133489
  ];
131465
133490
 
131466
133491
  // src/content/api/matching.ts
131467
- var sections27 = [
133492
+ var sections28 = [
131468
133493
  {
131469
133494
  slug: "list-matching-configs",
131470
133495
  parentSlug: "matching",
@@ -132911,7 +134936,7 @@ var sections27 = [
132911
134936
  ];
132912
134937
 
132913
134938
  // src/content/api/delivery.ts
132914
- var sections28 = [
134939
+ var sections29 = [
132915
134940
  {
132916
134941
  slug: "list-delivery-destinations",
132917
134942
  parentSlug: "delivery",
@@ -134569,7 +136594,7 @@ Link: </v1/delivery/bindings>; rel="successor-version"
134569
136594
  ];
134570
136595
 
134571
136596
  // src/content/api/batches.ts
134572
- var sections29 = [
136597
+ var sections30 = [
134573
136598
  {
134574
136599
  slug: "list-batches",
134575
136600
  parentSlug: "batches",
@@ -135000,7 +137025,7 @@ var sections29 = [
135000
137025
  ];
135001
137026
 
135002
137027
  // src/content/api/cases.ts
135003
- var sections30 = [
137028
+ var sections31 = [
135004
137029
  {
135005
137030
  slug: "list-cases",
135006
137031
  parentSlug: "cases",
@@ -136380,7 +138405,7 @@ var sections30 = [
136380
138405
  ];
136381
138406
 
136382
138407
  // src/content/api/review.ts
136383
- var sections31 = [
138408
+ var sections32 = [
136384
138409
  {
136385
138410
  slug: "list-review-items",
136386
138411
  parentSlug: "review",
@@ -137024,7 +139049,7 @@ var sections31 = [
137024
139049
  ];
137025
139050
 
137026
139051
  // src/content/api/quality.ts
137027
- var sections32 = [
139052
+ var sections33 = [
137028
139053
  {
137029
139054
  slug: "list-quality-datasets",
137030
139055
  parentSlug: "quality",
@@ -137866,7 +139891,7 @@ var sections32 = [
137866
139891
  ];
137867
139892
 
137868
139893
  // src/content/api/routing-rules.ts
137869
- var sections33 = [
139894
+ var sections34 = [
137870
139895
  {
137871
139896
  slug: "list-routing-rules",
137872
139897
  parentSlug: "routing-rules",
@@ -138296,7 +140321,7 @@ var sections33 = [
138296
140321
  ];
138297
140322
 
138298
140323
  // src/content/api/billing.ts
138299
- var sections34 = [
140324
+ var sections35 = [
138300
140325
  {
138301
140326
  slug: "billing-settings",
138302
140327
  parentSlug: "billing",
@@ -138776,7 +140801,7 @@ X-Talonic-Cells-Resolved-AI: 1`
138776
140801
  ];
138777
140802
 
138778
140803
  // src/content/api/registry.ts
138779
- var sections35 = [
140804
+ var sections36 = [
138780
140805
  {
138781
140806
  slug: "registry-query",
138782
140807
  parentSlug: "registry",
@@ -139028,7 +141053,7 @@ console.log(body.total, body.data);`
139028
141053
 
139029
141054
  // src/content/api/customer-ontologies.ts
139030
141055
  var SET = "75feea55-70ef-4fac-92f6-73ef8e7556c1";
139031
- var sections36 = [
141056
+ var sections37 = [
139032
141057
  {
139033
141058
  slug: "customer-ontologies-overview",
139034
141059
  parentSlug: "customer-ontologies",
@@ -139542,7 +141567,7 @@ curl -s -X POST https://api.talonic.com/v1/customer-ontologies/${SET}/publish \\
139542
141567
  ];
139543
141568
 
139544
141569
  // src/content/api/account.ts
139545
- var sections37 = [
141570
+ var sections38 = [
139546
141571
  {
139547
141572
  slug: "get-account",
139548
141573
  parentSlug: "account",
@@ -139789,7 +141814,7 @@ curl -s -X POST https://api.talonic.com/oauth/token \\
139789
141814
  ];
139790
141815
 
139791
141816
  // src/content/api/governance.ts
139792
- var sections38 = [
141817
+ var sections39 = [
139793
141818
  {
139794
141819
  "slug": "records-retention",
139795
141820
  "parentSlug": "records",
@@ -141600,7 +143625,7 @@ var sections38 = [
141600
143625
  ];
141601
143626
 
141602
143627
  // src/content/api/nodes.ts
141603
- var sections39 = [
143628
+ var sections40 = [
141604
143629
  {
141605
143630
  slug: "node-jobs",
141606
143631
  parentSlug: "nodes",
@@ -141830,7 +143855,7 @@ console.log(extract.id, extract.status);`
141830
143855
  ];
141831
143856
 
141832
143857
  // src/content/api/process.ts
141833
- var sections40 = [
143858
+ var sections41 = [
141834
143859
  {
141835
143860
  slug: "submit-process",
141836
143861
  parentSlug: "process",
@@ -142091,7 +144116,7 @@ Link: </v1/process/runs/a1b2c3d4-e5f6-7890-abcd-ef1234567890>; rel="successor-ve
142091
144116
  ];
142092
144117
 
142093
144118
  // src/content/api/run.ts
142094
- var sections41 = [
144119
+ var sections42 = [
142095
144120
  {
142096
144121
  slug: "run-spec",
142097
144122
  parentSlug: "run",
@@ -142573,7 +144598,7 @@ curl -X POST https://api.talonic.com/v1/run \\
142573
144598
  ];
142574
144599
 
142575
144600
  // src/content/api/reference-data.ts
142576
- var sections42 = [
144601
+ var sections43 = [
142577
144602
  {
142578
144603
  slug: "list-reference-data",
142579
144604
  parentSlug: "reference-data",
@@ -143075,7 +145100,7 @@ V003,Initech Ltd,DE,DE987654321`
143075
145100
  ];
143076
145101
 
143077
145102
  // src/content/api/errors-rate-limits.ts
143078
- var sections43 = [
145103
+ var sections44 = [
143079
145104
  {
143080
145105
  slug: "error-format",
143081
145106
  parentSlug: "errors-rate-limits",
@@ -143457,7 +145482,7 @@ if (!res.ok) {
143457
145482
  ];
143458
145483
 
143459
145484
  // src/content/api/usage.ts
143460
- var sections44 = [
145485
+ var sections45 = [
143461
145486
  {
143462
145487
  slug: "usage-overview",
143463
145488
  parentSlug: "usage",
@@ -143956,7 +145981,7 @@ var sections44 = [
143956
145981
  ];
143957
145982
 
143958
145983
  // src/content/api/aggregate.ts
143959
- var sections45 = [
145984
+ var sections46 = [
143960
145985
  {
143961
145986
  slug: "aggregate-overview",
143962
145987
  parentSlug: "aggregate",
@@ -144157,7 +146182,7 @@ var sections45 = [
144157
146182
  ];
144158
146183
 
144159
146184
  // src/content/api/pricing.ts
144160
- var sections46 = [
146185
+ var sections47 = [
144161
146186
  {
144162
146187
  slug: "pricing-overview",
144163
146188
  parentSlug: "pricing",
@@ -144271,7 +146296,7 @@ console.log(\`Batch: \${batchCredits} credits (\${batchCredits / pricing.cred
144271
146296
  ];
144272
146297
 
144273
146298
  // src/content/api/document-types.ts
144274
- var sections47 = [
146299
+ var sections48 = [
144275
146300
  {
144276
146301
  slug: "list-document-types",
144277
146302
  parentSlug: "document-types",
@@ -144593,7 +146618,7 @@ var sections47 = [
144593
146618
  ];
144594
146619
 
144595
146620
  // src/content/api/dialects.ts
144596
- var sections48 = [
146621
+ var sections49 = [
144597
146622
  {
144598
146623
  slug: "list-dialects",
144599
146624
  parentSlug: "dialects",
@@ -145137,7 +147162,7 @@ var sections48 = [
145137
147162
  ];
145138
147163
 
145139
147164
  // src/content/api/fields.ts
145140
- var sections49 = [
147165
+ var sections50 = [
145141
147166
  {
145142
147167
  slug: "list-fields",
145143
147168
  parentSlug: "fields",
@@ -145680,7 +147705,7 @@ var sections49 = [
145680
147705
  ];
145681
147706
 
145682
147707
  // src/content/api/data-products.ts
145683
- var sections50 = [
147708
+ var sections51 = [
145684
147709
  {
145685
147710
  slug: "list-data-products",
145686
147711
  parentSlug: "data-products",
@@ -146546,7 +148571,7 @@ inv_0043.pdf,INV-2026-0043,,842.10,USD`
146546
148571
  ];
146547
148572
 
146548
148573
  // src/content/api/data-policies.ts
146549
- var sections51 = [
148574
+ var sections52 = [
146550
148575
  {
146551
148576
  slug: "list-data-policies",
146552
148577
  parentSlug: "data-policies",
@@ -147430,7 +149455,7 @@ end
147430
149455
  ];
147431
149456
 
147432
149457
  // src/content/api/record-sets.ts
147433
- var sections52 = [
149458
+ var sections53 = [
147434
149459
  {
147435
149460
  slug: "list-record-sets",
147436
149461
  parentSlug: "record-sets",
@@ -148026,7 +150051,7 @@ var sections52 = [
148026
150051
  ];
148027
150052
 
148028
150053
  // src/content/api/pipelines.ts
148029
- var sections53 = [
150054
+ var sections54 = [
148030
150055
  {
148031
150056
  slug: "run-pipeline",
148032
150057
  parentSlug: "pipelines",
@@ -149572,7 +151597,7 @@ curl -X POST https://api.talonic.com/v1/pipelines/$PIPELINE_ID/start \\
149572
151597
  ];
149573
151598
 
149574
151599
  // src/content/api/field-reviews.ts
149575
- var sections54 = [
151600
+ var sections55 = [
149576
151601
  {
149577
151602
  slug: "list-field-reviews",
149578
151603
  parentSlug: "field-reviews",
@@ -150963,7 +152988,7 @@ const state = await res.json();`
150963
152988
  ];
150964
152989
 
150965
152990
  // src/content/api/specs.ts
150966
- var sections55 = [
152991
+ var sections56 = [
150967
152992
  {
150968
152993
  slug: "list-specs",
150969
152994
  parentSlug: "specs",
@@ -151577,7 +153602,7 @@ var errors2 = (extra, notFound) => ({
151577
153602
  ]
151578
153603
  });
151579
153604
  var NO_SPEC = "No Spec with this ID in your organization.";
151580
- var sections56 = [
153605
+ var sections57 = [
151581
153606
  {
151582
153607
  slug: "get-spec-rail",
151583
153608
  parentSlug: "spec-config",
@@ -152698,7 +154723,7 @@ curl -X POST https://api.talonic.com/v1/schemas/${SPEC}/delivery \\
152698
154723
  ];
152699
154724
 
152700
154725
  // src/content/api/reconciliation.ts
152701
- var sections57 = [
154726
+ var sections58 = [
152702
154727
  {
152703
154728
  slug: "analyze-reconciliation",
152704
154729
  parentSlug: "reconciliation",
@@ -153289,7 +155314,7 @@ var sections57 = [
153289
155314
  ];
153290
155315
 
153291
155316
  // src/content/api/matching-packages.ts
153292
- var sections58 = [
155317
+ var sections59 = [
153293
155318
  {
153294
155319
  slug: "create-matching-package-config",
153295
155320
  parentSlug: "matching-packages",
@@ -153993,7 +156018,7 @@ curl -s "https://api.talonic.com/v1/matching/packages/runs?package_config_id=4f2
153993
156018
  ];
153994
156019
 
153995
156020
  // src/content/api/ai-policies.ts
153996
- var sections59 = [
156021
+ var sections60 = [
153997
156022
  {
153998
156023
  slug: "ai-policy-overview",
153999
156024
  parentSlug: "ai",
@@ -154620,7 +156645,7 @@ console.log(catalog.counts);`
154620
156645
  ];
154621
156646
 
154622
156647
  // src/content/api/apps.ts
154623
- var sections60 = [
156648
+ var sections61 = [
154624
156649
  {
154625
156650
  slug: "apps-overview",
154626
156651
  parentSlug: "apps",
@@ -156311,7 +158336,7 @@ curl -s "https://api.talonic.com/v1/decision-tasks/$TASK_ID/package?cursor=$CURS
156311
158336
  ];
156312
158337
 
156313
158338
  // src/content/api/agent-tasks.ts
156314
- var sections61 = [
158339
+ var sections62 = [
156315
158340
  {
156316
158341
  slug: "agent-tasks-overview",
156317
158342
  parentSlug: "agent-tasks",
@@ -156576,7 +158601,7 @@ curl -s -X POST https://api.talonic.com/v1/agent-tasks/0b6a2f5e-8c1d-4e7a-9f3b-2
156576
158601
  ];
156577
158602
 
156578
158603
  // src/content/api/db-snapshots.ts
156579
- var sections62 = [
158604
+ var sections63 = [
156580
158605
  {
156581
158606
  slug: "db-snapshot-sources",
156582
158607
  parentSlug: "db-snapshots",
@@ -156935,7 +158960,7 @@ var sections62 = [
156935
158960
  ];
156936
158961
 
156937
158962
  // src/content/api/binding-resolutions.ts
156938
- var sections63 = [
158963
+ var sections64 = [
156939
158964
  {
156940
158965
  slug: "resolve-bindings",
156941
158966
  parentSlug: "binding-resolutions",
@@ -157156,7 +159181,7 @@ for (const { field_key, bindings } of res.resolutions) {
157156
159181
  ];
157157
159182
 
157158
159183
  // src/content/api/compliance.ts
157159
- var sections64 = [
159184
+ var sections65 = [
157160
159185
  {
157161
159186
  slug: "compliance-overview",
157162
159187
  parentSlug: "compliance",
@@ -158372,7 +160397,7 @@ curl -X POST "https://api.talonic.com/v1/compliance/tasks/$TASK_ID/submit" \\
158372
160397
  ];
158373
160398
 
158374
160399
  // src/content/api/contracts.ts
158375
- var sections65 = [
160400
+ var sections66 = [
158376
160401
  {
158377
160402
  slug: "contracts-overview",
158378
160403
  parentSlug: "contracts",
@@ -159312,7 +161337,7 @@ curl -X POST "https://api.talonic.com/v1/contracts/import/all" \\
159312
161337
  ];
159313
161338
 
159314
161339
  // src/content/api/parties.ts
159315
- var sections66 = [
161340
+ var sections67 = [
159316
161341
  {
159317
161342
  slug: "parties-overview",
159318
161343
  parentSlug: "parties",
@@ -160013,7 +162038,7 @@ curl -X POST "https://api.talonic.com/v1/parties/$DUPLICATE_ID/merge" \\
160013
162038
  ];
160014
162039
 
160015
162040
  // src/content/api/doc-gen.ts
160016
- var sections67 = [
162041
+ var sections68 = [
160017
162042
  {
160018
162043
  slug: "doc-gen-overview",
160019
162044
  parentSlug: "doc-gen",
@@ -161035,7 +163060,7 @@ curl -OJ "https://api.talonic.com/v1/doc-gen/jobs/$JOB_ID/zip" \\
161035
163060
  ];
161036
163061
 
161037
163062
  // src/content/api/customs-declaration.ts
161038
- var sections68 = [
163063
+ var sections69 = [
161039
163064
  {
161040
163065
  slug: "customs-declaration-overview",
161041
163066
  parentSlug: "customs-declaration",
@@ -161381,7 +163406,7 @@ curl "https://api.talonic.com/v1/customs-declaration/declarations?pipeline_id=$P
161381
163406
  ];
161382
163407
 
161383
163408
  // src/content/api/chart-to-data.ts
161384
- var sections69 = [
163409
+ var sections70 = [
161385
163410
  {
161386
163411
  slug: "chart-to-data-overview",
161387
163412
  parentSlug: "chart-to-data",
@@ -161865,7 +163890,7 @@ curl "https://api.talonic.com/v1/chart-to-data/runs/$RUN_ID" \\
161865
163890
  ];
161866
163891
 
161867
163892
  // src/content/api/data-library.ts
161868
- var sections70 = [
163893
+ var sections71 = [
161869
163894
  {
161870
163895
  slug: "data-library-overview",
161871
163896
  parentSlug: "data-library",
@@ -162473,7 +164498,7 @@ var sections70 = [
162473
164498
 
162474
164499
  // src/content/api/object-model.ts
162475
164500
  var SPEC2 = "5b2e0d7a-3c11-4e0f-9a64-7f1c2d8e9b40";
162476
- var sections71 = [
164501
+ var sections72 = [
162477
164502
  {
162478
164503
  slug: "object-model-overview",
162479
164504
  parentSlug: "object-model",
@@ -162710,7 +164735,7 @@ var sections71 = [
162710
164735
  ];
162711
164736
 
162712
164737
  // src/content/api/price-baseline.ts
162713
- var sections72 = [
164738
+ var sections73 = [
162714
164739
  {
162715
164740
  slug: "price-baseline-overview",
162716
164741
  parentSlug: "price-baseline",
@@ -164202,7 +166227,7 @@ curl "https://api.talonic.com/v1/price-baseline/comparisons/e04a9b17-6d28-47c5-b
164202
166227
  ];
164203
166228
 
164204
166229
  // src/content/api/submissions.ts
164205
- var sections73 = [
166230
+ var sections74 = [
164206
166231
  {
164207
166232
  slug: "submissions-overview",
164208
166233
  parentSlug: "submissions",
@@ -164981,7 +167006,7 @@ curl "https://api.talonic.com/v1/submissions/export?spec_id=5d1c0a52-0c1e-4b64-9
164981
167006
  ];
164982
167007
 
164983
167008
  // src/content/api/payables.ts
164984
- var sections74 = [
167009
+ var sections75 = [
164985
167010
  {
164986
167011
  slug: "payables-overview",
164987
167012
  parentSlug: "payables",
@@ -165502,7 +167527,7 @@ curl "https://api.talonic.com/v1/ap/netsuite/runs" \\
165502
167527
  ];
165503
167528
 
165504
167529
  // src/content/api/money-found.ts
165505
- var sections75 = [
167530
+ var sections76 = [
165506
167531
  {
165507
167532
  slug: "money-found-overview",
165508
167533
  parentSlug: "money-found",
@@ -165918,7 +167943,7 @@ curl "https://api.talonic.com/v1/money-found/reviews" \\
165918
167943
  ];
165919
167944
 
165920
167945
  // src/content/api/master-records.ts
165921
- var sections76 = [
167946
+ var sections77 = [
165922
167947
  {
165923
167948
  slug: "master-records-overview",
165924
167949
  parentSlug: "master-records",
@@ -166504,7 +168529,7 @@ curl -X POST "https://api.talonic.com/v1/master-records/vendors/records/3a7f9d1c
166504
168529
  ];
166505
168530
 
166506
168531
  // src/content/api/app-workflows.ts
166507
- var sections77 = [
168532
+ var sections78 = [
166508
168533
  {
166509
168534
  "slug": "receivables-overview",
166510
168535
  "parentSlug": "receivables",
@@ -168868,7 +170893,7 @@ var HAND_WRITTEN = [
168868
170893
  ...sections40,
168869
170894
  ...sections41,
168870
170895
  ...sections42,
168871
- ...sections44,
170896
+ ...sections43,
168872
170897
  ...sections45,
168873
170898
  ...sections46,
168874
170899
  ...sections47,
@@ -168902,7 +170927,8 @@ var HAND_WRITTEN = [
168902
170927
  ...sections75,
168903
170928
  ...sections76,
168904
170929
  ...sections77,
168905
- ...sections43
170930
+ ...sections78,
170931
+ ...sections44
168906
170932
  ];
168907
170933
  var GENERATED_API_REFERENCE = buildGeneratedReference(
168908
170934
  openapi_default,
@@ -168911,7 +170937,7 @@ var GENERATED_API_REFERENCE = buildGeneratedReference(
168911
170937
  var ALL_API_SECTIONS_RAW = [...HAND_WRITTEN, ...GENERATED_API_REFERENCE.sections];
168912
170938
 
168913
170939
  // src/content/platform/start.ts
168914
- var sections78 = [
170940
+ var sections79 = [
168915
170941
  // -------------------------------------------------------------------------
168916
170942
  {
168917
170943
  slug: "introduction",
@@ -169673,7 +171699,7 @@ while (true) {
169673
171699
  ];
169674
171700
 
169675
171701
  // src/content/platform/guides-1.ts
169676
- var sections79 = [
171702
+ var sections80 = [
169677
171703
  // ---------------------------------------------------------------------------
169678
171704
  // uploading
169679
171705
  // ---------------------------------------------------------------------------
@@ -170551,7 +172577,7 @@ console.log(run.accuracy_overall, run.accuracy_by_field)`
170551
172577
  ];
170552
172578
 
170553
172579
  // src/content/platform/guides-2.ts
170554
- var sections80 = [
172580
+ var sections81 = [
170555
172581
  // ---------------------------------------------------------------------------
170556
172582
  {
170557
172583
  slug: "run-a-spec",
@@ -171397,7 +173423,7 @@ for (const c of cases) {
171397
173423
  ];
171398
173424
 
171399
173425
  // src/content/platform/guides-3.ts
171400
- var sections81 = [
173426
+ var sections82 = [
171401
173427
  // ── Deliver data ──────────────────────────────────────────────────────────
171402
173428
  {
171403
173429
  slug: "deliver-data",
@@ -171981,7 +174007,7 @@ var errors3 = (slug, extra = []) => ({
171981
174007
  ]
171982
174008
  });
171983
174009
  var costs = (extra) => p(`${extra} Work an app does for you draws on the same credit balance as the rest of the platform; no separate per-app price is published. See [Billing, credits and usage](/docs/platform/billing-and-usage) and [rate limits](/docs/api/rate-limits).`);
171984
- var sections82 = [
174010
+ var sections83 = [
171985
174011
  // -------------------------------------------------------------------------
171986
174012
  {
171987
174013
  slug: "apps-gallery",
@@ -173135,7 +175161,7 @@ for (const order of data) console.log(order.lrn, order.checks.map((c) => c.id),
173135
175161
  ];
173136
175162
 
173137
175163
  // src/content/platform/admin.ts
173138
- var sections83 = [
175164
+ var sections84 = [
173139
175165
  // -------------------------------------------------------------------------
173140
175166
  {
173141
175167
  slug: "team-management",
@@ -174351,7 +176377,7 @@ if (!status.satisfiable) console.warn('blocked operations:', status.unroutable_o
174351
176377
  ];
174352
176378
 
174353
176379
  // src/content/platform/changelog.ts
174354
- var sections84 = [
176380
+ var sections85 = [
174355
176381
  {
174356
176382
  slug: "changelog",
174357
176383
  parentSlug: "changelog",
@@ -175737,7 +177763,7 @@ talonic --version`
175737
177763
  ];
175738
177764
 
175739
177765
  // src/content/sdk/index.ts
175740
- var sections85 = sections_default;
177766
+ var sections86 = sections_default;
175741
177767
 
175742
177768
  // src/content/mcp/sections.json
175743
177769
  var sections_default2 = [
@@ -181469,7 +183495,7 @@ var sections_default2 = [
181469
183495
  ];
181470
183496
 
181471
183497
  // src/content/mcp/index.ts
181472
- var sections86 = sections_default2;
183498
+ var sections87 = sections_default2;
181473
183499
 
181474
183500
  // src/content/redirects.ts
181475
183501
  var DOCS_REDIRECTS = [
@@ -181720,17 +183746,17 @@ function scanOpenApi(spec) {
181720
183746
 
181721
183747
  // src/content/index.ts
181722
183748
  var ALL_PLATFORM_RAW = [
181723
- ...sections78,
181724
183749
  ...sections79,
181725
183750
  ...sections80,
181726
183751
  ...sections81,
181727
183752
  ...sections82,
181728
183753
  ...sections83,
181729
- ...sections84
183754
+ ...sections84,
183755
+ ...sections85
181730
183756
  ];
181731
183757
  var ALL_API_RAW = ALL_API_SECTIONS_RAW;
181732
- var ALL_SDK_RAW = [...sections85];
181733
- var ALL_MCP_RAW = [...sections86];
183758
+ var ALL_SDK_RAW = [...sections86];
183759
+ var ALL_MCP_RAW = [...sections87];
181734
183760
  function enrich(raw, navSections, domain) {
181735
183761
  return raw.map((r) => {
181736
183762
  const { prev, next } = derivePrevNext(navSections, r.slug);