@talonic/docs 0.21.83 → 0.21.94

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/openapi.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "info": {
4
4
  "title": "Talonic API",
5
5
  "version": "1.1.0",
6
- "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) → Settings → API Keys → 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`** — extracted fields as key-value pairs matching your schema.\n- **`confidence.fields`** — per-field score from 0 to 1. Above 0.9 is high confidence; below 0.7 flags for review.\n- **`extraction_id`** — 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 — see [Async Extraction Flow](#section/Async-Extraction-Flow) below.\n- **Reusable schemas** — save field definitions with `POST /v1/schemas`, then pass `schema_id` on future extractions.\n- **Receive results via webhook** — 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 (≤5 pages) are processed synchronously and return a `200`\nwith the extracted data immediately. Larger documents return a `202 Accepted`\nwith a `poll_url` — 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` → `processing` → `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` — daily cap for the namespace\n- `X-RateLimit-Remaining` — requests left today\n- `X-RateLimit-Reset` — ISO 8601 timestamp when the window resets (midnight UTC)\n\n## Pagination\n\nList endpoints use cursor-based pagination. Pass `limit` (1–100, 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…`) 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 — 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 — 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 ≤5 pages return results synchronously (`200`). Larger documents\n— or any request with `options: {\"async\": true}` — 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 — 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 → 4s → 8s → 16s → 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# → {\"vendor_name\": \"Acme Corp\", \"total_amount\": 1250.00, ...}\n```\n\n**TypeScript — 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// → { vendor_name: \"Acme Corp\", total_amount: 1250.00, ... }\n```\n\nRecommended polling: 2s initial, exponential backoff (2→4→8→16→30s cap),\ntimeout after 5 minutes.\n\n**Alternative — Webhooks:** Configure a delivery destination and listen for\n`document.extracted` events. See the Delivery tag.\n\n**Job status state machine:**\n`pending` → `queued` → `processing` → `complete` | `failed`\n\n## Performance\n\n| Document size | Expected latency | Max timeout |\n|---------------|------------------|-------------|\n| 1–5 pages | Sync, <3s | 30s |\n| 6–50 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",
6
+ "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) → Settings → API Keys → 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`** — extracted fields as key-value pairs matching your schema.\n- **`confidence.fields`** — per-field score from 0 to 1. Above 0.9 is high confidence; below 0.7 flags for review.\n- **`extraction_id`** — 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 — see [Async Extraction Flow](#section/Async-Extraction-Flow) below.\n- **Reusable schemas** — save field definitions with `POST /v1/schemas`, then pass `schema_id` on future extractions.\n- **Receive results via webhook** — 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 (≤5 pages) are processed synchronously and return a `200`\nwith the extracted data immediately. Larger documents return a `202 Accepted`\nwith a `poll_url` — 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` → `processing` → `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` — daily cap for the namespace\n- `X-RateLimit-Remaining` — requests left today\n- `X-RateLimit-Reset` — ISO 8601 timestamp when the window resets (midnight UTC)\n\n## Pagination\n\nList endpoints use cursor-based pagination. Pass `limit` (1–100, 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…`) 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 — 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 — 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 ≤5 pages return results synchronously (`200`). Larger documents\n— or any request with `options: {\"async\": true}` — 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 — 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 → 4s → 8s → 16s → 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# → {\"vendor_name\": \"Acme Corp\", \"total_amount\": 1250.00, ...}\n```\n\n**TypeScript — 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// → { vendor_name: \"Acme Corp\", total_amount: 1250.00, ... }\n```\n\nRecommended polling: 2s initial, exponential backoff (2→4→8→16→30s cap),\ntimeout after 5 minutes.\n\n**Alternative — Webhooks:** Configure a delivery destination and listen for\n`document.extracted` events. See the Delivery tag.\n\n**Job status state machine:**\n`pending` → `queued` → `processing` → `complete` | `failed`\n\n## Performance\n\n| Document size | Expected latency | Max timeout |\n|---------------|------------------|-------------|\n| 1–5 pages | Sync, <3s | 30s |\n| 6–50 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",
7
7
  "contact": {
8
8
  "name": "Talonic Support",
9
9
  "email": "support@talonic.ai",
@@ -348,6 +348,10 @@
348
348
  {
349
349
  "name": "My Data",
350
350
  "description": "What you brought into the workspace, who can see it, and your sharing decisions. Always your own data, whichever credential asks."
351
+ },
352
+ {
353
+ "name": "Access & sharing",
354
+ "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."
351
355
  }
352
356
  ],
353
357
  "paths": {
@@ -1799,6 +1803,122 @@
1799
1803
  }
1800
1804
  }
1801
1805
  },
1806
+ "/v1/documents/{id}/mail-originals": {
1807
+ "get": {
1808
+ "operationId": "getDocumentMailOriginals",
1809
+ "x-audience": "public",
1810
+ "tags": [
1811
+ "Documents"
1812
+ ],
1813
+ "summary": "Get the original messages of an email document",
1814
+ "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",
1815
+ "security": [
1816
+ {
1817
+ "BearerAuth": []
1818
+ }
1819
+ ],
1820
+ "x-required-scopes": [
1821
+ "read"
1822
+ ],
1823
+ "parameters": [
1824
+ {
1825
+ "$ref": "#/components/parameters/ResourceId"
1826
+ }
1827
+ ],
1828
+ "responses": {
1829
+ "200": {
1830
+ "description": "The original messages, in the order they were stored.",
1831
+ "content": {
1832
+ "application/json": {
1833
+ "schema": {
1834
+ "type": "object",
1835
+ "required": [
1836
+ "originals"
1837
+ ],
1838
+ "properties": {
1839
+ "originals": {
1840
+ "type": "array",
1841
+ "items": {
1842
+ "type": "object",
1843
+ "required": [
1844
+ "asset_id",
1845
+ "message_id",
1846
+ "date",
1847
+ "from",
1848
+ "subject",
1849
+ "html",
1850
+ "text"
1851
+ ],
1852
+ "properties": {
1853
+ "asset_id": {
1854
+ "type": "string",
1855
+ "format": "uuid",
1856
+ "description": "The stored original this message was read from."
1857
+ },
1858
+ "message_id": {
1859
+ "type": "string",
1860
+ "nullable": true,
1861
+ "description": "The message's own `Message-ID` header."
1862
+ },
1863
+ "date": {
1864
+ "type": "string",
1865
+ "format": "date-time",
1866
+ "nullable": true,
1867
+ "description": "When the message was sent."
1868
+ },
1869
+ "from": {
1870
+ "type": "string",
1871
+ "nullable": true
1872
+ },
1873
+ "subject": {
1874
+ "type": "string",
1875
+ "nullable": true
1876
+ },
1877
+ "html": {
1878
+ "type": "string",
1879
+ "nullable": true,
1880
+ "description": "The HTML body as sent; null when the mail has none or it is larger than 1.5 MB."
1881
+ },
1882
+ "text": {
1883
+ "type": "string",
1884
+ "nullable": true
1885
+ }
1886
+ }
1887
+ }
1888
+ }
1889
+ }
1890
+ },
1891
+ "example": {
1892
+ "originals": [
1893
+ {
1894
+ "asset_id": "7f1c2b9e-4d3a-4e8b-9a61-0c5d2e8f4b10",
1895
+ "message_id": "<CAF9x2k@mail.example.com>",
1896
+ "date": "2026-10-02T08:14:00.000Z",
1897
+ "from": "\"Anna Weber\" <anna.weber@example.com>",
1898
+ "subject": "Invoice 4471203",
1899
+ "html": "<p>Please find the invoice attached.</p>",
1900
+ "text": "Please find the invoice attached."
1901
+ }
1902
+ ]
1903
+ }
1904
+ }
1905
+ }
1906
+ },
1907
+ "401": {
1908
+ "$ref": "#/components/responses/Unauthorized"
1909
+ },
1910
+ "403": {
1911
+ "$ref": "#/components/responses/Forbidden"
1912
+ },
1913
+ "404": {
1914
+ "$ref": "#/components/responses/NotFound"
1915
+ },
1916
+ "429": {
1917
+ "$ref": "#/components/responses/RateLimitExceeded"
1918
+ }
1919
+ }
1920
+ }
1921
+ },
1802
1922
  "/v1/documents/upload-session": {
1803
1923
  "post": {
1804
1924
  "operationId": "createUploadSession",
@@ -2994,6 +3114,73 @@
2994
3114
  }
2995
3115
  }
2996
3116
  },
3117
+ "/v1/jobs/{id}/documents/{documentId}": {
3118
+ "delete": {
3119
+ "tags": [
3120
+ "Jobs & Batches"
3121
+ ],
3122
+ "summary": "Take a document out of a structuring run",
3123
+ "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",
3124
+ "operationId": "removeJobDocument",
3125
+ "x-audience": "public",
3126
+ "x-required-scopes": [
3127
+ "runs:write"
3128
+ ],
3129
+ "security": [
3130
+ {
3131
+ "BearerAuth": []
3132
+ }
3133
+ ],
3134
+ "parameters": [
3135
+ {
3136
+ "name": "id",
3137
+ "in": "path",
3138
+ "required": true,
3139
+ "schema": {
3140
+ "type": "string",
3141
+ "format": "uuid"
3142
+ }
3143
+ },
3144
+ {
3145
+ "name": "documentId",
3146
+ "in": "path",
3147
+ "required": true,
3148
+ "schema": {
3149
+ "type": "string",
3150
+ "format": "uuid"
3151
+ }
3152
+ }
3153
+ ],
3154
+ "responses": {
3155
+ "200": {
3156
+ "description": "Removed",
3157
+ "content": {
3158
+ "application/json": {
3159
+ "schema": {
3160
+ "type": "object",
3161
+ "additionalProperties": true
3162
+ }
3163
+ }
3164
+ }
3165
+ },
3166
+ "400": {
3167
+ "$ref": "#/components/responses/BadRequest"
3168
+ },
3169
+ "401": {
3170
+ "$ref": "#/components/responses/Unauthorized"
3171
+ },
3172
+ "403": {
3173
+ "$ref": "#/components/responses/Forbidden"
3174
+ },
3175
+ "404": {
3176
+ "$ref": "#/components/responses/NotFound"
3177
+ },
3178
+ "429": {
3179
+ "$ref": "#/components/responses/RateLimitExceeded"
3180
+ }
3181
+ }
3182
+ }
3183
+ },
2997
3184
  "/v1/jobs/{id}": {
2998
3185
  "get": {
2999
3186
  "operationId": "getJob",
@@ -23871,6 +24058,64 @@
23871
24058
  }
23872
24059
  }
23873
24060
  },
24061
+ "/v1/documents/{id}/claims/recompute": {
24062
+ "post": {
24063
+ "tags": [
24064
+ "Provenance"
24065
+ ],
24066
+ "summary": "Rebuild a document's claims",
24067
+ "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",
24068
+ "operationId": "recomputeDocumentClaims",
24069
+ "x-audience": "public",
24070
+ "x-required-scopes": [
24071
+ "documents:write"
24072
+ ],
24073
+ "security": [
24074
+ {
24075
+ "BearerAuth": []
24076
+ }
24077
+ ],
24078
+ "parameters": [
24079
+ {
24080
+ "name": "id",
24081
+ "in": "path",
24082
+ "required": true,
24083
+ "schema": {
24084
+ "type": "string",
24085
+ "format": "uuid"
24086
+ }
24087
+ }
24088
+ ],
24089
+ "responses": {
24090
+ "200": {
24091
+ "description": "Rebuilt",
24092
+ "content": {
24093
+ "application/json": {
24094
+ "schema": {
24095
+ "type": "object",
24096
+ "additionalProperties": true
24097
+ }
24098
+ }
24099
+ }
24100
+ },
24101
+ "400": {
24102
+ "$ref": "#/components/responses/BadRequest"
24103
+ },
24104
+ "401": {
24105
+ "$ref": "#/components/responses/Unauthorized"
24106
+ },
24107
+ "403": {
24108
+ "$ref": "#/components/responses/Forbidden"
24109
+ },
24110
+ "404": {
24111
+ "$ref": "#/components/responses/NotFound"
24112
+ },
24113
+ "429": {
24114
+ "$ref": "#/components/responses/RateLimitExceeded"
24115
+ }
24116
+ }
24117
+ }
24118
+ },
23874
24119
  "/v1/documents/{id}/claims": {
23875
24120
  "get": {
23876
24121
  "tags": [
@@ -31053,6 +31298,7 @@
31053
31298
  "operationId": "getAppRunEvents",
31054
31299
  "x-audience": "public",
31055
31300
  "summary": "Run journal (append-only, ordered)",
31301
+ "description": "404 when the run names a document the caller cannot read (the journal carries the decision).",
31056
31302
  "tags": [
31057
31303
  "Apps"
31058
31304
  ],
@@ -31070,6 +31316,9 @@
31070
31316
  "responses": {
31071
31317
  "200": {
31072
31318
  "description": "Journal events."
31319
+ },
31320
+ "404": {
31321
+ "$ref": "#/components/responses/NotFound"
31073
31322
  }
31074
31323
  }
31075
31324
  }
@@ -31582,7 +31831,7 @@
31582
31831
  "operationId": "getAppRunRecord",
31583
31832
  "x-audience": "public",
31584
31833
  "summary": "Sealed decision record (the export; 404 until the run seals)",
31585
- "description": "Reading the sealed record is an audited export (app.record_exported).",
31834
+ "description": "Reading the sealed record is an audited export (app.record_exported). 404 also when the run names a document the caller cannot read.",
31586
31835
  "tags": [
31587
31836
  "Apps"
31588
31837
  ],
@@ -53887,117 +54136,38 @@
53887
54136
  }
53888
54137
  }
53889
54138
  },
53890
- "/v1/sources/s3/dedicated-egress": {
54139
+ "/v1/sources/egress": {
53891
54140
  "get": {
53892
- "operationId": "getS3DedicatedEgress",
54141
+ "operationId": "getSourceEgress",
53893
54142
  "x-audience": "public",
53894
54143
  "x-required-scopes": [
53895
54144
  "read"
53896
54145
  ],
53897
- "summary": "Check dedicated egress for Amazon S3",
53898
- "description": "Whether this workspace may route Amazon S3 connections through a fixed outbound address, for a system that only accepts traffic from allowlisted addresses. The same answer is served for Amazon S3, Kendox and SQL.\n\n**Scope:** `read` or `sources:read`.\n",
54146
+ "summary": "Get the workspace's dedicated egress IPs",
54147
+ "description": "Whether Talonic has given this workspace dedicated sync egress: every source then connects from fixed IP addresses that a customer firewall can allow. `ips` lists them when `enabled` is true and is empty otherwise.\n\n**Scope:** `read` or `sources:read`.\n",
53899
54148
  "tags": [
53900
54149
  "Sources"
53901
54150
  ],
53902
54151
  "responses": {
53903
54152
  "200": {
53904
- "description": "Availability.",
54153
+ "description": "Egress state of the workspace.",
53905
54154
  "content": {
53906
54155
  "application/json": {
53907
54156
  "schema": {
53908
54157
  "type": "object",
53909
54158
  "required": [
53910
- "available"
54159
+ "enabled",
54160
+ "ips"
53911
54161
  ],
53912
54162
  "properties": {
53913
- "available": {
53914
- "type": "boolean"
53915
- }
53916
- }
53917
- }
53918
- }
53919
- }
53920
- },
53921
- "401": {
53922
- "$ref": "#/components/responses/Unauthorized"
53923
- },
53924
- "403": {
53925
- "$ref": "#/components/responses/Forbidden"
53926
- },
53927
- "429": {
53928
- "$ref": "#/components/responses/RateLimitExceeded"
53929
- }
53930
- }
53931
- }
53932
- },
53933
- "/v1/sources/kendox/dedicated-egress": {
53934
- "get": {
53935
- "operationId": "getKendoxDedicatedEgress",
53936
- "x-audience": "public",
53937
- "x-required-scopes": [
53938
- "read"
53939
- ],
53940
- "summary": "Check dedicated egress for Kendox",
53941
- "description": "Whether this workspace may route Kendox connections through a fixed outbound address, for a system that only accepts traffic from allowlisted addresses. The same answer is served for Amazon S3, Kendox and SQL.\n\n**Scope:** `read` or `sources:read`.\n",
53942
- "tags": [
53943
- "Sources"
53944
- ],
53945
- "responses": {
53946
- "200": {
53947
- "description": "Availability.",
53948
- "content": {
53949
- "application/json": {
53950
- "schema": {
53951
- "type": "object",
53952
- "required": [
53953
- "available"
53954
- ],
53955
- "properties": {
53956
- "available": {
53957
- "type": "boolean"
53958
- }
53959
- }
53960
- }
53961
- }
53962
- }
53963
- },
53964
- "401": {
53965
- "$ref": "#/components/responses/Unauthorized"
53966
- },
53967
- "403": {
53968
- "$ref": "#/components/responses/Forbidden"
53969
- },
53970
- "429": {
53971
- "$ref": "#/components/responses/RateLimitExceeded"
53972
- }
53973
- }
53974
- }
53975
- },
53976
- "/v1/sources/sql/dedicated-egress": {
53977
- "get": {
53978
- "operationId": "getSqlDedicatedEgress",
53979
- "x-audience": "public",
53980
- "x-required-scopes": [
53981
- "read"
53982
- ],
53983
- "summary": "Check dedicated egress for SQL",
53984
- "description": "Whether this workspace may route SQL connections through a fixed outbound address, for a system that only accepts traffic from allowlisted addresses. The same answer is served for Amazon S3, Kendox and SQL.\n\n**Scope:** `read` or `sources:read`.\n",
53985
- "tags": [
53986
- "Sources"
53987
- ],
53988
- "responses": {
53989
- "200": {
53990
- "description": "Availability.",
53991
- "content": {
53992
- "application/json": {
53993
- "schema": {
53994
- "type": "object",
53995
- "required": [
53996
- "available"
53997
- ],
53998
- "properties": {
53999
- "available": {
54163
+ "enabled": {
54000
54164
  "type": "boolean"
54165
+ },
54166
+ "ips": {
54167
+ "type": "array",
54168
+ "items": {
54169
+ "type": "string"
54170
+ }
54001
54171
  }
54002
54172
  }
54003
54173
  }
@@ -54113,10 +54283,6 @@
54113
54283
  "type": "string",
54114
54284
  "maxLength": 255,
54115
54285
  "description": "Bucket name."
54116
- },
54117
- "dedicated_egress": {
54118
- "type": "boolean",
54119
- "description": "Route every call through the workspace's fixed outbound address (see `GET /v1/sources/s3/dedicated-egress`)."
54120
54286
  }
54121
54287
  }
54122
54288
  }
@@ -54438,10 +54604,6 @@
54438
54604
  "maxLength": 1000,
54439
54605
  "writeOnly": true,
54440
54606
  "description": "Password, for `auth_mode: password`. Write-only."
54441
- },
54442
- "dedicated_egress": {
54443
- "type": "boolean",
54444
- "description": "Route every call through the workspace's fixed outbound address."
54445
54607
  }
54446
54608
  }
54447
54609
  }
@@ -54517,10 +54679,6 @@
54517
54679
  "maxLength": 2048,
54518
54680
  "writeOnly": true,
54519
54681
  "description": "Connection string including credentials. Write-only."
54520
- },
54521
- "dedicated_egress": {
54522
- "type": "boolean",
54523
- "description": "Connect through the workspace's fixed outbound address."
54524
54682
  }
54525
54683
  }
54526
54684
  }
@@ -55769,10 +55927,6 @@
55769
55927
  "quick_extraction": {
55770
55928
  "type": "boolean",
55771
55929
  "description": "Use quick extraction for files brought in from this connection."
55772
- },
55773
- "dedicated_egress": {
55774
- "type": "boolean",
55775
- "description": "Route every call through the workspace's fixed outbound address; turning it on checks the bucket is reachable that way first."
55776
55930
  }
55777
55931
  }
55778
55932
  }
@@ -55843,10 +55997,6 @@
55843
55997
  "type": "string",
55844
55998
  "pattern": "^[a-z]{2}(-[A-Za-z]{2})?$",
55845
55999
  "description": "Language for localized Kendox names, e.g. `de`, `en`, `de-CH`."
55846
- },
55847
- "dedicated_egress": {
55848
- "type": "boolean",
55849
- "description": "Route every call through the workspace's fixed outbound address."
55850
56000
  }
55851
56001
  }
55852
56002
  }
@@ -55918,10 +56068,6 @@
55918
56068
  "minLength": 1,
55919
56069
  "maxLength": 255,
55920
56070
  "description": "New display name."
55921
- },
55922
- "dedicated_egress": {
55923
- "type": "boolean",
55924
- "description": "Connect through the workspace's fixed outbound address; turning it on checks the database is reachable that way first."
55925
56071
  }
55926
56072
  }
55927
56073
  }
@@ -56849,7 +56995,7 @@
56849
56995
  "documents:write"
56850
56996
  ],
56851
56997
  "summary": "Import files from a connection",
56852
- "description": "Brings the named files (ids from `GET /v1/sources/{id}/browse`) in as documents of the workspace, attributed to the caller's person, and processes them. Files already imported are skipped. A personal connection can be imported from only by the person who connected it. A key that belongs to no person (one created before keys named their creator) is refused with 403.\n\n**Scope:** `documents:write`. A key holding only the legacy `write` scope does not satisfy it.\n",
56998
+ "description": "Brings the named files (ids from `GET /v1/sources/{id}/browse`) in as documents of the workspace, attributed to the caller's person, and processes them. Files already imported are skipped. A personal connection can be imported from only by the person who connected it. A key that belongs to no person (one created before keys named their creator) is refused with 403.\n\n**Two ways.** Without `async` the call imports before it answers (`201` with what was imported, skipped or failed): fit for a few files, since every file is fetched and read inside the request. With `async: true` the import is recorded and answered at once (`202` with the import run), then carried out in the background as the same person; read its progress and outcome from `GET /v1/sources/{id}/import-runs/{runId}`. Files that fail do not stop the others, and importing the same selection again brings in only what is not in yet. `folder_ids` (a mail, a thread, a directory: the files directly inside each are imported) exist only with `async: true`.\n\n**Scope:** `documents:write`. A key holding only the legacy `write` scope does not satisfy it.\n",
56853
56999
  "tags": [
56854
57000
  "Sources"
56855
57001
  ],
@@ -56864,9 +57010,6 @@
56864
57010
  "application/json": {
56865
57011
  "schema": {
56866
57012
  "type": "object",
56867
- "required": [
56868
- "file_ids"
56869
- ],
56870
57013
  "properties": {
56871
57014
  "file_ids": {
56872
57015
  "type": "array",
@@ -56875,7 +57018,20 @@
56875
57018
  "items": {
56876
57019
  "type": "string"
56877
57020
  },
56878
- "description": "File ids to import."
57021
+ "description": "File ids to import. Required unless `async` is true and `folder_ids` names something."
57022
+ },
57023
+ "folder_ids": {
57024
+ "type": "array",
57025
+ "maxItems": 500,
57026
+ "items": {
57027
+ "type": "string"
57028
+ },
57029
+ "description": "Folder ids from browse (a mail, a thread, a directory). The files directly inside each are imported; each folder counts as one item of the run. Only with `async: true`.\n"
57030
+ },
57031
+ "async": {
57032
+ "type": "boolean",
57033
+ "default": false,
57034
+ "description": "True records the import and answers `202` with the run; the files are imported in the background."
56879
57035
  },
56880
57036
  "tags": {
56881
57037
  "type": "array",
@@ -56892,7 +57048,7 @@
56892
57048
  },
56893
57049
  "responses": {
56894
57050
  "201": {
56895
- "description": "What was imported, skipped or failed.",
57051
+ "description": "Without `async`. What was imported, skipped or failed.",
56896
57052
  "content": {
56897
57053
  "application/json": {
56898
57054
  "schema": {
@@ -56901,6 +57057,132 @@
56901
57057
  }
56902
57058
  }
56903
57059
  },
57060
+ "202": {
57061
+ "description": "With `async: true`. The import run, still queued.",
57062
+ "content": {
57063
+ "application/json": {
57064
+ "schema": {
57065
+ "$ref": "#/components/schemas/SourceImportRun"
57066
+ }
57067
+ }
57068
+ }
57069
+ },
57070
+ "400": {
57071
+ "$ref": "#/components/responses/BadRequest"
57072
+ },
57073
+ "401": {
57074
+ "$ref": "#/components/responses/Unauthorized"
57075
+ },
57076
+ "403": {
57077
+ "$ref": "#/components/responses/Forbidden"
57078
+ },
57079
+ "404": {
57080
+ "$ref": "#/components/responses/NotFound"
57081
+ },
57082
+ "429": {
57083
+ "$ref": "#/components/responses/RateLimitExceeded"
57084
+ }
57085
+ }
57086
+ }
57087
+ },
57088
+ "/v1/sources/{id}/import-runs": {
57089
+ "get": {
57090
+ "operationId": "listSourceImportRuns",
57091
+ "x-audience": "public",
57092
+ "x-required-scopes": [
57093
+ "read"
57094
+ ],
57095
+ "summary": "List import runs of a connection",
57096
+ "description": "The connection's latest import runs (imports started with `async: true`, or from the Sources page), newest first, without their failure lists. Reads of a personal connection (a mailbox, notes, Slack) answer only to the person who connected it.\n\n**Scope:** `read` or `sources:read`.\n",
57097
+ "tags": [
57098
+ "Sources"
57099
+ ],
57100
+ "parameters": [
57101
+ {
57102
+ "$ref": "#/components/parameters/ResourceId"
57103
+ },
57104
+ {
57105
+ "name": "open",
57106
+ "in": "query",
57107
+ "required": false,
57108
+ "schema": {
57109
+ "type": "boolean"
57110
+ },
57111
+ "description": "True keeps only runs that are still queued or running."
57112
+ }
57113
+ ],
57114
+ "responses": {
57115
+ "200": {
57116
+ "description": "The runs.",
57117
+ "content": {
57118
+ "application/json": {
57119
+ "schema": {
57120
+ "type": "object",
57121
+ "properties": {
57122
+ "data": {
57123
+ "type": "array",
57124
+ "items": {
57125
+ "$ref": "#/components/schemas/SourceImportRun"
57126
+ }
57127
+ }
57128
+ }
57129
+ }
57130
+ }
57131
+ }
57132
+ },
57133
+ "400": {
57134
+ "$ref": "#/components/responses/BadRequest"
57135
+ },
57136
+ "401": {
57137
+ "$ref": "#/components/responses/Unauthorized"
57138
+ },
57139
+ "403": {
57140
+ "$ref": "#/components/responses/Forbidden"
57141
+ },
57142
+ "429": {
57143
+ "$ref": "#/components/responses/RateLimitExceeded"
57144
+ }
57145
+ }
57146
+ }
57147
+ },
57148
+ "/v1/sources/{id}/import-runs/{runId}": {
57149
+ "get": {
57150
+ "operationId": "getSourceImportRun",
57151
+ "x-audience": "public",
57152
+ "x-required-scopes": [
57153
+ "read"
57154
+ ],
57155
+ "summary": "Read one import run",
57156
+ "description": "Progress and outcome of one import run: how many items were asked for, how many are in, how many failed, and for each failure which item and why. `running` is true until the run has finished. Items already in stay in when others fail. Reads of a personal connection answer only to the person who connected it.\n\n**Scope:** `read` or `sources:read`.\n",
57157
+ "tags": [
57158
+ "Sources"
57159
+ ],
57160
+ "parameters": [
57161
+ {
57162
+ "$ref": "#/components/parameters/ResourceId"
57163
+ },
57164
+ {
57165
+ "name": "runId",
57166
+ "in": "path",
57167
+ "required": true,
57168
+ "schema": {
57169
+ "type": "string",
57170
+ "format": "uuid"
57171
+ },
57172
+ "description": "Import run UUID from `POST /v1/sources/{id}/import` (`async: true`) or `GET /v1/sources/{id}/import-runs`."
57173
+ }
57174
+ ],
57175
+ "responses": {
57176
+ "200": {
57177
+ "description": "The run, with its failures named.",
57178
+ "content": {
57179
+ "application/json": {
57180
+ "schema": {
57181
+ "$ref": "#/components/schemas/SourceImportRun"
57182
+ }
57183
+ }
57184
+ }
57185
+ },
56904
57186
  "400": {
56905
57187
  "$ref": "#/components/responses/BadRequest"
56906
57188
  },
@@ -64988,7 +65270,7 @@
64988
65270
  "Documents"
64989
65271
  ],
64990
65272
  "summary": "Process a skipped duplicate anyway",
64991
- "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.",
65273
+ "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.",
64992
65274
  "security": [
64993
65275
  {
64994
65276
  "BearerAuth": []
@@ -64999,14 +65281,7 @@
64999
65281
  ],
65000
65282
  "parameters": [
65001
65283
  {
65002
- "name": "Idempotency-Key",
65003
- "in": "header",
65004
- "required": false,
65005
- "description": "Up to 255 characters; remembered for 24 hours per workspace.",
65006
- "schema": {
65007
- "type": "string",
65008
- "maxLength": 255
65009
- }
65284
+ "$ref": "#/components/parameters/IdempotencyKey"
65010
65285
  }
65011
65286
  ],
65012
65287
  "requestBody": {
@@ -65044,19 +65319,20 @@
65044
65319
  }
65045
65320
  },
65046
65321
  "responses": {
65047
- "200": {
65048
- "description": "A retry with the same Idempotency-Key: the first copy, with the header `Idempotent-Replayed: true`.",
65049
- "content": {
65050
- "application/json": {
65322
+ "201": {
65323
+ "description": "The new document. On a retry with the same Idempotency-Key, the first copy with `Idempotent-Replayed: true`.",
65324
+ "headers": {
65325
+ "Idempotent-Replayed": {
65051
65326
  "schema": {
65052
- "type": "object",
65053
- "additionalProperties": true
65054
- }
65327
+ "type": "string",
65328
+ "enum": [
65329
+ "true",
65330
+ "false"
65331
+ ]
65332
+ },
65333
+ "description": "`true` when the body is the stored answer to an earlier request with the same key."
65055
65334
  }
65056
- }
65057
- },
65058
- "201": {
65059
- "description": "OK",
65335
+ },
65060
65336
  "content": {
65061
65337
  "application/json": {
65062
65338
  "schema": {
@@ -65096,13 +65372,13 @@
65096
65372
  "$ref": "#/components/responses/Forbidden"
65097
65373
  },
65098
65374
  "409": {
65099
- "description": "`idempotency_key_reused` or `idempotency_in_progress` (retry shortly)."
65375
+ "description": "`idempotency_request_in_progress`: a request with the same Idempotency-Key is still running; retry shortly."
65376
+ },
65377
+ "422": {
65378
+ "description": "`idempotency_key_reused`: the Idempotency-Key was already used for a different request or by another API key."
65100
65379
  },
65101
65380
  "429": {
65102
65381
  "$ref": "#/components/responses/RateLimitExceeded"
65103
- },
65104
- "503": {
65105
- "description": "`idempotency_unavailable`: a request with an Idempotency-Key cannot be guaranteed right now; retry shortly."
65106
65382
  }
65107
65383
  }
65108
65384
  }
@@ -65412,7 +65688,7 @@
65412
65688
  "Documents"
65413
65689
  ],
65414
65690
  "summary": "Tag many documents at once",
65415
- "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`.",
65691
+ "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`.",
65416
65692
  "security": [
65417
65693
  {
65418
65694
  "BearerAuth": []
@@ -65483,6 +65759,13 @@
65483
65759
  "type": "string"
65484
65760
  }
65485
65761
  },
65762
+ "refused": {
65763
+ "type": "array",
65764
+ "items": {
65765
+ "type": "string",
65766
+ "format": "uuid"
65767
+ }
65768
+ },
65486
65769
  "results": {
65487
65770
  "type": "array",
65488
65771
  "items": {
@@ -65495,7 +65778,8 @@
65495
65778
  "status": {
65496
65779
  "type": "string",
65497
65780
  "enum": [
65498
- "updated"
65781
+ "updated",
65782
+ "refused"
65499
65783
  ]
65500
65784
  },
65501
65785
  "tags": {
@@ -70453,6 +70737,64 @@
70453
70737
  }
70454
70738
  }
70455
70739
  },
70740
+ "/v1/documents/{id}/relation-claims/recompute": {
70741
+ "post": {
70742
+ "tags": [
70743
+ "Cases"
70744
+ ],
70745
+ "summary": "Rebuild a document's relation claims",
70746
+ "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",
70747
+ "operationId": "recomputeDocumentRelationClaims",
70748
+ "x-audience": "public",
70749
+ "x-required-scopes": [
70750
+ "cases:write"
70751
+ ],
70752
+ "security": [
70753
+ {
70754
+ "BearerAuth": []
70755
+ }
70756
+ ],
70757
+ "parameters": [
70758
+ {
70759
+ "name": "id",
70760
+ "in": "path",
70761
+ "required": true,
70762
+ "schema": {
70763
+ "type": "string",
70764
+ "format": "uuid"
70765
+ }
70766
+ }
70767
+ ],
70768
+ "responses": {
70769
+ "200": {
70770
+ "description": "Rebuilt",
70771
+ "content": {
70772
+ "application/json": {
70773
+ "schema": {
70774
+ "type": "object",
70775
+ "additionalProperties": true
70776
+ }
70777
+ }
70778
+ }
70779
+ },
70780
+ "400": {
70781
+ "$ref": "#/components/responses/BadRequest"
70782
+ },
70783
+ "401": {
70784
+ "$ref": "#/components/responses/Unauthorized"
70785
+ },
70786
+ "403": {
70787
+ "$ref": "#/components/responses/Forbidden"
70788
+ },
70789
+ "404": {
70790
+ "$ref": "#/components/responses/NotFound"
70791
+ },
70792
+ "429": {
70793
+ "$ref": "#/components/responses/RateLimitExceeded"
70794
+ }
70795
+ }
70796
+ }
70797
+ },
70456
70798
  "/v1/relation-claims/cases": {
70457
70799
  "get": {
70458
70800
  "operationId": "listReferenceCases",
@@ -77241,6 +77583,97 @@
77241
77583
  }
77242
77584
  }
77243
77585
  },
77586
+ "/v1/team/members/{userId}/access-until": {
77587
+ "put": {
77588
+ "operationId": "setMemberAccessUntil",
77589
+ "x-required-scopes": [
77590
+ "team:write"
77591
+ ],
77592
+ "x-audience": "public",
77593
+ "summary": "Make a membership temporary",
77594
+ "description": "Sets when a member's membership ends, or `null` for no end. The hourly expiry then removes\nthe member with their shares and personal API keys, as a removal does. The moment must be\nin the future; nobody sets their own, and the workspace always keeps a member who holds `team`.\n\nScope: `team:write`. The person behind the credential needs the `team` permission\n(Admins by default).\n",
77595
+ "tags": [
77596
+ "Team"
77597
+ ],
77598
+ "parameters": [
77599
+ {
77600
+ "name": "userId",
77601
+ "in": "path",
77602
+ "required": true,
77603
+ "schema": {
77604
+ "type": "string",
77605
+ "format": "uuid"
77606
+ }
77607
+ }
77608
+ ],
77609
+ "requestBody": {
77610
+ "required": true,
77611
+ "content": {
77612
+ "application/json": {
77613
+ "schema": {
77614
+ "type": "object",
77615
+ "properties": {
77616
+ "access_until": {
77617
+ "oneOf": [
77618
+ {
77619
+ "type": "string",
77620
+ "format": "date-time"
77621
+ },
77622
+ {
77623
+ "type": "null"
77624
+ }
77625
+ ]
77626
+ }
77627
+ },
77628
+ "required": [
77629
+ "access_until"
77630
+ ]
77631
+ }
77632
+ }
77633
+ }
77634
+ },
77635
+ "responses": {
77636
+ "200": {
77637
+ "description": "Make a membership temporary: done.",
77638
+ "content": {
77639
+ "application/json": {
77640
+ "schema": {
77641
+ "type": "object",
77642
+ "properties": {
77643
+ "user_id": {
77644
+ "type": "string",
77645
+ "format": "uuid"
77646
+ },
77647
+ "access_until": {
77648
+ "type": [
77649
+ "string",
77650
+ "null"
77651
+ ],
77652
+ "format": "date-time"
77653
+ }
77654
+ }
77655
+ }
77656
+ }
77657
+ }
77658
+ },
77659
+ "400": {
77660
+ "$ref": "#/components/responses/BadRequest"
77661
+ },
77662
+ "401": {
77663
+ "$ref": "#/components/responses/Unauthorized"
77664
+ },
77665
+ "403": {
77666
+ "$ref": "#/components/responses/Forbidden"
77667
+ },
77668
+ "404": {
77669
+ "$ref": "#/components/responses/NotFound"
77670
+ },
77671
+ "429": {
77672
+ "$ref": "#/components/responses/RateLimitExceeded"
77673
+ }
77674
+ }
77675
+ }
77676
+ },
77244
77677
  "/v1/team/role-permissions": {
77245
77678
  "get": {
77246
77679
  "operationId": "getRolePermissions",
@@ -79216,7 +79649,7 @@
79216
79649
  "thread:read"
79217
79650
  ],
79218
79651
  "summary": "Read the thread",
79219
- "description": "The last exchange of your thread and anything waiting for your decision. `enabled: false` when the thread is not available to you; `cursor` is where to start reading events.\n",
79652
+ "description": "The newest page of your conversation and anything waiting for your decision. `enabled: false` when the thread is not available to you; `cursor` is where to start reading events, and `has_older` says earlier messages can be read with the history route.\n",
79220
79653
  "tags": [
79221
79654
  "Thread"
79222
79655
  ],
@@ -79316,6 +79749,76 @@
79316
79749
  }
79317
79750
  }
79318
79751
  },
79752
+ "/v1/thread/history": {
79753
+ "get": {
79754
+ "operationId": "listThreadHistory",
79755
+ "x-audience": "public",
79756
+ "x-required-scopes": [
79757
+ "thread:read"
79758
+ ],
79759
+ "summary": "Read earlier thread messages",
79760
+ "description": "One page of your conversation further back: messages, reactions and decision cards before a given row, oldest first. Start from the `seq` of the oldest event you hold and repeat while `has_older` is true.\n",
79761
+ "tags": [
79762
+ "Thread"
79763
+ ],
79764
+ "parameters": [
79765
+ {
79766
+ "name": "before",
79767
+ "in": "query",
79768
+ "schema": {
79769
+ "type": "integer",
79770
+ "minimum": 1
79771
+ },
79772
+ "description": "The `seq` of the oldest event you already hold. Omitted, the newest page is returned."
79773
+ },
79774
+ {
79775
+ "name": "limit",
79776
+ "in": "query",
79777
+ "schema": {
79778
+ "type": "integer",
79779
+ "minimum": 1,
79780
+ "maximum": 100,
79781
+ "default": 50
79782
+ }
79783
+ }
79784
+ ],
79785
+ "responses": {
79786
+ "200": {
79787
+ "description": "OK",
79788
+ "content": {
79789
+ "application/json": {
79790
+ "schema": {
79791
+ "type": "object",
79792
+ "properties": {
79793
+ "events": {
79794
+ "type": "array",
79795
+ "items": {
79796
+ "$ref": "#/components/schemas/ThreadEvent"
79797
+ }
79798
+ },
79799
+ "has_older": {
79800
+ "type": "boolean"
79801
+ }
79802
+ }
79803
+ }
79804
+ }
79805
+ }
79806
+ },
79807
+ "401": {
79808
+ "$ref": "#/components/responses/Unauthorized"
79809
+ },
79810
+ "403": {
79811
+ "$ref": "#/components/responses/Forbidden"
79812
+ },
79813
+ "404": {
79814
+ "$ref": "#/components/responses/NotFound"
79815
+ },
79816
+ "429": {
79817
+ "$ref": "#/components/responses/RateLimitExceeded"
79818
+ }
79819
+ }
79820
+ }
79821
+ },
79319
79822
  "/v1/thread/messages": {
79320
79823
  "post": {
79321
79824
  "operationId": "sendThreadMessage",
@@ -79491,6 +79994,56 @@
79491
79994
  }
79492
79995
  }
79493
79996
  },
79997
+ "/v1/thread/files/{documentId}": {
79998
+ "get": {
79999
+ "operationId": "getThreadFile",
80000
+ "x-audience": "public",
80001
+ "x-required-scopes": [
80002
+ "thread:read"
80003
+ ],
80004
+ "summary": "Get a picture you handed in",
80005
+ "description": "A picture you handed your thread, as an image for showing it: upright and at most 1,600 pixels on its longer side. The id is `document_id` of an entry with `kind: image` in `meta.attachments` of your own message event. Anything else answers 404: a file that is not a picture, a document of the workspace, another person's file.\n",
80006
+ "tags": [
80007
+ "Thread"
80008
+ ],
80009
+ "parameters": [
80010
+ {
80011
+ "name": "documentId",
80012
+ "in": "path",
80013
+ "required": true,
80014
+ "schema": {
80015
+ "type": "string",
80016
+ "format": "uuid"
80017
+ }
80018
+ }
80019
+ ],
80020
+ "responses": {
80021
+ "200": {
80022
+ "description": "The picture.",
80023
+ "content": {
80024
+ "image/webp": {
80025
+ "schema": {
80026
+ "type": "string",
80027
+ "format": "binary"
80028
+ }
80029
+ }
80030
+ }
80031
+ },
80032
+ "401": {
80033
+ "$ref": "#/components/responses/Unauthorized"
80034
+ },
80035
+ "403": {
80036
+ "$ref": "#/components/responses/Forbidden"
80037
+ },
80038
+ "404": {
80039
+ "$ref": "#/components/responses/NotFound"
80040
+ },
80041
+ "429": {
80042
+ "$ref": "#/components/responses/RateLimitExceeded"
80043
+ }
80044
+ }
80045
+ }
80046
+ },
79494
80047
  "/v1/thread/approvals/{id}": {
79495
80048
  "post": {
79496
80049
  "operationId": "decideThreadApproval",
@@ -81622,7 +82175,1931 @@
81622
82175
  }
81623
82176
  },
81624
82177
  "400": {
81625
- "$ref": "#/components/responses/ValidationError"
82178
+ "$ref": "#/components/responses/ValidationError"
82179
+ },
82180
+ "401": {
82181
+ "$ref": "#/components/responses/Unauthorized"
82182
+ },
82183
+ "403": {
82184
+ "$ref": "#/components/responses/Forbidden"
82185
+ },
82186
+ "404": {
82187
+ "$ref": "#/components/responses/NotFound"
82188
+ },
82189
+ "409": {
82190
+ "$ref": "#/components/responses/Conflict"
82191
+ },
82192
+ "429": {
82193
+ "$ref": "#/components/responses/RateLimitExceeded"
82194
+ }
82195
+ }
82196
+ }
82197
+ },
82198
+ "/v1/me/data": {
82199
+ "get": {
82200
+ "operationId": "getMeData",
82201
+ "x-audience": "public",
82202
+ "x-required-scopes": [
82203
+ "documents:read"
82204
+ ],
82205
+ "summary": "Count your data",
82206
+ "description": "How much you brought into this workspace, per kind: uploads, values read out of them, decisions, apps and profile.\n",
82207
+ "tags": [
82208
+ "My Data"
82209
+ ],
82210
+ "responses": {
82211
+ "200": {
82212
+ "description": "OK",
82213
+ "content": {
82214
+ "application/json": {
82215
+ "schema": {
82216
+ "type": "object",
82217
+ "additionalProperties": true
82218
+ }
82219
+ }
82220
+ }
82221
+ },
82222
+ "401": {
82223
+ "$ref": "#/components/responses/Unauthorized"
82224
+ },
82225
+ "403": {
82226
+ "$ref": "#/components/responses/Forbidden"
82227
+ },
82228
+ "429": {
82229
+ "$ref": "#/components/responses/RateLimitExceeded"
82230
+ }
82231
+ }
82232
+ }
82233
+ },
82234
+ "/v1/me/data/groups": {
82235
+ "get": {
82236
+ "operationId": "listMeDataGroups",
82237
+ "x-audience": "public",
82238
+ "x-required-scopes": [
82239
+ "documents:read"
82240
+ ],
82241
+ "summary": "Group your data",
82242
+ "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",
82243
+ "tags": [
82244
+ "My Data"
82245
+ ],
82246
+ "parameters": [
82247
+ {
82248
+ "name": "kind",
82249
+ "in": "query",
82250
+ "required": true,
82251
+ "schema": {
82252
+ "type": "string",
82253
+ "enum": [
82254
+ "uploads",
82255
+ "extracted"
82256
+ ]
82257
+ }
82258
+ },
82259
+ {
82260
+ "name": "by",
82261
+ "in": "query",
82262
+ "schema": {
82263
+ "type": "string",
82264
+ "enum": [
82265
+ "source",
82266
+ "type",
82267
+ "month",
82268
+ "field",
82269
+ "all"
82270
+ ],
82271
+ "default": "all"
82272
+ }
82273
+ },
82274
+ {
82275
+ "name": "source",
82276
+ "in": "query",
82277
+ "description": "A source id, or `none`.",
82278
+ "schema": {
82279
+ "type": "string"
82280
+ }
82281
+ },
82282
+ {
82283
+ "name": "type",
82284
+ "in": "query",
82285
+ "description": "A document type id, or `none`.",
82286
+ "schema": {
82287
+ "type": "string"
82288
+ }
82289
+ },
82290
+ {
82291
+ "name": "month",
82292
+ "in": "query",
82293
+ "description": "Month, `YYYY-MM`.",
82294
+ "schema": {
82295
+ "type": "string",
82296
+ "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
82297
+ }
82298
+ },
82299
+ {
82300
+ "name": "field",
82301
+ "in": "query",
82302
+ "description": "A field id, or `none`.",
82303
+ "schema": {
82304
+ "type": "string"
82305
+ }
82306
+ }
82307
+ ],
82308
+ "responses": {
82309
+ "200": {
82310
+ "description": "OK",
82311
+ "content": {
82312
+ "application/json": {
82313
+ "schema": {
82314
+ "type": "object",
82315
+ "additionalProperties": true
82316
+ }
82317
+ }
82318
+ }
82319
+ },
82320
+ "400": {
82321
+ "$ref": "#/components/responses/BadRequest"
82322
+ },
82323
+ "401": {
82324
+ "$ref": "#/components/responses/Unauthorized"
82325
+ },
82326
+ "403": {
82327
+ "$ref": "#/components/responses/Forbidden"
82328
+ },
82329
+ "429": {
82330
+ "$ref": "#/components/responses/RateLimitExceeded"
82331
+ }
82332
+ }
82333
+ }
82334
+ },
82335
+ "/v1/me/data/items": {
82336
+ "get": {
82337
+ "operationId": "listMeDataItems",
82338
+ "x-audience": "public",
82339
+ "x-required-scopes": [
82340
+ "documents:read"
82341
+ ],
82342
+ "summary": "List your data items",
82343
+ "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",
82344
+ "tags": [
82345
+ "My Data"
82346
+ ],
82347
+ "parameters": [
82348
+ {
82349
+ "name": "kind",
82350
+ "in": "query",
82351
+ "required": true,
82352
+ "schema": {
82353
+ "type": "string",
82354
+ "enum": [
82355
+ "uploads",
82356
+ "extracted"
82357
+ ]
82358
+ }
82359
+ },
82360
+ {
82361
+ "name": "id",
82362
+ "in": "query",
82363
+ "schema": {
82364
+ "type": "string"
82365
+ }
82366
+ },
82367
+ {
82368
+ "name": "source",
82369
+ "in": "query",
82370
+ "description": "A source id, or `none`.",
82371
+ "schema": {
82372
+ "type": "string"
82373
+ }
82374
+ },
82375
+ {
82376
+ "name": "type",
82377
+ "in": "query",
82378
+ "description": "A document type id, or `none`.",
82379
+ "schema": {
82380
+ "type": "string"
82381
+ }
82382
+ },
82383
+ {
82384
+ "name": "month",
82385
+ "in": "query",
82386
+ "description": "Month, `YYYY-MM`.",
82387
+ "schema": {
82388
+ "type": "string",
82389
+ "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
82390
+ }
82391
+ },
82392
+ {
82393
+ "name": "field",
82394
+ "in": "query",
82395
+ "description": "A field id, or `none`.",
82396
+ "schema": {
82397
+ "type": "string"
82398
+ }
82399
+ },
82400
+ {
82401
+ "name": "vis",
82402
+ "in": "query",
82403
+ "schema": {
82404
+ "type": "string",
82405
+ "enum": [
82406
+ "me",
82407
+ "shared",
82408
+ "company"
82409
+ ]
82410
+ }
82411
+ },
82412
+ {
82413
+ "name": "after",
82414
+ "in": "query",
82415
+ "schema": {
82416
+ "type": "string"
82417
+ }
82418
+ },
82419
+ {
82420
+ "name": "limit",
82421
+ "in": "query",
82422
+ "schema": {
82423
+ "type": "integer",
82424
+ "minimum": 1,
82425
+ "default": 50
82426
+ }
82427
+ }
82428
+ ],
82429
+ "responses": {
82430
+ "200": {
82431
+ "description": "OK",
82432
+ "content": {
82433
+ "application/json": {
82434
+ "schema": {
82435
+ "type": "object",
82436
+ "additionalProperties": true
82437
+ }
82438
+ }
82439
+ }
82440
+ },
82441
+ "400": {
82442
+ "$ref": "#/components/responses/BadRequest"
82443
+ },
82444
+ "401": {
82445
+ "$ref": "#/components/responses/Unauthorized"
82446
+ },
82447
+ "403": {
82448
+ "$ref": "#/components/responses/Forbidden"
82449
+ },
82450
+ "429": {
82451
+ "$ref": "#/components/responses/RateLimitExceeded"
82452
+ }
82453
+ }
82454
+ }
82455
+ },
82456
+ "/v1/me/workspace-data": {
82457
+ "get": {
82458
+ "operationId": "getMeWorkspaceData",
82459
+ "x-audience": "public",
82460
+ "x-required-scopes": [
82461
+ "documents:read"
82462
+ ],
82463
+ "summary": "Count workspace data by owner",
82464
+ "description": "The workspace's documents, fields and data points you can see, counted by whose they are: `me`, `shared` with you, or `company`.\n",
82465
+ "tags": [
82466
+ "My Data"
82467
+ ],
82468
+ "responses": {
82469
+ "200": {
82470
+ "description": "OK",
82471
+ "content": {
82472
+ "application/json": {
82473
+ "schema": {
82474
+ "type": "object",
82475
+ "additionalProperties": true
82476
+ }
82477
+ }
82478
+ }
82479
+ },
82480
+ "401": {
82481
+ "$ref": "#/components/responses/Unauthorized"
82482
+ },
82483
+ "403": {
82484
+ "$ref": "#/components/responses/Forbidden"
82485
+ },
82486
+ "429": {
82487
+ "$ref": "#/components/responses/RateLimitExceeded"
82488
+ }
82489
+ }
82490
+ }
82491
+ },
82492
+ "/v1/governance/directory": {
82493
+ "get": {
82494
+ "operationId": "getAccessDirectory",
82495
+ "x-audience": "public",
82496
+ "x-required-scopes": [
82497
+ "access:read"
82498
+ ],
82499
+ "summary": "List sources and their holders",
82500
+ "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",
82501
+ "tags": [
82502
+ "Access & sharing"
82503
+ ],
82504
+ "responses": {
82505
+ "200": {
82506
+ "description": "OK",
82507
+ "content": {
82508
+ "application/json": {
82509
+ "schema": {
82510
+ "type": "object",
82511
+ "additionalProperties": true
82512
+ }
82513
+ }
82514
+ }
82515
+ },
82516
+ "401": {
82517
+ "$ref": "#/components/responses/Unauthorized"
82518
+ },
82519
+ "403": {
82520
+ "$ref": "#/components/responses/Forbidden"
82521
+ },
82522
+ "429": {
82523
+ "$ref": "#/components/responses/RateLimitExceeded"
82524
+ }
82525
+ }
82526
+ }
82527
+ },
82528
+ "/v1/governance/access-requests": {
82529
+ "get": {
82530
+ "operationId": "listAccessRequests",
82531
+ "x-audience": "public",
82532
+ "x-required-scopes": [
82533
+ "access:read"
82534
+ ],
82535
+ "summary": "List access requests",
82536
+ "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",
82537
+ "tags": [
82538
+ "Access & sharing"
82539
+ ],
82540
+ "responses": {
82541
+ "200": {
82542
+ "description": "OK",
82543
+ "content": {
82544
+ "application/json": {
82545
+ "schema": {
82546
+ "type": "object",
82547
+ "additionalProperties": true
82548
+ }
82549
+ }
82550
+ }
82551
+ },
82552
+ "401": {
82553
+ "$ref": "#/components/responses/Unauthorized"
82554
+ },
82555
+ "403": {
82556
+ "$ref": "#/components/responses/Forbidden"
82557
+ },
82558
+ "429": {
82559
+ "$ref": "#/components/responses/RateLimitExceeded"
82560
+ }
82561
+ }
82562
+ },
82563
+ "post": {
82564
+ "operationId": "createAccessRequest",
82565
+ "x-audience": "public",
82566
+ "x-required-scopes": [
82567
+ "access:write"
82568
+ ],
82569
+ "summary": "Ask for access",
82570
+ "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",
82571
+ "tags": [
82572
+ "Access & sharing"
82573
+ ],
82574
+ "requestBody": {
82575
+ "required": true,
82576
+ "content": {
82577
+ "application/json": {
82578
+ "schema": {
82579
+ "type": "object",
82580
+ "required": [
82581
+ "purpose",
82582
+ "duration_days"
82583
+ ],
82584
+ "properties": {
82585
+ "scope_id": {
82586
+ "type": "string",
82587
+ "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}$",
82588
+ "description": "An access scope (8-4-4-4-12 hex; version digits are arbitrary)."
82589
+ },
82590
+ "source_connection_id": {
82591
+ "type": "string",
82592
+ "format": "uuid"
82593
+ },
82594
+ "document_id": {
82595
+ "type": "string",
82596
+ "format": "uuid"
82597
+ },
82598
+ "purpose": {
82599
+ "type": "string",
82600
+ "maxLength": 500
82601
+ },
82602
+ "duration_days": {
82603
+ "type": "integer",
82604
+ "minimum": 1,
82605
+ "maximum": 90
82606
+ },
82607
+ "capabilities": {
82608
+ "type": "array",
82609
+ "items": {
82610
+ "type": "string",
82611
+ "enum": [
82612
+ "delete",
82613
+ "discover",
82614
+ "read",
82615
+ "write"
82616
+ ]
82617
+ }
82618
+ }
82619
+ }
82620
+ }
82621
+ }
82622
+ }
82623
+ },
82624
+ "responses": {
82625
+ "201": {
82626
+ "description": "Created",
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}/approve": {
82658
+ "post": {
82659
+ "operationId": "approveAccessRequest",
82660
+ "x-audience": "public",
82661
+ "x-required-scopes": [
82662
+ "access:write"
82663
+ ],
82664
+ "summary": "Approve an access request",
82665
+ "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",
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
+ "responses": {
82681
+ "200": {
82682
+ "description": "OK",
82683
+ "content": {
82684
+ "application/json": {
82685
+ "schema": {
82686
+ "type": "object",
82687
+ "additionalProperties": true
82688
+ }
82689
+ }
82690
+ }
82691
+ },
82692
+ "400": {
82693
+ "$ref": "#/components/responses/BadRequest"
82694
+ },
82695
+ "401": {
82696
+ "$ref": "#/components/responses/Unauthorized"
82697
+ },
82698
+ "403": {
82699
+ "$ref": "#/components/responses/Forbidden"
82700
+ },
82701
+ "404": {
82702
+ "$ref": "#/components/responses/NotFound"
82703
+ },
82704
+ "409": {
82705
+ "$ref": "#/components/responses/Conflict"
82706
+ },
82707
+ "429": {
82708
+ "$ref": "#/components/responses/RateLimitExceeded"
82709
+ }
82710
+ }
82711
+ }
82712
+ },
82713
+ "/v1/governance/access-requests/{id}/deny": {
82714
+ "post": {
82715
+ "operationId": "denyAccessRequest",
82716
+ "x-audience": "public",
82717
+ "x-required-scopes": [
82718
+ "access:write"
82719
+ ],
82720
+ "summary": "Deny an access request",
82721
+ "description": "A holder of the request's scope refuses a pending request, with a reason.\n",
82722
+ "tags": [
82723
+ "Access & sharing"
82724
+ ],
82725
+ "parameters": [
82726
+ {
82727
+ "name": "id",
82728
+ "in": "path",
82729
+ "required": true,
82730
+ "schema": {
82731
+ "type": "string",
82732
+ "format": "uuid"
82733
+ }
82734
+ }
82735
+ ],
82736
+ "requestBody": {
82737
+ "required": true,
82738
+ "content": {
82739
+ "application/json": {
82740
+ "schema": {
82741
+ "type": "object",
82742
+ "required": [
82743
+ "reason"
82744
+ ],
82745
+ "properties": {
82746
+ "reason": {
82747
+ "type": "string",
82748
+ "maxLength": 500
82749
+ }
82750
+ }
82751
+ }
82752
+ }
82753
+ }
82754
+ },
82755
+ "responses": {
82756
+ "200": {
82757
+ "description": "OK",
82758
+ "content": {
82759
+ "application/json": {
82760
+ "schema": {
82761
+ "type": "object",
82762
+ "additionalProperties": true
82763
+ }
82764
+ }
82765
+ }
82766
+ },
82767
+ "400": {
82768
+ "$ref": "#/components/responses/BadRequest"
82769
+ },
82770
+ "401": {
82771
+ "$ref": "#/components/responses/Unauthorized"
82772
+ },
82773
+ "403": {
82774
+ "$ref": "#/components/responses/Forbidden"
82775
+ },
82776
+ "404": {
82777
+ "$ref": "#/components/responses/NotFound"
82778
+ },
82779
+ "409": {
82780
+ "$ref": "#/components/responses/Conflict"
82781
+ },
82782
+ "429": {
82783
+ "$ref": "#/components/responses/RateLimitExceeded"
82784
+ }
82785
+ }
82786
+ }
82787
+ },
82788
+ "/v1/governance/access-requests/{id}/second": {
82789
+ "post": {
82790
+ "operationId": "secondAccessRequest",
82791
+ "x-audience": "public",
82792
+ "x-required-scopes": [
82793
+ "access:write"
82794
+ ],
82795
+ "summary": "Decide an access request as data protection officer",
82796
+ "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",
82797
+ "tags": [
82798
+ "Access & sharing"
82799
+ ],
82800
+ "parameters": [
82801
+ {
82802
+ "name": "id",
82803
+ "in": "path",
82804
+ "required": true,
82805
+ "schema": {
82806
+ "type": "string",
82807
+ "format": "uuid"
82808
+ }
82809
+ }
82810
+ ],
82811
+ "requestBody": {
82812
+ "required": true,
82813
+ "content": {
82814
+ "application/json": {
82815
+ "schema": {
82816
+ "type": "object",
82817
+ "required": [
82818
+ "ok",
82819
+ "text"
82820
+ ],
82821
+ "properties": {
82822
+ "ok": {
82823
+ "type": "boolean"
82824
+ },
82825
+ "text": {
82826
+ "type": "string"
82827
+ }
82828
+ }
82829
+ }
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/access-requests/{id}/stop": {
82867
+ "post": {
82868
+ "operationId": "stopAccessRequest",
82869
+ "x-audience": "public",
82870
+ "x-required-scopes": [
82871
+ "access:write"
82872
+ ],
82873
+ "summary": "Stop an access request",
82874
+ "description": "The requester or a holder ends an approved request; its licence or document share is revoked.\n",
82875
+ "tags": [
82876
+ "Access & sharing"
82877
+ ],
82878
+ "parameters": [
82879
+ {
82880
+ "name": "id",
82881
+ "in": "path",
82882
+ "required": true,
82883
+ "schema": {
82884
+ "type": "string",
82885
+ "format": "uuid"
82886
+ }
82887
+ }
82888
+ ],
82889
+ "responses": {
82890
+ "200": {
82891
+ "description": "OK",
82892
+ "content": {
82893
+ "application/json": {
82894
+ "schema": {
82895
+ "type": "object",
82896
+ "additionalProperties": true
82897
+ }
82898
+ }
82899
+ }
82900
+ },
82901
+ "400": {
82902
+ "$ref": "#/components/responses/BadRequest"
82903
+ },
82904
+ "401": {
82905
+ "$ref": "#/components/responses/Unauthorized"
82906
+ },
82907
+ "403": {
82908
+ "$ref": "#/components/responses/Forbidden"
82909
+ },
82910
+ "404": {
82911
+ "$ref": "#/components/responses/NotFound"
82912
+ },
82913
+ "409": {
82914
+ "$ref": "#/components/responses/Conflict"
82915
+ },
82916
+ "429": {
82917
+ "$ref": "#/components/responses/RateLimitExceeded"
82918
+ }
82919
+ }
82920
+ }
82921
+ },
82922
+ "/v1/governance/sharing": {
82923
+ "get": {
82924
+ "operationId": "getSharing",
82925
+ "x-audience": "public",
82926
+ "x-required-scopes": [
82927
+ "access:read"
82928
+ ],
82929
+ "summary": "List shares",
82930
+ "description": "Whether sharing applies in this workspace (`available`), the shares the caller gave (`given`) and the shares naming the caller (`received`).\n",
82931
+ "tags": [
82932
+ "Access & sharing"
82933
+ ],
82934
+ "responses": {
82935
+ "200": {
82936
+ "description": "OK",
82937
+ "content": {
82938
+ "application/json": {
82939
+ "schema": {
82940
+ "type": "object",
82941
+ "additionalProperties": true
82942
+ }
82943
+ }
82944
+ }
82945
+ },
82946
+ "401": {
82947
+ "$ref": "#/components/responses/Unauthorized"
82948
+ },
82949
+ "403": {
82950
+ "$ref": "#/components/responses/Forbidden"
82951
+ },
82952
+ "429": {
82953
+ "$ref": "#/components/responses/RateLimitExceeded"
82954
+ }
82955
+ }
82956
+ }
82957
+ },
82958
+ "/v1/governance/documents/{id}/access": {
82959
+ "get": {
82960
+ "operationId": "getDocumentAccess",
82961
+ "x-audience": "public",
82962
+ "x-required-scopes": [
82963
+ "access:read"
82964
+ ],
82965
+ "summary": "What you may do with a document",
82966
+ "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",
82967
+ "tags": [
82968
+ "Access & sharing"
82969
+ ],
82970
+ "parameters": [
82971
+ {
82972
+ "name": "id",
82973
+ "in": "path",
82974
+ "required": true,
82975
+ "schema": {
82976
+ "type": "string",
82977
+ "format": "uuid"
82978
+ }
82979
+ }
82980
+ ],
82981
+ "responses": {
82982
+ "200": {
82983
+ "description": "OK",
82984
+ "content": {
82985
+ "application/json": {
82986
+ "schema": {
82987
+ "type": "object",
82988
+ "properties": {
82989
+ "managed": {
82990
+ "type": "boolean"
82991
+ },
82992
+ "share": {
82993
+ "type": "boolean"
82994
+ },
82995
+ "write": {
82996
+ "type": "boolean"
82997
+ },
82998
+ "classify": {
82999
+ "type": "boolean"
83000
+ }
83001
+ }
83002
+ }
83003
+ }
83004
+ }
83005
+ },
83006
+ "401": {
83007
+ "$ref": "#/components/responses/Unauthorized"
83008
+ },
83009
+ "403": {
83010
+ "$ref": "#/components/responses/Forbidden"
83011
+ },
83012
+ "404": {
83013
+ "$ref": "#/components/responses/NotFound"
83014
+ },
83015
+ "429": {
83016
+ "$ref": "#/components/responses/RateLimitExceeded"
83017
+ }
83018
+ }
83019
+ }
83020
+ },
83021
+ "/v1/governance/documents/{id}/shares": {
83022
+ "get": {
83023
+ "operationId": "listDocumentShares",
83024
+ "x-audience": "public",
83025
+ "x-required-scopes": [
83026
+ "access:read"
83027
+ ],
83028
+ "summary": "List who a document is shared with",
83029
+ "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",
83030
+ "tags": [
83031
+ "Access & sharing"
83032
+ ],
83033
+ "parameters": [
83034
+ {
83035
+ "name": "id",
83036
+ "in": "path",
83037
+ "required": true,
83038
+ "schema": {
83039
+ "type": "string",
83040
+ "format": "uuid"
83041
+ }
83042
+ }
83043
+ ],
83044
+ "responses": {
83045
+ "200": {
83046
+ "description": "OK",
83047
+ "content": {
83048
+ "application/json": {
83049
+ "schema": {
83050
+ "type": "object",
83051
+ "additionalProperties": true
83052
+ }
83053
+ }
83054
+ }
83055
+ },
83056
+ "401": {
83057
+ "$ref": "#/components/responses/Unauthorized"
83058
+ },
83059
+ "403": {
83060
+ "$ref": "#/components/responses/Forbidden"
83061
+ },
83062
+ "404": {
83063
+ "$ref": "#/components/responses/NotFound"
83064
+ },
83065
+ "429": {
83066
+ "$ref": "#/components/responses/RateLimitExceeded"
83067
+ }
83068
+ }
83069
+ }
83070
+ },
83071
+ "/v1/governance/shares/documents": {
83072
+ "post": {
83073
+ "operationId": "shareDocuments",
83074
+ "x-audience": "public",
83075
+ "x-required-scopes": [
83076
+ "access:write"
83077
+ ],
83078
+ "summary": "Share documents",
83079
+ "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",
83080
+ "tags": [
83081
+ "Access & sharing"
83082
+ ],
83083
+ "requestBody": {
83084
+ "required": true,
83085
+ "content": {
83086
+ "application/json": {
83087
+ "schema": {
83088
+ "type": "object",
83089
+ "required": [
83090
+ "document_ids",
83091
+ "to"
83092
+ ],
83093
+ "properties": {
83094
+ "document_ids": {
83095
+ "type": "array",
83096
+ "minItems": 1,
83097
+ "maxItems": 200,
83098
+ "items": {
83099
+ "type": "string",
83100
+ "format": "uuid"
83101
+ }
83102
+ },
83103
+ "to": {
83104
+ "type": "object",
83105
+ "required": [
83106
+ "type"
83107
+ ],
83108
+ "properties": {
83109
+ "type": {
83110
+ "type": "string",
83111
+ "enum": [
83112
+ "person",
83113
+ "group",
83114
+ "everyone"
83115
+ ]
83116
+ },
83117
+ "id": {
83118
+ "type": "string",
83119
+ "format": "uuid",
83120
+ "description": "The member or group; absent for everyone."
83121
+ }
83122
+ }
83123
+ },
83124
+ "duration_days": {
83125
+ "type": "integer",
83126
+ "minimum": 1,
83127
+ "maximum": 365,
83128
+ "nullable": true
83129
+ },
83130
+ "note": {
83131
+ "type": "string",
83132
+ "maxLength": 500
83133
+ },
83134
+ "allow_pass_on": {
83135
+ "type": "boolean",
83136
+ "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."
83137
+ }
83138
+ }
83139
+ }
83140
+ }
83141
+ }
83142
+ },
83143
+ "responses": {
83144
+ "201": {
83145
+ "description": "Created",
83146
+ "content": {
83147
+ "application/json": {
83148
+ "schema": {
83149
+ "type": "object",
83150
+ "additionalProperties": true
83151
+ }
83152
+ }
83153
+ }
83154
+ },
83155
+ "400": {
83156
+ "$ref": "#/components/responses/BadRequest"
83157
+ },
83158
+ "401": {
83159
+ "$ref": "#/components/responses/Unauthorized"
83160
+ },
83161
+ "403": {
83162
+ "$ref": "#/components/responses/Forbidden"
83163
+ },
83164
+ "404": {
83165
+ "$ref": "#/components/responses/NotFound"
83166
+ },
83167
+ "409": {
83168
+ "$ref": "#/components/responses/Conflict"
83169
+ },
83170
+ "429": {
83171
+ "$ref": "#/components/responses/RateLimitExceeded"
83172
+ }
83173
+ }
83174
+ }
83175
+ },
83176
+ "/v1/governance/shares/pass-on": {
83177
+ "post": {
83178
+ "operationId": "passOnShare",
83179
+ "x-audience": "public",
83180
+ "x-required-scopes": [
83181
+ "access:write"
83182
+ ],
83183
+ "summary": "Pass a share on",
83184
+ "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",
83185
+ "tags": [
83186
+ "Access & sharing"
83187
+ ],
83188
+ "requestBody": {
83189
+ "required": true,
83190
+ "content": {
83191
+ "application/json": {
83192
+ "schema": {
83193
+ "type": "object",
83194
+ "required": [
83195
+ "to"
83196
+ ],
83197
+ "properties": {
83198
+ "document_ids": {
83199
+ "type": "array",
83200
+ "minItems": 1,
83201
+ "maxItems": 200,
83202
+ "items": {
83203
+ "type": "string",
83204
+ "format": "uuid"
83205
+ }
83206
+ },
83207
+ "scope_id": {
83208
+ "type": "string",
83209
+ "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}$",
83210
+ "description": "An access scope (8-4-4-4-12 hex; version digits are arbitrary)."
83211
+ },
83212
+ "source_connection_id": {
83213
+ "type": "string",
83214
+ "format": "uuid"
83215
+ },
83216
+ "to": {
83217
+ "type": "object",
83218
+ "required": [
83219
+ "type",
83220
+ "id"
83221
+ ],
83222
+ "properties": {
83223
+ "type": {
83224
+ "type": "string",
83225
+ "enum": [
83226
+ "person",
83227
+ "group"
83228
+ ]
83229
+ },
83230
+ "id": {
83231
+ "type": "string",
83232
+ "format": "uuid",
83233
+ "description": "The member or group."
83234
+ }
83235
+ }
83236
+ },
83237
+ "duration_days": {
83238
+ "type": "integer",
83239
+ "minimum": 1,
83240
+ "maximum": 365,
83241
+ "nullable": true
83242
+ },
83243
+ "note": {
83244
+ "type": "string",
83245
+ "maxLength": 500
83246
+ }
83247
+ }
83248
+ }
83249
+ }
83250
+ }
83251
+ },
83252
+ "responses": {
83253
+ "201": {
83254
+ "description": "The shares written.",
83255
+ "content": {
83256
+ "application/json": {
83257
+ "schema": {
83258
+ "type": "array",
83259
+ "items": {
83260
+ "type": "object",
83261
+ "additionalProperties": true
83262
+ }
83263
+ }
83264
+ }
83265
+ }
83266
+ },
83267
+ "400": {
83268
+ "$ref": "#/components/responses/BadRequest"
83269
+ },
83270
+ "401": {
83271
+ "$ref": "#/components/responses/Unauthorized"
83272
+ },
83273
+ "403": {
83274
+ "$ref": "#/components/responses/Forbidden"
83275
+ },
83276
+ "404": {
83277
+ "$ref": "#/components/responses/NotFound"
83278
+ },
83279
+ "409": {
83280
+ "$ref": "#/components/responses/Conflict"
83281
+ },
83282
+ "429": {
83283
+ "$ref": "#/components/responses/RateLimitExceeded"
83284
+ }
83285
+ }
83286
+ }
83287
+ },
83288
+ "/v1/governance/shares/scopes": {
83289
+ "post": {
83290
+ "operationId": "shareScope",
83291
+ "x-audience": "public",
83292
+ "x-required-scopes": [
83293
+ "access:write"
83294
+ ],
83295
+ "summary": "Share a whole source",
83296
+ "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",
83297
+ "tags": [
83298
+ "Access & sharing"
83299
+ ],
83300
+ "requestBody": {
83301
+ "required": true,
83302
+ "content": {
83303
+ "application/json": {
83304
+ "schema": {
83305
+ "type": "object",
83306
+ "required": [
83307
+ "to"
83308
+ ],
83309
+ "properties": {
83310
+ "scope_id": {
83311
+ "type": "string",
83312
+ "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}$",
83313
+ "description": "An access scope (8-4-4-4-12 hex; version digits are arbitrary)."
83314
+ },
83315
+ "source_connection_id": {
83316
+ "type": "string",
83317
+ "format": "uuid"
83318
+ },
83319
+ "to": {
83320
+ "type": "object",
83321
+ "required": [
83322
+ "type"
83323
+ ],
83324
+ "properties": {
83325
+ "type": {
83326
+ "type": "string",
83327
+ "enum": [
83328
+ "person",
83329
+ "group",
83330
+ "everyone"
83331
+ ]
83332
+ },
83333
+ "id": {
83334
+ "type": "string",
83335
+ "format": "uuid",
83336
+ "description": "The member or group; absent for everyone."
83337
+ }
83338
+ }
83339
+ },
83340
+ "duration_days": {
83341
+ "type": "integer",
83342
+ "minimum": 1,
83343
+ "maximum": 365,
83344
+ "nullable": true
83345
+ },
83346
+ "allow_pass_on": {
83347
+ "type": "boolean",
83348
+ "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."
83349
+ }
83350
+ }
83351
+ }
83352
+ }
83353
+ }
83354
+ },
83355
+ "responses": {
83356
+ "201": {
83357
+ "description": "Created",
83358
+ "content": {
83359
+ "application/json": {
83360
+ "schema": {
83361
+ "type": "object",
83362
+ "additionalProperties": true
83363
+ }
83364
+ }
83365
+ }
83366
+ },
83367
+ "400": {
83368
+ "$ref": "#/components/responses/BadRequest"
83369
+ },
83370
+ "401": {
83371
+ "$ref": "#/components/responses/Unauthorized"
83372
+ },
83373
+ "403": {
83374
+ "$ref": "#/components/responses/Forbidden"
83375
+ },
83376
+ "404": {
83377
+ "$ref": "#/components/responses/NotFound"
83378
+ },
83379
+ "409": {
83380
+ "$ref": "#/components/responses/Conflict"
83381
+ },
83382
+ "429": {
83383
+ "$ref": "#/components/responses/RateLimitExceeded"
83384
+ }
83385
+ }
83386
+ }
83387
+ },
83388
+ "/v1/governance/level": {
83389
+ "get": {
83390
+ "operationId": "getGovernanceLevel",
83391
+ "x-audience": "public",
83392
+ "x-required-scopes": [
83393
+ "access:read"
83394
+ ],
83395
+ "summary": "The workspace's data governance",
83396
+ "description": "Whether data governance is on, its default (`open`: what the access rules open to the workspace stays open, holders close their sources; `private`: holders, licences and shares only), and a turn-on in progress (`enabling`). Workspace owners only.\n",
83397
+ "tags": [
83398
+ "Access & sharing"
83399
+ ],
83400
+ "responses": {
83401
+ "200": {
83402
+ "description": "The governance status.",
83403
+ "content": {
83404
+ "application/json": {
83405
+ "schema": {
83406
+ "type": "object",
83407
+ "properties": {
83408
+ "on": {
83409
+ "type": "boolean"
83410
+ },
83411
+ "default": {
83412
+ "type": "string",
83413
+ "enum": [
83414
+ "open",
83415
+ "private"
83416
+ ]
83417
+ },
83418
+ "stored_default": {
83419
+ "type": "string",
83420
+ "enum": [
83421
+ "open",
83422
+ "private"
83423
+ ],
83424
+ "nullable": true
83425
+ },
83426
+ "since": {
83427
+ "type": "string",
83428
+ "nullable": true
83429
+ },
83430
+ "enabled": {
83431
+ "type": "boolean",
83432
+ "description": "governance.enabled: this deployment runs the scope model."
83433
+ },
83434
+ "decision_point_on": {
83435
+ "type": "boolean"
83436
+ },
83437
+ "field_tiers": {
83438
+ "type": "boolean"
83439
+ },
83440
+ "enabling": {
83441
+ "type": "object",
83442
+ "nullable": true,
83443
+ "description": "A turn-on in progress: the workspace keeps its current access rules until the job has given every document its access scope; then governance switches on.",
83444
+ "properties": {
83445
+ "state": {
83446
+ "type": "string",
83447
+ "enum": [
83448
+ "preparing",
83449
+ "failed"
83450
+ ]
83451
+ },
83452
+ "default": {
83453
+ "type": "string",
83454
+ "enum": [
83455
+ "open",
83456
+ "private"
83457
+ ]
83458
+ },
83459
+ "requested_at": {
83460
+ "type": "string",
83461
+ "nullable": true
83462
+ },
83463
+ "requested_by": {
83464
+ "type": "string",
83465
+ "nullable": true
83466
+ },
83467
+ "done": {
83468
+ "type": "integer",
83469
+ "nullable": true,
83470
+ "description": "Documents given their access scope so far."
83471
+ },
83472
+ "total": {
83473
+ "type": "integer",
83474
+ "nullable": true
83475
+ },
83476
+ "error": {
83477
+ "type": "string",
83478
+ "nullable": true
83479
+ }
83480
+ }
83481
+ }
83482
+ }
83483
+ }
83484
+ }
83485
+ }
83486
+ },
83487
+ "400": {
83488
+ "$ref": "#/components/responses/BadRequest"
83489
+ },
83490
+ "401": {
83491
+ "$ref": "#/components/responses/Unauthorized"
83492
+ },
83493
+ "403": {
83494
+ "$ref": "#/components/responses/Forbidden"
83495
+ },
83496
+ "429": {
83497
+ "$ref": "#/components/responses/RateLimitExceeded"
83498
+ }
83499
+ }
83500
+ },
83501
+ "put": {
83502
+ "operationId": "setGovernanceLevel",
83503
+ "x-audience": "public",
83504
+ "x-required-scopes": [
83505
+ "access:write"
83506
+ ],
83507
+ "summary": "Turn data governance on or off",
83508
+ "description": "Turn data governance on or off and choose its default. When documents still need their access scope, turning on answers at once with `enabling.state = preparing`; a background job gives every document its access scope and then switches governance on (poll `GET /v1/governance/level`). The workspace keeps its current access rules until then. A failed preparation is reported in `enabling.error`; turning on again continues where it stopped. Turning off is immediate and ends a preparation. Workspace owners only.\n",
83509
+ "tags": [
83510
+ "Access & sharing"
83511
+ ],
83512
+ "requestBody": {
83513
+ "required": true,
83514
+ "content": {
83515
+ "application/json": {
83516
+ "schema": {
83517
+ "type": "object",
83518
+ "required": [
83519
+ "on"
83520
+ ],
83521
+ "properties": {
83522
+ "on": {
83523
+ "type": "boolean"
83524
+ },
83525
+ "default": {
83526
+ "type": "string",
83527
+ "enum": [
83528
+ "open",
83529
+ "private"
83530
+ ]
83531
+ }
83532
+ }
83533
+ }
83534
+ }
83535
+ }
83536
+ },
83537
+ "responses": {
83538
+ "200": {
83539
+ "description": "The governance status after the change (or with `enabling` while it prepares).",
83540
+ "content": {
83541
+ "application/json": {
83542
+ "schema": {
83543
+ "type": "object",
83544
+ "properties": {
83545
+ "on": {
83546
+ "type": "boolean"
83547
+ },
83548
+ "default": {
83549
+ "type": "string",
83550
+ "enum": [
83551
+ "open",
83552
+ "private"
83553
+ ]
83554
+ },
83555
+ "stored_default": {
83556
+ "type": "string",
83557
+ "enum": [
83558
+ "open",
83559
+ "private"
83560
+ ],
83561
+ "nullable": true
83562
+ },
83563
+ "since": {
83564
+ "type": "string",
83565
+ "nullable": true
83566
+ },
83567
+ "enabled": {
83568
+ "type": "boolean",
83569
+ "description": "governance.enabled: this deployment runs the scope model."
83570
+ },
83571
+ "decision_point_on": {
83572
+ "type": "boolean"
83573
+ },
83574
+ "field_tiers": {
83575
+ "type": "boolean"
83576
+ },
83577
+ "enabling": {
83578
+ "type": "object",
83579
+ "nullable": true,
83580
+ "description": "A turn-on in progress: the workspace keeps its current access rules until the job has given every document its access scope; then governance switches on.",
83581
+ "properties": {
83582
+ "state": {
83583
+ "type": "string",
83584
+ "enum": [
83585
+ "preparing",
83586
+ "failed"
83587
+ ]
83588
+ },
83589
+ "default": {
83590
+ "type": "string",
83591
+ "enum": [
83592
+ "open",
83593
+ "private"
83594
+ ]
83595
+ },
83596
+ "requested_at": {
83597
+ "type": "string",
83598
+ "nullable": true
83599
+ },
83600
+ "requested_by": {
83601
+ "type": "string",
83602
+ "nullable": true
83603
+ },
83604
+ "done": {
83605
+ "type": "integer",
83606
+ "nullable": true,
83607
+ "description": "Documents given their access scope so far."
83608
+ },
83609
+ "total": {
83610
+ "type": "integer",
83611
+ "nullable": true
83612
+ },
83613
+ "error": {
83614
+ "type": "string",
83615
+ "nullable": true
83616
+ }
83617
+ }
83618
+ }
83619
+ }
83620
+ }
83621
+ }
83622
+ }
83623
+ },
83624
+ "400": {
83625
+ "$ref": "#/components/responses/BadRequest"
83626
+ },
83627
+ "401": {
83628
+ "$ref": "#/components/responses/Unauthorized"
83629
+ },
83630
+ "403": {
83631
+ "$ref": "#/components/responses/Forbidden"
83632
+ },
83633
+ "409": {
83634
+ "$ref": "#/components/responses/Conflict"
83635
+ },
83636
+ "429": {
83637
+ "$ref": "#/components/responses/RateLimitExceeded"
83638
+ }
83639
+ }
83640
+ }
83641
+ },
83642
+ "/v1/governance/level/dry-run": {
83643
+ "get": {
83644
+ "operationId": "dryRunGovernanceLevel",
83645
+ "x-audience": "public",
83646
+ "x-required-scopes": [
83647
+ "access:read"
83648
+ ],
83649
+ "summary": "Who reads what under data governance",
83650
+ "description": "Per active member: live documents read today and under governance with the given default (`default=open|private`, `open` when omitted), with how many they would gain or lose, and the stamp report (documents still needing their access scope). Reads only. Workspace owners only.\n",
83651
+ "tags": [
83652
+ "Access & sharing"
83653
+ ],
83654
+ "parameters": [
83655
+ {
83656
+ "name": "default",
83657
+ "in": "query",
83658
+ "required": false,
83659
+ "schema": {
83660
+ "type": "string",
83661
+ "enum": [
83662
+ "open",
83663
+ "private"
83664
+ ]
83665
+ }
83666
+ }
83667
+ ],
83668
+ "responses": {
83669
+ "200": {
83670
+ "description": "The dry run.",
83671
+ "content": {
83672
+ "application/json": {
83673
+ "schema": {
83674
+ "type": "object",
83675
+ "additionalProperties": true
83676
+ }
83677
+ }
83678
+ }
83679
+ },
83680
+ "400": {
83681
+ "$ref": "#/components/responses/BadRequest"
83682
+ },
83683
+ "401": {
83684
+ "$ref": "#/components/responses/Unauthorized"
83685
+ },
83686
+ "403": {
83687
+ "$ref": "#/components/responses/Forbidden"
83688
+ },
83689
+ "429": {
83690
+ "$ref": "#/components/responses/RateLimitExceeded"
83691
+ }
83692
+ }
83693
+ }
83694
+ },
83695
+ "/v1/governance/shares/workspace": {
83696
+ "post": {
83697
+ "operationId": "setWorkspaceOpen",
83698
+ "x-audience": "public",
83699
+ "x-required-scopes": [
83700
+ "access:write"
83701
+ ],
83702
+ "summary": "Open or close a source to the workspace",
83703
+ "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",
83704
+ "tags": [
83705
+ "Access & sharing"
83706
+ ],
83707
+ "requestBody": {
83708
+ "required": true,
83709
+ "content": {
83710
+ "application/json": {
83711
+ "schema": {
83712
+ "type": "object",
83713
+ "required": [
83714
+ "open"
83715
+ ],
83716
+ "properties": {
83717
+ "scope_id": {
83718
+ "type": "string",
83719
+ "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}$",
83720
+ "description": "An access scope (8-4-4-4-12 hex; version digits are arbitrary)."
83721
+ },
83722
+ "source_connection_id": {
83723
+ "type": "string",
83724
+ "format": "uuid"
83725
+ },
83726
+ "open": {
83727
+ "type": "boolean"
83728
+ }
83729
+ }
83730
+ }
83731
+ }
83732
+ }
83733
+ },
83734
+ "responses": {
83735
+ "200": {
83736
+ "description": "The scope, with `open_to_workspace`.",
83737
+ "content": {
83738
+ "application/json": {
83739
+ "schema": {
83740
+ "type": "object",
83741
+ "additionalProperties": true
83742
+ }
83743
+ }
83744
+ }
83745
+ },
83746
+ "400": {
83747
+ "$ref": "#/components/responses/BadRequest"
83748
+ },
83749
+ "401": {
83750
+ "$ref": "#/components/responses/Unauthorized"
83751
+ },
83752
+ "403": {
83753
+ "$ref": "#/components/responses/Forbidden"
83754
+ },
83755
+ "404": {
83756
+ "$ref": "#/components/responses/NotFound"
83757
+ },
83758
+ "409": {
83759
+ "$ref": "#/components/responses/Conflict"
83760
+ },
83761
+ "429": {
83762
+ "$ref": "#/components/responses/RateLimitExceeded"
83763
+ }
83764
+ }
83765
+ }
83766
+ },
83767
+ "/v1/governance/shares/{kind}/{id}/stop": {
83768
+ "post": {
83769
+ "operationId": "stopShare",
83770
+ "x-audience": "public",
83771
+ "x-required-scopes": [
83772
+ "access:write"
83773
+ ],
83774
+ "summary": "Stop a share",
83775
+ "description": "Stop a share: its granter or a holder ends it; the person it names may remove it from their own access.\n",
83776
+ "tags": [
83777
+ "Access & sharing"
83778
+ ],
83779
+ "parameters": [
83780
+ {
83781
+ "name": "kind",
83782
+ "in": "path",
83783
+ "required": true,
83784
+ "schema": {
83785
+ "type": "string",
83786
+ "enum": [
83787
+ "document",
83788
+ "scope"
83789
+ ]
83790
+ }
83791
+ },
83792
+ {
83793
+ "name": "id",
83794
+ "in": "path",
83795
+ "required": true,
83796
+ "schema": {
83797
+ "type": "string",
83798
+ "format": "uuid"
83799
+ }
83800
+ }
83801
+ ],
83802
+ "responses": {
83803
+ "200": {
83804
+ "description": "OK",
83805
+ "content": {
83806
+ "application/json": {
83807
+ "schema": {
83808
+ "type": "object",
83809
+ "additionalProperties": true
83810
+ }
83811
+ }
83812
+ }
83813
+ },
83814
+ "400": {
83815
+ "$ref": "#/components/responses/BadRequest"
83816
+ },
83817
+ "401": {
83818
+ "$ref": "#/components/responses/Unauthorized"
83819
+ },
83820
+ "403": {
83821
+ "$ref": "#/components/responses/Forbidden"
83822
+ },
83823
+ "404": {
83824
+ "$ref": "#/components/responses/NotFound"
83825
+ },
83826
+ "409": {
83827
+ "$ref": "#/components/responses/Conflict"
83828
+ },
83829
+ "429": {
83830
+ "$ref": "#/components/responses/RateLimitExceeded"
83831
+ }
83832
+ }
83833
+ }
83834
+ },
83835
+ "/v1/governance/data-points": {
83836
+ "get": {
83837
+ "operationId": "listMyDataPoints",
83838
+ "x-audience": "public",
83839
+ "x-required-scopes": [
83840
+ "access:read"
83841
+ ],
83842
+ "summary": "My data points",
83843
+ "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",
83844
+ "tags": [
83845
+ "Access & sharing"
83846
+ ],
83847
+ "responses": {
83848
+ "200": {
83849
+ "description": "OK",
83850
+ "content": {
83851
+ "application/json": {
83852
+ "schema": {
83853
+ "type": "object",
83854
+ "additionalProperties": true
83855
+ }
83856
+ }
83857
+ }
83858
+ },
83859
+ "400": {
83860
+ "$ref": "#/components/responses/BadRequest"
83861
+ },
83862
+ "401": {
83863
+ "$ref": "#/components/responses/Unauthorized"
83864
+ },
83865
+ "403": {
83866
+ "$ref": "#/components/responses/Forbidden"
83867
+ },
83868
+ "404": {
83869
+ "$ref": "#/components/responses/NotFound"
83870
+ },
83871
+ "409": {
83872
+ "$ref": "#/components/responses/Conflict"
83873
+ },
83874
+ "429": {
83875
+ "$ref": "#/components/responses/RateLimitExceeded"
83876
+ }
83877
+ }
83878
+ }
83879
+ },
83880
+ "/v1/governance/data-points/shared": {
83881
+ "get": {
83882
+ "operationId": "listSharedDataPoints",
83883
+ "x-audience": "public",
83884
+ "x-required-scopes": [
83885
+ "access:read"
83886
+ ],
83887
+ "summary": "Data points shared with me",
83888
+ "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",
83889
+ "tags": [
83890
+ "Access & sharing"
83891
+ ],
83892
+ "parameters": [
83893
+ {
83894
+ "name": "spec_id",
83895
+ "in": "query",
83896
+ "required": false,
83897
+ "schema": {
83898
+ "type": "string",
83899
+ "format": "uuid"
83900
+ }
83901
+ }
83902
+ ],
83903
+ "responses": {
83904
+ "200": {
83905
+ "description": "OK",
83906
+ "content": {
83907
+ "application/json": {
83908
+ "schema": {
83909
+ "type": "object",
83910
+ "additionalProperties": true
83911
+ }
83912
+ }
83913
+ }
83914
+ },
83915
+ "400": {
83916
+ "$ref": "#/components/responses/BadRequest"
83917
+ },
83918
+ "401": {
83919
+ "$ref": "#/components/responses/Unauthorized"
83920
+ },
83921
+ "403": {
83922
+ "$ref": "#/components/responses/Forbidden"
83923
+ },
83924
+ "404": {
83925
+ "$ref": "#/components/responses/NotFound"
83926
+ },
83927
+ "409": {
83928
+ "$ref": "#/components/responses/Conflict"
83929
+ },
83930
+ "429": {
83931
+ "$ref": "#/components/responses/RateLimitExceeded"
83932
+ }
83933
+ }
83934
+ }
83935
+ },
83936
+ "/v1/governance/data-points/{specId}": {
83937
+ "put": {
83938
+ "operationId": "confirmDataPoints",
83939
+ "x-audience": "public",
83940
+ "x-required-scopes": [
83941
+ "access:write"
83942
+ ],
83943
+ "summary": "Confirm my data points for one Spec",
83944
+ "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",
83945
+ "tags": [
83946
+ "Access & sharing"
83947
+ ],
83948
+ "parameters": [
83949
+ {
83950
+ "name": "specId",
83951
+ "in": "path",
83952
+ "required": true,
83953
+ "schema": {
83954
+ "type": "string",
83955
+ "format": "uuid"
83956
+ }
83957
+ }
83958
+ ],
83959
+ "requestBody": {
83960
+ "required": true,
83961
+ "content": {
83962
+ "application/json": {
83963
+ "schema": {
83964
+ "type": "object",
83965
+ "required": [
83966
+ "fields"
83967
+ ],
83968
+ "properties": {
83969
+ "fields": {
83970
+ "type": "array",
83971
+ "items": {
83972
+ "type": "object",
83973
+ "required": [
83974
+ "field_key",
83975
+ "audience"
83976
+ ],
83977
+ "properties": {
83978
+ "field_key": {
83979
+ "type": "string"
83980
+ },
83981
+ "audience": {
83982
+ "type": "string",
83983
+ "enum": [
83984
+ "private",
83985
+ "people",
83986
+ "everyone"
83987
+ ]
83988
+ },
83989
+ "kind": {
83990
+ "type": "string",
83991
+ "enum": [
83992
+ "plain",
83993
+ "customer_information",
83994
+ "personal",
83995
+ "sensitive"
83996
+ ],
83997
+ "nullable": true
83998
+ },
83999
+ "shared_with": {
84000
+ "type": "array",
84001
+ "items": {
84002
+ "type": "string",
84003
+ "format": "uuid"
84004
+ }
84005
+ }
84006
+ }
84007
+ }
84008
+ },
84009
+ "hide_holder": {
84010
+ "type": "boolean"
84011
+ },
84012
+ "date_precision": {
84013
+ "type": "string",
84014
+ "enum": [
84015
+ "day",
84016
+ "month",
84017
+ "year",
84018
+ "none"
84019
+ ]
84020
+ },
84021
+ "excluded_document_ids": {
84022
+ "type": "array",
84023
+ "items": {
84024
+ "type": "string",
84025
+ "format": "uuid"
84026
+ }
84027
+ }
84028
+ }
84029
+ }
84030
+ }
84031
+ }
84032
+ },
84033
+ "responses": {
84034
+ "200": {
84035
+ "description": "OK",
84036
+ "content": {
84037
+ "application/json": {
84038
+ "schema": {
84039
+ "type": "object",
84040
+ "additionalProperties": true
84041
+ }
84042
+ }
84043
+ }
84044
+ },
84045
+ "400": {
84046
+ "$ref": "#/components/responses/BadRequest"
84047
+ },
84048
+ "401": {
84049
+ "$ref": "#/components/responses/Unauthorized"
84050
+ },
84051
+ "403": {
84052
+ "$ref": "#/components/responses/Forbidden"
84053
+ },
84054
+ "404": {
84055
+ "$ref": "#/components/responses/NotFound"
84056
+ },
84057
+ "409": {
84058
+ "$ref": "#/components/responses/Conflict"
84059
+ },
84060
+ "429": {
84061
+ "$ref": "#/components/responses/RateLimitExceeded"
84062
+ }
84063
+ }
84064
+ }
84065
+ },
84066
+ "/v1/governance/data-points/{specId}/stop": {
84067
+ "post": {
84068
+ "operationId": "stopDataPoints",
84069
+ "x-audience": "public",
84070
+ "x-required-scopes": [
84071
+ "access:write"
84072
+ ],
84073
+ "summary": "Stop sharing a Spec's data points",
84074
+ "description": "Stops sharing every field of one Spec from the caller's documents. 404 when the caller shares none of it.\n",
84075
+ "tags": [
84076
+ "Access & sharing"
84077
+ ],
84078
+ "parameters": [
84079
+ {
84080
+ "name": "specId",
84081
+ "in": "path",
84082
+ "required": true,
84083
+ "schema": {
84084
+ "type": "string",
84085
+ "format": "uuid"
84086
+ }
84087
+ }
84088
+ ],
84089
+ "responses": {
84090
+ "200": {
84091
+ "description": "OK",
84092
+ "content": {
84093
+ "application/json": {
84094
+ "schema": {
84095
+ "type": "object",
84096
+ "additionalProperties": true
84097
+ }
84098
+ }
84099
+ }
84100
+ },
84101
+ "400": {
84102
+ "$ref": "#/components/responses/BadRequest"
81626
84103
  },
81627
84104
  "401": {
81628
84105
  "$ref": "#/components/responses/Unauthorized"
@@ -81642,51 +84119,15 @@
81642
84119
  }
81643
84120
  }
81644
84121
  },
81645
- "/v1/me/data": {
84122
+ "/v1/me/workspace-data/groups": {
81646
84123
  "get": {
81647
- "operationId": "getMeData",
84124
+ "operationId": "listMeWorkspaceDataGroups",
81648
84125
  "x-audience": "public",
81649
84126
  "x-required-scopes": [
81650
84127
  "documents:read"
81651
84128
  ],
81652
- "summary": "Count your data",
81653
- "description": "How much you brought into this workspace, per kind: uploads, values read out of them, decisions, apps and profile.\n",
81654
- "tags": [
81655
- "My Data"
81656
- ],
81657
- "responses": {
81658
- "200": {
81659
- "description": "OK",
81660
- "content": {
81661
- "application/json": {
81662
- "schema": {
81663
- "type": "object",
81664
- "additionalProperties": true
81665
- }
81666
- }
81667
- }
81668
- },
81669
- "401": {
81670
- "$ref": "#/components/responses/Unauthorized"
81671
- },
81672
- "403": {
81673
- "$ref": "#/components/responses/Forbidden"
81674
- },
81675
- "429": {
81676
- "$ref": "#/components/responses/RateLimitExceeded"
81677
- }
81678
- }
81679
- }
81680
- },
81681
- "/v1/me/data/items": {
81682
- "get": {
81683
- "operationId": "listMeDataItems",
81684
- "x-audience": "public",
81685
- "x-required-scopes": [
81686
- "documents:read"
81687
- ],
81688
- "summary": "List your data items",
81689
- "description": "What one kind of your data stands for (`uploads` or `extracted`), a page at a time, or one item by `id`.\n",
84129
+ "summary": "Group workspace data",
84130
+ "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",
81690
84131
  "tags": [
81691
84132
  "My Data"
81692
84133
  ],
@@ -81698,92 +84139,59 @@
81698
84139
  "schema": {
81699
84140
  "type": "string",
81700
84141
  "enum": [
81701
- "uploads",
81702
- "extracted"
84142
+ "documents",
84143
+ "points"
81703
84144
  ]
81704
84145
  }
81705
84146
  },
81706
84147
  {
81707
- "name": "id",
84148
+ "name": "by",
81708
84149
  "in": "query",
81709
84150
  "schema": {
81710
- "type": "string"
84151
+ "type": "string",
84152
+ "enum": [
84153
+ "source",
84154
+ "type",
84155
+ "month",
84156
+ "field",
84157
+ "all"
84158
+ ],
84159
+ "default": "all"
81711
84160
  }
81712
84161
  },
81713
84162
  {
81714
- "name": "offset",
84163
+ "name": "source",
81715
84164
  "in": "query",
84165
+ "description": "A source id, or `none`.",
81716
84166
  "schema": {
81717
- "type": "integer",
81718
- "minimum": 0,
81719
- "default": 0
84167
+ "type": "string"
81720
84168
  }
81721
84169
  },
81722
84170
  {
81723
- "name": "limit",
84171
+ "name": "type",
81724
84172
  "in": "query",
84173
+ "description": "A document type id, or `none`.",
81725
84174
  "schema": {
81726
- "type": "integer",
81727
- "minimum": 1,
81728
- "default": 50
84175
+ "type": "string"
81729
84176
  }
81730
84177
  },
81731
84178
  {
81732
- "name": "order",
84179
+ "name": "month",
81733
84180
  "in": "query",
84181
+ "description": "Month, `YYYY-MM`.",
81734
84182
  "schema": {
81735
84183
  "type": "string",
81736
- "enum": [
81737
- "time",
81738
- "state"
81739
- ],
81740
- "default": "time"
84184
+ "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
81741
84185
  }
81742
- }
81743
- ],
81744
- "responses": {
81745
- "200": {
81746
- "description": "OK",
81747
- "content": {
81748
- "application/json": {
81749
- "schema": {
81750
- "type": "object",
81751
- "properties": {
81752
- "items": {
81753
- "type": "array",
81754
- "items": {
81755
- "type": "object",
81756
- "additionalProperties": true
81757
- }
81758
- }
81759
- }
81760
- }
81761
- }
81762
- }
81763
- },
81764
- "401": {
81765
- "$ref": "#/components/responses/Unauthorized"
81766
84186
  },
81767
- "403": {
81768
- "$ref": "#/components/responses/Forbidden"
81769
- },
81770
- "429": {
81771
- "$ref": "#/components/responses/RateLimitExceeded"
84187
+ {
84188
+ "name": "field",
84189
+ "in": "query",
84190
+ "description": "A field id, or `none`.",
84191
+ "schema": {
84192
+ "type": "string"
84193
+ }
81772
84194
  }
81773
- }
81774
- }
81775
- },
81776
- "/v1/me/workspace-data": {
81777
- "get": {
81778
- "operationId": "getMeWorkspaceData",
81779
- "x-audience": "public",
81780
- "x-required-scopes": [
81781
- "documents:read"
81782
- ],
81783
- "summary": "Count workspace data by owner",
81784
- "description": "The workspace's documents, fields and data points you can see, counted by whose they are: `me`, `shared` with you, or `company`.\n",
81785
- "tags": [
81786
- "My Data"
81787
84195
  ],
81788
84196
  "responses": {
81789
84197
  "200": {
@@ -81797,6 +84205,9 @@
81797
84205
  }
81798
84206
  }
81799
84207
  },
84208
+ "400": {
84209
+ "$ref": "#/components/responses/BadRequest"
84210
+ },
81800
84211
  "401": {
81801
84212
  "$ref": "#/components/responses/Unauthorized"
81802
84213
  },
@@ -81817,7 +84228,7 @@
81817
84228
  "documents:read"
81818
84229
  ],
81819
84230
  "summary": "List workspace data by owner",
81820
- "description": "The documents, fields or data points behind one of those counts, a page at a time.\n",
84231
+ "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",
81821
84232
  "tags": [
81822
84233
  "My Data"
81823
84234
  ],
@@ -81848,9 +84259,50 @@
81848
84259
  ]
81849
84260
  }
81850
84261
  },
84262
+ {
84263
+ "name": "source",
84264
+ "in": "query",
84265
+ "description": "A source id, or `none`.",
84266
+ "schema": {
84267
+ "type": "string"
84268
+ }
84269
+ },
84270
+ {
84271
+ "name": "type",
84272
+ "in": "query",
84273
+ "description": "A document type id, or `none`.",
84274
+ "schema": {
84275
+ "type": "string"
84276
+ }
84277
+ },
84278
+ {
84279
+ "name": "month",
84280
+ "in": "query",
84281
+ "description": "Month, `YYYY-MM`.",
84282
+ "schema": {
84283
+ "type": "string",
84284
+ "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
84285
+ }
84286
+ },
84287
+ {
84288
+ "name": "field",
84289
+ "in": "query",
84290
+ "description": "A field id, or `none`.",
84291
+ "schema": {
84292
+ "type": "string"
84293
+ }
84294
+ },
84295
+ {
84296
+ "name": "after",
84297
+ "in": "query",
84298
+ "schema": {
84299
+ "type": "string"
84300
+ }
84301
+ },
81851
84302
  {
81852
84303
  "name": "offset",
81853
84304
  "in": "query",
84305
+ "description": "Fields only.",
81854
84306
  "schema": {
81855
84307
  "type": "integer",
81856
84308
  "minimum": 0,
@@ -81874,19 +84326,14 @@
81874
84326
  "application/json": {
81875
84327
  "schema": {
81876
84328
  "type": "object",
81877
- "properties": {
81878
- "items": {
81879
- "type": "array",
81880
- "items": {
81881
- "type": "object",
81882
- "additionalProperties": true
81883
- }
81884
- }
81885
- }
84329
+ "additionalProperties": true
81886
84330
  }
81887
84331
  }
81888
84332
  }
81889
84333
  },
84334
+ "400": {
84335
+ "$ref": "#/components/responses/BadRequest"
84336
+ },
81890
84337
  "401": {
81891
84338
  "$ref": "#/components/responses/Unauthorized"
81892
84339
  },
@@ -81986,7 +84433,7 @@
81986
84433
  "type": "string",
81987
84434
  "maxLength": 64
81988
84435
  },
81989
- "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"
84436
+ "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"
81990
84437
  },
81991
84438
  "SourceConnectionId": {
81992
84439
  "name": "connectionId",
@@ -82969,7 +85416,12 @@
82969
85416
  },
82970
85417
  "decision": {
82971
85418
  "type": "object",
82972
- "nullable": true
85419
+ "nullable": true,
85420
+ "description": "Null while undecided, or when withheld (`decision_withheld`)."
85421
+ },
85422
+ "decision_withheld": {
85423
+ "type": "boolean",
85424
+ "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."
82973
85425
  },
82974
85426
  "decided_by": {
82975
85427
  "type": "object",
@@ -83071,7 +85523,12 @@
83071
85523
  },
83072
85524
  "decision": {
83073
85525
  "type": "object",
83074
- "nullable": true
85526
+ "nullable": true,
85527
+ "description": "Null while undecided, or when withheld (`decision_withheld`)."
85528
+ },
85529
+ "decision_withheld": {
85530
+ "type": "boolean",
85531
+ "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."
83075
85532
  },
83076
85533
  "decided_by": {
83077
85534
  "type": "object",
@@ -114720,10 +117177,119 @@
114720
117177
  "type": "string"
114721
117178
  },
114722
117179
  "error": {
117180
+ "type": "string",
117181
+ "description": "The raw failure message."
117182
+ },
117183
+ "reason": {
117184
+ "type": "string",
117185
+ "description": "Why the file could not be imported, in words for a person."
117186
+ }
117187
+ }
117188
+ }
117189
+ }
117190
+ }
117191
+ },
117192
+ "SourceImportRun": {
117193
+ "type": "object",
117194
+ "description": "One import carried out in the background. Counts are in requested items (a folder is one item however many files it holds): `requested = imported + skipped + empty + failed + pending`.\n",
117195
+ "properties": {
117196
+ "id": {
117197
+ "type": "string",
117198
+ "format": "uuid"
117199
+ },
117200
+ "source_connection_id": {
117201
+ "type": "string",
117202
+ "format": "uuid"
117203
+ },
117204
+ "status": {
117205
+ "type": "string",
117206
+ "enum": [
117207
+ "queued",
117208
+ "running",
117209
+ "completed",
117210
+ "failed"
117211
+ ],
117212
+ "description": "`completed` also when some items failed (see `failed` and `failures`); `failed` when the run itself stopped (see `error`).\n"
117213
+ },
117214
+ "running": {
117215
+ "type": "boolean",
117216
+ "description": "True while the run is queued or being worked on."
117217
+ },
117218
+ "requested": {
117219
+ "type": "integer",
117220
+ "description": "Items asked for."
117221
+ },
117222
+ "imported": {
117223
+ "type": "integer",
117224
+ "description": "Items brought into the workspace by this run."
117225
+ },
117226
+ "skipped": {
117227
+ "type": "integer",
117228
+ "description": "Items that were in the workspace already; nothing was imported twice."
117229
+ },
117230
+ "empty": {
117231
+ "type": "integer",
117232
+ "description": "Folders that held nothing to import."
117233
+ },
117234
+ "failed": {
117235
+ "type": "integer"
117236
+ },
117237
+ "pending": {
117238
+ "type": "integer",
117239
+ "description": "Items not worked on yet (or never, when the run itself failed)."
117240
+ },
117241
+ "error": {
117242
+ "type": [
117243
+ "string",
117244
+ "null"
117245
+ ],
117246
+ "description": "Why the run as a whole stopped, when it did."
117247
+ },
117248
+ "created_at": {
117249
+ "type": "string",
117250
+ "format": "date-time"
117251
+ },
117252
+ "started_at": {
117253
+ "type": [
117254
+ "string",
117255
+ "null"
117256
+ ],
117257
+ "format": "date-time"
117258
+ },
117259
+ "finished_at": {
117260
+ "type": [
117261
+ "string",
117262
+ "null"
117263
+ ],
117264
+ "format": "date-time"
117265
+ },
117266
+ "failures": {
117267
+ "type": "array",
117268
+ "description": "On the single-run read. What could not be imported.",
117269
+ "items": {
117270
+ "type": "object",
117271
+ "properties": {
117272
+ "item_id": {
117273
+ "type": "string",
117274
+ "description": "The requested item (a file or folder id)."
117275
+ },
117276
+ "file_id": {
117277
+ "type": "string",
117278
+ "description": "The file inside a requested folder, when the failure is that file's."
117279
+ },
117280
+ "name": {
114723
117281
  "type": "string"
117282
+ },
117283
+ "reason": {
117284
+ "type": "string",
117285
+ "description": "Why, in words for a person."
114724
117286
  }
114725
117287
  }
114726
117288
  }
117289
+ },
117290
+ "failures_truncated": {
117291
+ "type": "boolean",
117292
+ "description": "True when more failures exist than `failures` names; `failed` is always exact."
114727
117293
  }
114728
117294
  }
114729
117295
  },
@@ -115627,6 +118193,10 @@
115627
118193
  },
115628
118194
  "cursor": {
115629
118195
  "type": "integer"
118196
+ },
118197
+ "has_older": {
118198
+ "type": "boolean",
118199
+ "description": "True when the conversation goes further back than this page."
115630
118200
  }
115631
118201
  }
115632
118202
  },