{"openapi":"3.1.0","info":{"title":"anyformat API","description":"Document extraction and workflow automation API.\n\nAnyFormat lets you define extraction workflows that pull structured data from any document — PDFs, images, scanned files, or plain text. Upload a file, run it through a workflow, and get back structured fields with confidence scores and source evidence.\n\n## Quick start\n\nSee the [Quick start guide](https://docs.anyformat.ai/api-reference-v3/introduction) for a walkthrough.\n\n## Authentication\n\nAll endpoints (except `/health/`) require a Bearer token in the `Authorization` header:\n\n```\nAuthorization: Bearer <your-api-key>\n```\n\nGet your API key from [app.anyformat.ai/api-key](https://app.anyformat.ai/api-key).\n\n## Versioning\n\nEndpoints are versioned by path prefix (`/v3/`). Every response under\na versioned prefix includes `X-API-Version`.\n","version":"3.0.0"},"servers":[{"url":"https://api.anyformat.ai","description":"API server"}],"paths":{"/health/":{"get":{"tags":["health"],"summary":"Health Check","description":"Returns 200 OK if the service is running. No authentication required.\n\nUse this endpoint to verify API connectivity before making authenticated calls.","operationId":"health_check_health__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthCheckResponse"}}}}}}},"/key-check/":{"get":{"tags":["health"],"summary":"Key Check","description":"Validate the caller's API key.\n\nSuccess (200): the key is active and the response names its\norganization and granted scopes. Failure (401): the standard error envelope with\n``error_code`` set to ``MISSING_API_KEY`` (no key sent) or\n``INVALID_API_KEY`` (key sent but not recognised).\n\nReuses the same ``/whoami/`` round-trip that every\nauthenticated request already runs, so a call here warms the same\ncache — cheap to invoke as a probe before the first real request.","operationId":"key_check_key_check__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyCheckResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/v3/workflows/":{"post":{"tags":["workflows"],"summary":"Create workflow","description":"Create a workflow from a strongly-typed graph (atomic).\n\nProvide an explicit list of typed `nodes` (parse / classify / splitter /\nextract / validate) and `edges` between them. Returns the stored graph, so the\nserver-assigned `persistent_id`s a later `PATCH` must echo arrive with the\ncreate rather than needing a second call.","operationId":"v3_create_workflow","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetailV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"`VALIDATION_ERROR` — The request failed validation. `detail` is a list of `{type, loc, msg}`, one per failure; `loc[0]` is the request part.\n`TOPOLOGY_INVALID` — The workflow topology is not valid.\n`LOOKUP_FIELD_WITHOUT_FILE` — A lookup field has no lookup file.\n`INVALID_LOOKUP_FILE_ENCODING` — The lookup file uses an encoding the server cannot read.\n`UNSUPPORTED_LOOKUP_FILE` — The lookup file type is not supported.\n`INVALID_WORKFLOW_CONFIG` — The workflow holds a node configuration that is not valid.\n`OPERATOR_NOT_AVAILABLE` — This workflow uses an operator that is no longer available.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}},"TOPOLOGY_INVALID":{"value":{"error":"The workflow topology is not valid.","detail":"The workflow topology is not valid.","error_code":"TOPOLOGY_INVALID","retryable":false,"request_id":"req_abc123","recovery":"Fix the node connections `detail` names so the graph is valid, and save again."}},"LOOKUP_FIELD_WITHOUT_FILE":{"value":{"error":"A lookup field has no lookup file.","detail":"A lookup field has no lookup file.","error_code":"LOOKUP_FIELD_WITHOUT_FILE","retryable":false,"request_id":"req_abc123","recovery":"Attach a lookup file to every lookup field, or remove the field, and save again."}},"INVALID_LOOKUP_FILE_ENCODING":{"value":{"error":"The lookup file uses an encoding the server cannot read.","detail":"The lookup file uses an encoding the server cannot read.","error_code":"INVALID_LOOKUP_FILE_ENCODING","retryable":false,"request_id":"req_abc123","recovery":"Save the lookup file as UTF-8 and upload it again."}},"UNSUPPORTED_LOOKUP_FILE":{"value":{"error":"The lookup file type is not supported.","detail":"The lookup file type is not supported.","error_code":"UNSUPPORTED_LOOKUP_FILE","retryable":false,"request_id":"req_abc123","recovery":"Upload the lookup file as UTF-8 text or CSV."}},"INVALID_WORKFLOW_CONFIG":{"value":{"error":"The workflow holds a node configuration that is not valid.","detail":"The workflow holds a node configuration that is not valid.","error_code":"INVALID_WORKFLOW_CONFIG","retryable":false,"request_id":"req_abc123","recovery":"Fix the node configuration `detail` names and save the workflow again."}},"OPERATOR_NOT_AVAILABLE":{"value":{"error":"This workflow uses an operator that is no longer available.","detail":"This workflow uses an operator that is no longer available.","error_code":"OPERATOR_NOT_AVAILABLE","retryable":false,"request_id":"req_abc123","recovery":"Replace the operator on the nodes in `params.node_ids` with a supported one, and save again."}}}}}},"403":{"description":"`PARSE_MODE_FORBIDDEN` — This organization cannot use that parse mode.\n`EXTRACT_MODE_FORBIDDEN` — This organization cannot use that extract mode.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"PARSE_MODE_FORBIDDEN":{"value":{"error":"This organization cannot use that parse mode.","detail":"This organization cannot use that parse mode.","error_code":"PARSE_MODE_FORBIDDEN","retryable":false,"request_id":"req_abc123","recovery":"Choose a parse mode the organization's plan includes, or contact support to enable this one."}},"EXTRACT_MODE_FORBIDDEN":{"value":{"error":"This organization cannot use that extract mode.","detail":"This organization cannot use that extract mode.","error_code":"EXTRACT_MODE_FORBIDDEN","retryable":false,"request_id":"req_abc123","recovery":"Choose an extract mode the organization's plan includes, or contact support to enable this one."}}}}}},"409":{"description":"`WORKFLOW_NAME_CONFLICT` — A workflow with that name already exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"WORKFLOW_NAME_CONFLICT":{"value":{"error":"A workflow with that name already exists.","detail":"A workflow with that name already exists.","error_code":"WORKFLOW_NAME_CONFLICT","retryable":false,"request_id":"req_abc123","recovery":"Choose a different workflow name and send the request again."}}}}}},"404":{"description":"`NOT_FOUND` — The resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"502":{"description":"`GRAPH_READBACK_FAILED` — The workflow was saved and its graph could not be read back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GRAPH_READBACK_FAILED":{"value":{"error":"The workflow was saved and its graph could not be read back.","detail":"The workflow was saved and its graph could not be read back.","error_code":"GRAPH_READBACK_FAILED","retryable":false,"request_id":"req_abc123","recovery":"Fetch the workflow by its ID to read the saved graph, rather than saving it again."}},"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"413":{"description":"The request body is larger than `params.max_bytes` (`REQUEST_TOO_LARGE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"REQUEST_TOO_LARGE":{"value":{"error":"The request body is larger than the maximum allowed size.","detail":"The request body is larger than the maximum allowed size.","error_code":"REQUEST_TOO_LARGE","retryable":false,"request_id":"req_abc123","recovery":"Send a request, and a file, smaller than `params.max_bytes` bytes."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}},"get":{"tags":["workflows"],"summary":"List workflows","description":"List your organization's workflows, newest first.\n\nKeyset-paginated: follow `next_cursor` until it is `null`. The sort\norder is fixed (`-created_at, -id`); there are no totals or page numbers.","operationId":"v3_list_workflows","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size, capped at 100.","default":20,"title":"Limit"},"description":"Page size, capped at 100."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque token from a previous response's `next_cursor`.","title":"Cursor"},"description":"Opaque token from a previous response's `next_cursor`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowListPageV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"404":{"description":"`NOT_FOUND` — The resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/workflows/{workflow_id}/":{"get":{"tags":["workflows"],"summary":"Get workflow","description":"Retrieve a workflow with its complete typed graph inline.\n\n`{name, description, nodes, edges}` is the exact shape\n`POST /v3/workflows/` accepts — mutate it and feed it back to\n`PATCH /v3/workflows/{workflow_id}/` to edit.\n\nPass `version` to read one version for comparison or audit; any other\nquery parameter is rejected, so a misspelled `version` cannot silently\nread the latest. Versions are read-only: a run uses the latest version\nunless it names one with `workflow_version_id`, and a PATCH always builds\non the latest version.","operationId":"v3_get_workflow","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A `version_id` from `GET /v3/workflows/{workflow_id}/versions/`. Reads that version's graph instead of the latest.","title":"Version"},"description":"A `version_id` from `GET /v3/workflows/{workflow_id}/versions/`. Reads that version's graph instead of the latest."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowReadV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}},"patch":{"tags":["workflows"],"summary":"Update workflow","description":"Replace a workflow's typed graph (atomic).\n\nThe body is the `{name, description, nodes, edges}` sub-shape of\n`GET /v3/workflows/{workflow_id}/` — GET, mutate, PATCH. Echo each\nexisting field's `persistent_id` unchanged (including across\nrenames) to keep the field's identity, so analytics, ground truth\nand quality metrics stay attached; omit `persistent_id` only for\ngenuinely new fields (a pidless field is always treated as new —\nname coincidence with a prior field does NOT confer identity). An\nechoed `persistent_id` that doesn't match any field in the current\nversion is a 400. Responds with the updated workflow in the exact\n`GET /v3/workflows/{workflow_id}/` shape, so the result can be\nedited and PATCHed again. The returned graph is this request's own\nwrite result — including the `persistent_id`s assigned to new\nfields — never the state left by a concurrent update.","operationId":"v3_update_workflow","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowReadV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"`VALIDATION_ERROR` — The request failed validation. `detail` is a list of `{type, loc, msg}`, one per failure; `loc[0]` is the request part.\n`TOPOLOGY_INVALID` — The workflow topology is not valid.\n`LOOKUP_FIELD_WITHOUT_FILE` — A lookup field has no lookup file.\n`INVALID_LOOKUP_FILE_ENCODING` — The lookup file uses an encoding the server cannot read.\n`UNSUPPORTED_LOOKUP_FILE` — The lookup file type is not supported.\n`INVALID_WORKFLOW_CONFIG` — The workflow holds a node configuration that is not valid.\n`OPERATOR_NOT_AVAILABLE` — This workflow uses an operator that is no longer available.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}},"TOPOLOGY_INVALID":{"value":{"error":"The workflow topology is not valid.","detail":"The workflow topology is not valid.","error_code":"TOPOLOGY_INVALID","retryable":false,"request_id":"req_abc123","recovery":"Fix the node connections `detail` names so the graph is valid, and save again."}},"LOOKUP_FIELD_WITHOUT_FILE":{"value":{"error":"A lookup field has no lookup file.","detail":"A lookup field has no lookup file.","error_code":"LOOKUP_FIELD_WITHOUT_FILE","retryable":false,"request_id":"req_abc123","recovery":"Attach a lookup file to every lookup field, or remove the field, and save again."}},"INVALID_LOOKUP_FILE_ENCODING":{"value":{"error":"The lookup file uses an encoding the server cannot read.","detail":"The lookup file uses an encoding the server cannot read.","error_code":"INVALID_LOOKUP_FILE_ENCODING","retryable":false,"request_id":"req_abc123","recovery":"Save the lookup file as UTF-8 and upload it again."}},"UNSUPPORTED_LOOKUP_FILE":{"value":{"error":"The lookup file type is not supported.","detail":"The lookup file type is not supported.","error_code":"UNSUPPORTED_LOOKUP_FILE","retryable":false,"request_id":"req_abc123","recovery":"Upload the lookup file as UTF-8 text or CSV."}},"INVALID_WORKFLOW_CONFIG":{"value":{"error":"The workflow holds a node configuration that is not valid.","detail":"The workflow holds a node configuration that is not valid.","error_code":"INVALID_WORKFLOW_CONFIG","retryable":false,"request_id":"req_abc123","recovery":"Fix the node configuration `detail` names and save the workflow again."}},"OPERATOR_NOT_AVAILABLE":{"value":{"error":"This workflow uses an operator that is no longer available.","detail":"This workflow uses an operator that is no longer available.","error_code":"OPERATOR_NOT_AVAILABLE","retryable":false,"request_id":"req_abc123","recovery":"Replace the operator on the nodes in `params.node_ids` with a supported one, and save again."}}}}}},"403":{"description":"`PARSE_MODE_FORBIDDEN` — This organization cannot use that parse mode.\n`EXTRACT_MODE_FORBIDDEN` — This organization cannot use that extract mode.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"PARSE_MODE_FORBIDDEN":{"value":{"error":"This organization cannot use that parse mode.","detail":"This organization cannot use that parse mode.","error_code":"PARSE_MODE_FORBIDDEN","retryable":false,"request_id":"req_abc123","recovery":"Choose a parse mode the organization's plan includes, or contact support to enable this one."}},"EXTRACT_MODE_FORBIDDEN":{"value":{"error":"This organization cannot use that extract mode.","detail":"This organization cannot use that extract mode.","error_code":"EXTRACT_MODE_FORBIDDEN","retryable":false,"request_id":"req_abc123","recovery":"Choose an extract mode the organization's plan includes, or contact support to enable this one."}}}}}},"409":{"description":"`IMMUTABLE_WORKFLOW` — This is a system workflow and it cannot change.\n`WORKFLOW_NAME_CONFLICT` — A workflow with that name already exists.\n`deprecated_operator_ack_required` — This workflow uses a deprecated operator, so the save needs an acknowledgement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"IMMUTABLE_WORKFLOW":{"value":{"error":"This is a system workflow and it cannot change.","detail":"This is a system workflow and it cannot change.","error_code":"IMMUTABLE_WORKFLOW","retryable":false,"request_id":"req_abc123","recovery":"Make the change on a workflow of your own, because a system workflow never changes."}},"WORKFLOW_NAME_CONFLICT":{"value":{"error":"A workflow with that name already exists.","detail":"A workflow with that name already exists.","error_code":"WORKFLOW_NAME_CONFLICT","retryable":false,"request_id":"req_abc123","recovery":"Choose a different workflow name and send the request again."}},"deprecated_operator_ack_required":{"value":{"error":"This workflow uses a deprecated operator, so the save needs an acknowledgement.","detail":"This workflow uses a deprecated operator, so the save needs an acknowledgement.","error_code":"deprecated_operator_ack_required","retryable":false,"request_id":"req_abc123","recovery":"Replace the operator on the nodes in `params.node_ids`, then save again."}}}}}},"503":{"description":"`WORKFLOW_CONCURRENT_EDIT` — Another request is editing this workflow.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"WORKFLOW_CONCURRENT_EDIT":{"value":{"error":"Another request is editing this workflow.","detail":"Another request is editing this workflow.","error_code":"WORKFLOW_CONCURRENT_EDIT","retryable":false,"request_id":"req_abc123","recovery":"Wait for the other edit to finish, fetch the workflow again, and reapply your change."}},"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"413":{"description":"The request body is larger than `params.max_bytes` (`REQUEST_TOO_LARGE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"REQUEST_TOO_LARGE":{"value":{"error":"The request body is larger than the maximum allowed size.","detail":"The request body is larger than the maximum allowed size.","error_code":"REQUEST_TOO_LARGE","retryable":false,"request_id":"req_abc123","recovery":"Send a request, and a file, smaller than `params.max_bytes` bytes."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}},"delete":{"tags":["workflows"],"summary":"Delete workflow","description":"Delete a workflow and all associated document packets and runs.\n\nThe API key's owner must be an admin of the workflow's organization.\nThis action is irreversible.","operationId":"v3_delete_workflow","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"X-Anyformat-Skip-Deletion-Window","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`true` forgets the deleted data at once instead of keeping it restorable for the deletion window, so its deletion certificate is issued right away. The delete cannot then be undone.","title":"X-Anyformat-Skip-Deletion-Window"},"description":"`true` forgets the deleted data at once instead of keeping it restorable for the deletion window, so its deletion certificate is issued right away. The delete cannot then be undone."}],"responses":{"204":{"description":"Successful Response","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"403":{"description":"`ACCESS_DENIED` — You do not have access to this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}}}}}},"404":{"description":"`NOT_FOUND` — The resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"409":{"description":"`IMMUTABLE_WORKFLOW` — This is a system workflow and it cannot change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"IMMUTABLE_WORKFLOW":{"value":{"error":"This is a system workflow and it cannot change.","detail":"This is a system workflow and it cannot change.","error_code":"IMMUTABLE_WORKFLOW","retryable":false,"request_id":"req_abc123","recovery":"Make the change on a workflow of your own, because a system workflow never changes."}}}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/workflows/{workflow_id}/upload/":{"post":{"tags":["workflows"],"summary":"Upload document packet to workflow","description":"Upload one or more files as a single document packet (atomic).\n\nAll files are grouped into ONE packet — the unit later runs address.\nCreation is all-or-nothing: any rejected file (unsupported type,\ndisguised bytes) fails the whole request and nothing is stored.\n\nFilenames are unique within a workflow. By default (`on_conflict=error`) a\nfile whose name collides with an existing file fails the request with\n``409`` before anything is uploaded; pass `on_conflict=rename` to auto-rename\nthe collision instead (`contract.pdf` -> `contract (1).pdf`); each returned\nfile's ``name`` is then the name it landed under, with ``original_name``\nholding the uploaded name when a rename happened.\n\nUpload without running; trigger extraction via\n`POST /v3/document-packets/{document_packet_id}/run/`.","operationId":"v3_upload_to_workflow","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional caller-supplied key (Stripe convention). Retrying the request with the same key replays the original upload slots so no duplicate packet is created.","title":"Idempotency-Key"},"description":"Optional caller-supplied key (Stripe convention). Retrying the request with the same key replays the original upload slots so no duplicate packet is created."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_v3_upload_to_workflow"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentPacketCreatedV3"}}},"headers":{"Idempotent-Replayed":{"description":"`true` when this response replays an earlier request sent with the same `Idempotency-Key`; absent on a first request.","schema":{"type":"string","enum":["true"]}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"`VALIDATION_ERROR` — The request failed validation. `detail` is a list of `{type, loc, msg}`, one per failure; `loc[0]` is the request part.\n`UNSUPPORTED_FILE_TYPE` — The file type is not supported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}},"UNSUPPORTED_FILE_TYPE":{"value":{"error":"The file type is not supported.","detail":"The file type is not supported.","error_code":"UNSUPPORTED_FILE_TYPE","retryable":false,"request_id":"req_abc123","recovery":"Convert the file to a type the API reference lists, and upload it again."}}}}}},"413":{"description":"`REQUEST_TOO_LARGE` — The request body is larger than the maximum allowed size.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"REQUEST_TOO_LARGE":{"value":{"error":"The request body is larger than the maximum allowed size.","detail":"The request body is larger than the maximum allowed size.","error_code":"REQUEST_TOO_LARGE","retryable":false,"request_id":"req_abc123","recovery":"Send a request, and a file, smaller than `params.max_bytes` bytes."}}}}}},"409":{"description":"`FILENAME_CONFLICT` — A file with that name already exists.\n`MULTIFILE_UNSUPPORTED` — This workflow cannot process a multi-file document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"FILENAME_CONFLICT":{"value":{"error":"A file with that name already exists.","detail":"A file with that name already exists.","error_code":"FILENAME_CONFLICT","retryable":false,"request_id":"req_abc123","recovery":"Rename the file, or pass `on_conflict=rename`, and upload it again."}},"MULTIFILE_UNSUPPORTED":{"value":{"error":"This workflow cannot process a multi-file document.","detail":"This workflow cannot process a multi-file document.","error_code":"MULTIFILE_UNSUPPORTED","retryable":false,"request_id":"req_abc123","recovery":"Send each file as its own document packet, or change the nodes in `params.node_ids`: turn agentic mode off on an extract node, or keep a single parse node."}}}}}},"422":{"description":"`DATASET_DOCUMENT_REJECTED` — A file in the dataset document was rejected.\n`IDEMPOTENCY_KEY_REUSED` — The idempotency key was already used with a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"DATASET_DOCUMENT_REJECTED":{"value":{"error":"A file in the dataset document was rejected.","detail":"A file in the dataset document was rejected.","error_code":"DATASET_DOCUMENT_REJECTED","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for the file that was rejected, fix or remove it, and register the document again."}},"IDEMPOTENCY_KEY_REUSED":{"value":{"error":"The idempotency key was already used with a different request.","detail":"The idempotency key was already used with a different request.","error_code":"IDEMPOTENCY_KEY_REUSED","retryable":false,"request_id":"req_abc123","recovery":"Resend the original request unchanged to get its result, or read the resource it created from `params.resource_id`; use a new `Idempotency-Key` only for a genuinely new request."}}}}}},"502":{"description":"`OBJECT_STORAGE_UNAVAILABLE` — Object storage did not complete the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"OBJECT_STORAGE_UNAVAILABLE":{"value":{"error":"Object storage did not complete the request.","detail":"Object storage did not complete the request.","error_code":"OBJECT_STORAGE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}},"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/workflows/{workflow_id}/upload/run/":{"post":{"tags":["workflows"],"summary":"Upload and run workflow","description":"Upload one document packet and run it in a single call.\n\nComposes `POST /v3/workflows/{workflow_id}/upload/` and\n`POST /v3/document-packets/{document_packet_id}/run/`: the files are\ngrouped into ONE packet (all-or-nothing) and an extraction is enqueued\non the workflow's latest version, or on `workflow_version_id`. An unknown\nversion, or one of another workflow, returns 404 before anything is\nuploaded. Poll `GET /v3/runs/{run_id}/` until\n`status` is terminal.\n\nFilenames are unique within a workflow. By default (`on_conflict=error`) a\ncolliding filename fails the request with ``409`` before anything is\nuploaded or run; pass `on_conflict=rename` to auto-rename instead.","operationId":"v3_upload_and_run_workflow","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional caller-supplied key (Stripe convention). Retrying the request with the same key replays the original packet AND run — no duplicate upload, no second extraction. A retry with a different `workflow_version_id` starts a second, billed run.","title":"Idempotency-Key"},"description":"Optional caller-supplied key (Stripe convention). Retrying the request with the same key replays the original packet AND run — no duplicate upload, no second extraction. A retry with a different `workflow_version_id` starts a second, billed run."},{"name":"X-Anyformat-Priority","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anyformat-Priority"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_v3_upload_and_run_workflow"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRunTriggeredV3"}}},"headers":{"Idempotent-Replayed":{"description":"`true` when this response replays an earlier request sent with the same `Idempotency-Key`; absent on a first request.","schema":{"type":"string","enum":["true"]}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"`VALIDATION_ERROR` — The request failed validation. `detail` is a list of `{type, loc, msg}`, one per failure; `loc[0]` is the request part.\n`UNSUPPORTED_FILE_TYPE` — The file type is not supported.\n`OPERATOR_DEPRECATED` — This workflow version uses a deprecated operator and cannot run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}},"UNSUPPORTED_FILE_TYPE":{"value":{"error":"The file type is not supported.","detail":"The file type is not supported.","error_code":"UNSUPPORTED_FILE_TYPE","retryable":false,"request_id":"req_abc123","recovery":"Convert the file to a type the API reference lists, and upload it again."}},"OPERATOR_DEPRECATED":{"value":{"error":"This workflow version uses a deprecated operator and cannot run.","detail":"This workflow version uses a deprecated operator and cannot run.","error_code":"OPERATOR_DEPRECATED","retryable":false,"request_id":"req_abc123","recovery":"Replace the operator on the nodes in `params.node_ids`, save a new version, and run again."}}}}}},"413":{"description":"`REQUEST_TOO_LARGE` — The request body is larger than the maximum allowed size.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"REQUEST_TOO_LARGE":{"value":{"error":"The request body is larger than the maximum allowed size.","detail":"The request body is larger than the maximum allowed size.","error_code":"REQUEST_TOO_LARGE","retryable":false,"request_id":"req_abc123","recovery":"Send a request, and a file, smaller than `params.max_bytes` bytes."}}}}}},"409":{"description":"`FILENAME_CONFLICT` — A file with that name already exists.\n`MULTIFILE_UNSUPPORTED` — This workflow cannot process a multi-file document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"FILENAME_CONFLICT":{"value":{"error":"A file with that name already exists.","detail":"A file with that name already exists.","error_code":"FILENAME_CONFLICT","retryable":false,"request_id":"req_abc123","recovery":"Rename the file, or pass `on_conflict=rename`, and upload it again."}},"MULTIFILE_UNSUPPORTED":{"value":{"error":"This workflow cannot process a multi-file document.","detail":"This workflow cannot process a multi-file document.","error_code":"MULTIFILE_UNSUPPORTED","retryable":false,"request_id":"req_abc123","recovery":"Send each file as its own document packet, or change the nodes in `params.node_ids`: turn agentic mode off on an extract node, or keep a single parse node."}}}}}},"422":{"description":"`DATASET_DOCUMENT_REJECTED` — A file in the dataset document was rejected.\n`INPUT_VALUES_REFUSED` — The values sent do not match the workflow's input fields.\n`REPORT_TEMPLATE_UNFILLABLE` — The report's Word template reads fields the workflow does not supply.\n`IDEMPOTENCY_KEY_REUSED` — The idempotency key was already used with a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"DATASET_DOCUMENT_REJECTED":{"value":{"error":"A file in the dataset document was rejected.","detail":"A file in the dataset document was rejected.","error_code":"DATASET_DOCUMENT_REJECTED","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for the file that was rejected, fix or remove it, and register the document again."}},"INPUT_VALUES_REFUSED":{"value":{"error":"The values sent do not match the workflow's input fields.","detail":"The values sent do not match the workflow's input fields.","error_code":"INPUT_VALUES_REFUSED","retryable":false,"request_id":"req_abc123","recovery":"Fix each key in `params.keys` so it holds what the entry at the same position of `params.expected` says, and start the run again."}},"REPORT_TEMPLATE_UNFILLABLE":{"value":{"error":"The report's Word template reads fields the workflow does not supply.","detail":"The report's Word template reads fields the workflow does not supply.","error_code":"REPORT_TEMPLATE_UNFILLABLE","retryable":false,"request_id":"req_abc123","recovery":"Add the fields in `params.placeholders` to the node that feeds the report in `params.node_id`, or upload a template without them."}},"IDEMPOTENCY_KEY_REUSED":{"value":{"error":"The idempotency key was already used with a different request.","detail":"The idempotency key was already used with a different request.","error_code":"IDEMPOTENCY_KEY_REUSED","retryable":false,"request_id":"req_abc123","recovery":"Resend the original request unchanged to get its result, or read the resource it created from `params.resource_id`; use a new `Idempotency-Key` only for a genuinely new request."}}}}}},"502":{"description":"`OBJECT_STORAGE_UNAVAILABLE` — Object storage did not complete the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"OBJECT_STORAGE_UNAVAILABLE":{"value":{"error":"Object storage did not complete the request.","detail":"Object storage did not complete the request.","error_code":"OBJECT_STORAGE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}},"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"402":{"description":"`INSUFFICIENT_CREDIT` — The organization has no extraction credit left.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INSUFFICIENT_CREDIT":{"value":{"error":"The organization has no extraction credit left.","detail":"The organization has no extraction credit left.","error_code":"INSUFFICIENT_CREDIT","retryable":false,"request_id":"req_abc123","recovery":"Top up the organization's credit or upgrade its plan, then run again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/workflows/{workflow_id}/run/":{"post":{"tags":["workflows"],"summary":"Run a workflow on values","description":"Run a workflow that starts at an input node, on the values in `metadata`. No file is sent.\n\nThe values become a document packet of their own: they are stored as its `metadata`, and as\nits one file, `input-<id>.json`, so the packet reads like any other. The run starts on the\nworkflow's latest version, or on `workflow_version_id`. Poll `GET /v3/runs/{run_id}/` until\n`status` is terminal. A version with no input node is refused with `INVALID_VALUE`.\n\nA value that is not what its field takes refuses the run with `INPUT_VALUES_REFUSED`, naming\neach key in `params.keys` and what it takes in `params.expected`. A key no field declares is ignored.","operationId":"v3_run_workflow","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional caller-supplied key (Stripe convention). Retrying the request with the same key replays the original packet and run: no second packet, no second run.","title":"Idempotency-Key"},"description":"Optional caller-supplied key (Stripe convention). Retrying the request with the same key replays the original packet and run: no second packet, no second run."},{"name":"X-Anyformat-Priority","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anyformat-Priority"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRunFromValuesRequestV3"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRunTriggeredV3"}}},"headers":{"Idempotent-Replayed":{"description":"`true` when this response replays an earlier request sent with the same `Idempotency-Key`; absent on a first request.","schema":{"type":"string","enum":["true"]}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"`VALIDATION_ERROR` — The request failed validation. `detail` is a list of `{type, loc, msg}`, one per failure; `loc[0]` is the request part.\n`INVALID_VALUE` — A value in the request is not valid.\n`OPERATOR_DEPRECATED` — This workflow version uses a deprecated operator and cannot run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}},"INVALID_VALUE":{"value":{"error":"A value in the request is not valid.","detail":"A value in the request is not valid.","error_code":"INVALID_VALUE","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for the value that was rejected, correct it, and send the request again."}},"OPERATOR_DEPRECATED":{"value":{"error":"This workflow version uses a deprecated operator and cannot run.","detail":"This workflow version uses a deprecated operator and cannot run.","error_code":"OPERATOR_DEPRECATED","retryable":false,"request_id":"req_abc123","recovery":"Replace the operator on the nodes in `params.node_ids`, save a new version, and run again."}}}}}},"422":{"description":"`INPUT_VALUES_REFUSED` — The values sent do not match the workflow's input fields.\n`REPORT_TEMPLATE_UNFILLABLE` — The report's Word template reads fields the workflow does not supply.\n`IDEMPOTENCY_KEY_REUSED` — The idempotency key was already used with a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INPUT_VALUES_REFUSED":{"value":{"error":"The values sent do not match the workflow's input fields.","detail":"The values sent do not match the workflow's input fields.","error_code":"INPUT_VALUES_REFUSED","retryable":false,"request_id":"req_abc123","recovery":"Fix each key in `params.keys` so it holds what the entry at the same position of `params.expected` says, and start the run again."}},"REPORT_TEMPLATE_UNFILLABLE":{"value":{"error":"The report's Word template reads fields the workflow does not supply.","detail":"The report's Word template reads fields the workflow does not supply.","error_code":"REPORT_TEMPLATE_UNFILLABLE","retryable":false,"request_id":"req_abc123","recovery":"Add the fields in `params.placeholders` to the node that feeds the report in `params.node_id`, or upload a template without them."}},"IDEMPOTENCY_KEY_REUSED":{"value":{"error":"The idempotency key was already used with a different request.","detail":"The idempotency key was already used with a different request.","error_code":"IDEMPOTENCY_KEY_REUSED","retryable":false,"request_id":"req_abc123","recovery":"Resend the original request unchanged to get its result, or read the resource it created from `params.resource_id`; use a new `Idempotency-Key` only for a genuinely new request."}}}}}},"502":{"description":"`OBJECT_STORAGE_UNAVAILABLE` — Object storage did not complete the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"OBJECT_STORAGE_UNAVAILABLE":{"value":{"error":"Object storage did not complete the request.","detail":"Object storage did not complete the request.","error_code":"OBJECT_STORAGE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}},"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"402":{"description":"`INSUFFICIENT_CREDIT` — The organization has no extraction credit left.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INSUFFICIENT_CREDIT":{"value":{"error":"The organization has no extraction credit left.","detail":"The organization has no extraction credit left.","error_code":"INSUFFICIENT_CREDIT","retryable":false,"request_id":"req_abc123","recovery":"Top up the organization's credit or upgrade its plan, then run again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"413":{"description":"The request body is larger than `params.max_bytes` (`REQUEST_TOO_LARGE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"REQUEST_TOO_LARGE":{"value":{"error":"The request body is larger than the maximum allowed size.","detail":"The request body is larger than the maximum allowed size.","error_code":"REQUEST_TOO_LARGE","retryable":false,"request_id":"req_abc123","recovery":"Send a request, and a file, smaller than `params.max_bytes` bytes."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/workflows/{workflow_id}/upload/from-url/":{"post":{"tags":["workflows"],"summary":"Create document packet from URLs","description":"Import every URL into a single document packet, atomically.\n\nThe backend fetches each HTTPS URL server-side (10s timeout, 20 MB cap\nper file) and registers the packet in one transaction only after every\nfetch succeeded — any failure imports nothing (no partial packet, no\norphan files).\n\nFiles arrive as fetchable `urls`, as `staged_files` ids from\n`POST /v3/blobs/slots/`, or a mix (1..10 in total); staged files land\nafter the `urls` entries.\n\nEach URL-fetched file is named by its response's `Content-Disposition`\nfilename when present, else by the last segment of the URL's path. A\npresigned URL can sign the header in (S3: `ResponseContentDisposition`),\nwhich is how a caller names a file whose URL path is opaque. A staged file\nis named by its `filename`.\n\nFilenames are unique within a workflow. By default (`on_conflict=error`)\na colliding filename fails the request with ``409`` — surfaced once\nthe atomic import settles, not before it starts; pass `on_conflict=rename`\nto auto-rename instead (``report.pdf`` -> ``report (1).pdf``). Each returned\n`name` is the name the file actually landed under; ``original_name`` holds\nthe name it was fetched under when a rename happened.","operationId":"v3_upload_from_url","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentPacketFromUrlsRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentPacketCreatedV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"`VALIDATION_ERROR` — The request failed validation. `detail` is a list of `{type, loc, msg}`, one per failure; `loc[0]` is the request part.\n`INVALID_VALUE` — A value in the request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}},"INVALID_VALUE":{"value":{"error":"A value in the request is not valid.","detail":"A value in the request is not valid.","error_code":"INVALID_VALUE","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for the value that was rejected, correct it, and send the request again."}}}}}},"409":{"description":"`MULTIFILE_UNSUPPORTED` — This workflow cannot process a multi-file document.\n`FILENAME_CONFLICT` — A file with that name already exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"MULTIFILE_UNSUPPORTED":{"value":{"error":"This workflow cannot process a multi-file document.","detail":"This workflow cannot process a multi-file document.","error_code":"MULTIFILE_UNSUPPORTED","retryable":false,"request_id":"req_abc123","recovery":"Send each file as its own document packet, or change the nodes in `params.node_ids`: turn agentic mode off on an extract node, or keep a single parse node."}},"FILENAME_CONFLICT":{"value":{"error":"A file with that name already exists.","detail":"A file with that name already exists.","error_code":"FILENAME_CONFLICT","retryable":false,"request_id":"req_abc123","recovery":"Rename the file, or pass `on_conflict=rename`, and upload it again."}}}}}},"504":{"description":"`GATEWAY_TIMEOUT` — The upstream service did not answer in time.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"413":{"description":"The request body is larger than `params.max_bytes` (`REQUEST_TOO_LARGE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"REQUEST_TOO_LARGE":{"value":{"error":"The request body is larger than the maximum allowed size.","detail":"The request body is larger than the maximum allowed size.","error_code":"REQUEST_TOO_LARGE","retryable":false,"request_id":"req_abc123","recovery":"Send a request, and a file, smaller than `params.max_bytes` bytes."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/workflows/{workflow_id}/document-packets/":{"get":{"tags":["workflows"],"summary":"List workflow document packets","description":"List a workflow's document packets, newest first.\n\nKeyset-paginated: follow `next_cursor` until it is `null`. The sort\norder is fixed (`-created_at, -id`); there are no totals or page\nnumbers. Items are slim — fetch\n`GET /v3/document-packets/{document_packet_id}/` for the per-file\nbreakdown and `latest_run_id`.","operationId":"v3_list_workflow_document_packets","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size, capped at 100.","default":20,"title":"Limit"},"description":"Page size, capped at 100."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque token from a previous response's `next_cursor`.","title":"Cursor"},"description":"Opaque token from a previous response's `next_cursor`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentPacketListPageV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/workflows/{workflow_id}/versions/":{"get":{"tags":["workflows"],"summary":"List workflow versions","description":"List a workflow's versions, newest first.\n\nVersions are read-only: they exist for comparison and audit. A run uses\nthe latest version (item 0 of the first page) unless it names one with\n`workflow_version_id`. Read a version's graph with\n`GET /v3/workflows/{workflow_id}/?version=`.\n\nKeyset-paginated: follow `next_cursor` until it is `null`. The sort\norder is fixed (`-created_at, -id`); there are no totals or page numbers.","operationId":"v3_list_workflow_versions","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size, capped at 100.","default":20,"title":"Limit"},"description":"Page size, capped at 100."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque token from a previous response's `next_cursor`.","title":"Cursor"},"description":"Opaque token from a previous response's `next_cursor`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVersionListPageV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/workflows/{workflow_id}/runs/":{"get":{"tags":["workflows"],"summary":"List workflow runs","description":"List a workflow's runs, newest first.\n\nKeyset-paginated: follow `next_cursor` until it is `null`. The sort\norder is fixed (`-created_at, -id`); there are no totals or page\nnumbers. Items are slim — fetch `GET /v3/runs/{run_id}/` for the\nresults.\n\nOptional half-open interval on the packet's `created_at`:\n`document_packet_created_after` (inclusive) /\n`document_packet_created_before` (exclusive). Typical daily-batch\nworkflow: upload day N, fetch day N+1 with\n`after=<N>T00:00:00 & before=<N+1>T00:00:00`.","operationId":"v3_list_workflow_runs","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size, capped at 100.","default":20,"title":"Limit"},"description":"Page size, capped at 100."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque token from a previous response's `next_cursor`.","title":"Cursor"},"description":"Opaque token from a previous response's `next_cursor`."},{"name":"document_packet_created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Include only runs whose document packet was created at or after this ISO 8601 datetime (inclusive lower bound). Combine with `document_packet_created_before` to fetch one day's uploads.","title":"Document Packet Created After"},"description":"Include only runs whose document packet was created at or after this ISO 8601 datetime (inclusive lower bound). Combine with `document_packet_created_before` to fetch one day's uploads."},{"name":"document_packet_created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Include only runs whose document packet was created before this ISO 8601 datetime (exclusive upper bound). Adjacent day-buckets tile without overlap: `after=2026-07-17T00:00:00 & before=2026-07-18T00:00:00` is exactly July 17.","title":"Document Packet Created Before"},"description":"Include only runs whose document packet was created before this ISO 8601 datetime (exclusive upper bound). Adjacent day-buckets tile without overlap: `after=2026-07-17T00:00:00 & before=2026-07-18T00:00:00` is exactly July 17."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunListPageV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/workflows/{workflow_id}/usage/":{"get":{"tags":["workflows"],"summary":"Get workflow usage","description":"The pages and credits a workflow's document runs were billed for, and the pages of its failed runs.\n\nThe numbers are the workflow's row on the usage page. Credits spent without a\ndocument (knowledge asks, optimization proposals and edit-reference parses)\nare not counted. A charge counts on the day it was made, so a document run\nagain on a later day counts again on that day; a deleted document still\ncounts. Omit both dates for the workflow's whole history.","operationId":"v3_get_workflow_usage","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"First day to count, inclusive, as `YYYY-MM-DD` in UTC. Omit to count from the start.","examples":["2026-10-01"],"title":"Date From"},"description":"First day to count, inclusive, as `YYYY-MM-DD` in UTC. Omit to count from the start."},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Last day to count, inclusive, as `YYYY-MM-DD` in UTC. Omit to count up to now.","examples":["2026-10-31"],"title":"Date To"},"description":"Last day to count, inclusive, as `YYYY-MM-DD` in UTC. Omit to count up to now."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowUsageV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/document-packets/{document_packet_id}/":{"get":{"tags":["document-packets"],"summary":"Get document packet","description":"Retrieve one document packet flat: status, timestamps, the files it\ngroups, and `latest_run_id` (`null` until the packet has been run).\n\nEach file carries `download_url`, a presigned link to its original bytes that this read signs, valid until\n`download_url_expires_at`; the bytes are never served through the API. A file whose bytes cannot be linked\nanswers `null` in those fields and in `content_type`. The read counts as one request of the general tier,\nplus one per file in the packet (at most the key's limit), and answers `429 RATE_LIMITED` when those do not fit\nin the window. To follow a run's progress, poll `GET /v3/runs/{run_id}/`, which costs one request.\n\nUnknown ids — including packets belonging to another organization —\nreturn 404.","operationId":"v3_get_document_packet","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"document_packet_id","in":"path","required":true,"schema":{"type":"string","title":"Document Packet Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentPacketDetailV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}},"delete":{"tags":["document-packets"],"summary":"Delete document packet","description":"Delete a document packet and all its files.\n\nThe packet and every file in it are removed together, along with any\nextraction results. This action is irreversible.","operationId":"v3_delete_document_packet","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"document_packet_id","in":"path","required":true,"schema":{"type":"string","title":"Document Packet Id"}},{"name":"X-Anyformat-Skip-Deletion-Window","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`true` forgets the deleted data at once instead of keeping it restorable for the deletion window, so its deletion certificate is issued right away. The delete cannot then be undone.","title":"X-Anyformat-Skip-Deletion-Window"},"description":"`true` forgets the deleted data at once instead of keeping it restorable for the deletion window, so its deletion certificate is issued right away. The delete cannot then be undone."}],"responses":{"204":{"description":"Successful Response","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/document-packets/{document_packet_id}/run/":{"post":{"tags":["document-packets"],"summary":"Run document packet","description":"Run (or re-run) a document packet on the latest version of its\nworkflow, or on the version `workflow_version_id` names.\n\nPin a version to keep production runs off the candidates the optimizer\nsaves, and to make a result reproducible. A version of another workflow\nreturns 404, like an unknown one. Every call creates a NEW run — re-running after editing the workflow\nis the intended flow; earlier runs stay readable at\n`GET /v3/runs/{run_id}/`. The only exception is an `Idempotency-Key`\nreplay, which returns the original run.\n\nUnknown ids — including packets belonging to another organization —\nreturn 404. An organization without extraction credit gets 402.","operationId":"v3_run_document_packet","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"document_packet_id","in":"path","required":true,"schema":{"type":"string","title":"Document Packet Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional caller-supplied key (Stripe convention). Retrying the request with the same key returns the original run instead of triggering (and billing) a second extraction. The key is scoped by `workflow_version_id`.","title":"Idempotency-Key"},"description":"Optional caller-supplied key (Stripe convention). Retrying the request with the same key returns the original run instead of triggering (and billing) a second extraction. The key is scoped by `workflow_version_id`."},{"name":"X-Anyformat-Priority","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anyformat-Priority"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RunPacketRequestV3"},{"type":"null"}],"title":"Body"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRunTriggeredV3"}}},"headers":{"Idempotent-Replayed":{"description":"`true` when this response replays an earlier request sent with the same `Idempotency-Key`; absent on a first request.","schema":{"type":"string","enum":["true"]}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"402":{"description":"`INSUFFICIENT_CREDIT` — The organization has no extraction credit left.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INSUFFICIENT_CREDIT":{"value":{"error":"The organization has no extraction credit left.","detail":"The organization has no extraction credit left.","error_code":"INSUFFICIENT_CREDIT","retryable":false,"request_id":"req_abc123","recovery":"Top up the organization's credit or upgrade its plan, then run again."}}}}}},"400":{"description":"`VALIDATION_ERROR` — The request failed validation. `detail` is a list of `{type, loc, msg}`, one per failure; `loc[0]` is the request part.\n`OPERATOR_DEPRECATED` — This workflow version uses a deprecated operator and cannot run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}},"OPERATOR_DEPRECATED":{"value":{"error":"This workflow version uses a deprecated operator and cannot run.","detail":"This workflow version uses a deprecated operator and cannot run.","error_code":"OPERATOR_DEPRECATED","retryable":false,"request_id":"req_abc123","recovery":"Replace the operator on the nodes in `params.node_ids`, save a new version, and run again."}}}}}},"409":{"description":"`MULTIFILE_UNSUPPORTED` — This workflow cannot process a multi-file document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"MULTIFILE_UNSUPPORTED":{"value":{"error":"This workflow cannot process a multi-file document.","detail":"This workflow cannot process a multi-file document.","error_code":"MULTIFILE_UNSUPPORTED","retryable":false,"request_id":"req_abc123","recovery":"Send each file as its own document packet, or change the nodes in `params.node_ids`: turn agentic mode off on an extract node, or keep a single parse node."}}}}}},"422":{"description":"`INPUT_VALUES_REFUSED` — The values sent do not match the workflow's input fields.\n`REPORT_TEMPLATE_UNFILLABLE` — The report's Word template reads fields the workflow does not supply.\n`IDEMPOTENCY_KEY_REUSED` — The idempotency key was already used with a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INPUT_VALUES_REFUSED":{"value":{"error":"The values sent do not match the workflow's input fields.","detail":"The values sent do not match the workflow's input fields.","error_code":"INPUT_VALUES_REFUSED","retryable":false,"request_id":"req_abc123","recovery":"Fix each key in `params.keys` so it holds what the entry at the same position of `params.expected` says, and start the run again."}},"REPORT_TEMPLATE_UNFILLABLE":{"value":{"error":"The report's Word template reads fields the workflow does not supply.","detail":"The report's Word template reads fields the workflow does not supply.","error_code":"REPORT_TEMPLATE_UNFILLABLE","retryable":false,"request_id":"req_abc123","recovery":"Add the fields in `params.placeholders` to the node that feeds the report in `params.node_id`, or upload a template without them."}},"IDEMPOTENCY_KEY_REUSED":{"value":{"error":"The idempotency key was already used with a different request.","detail":"The idempotency key was already used with a different request.","error_code":"IDEMPOTENCY_KEY_REUSED","retryable":false,"request_id":"req_abc123","recovery":"Resend the original request unchanged to get its result, or read the resource it created from `params.resource_id`; use a new `Idempotency-Key` only for a genuinely new request."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"413":{"description":"The request body is larger than `params.max_bytes` (`REQUEST_TOO_LARGE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"REQUEST_TOO_LARGE":{"value":{"error":"The request body is larger than the maximum allowed size.","detail":"The request body is larger than the maximum allowed size.","error_code":"REQUEST_TOO_LARGE","retryable":false,"request_id":"req_abc123","recovery":"Send a request, and a file, smaller than `params.max_bytes` bytes."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/workflows/{workflow_id}/dataset/upload/":{"post":{"tags":["datasets"],"summary":"Upload a document (+ ground truth) to a workflow dataset","description":"Upload one document (1..N files) plus optional ground truth as ONE\ndocument packet in the dataset (atomic).\n\nAll-or-nothing: any rejected file (unsupported type, disguised bytes) or a\nground-truth failure fails the whole request and nothing is stored.\n\nFilenames are unique within a workflow. By default (`on_conflict=error`) a\nfile whose name collides with an existing file fails the request with `409`\nbefore anything is uploaded; pass `on_conflict=rename` to auto-rename the\ncollision instead (`invoice.pdf` -> `invoice (1).pdf`), each returned file's\n``name`` being the name it landed under and ``original_name`` holding the\nuploaded name when a rename happened.\n\nBulk ingestion loops this endpoint, one call per document; each call is\nbounded and independently retryable.","operationId":"v3_upload_to_dataset","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional caller-supplied key (Stripe convention). Retrying the request with the same key replays the original document packet — no duplicate document is registered.","title":"Idempotency-Key"},"description":"Optional caller-supplied key (Stripe convention). Retrying the request with the same key replays the original document packet — no duplicate document is registered."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_v3_upload_to_dataset"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetUploadResponseV3"}}},"headers":{"Idempotent-Replayed":{"description":"`true` when this response replays an earlier request sent with the same `Idempotency-Key`; absent on a first request.","schema":{"type":"string","enum":["true"]}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"`VALIDATION_ERROR` — The request failed validation. `detail` is a list of `{type, loc, msg}`, one per failure; `loc[0]` is the request part.\n`UNSUPPORTED_FILE_TYPE` — The file type is not supported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}},"UNSUPPORTED_FILE_TYPE":{"value":{"error":"The file type is not supported.","detail":"The file type is not supported.","error_code":"UNSUPPORTED_FILE_TYPE","retryable":false,"request_id":"req_abc123","recovery":"Convert the file to a type the API reference lists, and upload it again."}}}}}},"413":{"description":"`REQUEST_TOO_LARGE` — The request body is larger than the maximum allowed size.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"REQUEST_TOO_LARGE":{"value":{"error":"The request body is larger than the maximum allowed size.","detail":"The request body is larger than the maximum allowed size.","error_code":"REQUEST_TOO_LARGE","retryable":false,"request_id":"req_abc123","recovery":"Send a request, and a file, smaller than `params.max_bytes` bytes."}}}}}},"409":{"description":"`FILENAME_CONFLICT` — A file with that name already exists.\n`DATASET_UNSUPPORTED` — This workflow does not support datasets.\n`ZERO_DATA_RETENTION_REFUSES_DATASET` — This organization keeps no data, so it has no dataset.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"FILENAME_CONFLICT":{"value":{"error":"A file with that name already exists.","detail":"A file with that name already exists.","error_code":"FILENAME_CONFLICT","retryable":false,"request_id":"req_abc123","recovery":"Rename the file, or pass `on_conflict=rename`, and upload it again."}},"DATASET_UNSUPPORTED":{"value":{"error":"This workflow does not support datasets.","detail":"This workflow does not support datasets.","error_code":"DATASET_UNSUPPORTED","retryable":false,"request_id":"req_abc123","recovery":"Use a workflow with an Extract node and no Split node for datasets and evals, as `params.reason` (`split` or `parse_only`) names the rule this one breaks."}},"ZERO_DATA_RETENTION_REFUSES_DATASET":{"value":{"error":"This organization keeps no data, so it has no dataset.","detail":"This organization keeps no data, so it has no dataset.","error_code":"ZERO_DATA_RETENTION_REFUSES_DATASET","retryable":false,"request_id":"req_abc123","recovery":"Keep datasets in an organization that retains data, because a zero-data-retention one cannot hold them."}}}}}},"422":{"description":"`GT_INVALID` — The ground truth is not valid. `detail` is a list of `{type, loc, msg}`, one per failure; `loc` holds the field's `persistent_id`, or an unknown key as sent.\n`DATASET_GROUND_TRUTH_SAVE_FAILED` — The ground truth could not be saved. `detail` is a list of `{type, loc, msg}`; an empty `loc` names the whole ground truth.\n`DATASET_DOCUMENT_REJECTED` — A file in the dataset document was rejected. `detail` is a list of `{filename, reason}`, one per rejected file.\n`EXTRACT_NODE_UNRESOLVED` — The request does not say which extract node to use.\n`DATASET_INVALID_REQUEST` — The dataset registration request is not valid.\n`IDEMPOTENCY_KEY_REUSED` — The idempotency key was already used with a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GT_INVALID":{"value":{"error":"The ground truth is not valid.","detail":[{"type":"missing","loc":["069dcc2ce14c760680002ee4fb17b4f0"],"msg":"Field required"}],"error_code":"GT_INVALID","retryable":false,"request_id":"req_abc123","recovery":"Correct the ground truth against `detail` so it matches the workflow's fields, and upload it again."}},"DATASET_GROUND_TRUTH_SAVE_FAILED":{"value":{"error":"The ground truth could not be saved.","detail":[{"type":"value_error","loc":[],"msg":"Ground truth passed validation but could not be saved."}],"error_code":"DATASET_GROUND_TRUTH_SAVE_FAILED","retryable":false,"request_id":"req_abc123","recovery":"Check that the ground truth matches the workflow's fields, then upload it again."}},"DATASET_DOCUMENT_REJECTED":{"value":{"error":"A file in the dataset document was rejected.","detail":[{"filename":"invoice.pdf","reason":"sniff"}],"error_code":"DATASET_DOCUMENT_REJECTED","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for the file that was rejected, fix or remove it, and register the document again."}},"EXTRACT_NODE_UNRESOLVED":{"value":{"error":"The request does not say which extract node to use.","detail":"The request does not say which extract node to use.","error_code":"EXTRACT_NODE_UNRESOLVED","retryable":false,"request_id":"req_abc123","recovery":"Name in the request the extract node the ground truth belongs to."}},"DATASET_INVALID_REQUEST":{"value":{"error":"The dataset registration request is not valid.","detail":"The dataset registration request is not valid.","error_code":"DATASET_INVALID_REQUEST","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for the part of the request that is not valid, correct it, and send it again."}},"IDEMPOTENCY_KEY_REUSED":{"value":{"error":"The idempotency key was already used with a different request.","detail":"The idempotency key was already used with a different request.","error_code":"IDEMPOTENCY_KEY_REUSED","retryable":false,"request_id":"req_abc123","recovery":"Resend the original request unchanged to get its result, or read the resource it created from `params.resource_id`; use a new `Idempotency-Key` only for a genuinely new request."}}}}}},"502":{"description":"`OBJECT_STORAGE_UNAVAILABLE` — Object storage did not complete the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"OBJECT_STORAGE_UNAVAILABLE":{"value":{"error":"Object storage did not complete the request.","detail":"Object storage did not complete the request.","error_code":"OBJECT_STORAGE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}},"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/workflows/{workflow_id}/edit-references/":{"post":{"tags":["edit references"],"summary":"Upload reference documents to a workflow","description":"Upload the standing data an Edit node fills forms from.\n\nReturns one document per file, each with the `id` to put in an Edit node's\n`reference_document_ids`.\n\nA text reference is usable immediately (`status: ready`). A PDF is parsed\nonce, here — never on a run — so it comes back `pending` and reaches\n`ready` shortly after; poll `GET /v3/workflows/{workflow_id}/edit-references/`\nuntil it settles. Starting a run whose Edit node names a reference that is\nnot yet `ready` is refused rather than filled from a partial reference.\n\nUpload once, reuse forever: every later run reads the already-parsed text,\nso the parse is neither repeated nor re-billed.","operationId":"v3_upload_edit_references","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_v3_upload_edit_references"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditReferenceListResponseV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"`VALIDATION_ERROR` — The request failed validation. `detail` is a list of `{type, loc, msg}`, one per failure; `loc[0]` is the request part.\n`UNSUPPORTED_FILE_TYPE` — The file type is not supported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}},"UNSUPPORTED_FILE_TYPE":{"value":{"error":"The file type is not supported.","detail":"The file type is not supported.","error_code":"UNSUPPORTED_FILE_TYPE","retryable":false,"request_id":"req_abc123","recovery":"Convert the file to a type the API reference lists, and upload it again."}}}}}},"413":{"description":"`FILE_TOO_LARGE` — The file is larger than the maximum allowed size.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"FILE_TOO_LARGE":{"value":{"error":"The file is larger than the maximum allowed size.","detail":"The file is larger than the maximum allowed size.","error_code":"FILE_TOO_LARGE","retryable":false,"request_id":"req_abc123","recovery":"Split or compress the file until it is under `params.max_bytes` bytes, and upload it again."}}}}}},"409":{"description":"`IMMUTABLE_WORKFLOW` — This is a system workflow and it cannot change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"IMMUTABLE_WORKFLOW":{"value":{"error":"This is a system workflow and it cannot change.","detail":"This is a system workflow and it cannot change.","error_code":"IMMUTABLE_WORKFLOW","retryable":false,"request_id":"req_abc123","recovery":"Make the change on a workflow of your own, because a system workflow never changes."}}}}}},"502":{"description":"`OBJECT_STORAGE_UNAVAILABLE` — Object storage did not complete the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"OBJECT_STORAGE_UNAVAILABLE":{"value":{"error":"Object storage did not complete the request.","detail":"Object storage did not complete the request.","error_code":"OBJECT_STORAGE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}},"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}},"get":{"tags":["edit references"],"summary":"List a workflow's reference documents","description":"List the reference documents on a workflow, with their parse status.\n\nPoll this after uploading a PDF reference until its `status` leaves\n`pending`.","operationId":"v3_list_edit_references","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditReferenceListResponseV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"409":{"description":"`IMMUTABLE_WORKFLOW` — This is a system workflow and it cannot change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"IMMUTABLE_WORKFLOW":{"value":{"error":"This is a system workflow and it cannot change.","detail":"This is a system workflow and it cannot change.","error_code":"IMMUTABLE_WORKFLOW","retryable":false,"request_id":"req_abc123","recovery":"Make the change on a workflow of your own, because a system workflow never changes."}}}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/workflows/{workflow_id}/edit-references/{document_id}/":{"delete":{"tags":["edit references"],"summary":"Delete a reference document","description":"Delete a reference document and its stored objects.\n\nAn Edit node still naming the deleted id will refuse to run rather than\nfill from a reference that no longer exists — remove the id from the node\nin the same change.","operationId":"v3_delete_edit_reference","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}}],"responses":{"204":{"description":"Successful Response","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"409":{"description":"`IMMUTABLE_WORKFLOW` — This is a system workflow and it cannot change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"IMMUTABLE_WORKFLOW":{"value":{"error":"This is a system workflow and it cannot change.","detail":"This is a system workflow and it cannot change.","error_code":"IMMUTABLE_WORKFLOW","retryable":false,"request_id":"req_abc123","recovery":"Make the change on a workflow of your own, because a system workflow never changes."}}}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/workflows/{workflow_id}/report-templates/":{"post":{"tags":["report templates"],"summary":"Upload a Word template for a report node","description":"Upload the Word document a report node fills.\n\nReturns the `id` to put in a report node's `template_file_id`, and the `placeholders`\nthe document reads. A placeholder is written `{{ field_key }}`; a paragraph kept only for a\nchosen option is wrapped in `{%p if 'option' in field_key %}` and `{%p endif %}`; a table row\nrepeated per row of a table field is wrapped in `{%tr for row in field_key %}` and\n`{%tr endfor %}`. A document whose placeholders are not valid template syntax is refused.\n\nThe feature is in alpha: the organization needs it enabled, or the request answers 403.","operationId":"v3_upload_report_template","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_v3_upload_report_template"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportTemplateV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"`VALIDATION_ERROR` — The request failed validation. `detail` is a list of `{type, loc, msg}`, one per failure; `loc[0]` is the request part.\n`UNSUPPORTED_FILE_TYPE` — The file type is not supported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}},"UNSUPPORTED_FILE_TYPE":{"value":{"error":"The file type is not supported.","detail":"The file type is not supported.","error_code":"UNSUPPORTED_FILE_TYPE","retryable":false,"request_id":"req_abc123","recovery":"Convert the file to a type the API reference lists, and upload it again."}}}}}},"413":{"description":"`FILE_TOO_LARGE` — The file is larger than the maximum allowed size.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"FILE_TOO_LARGE":{"value":{"error":"The file is larger than the maximum allowed size.","detail":"The file is larger than the maximum allowed size.","error_code":"FILE_TOO_LARGE","retryable":false,"request_id":"req_abc123","recovery":"Split or compress the file until it is under `params.max_bytes` bytes, and upload it again."}}}}}},"409":{"description":"`IMMUTABLE_WORKFLOW` — This is a system workflow and it cannot change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"IMMUTABLE_WORKFLOW":{"value":{"error":"This is a system workflow and it cannot change.","detail":"This is a system workflow and it cannot change.","error_code":"IMMUTABLE_WORKFLOW","retryable":false,"request_id":"req_abc123","recovery":"Make the change on a workflow of your own, because a system workflow never changes."}}}}}},"403":{"description":"`ACCESS_DENIED` — You do not have access to this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/workflows/{workflow_id}/report-templates/{template_id}/":{"get":{"tags":["report templates"],"summary":"Get a report template","description":"Read one of a workflow's Word templates: its name, its size and the field keys it reads.","operationId":"v3_get_report_template","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportTemplateV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/workflows/{workflow_id}/knowledge/ask":{"post":{"tags":["knowledge"],"summary":"Ask a question about a workflow's documents","description":"Answer a question from the content of this workflow's documents.\n\nThe answer is grounded: every claim comes back with the exact quote it\nrests on, resolved to a page and a region in the source PDF, so you can\nshow a customer where a number came from instead of asking them to trust\nit. `path` reports the route the agent took to get there.\n\nThe workflow needs a knowledge node — that is what indexes its documents.\nWithout one this returns 409.\n\nBilled per question against the organization's credits, on the text the\nagent actually reads. A question the organization cannot pay for is\nrefused before it runs, not after.\n\nPass a `thread_id` you mint yourself (starting with `kb-`) to ask a\nfollow-up in context; omit it and each question stands alone.","operationId":"v3_ask_knowledge","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskRequestV3"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskResponseV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"402":{"description":"`INSUFFICIENT_CREDIT` — the organization has no credits. Refused before the question runs, so nothing is charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"`KNOWLEDGE_NOT_ENABLED` — no knowledge node on the workflow, permanent until one is added. `ZERO_DATA_RETENTION_REFUSES_KNOWLEDGE` — the workflow's organization is zero-data-retention, which keeps no knowledge base, permanent. `KNOWLEDGE_NOT_READY` — the first index is still building, worth retrying. `KNOWLEDGE_THREAD_MISMATCH` — this `thread_id` belongs to a different workflow. `KNOWLEDGE_UNSUPPORTED_SNAPSHOT_FORMAT` — the published snapshot is in a format this deployment no longer reads, permanent until an operator republishes it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"504":{"description":"The ask exceeded the agent's own time ceiling. Retry with a narrower question.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"413":{"description":"The request body is larger than `params.max_bytes` (`REQUEST_TOO_LARGE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"REQUEST_TOO_LARGE":{"value":{"error":"The request body is larger than the maximum allowed size.","detail":"The request body is larger than the maximum allowed size.","error_code":"REQUEST_TOO_LARGE","retryable":false,"request_id":"req_abc123","recovery":"Send a request, and a file, smaller than `params.max_bytes` bytes."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/workflows/{workflow_id}/knowledge/entries":{"get":{"tags":["knowledge"],"summary":"List a workflow's knowledge corpus","description":"List a workflow's knowledge corpus tree: every source document,\nsorted by path. Needs a knowledge node\n(409 otherwise); see `folder`/`cursor` and knowledge/list.mdx for the\nrest.","operationId":"v3_list_knowledge","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"folder","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only list entries directly in this folder or a folder beneath it; omit for the whole tree.","title":"Folder"},"description":"Only list entries directly in this folder or a folder beneath it; omit for the whole tree."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque token from a previous response's `next_cursor`.","title":"Cursor"},"description":"Opaque token from a previous response's `next_cursor`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeEntryPageV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"404":{"description":"Unknown workflow, or `folder` names no folder in this corpus.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"`KNOWLEDGE_NOT_ENABLED` — no knowledge node on the workflow, permanent until one is added. `ZERO_DATA_RETENTION_REFUSES_KNOWLEDGE` — the workflow's organization is zero-data-retention, which keeps no knowledge base, permanent. `KNOWLEDGE_NOT_READY` — the first index is still building, worth retrying. `KNOWLEDGE_UNSUPPORTED_SNAPSHOT_FORMAT` — the published snapshot is in a format this deployment no longer reads, permanent until an operator republishes it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"504":{"description":"The listing exceeded the agent's own time ceiling. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/workflows/{workflow_id}/knowledge/search":{"get":{"tags":["knowledge"],"summary":"Search a workflow's knowledge corpus","description":"Rank a workflow's knowledge corpus by relevance to `query` (full-text search over blocks).\nNeeds a knowledge node (409 otherwise); see `query`/`folder`/`limit`\nand knowledge/search.mdx for the rest.","operationId":"v3_search_knowledge","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":512,"description":"Search query. 1 to 512 characters.","title":"Query"},"description":"Search query. 1 to 512 characters."},{"name":"folder","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Narrows to one top-level source folder (the first path segment, not a nested path). 404s when no such folder exists in this corpus.","title":"Folder"},"description":"Narrows to one top-level source folder (the first path segment, not a nested path). 404s when no such folder exists in this corpus."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Max hits to return, 1 to 50.","default":10,"title":"Limit"},"description":"Max hits to return, 1 to 50."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeSearchHitV3"},"title":"Response V3 Search Knowledge"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"404":{"description":"Unknown workflow, or `folder` names no folder in this corpus.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"`KNOWLEDGE_NOT_ENABLED` — no knowledge node on the workflow, permanent until one is added. `ZERO_DATA_RETENTION_REFUSES_KNOWLEDGE` — the workflow's organization is zero-data-retention, which keeps no knowledge base, permanent. `KNOWLEDGE_NOT_READY` — the first index is still building, worth retrying. `KNOWLEDGE_UNSUPPORTED_SNAPSHOT_FORMAT` — the published snapshot is in a format this deployment no longer reads, permanent until an operator republishes it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"504":{"description":"The search exceeded the agent's own time ceiling. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/workflows/{workflow_id}/knowledge/entry":{"get":{"tags":["knowledge"],"summary":"Read one document from a workflow's knowledge corpus","description":"Read one document's text from a workflow's\nknowledge corpus.\n\nThe workflow needs a knowledge node — that is what indexes its\ndocuments. Without one this returns 409. An unknown `path` is a 404 —\nlist entries with `list_knowledge` or find one with `search_knowledge`\nfirst.\n\n`content` is capped; `truncated` is `true` when it was cut off. With\n`as_url=true`, `content_url` is a presigned URL of the whole body instead.","operationId":"v3_read_knowledge","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"path","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":1024,"description":"Path of the document to read, from list_knowledge or search_knowledge. 1 to 1024 characters.","title":"Path"},"description":"Path of the document to read, from list_knowledge or search_knowledge. 1 to 1024 characters."},{"name":"as_url","in":"query","required":false,"schema":{"type":"boolean","description":"Return a presigned `content_url` of the document's whole body instead of its capped `content`.","default":false,"title":"As Url"},"description":"Return a presigned `content_url` of the document's whole body instead of its capped `content`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeReadResultV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"409":{"description":"`KNOWLEDGE_NOT_ENABLED` — no knowledge node on the workflow, permanent until one is added. `ZERO_DATA_RETENTION_REFUSES_KNOWLEDGE` — the workflow's organization is zero-data-retention, which keeps no knowledge base, permanent. `KNOWLEDGE_NOT_READY` — the first index is still building, worth retrying. `KNOWLEDGE_UNSUPPORTED_SNAPSHOT_FORMAT` — the published snapshot is in a format this deployment no longer reads, permanent until an operator republishes it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"504":{"description":"The read exceeded the agent's own time ceiling. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/workflows/{workflow_id}/knowledge/snapshot":{"get":{"tags":["knowledge"],"summary":"Get a presigned URL for a workflow's whole knowledge corpus","description":"Get a presigned URL for the whole knowledge corpus tar.\n\nPossession of the URL is read permission for the workflow's corpus\nuntil it expires — prefer `list_knowledge`/`read_knowledge` for\nanything that stays inside this API; this is for handing the whole\narchive to something outside it.\n\nThe archive is built on the first call after a publish: that call answers\n`KNOWLEDGE_NOT_READY` and a retry shortly after returns the URL. A corpus whose archive\ncan never be built answers `KNOWLEDGE_DOWNLOAD_UNAVAILABLE`, which is not worth retrying.","operationId":"v3_download_knowledge","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeSnapshotV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"403":{"description":"`ACCESS_DENIED` — the caller does not have access to this workflow's knowledge base.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"`KNOWLEDGE_NOT_ENABLED` — no knowledge node on the workflow, permanent until one is added. `ZERO_DATA_RETENTION_REFUSES_KNOWLEDGE` — the workflow's organization is zero-data-retention, which keeps no knowledge base, permanent. `KNOWLEDGE_NOT_READY` — no snapshot has ever been published, or the download archive is being built (the first call after a publish starts it); worth retrying shortly. `KNOWLEDGE_DOWNLOAD_UNAVAILABLE` — the archive of this corpus version cannot be built (the corpus is over the size limit, or a document object is gone), permanent until the corpus changes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/runs/{run_id}/":{"get":{"tags":["runs"],"summary":"Get run","description":"Retrieve one run flat: lifecycle status plus results inline.\n\nAlways 200 while the run exists — no precondition errors while the\nextraction is in flight. `results` is `null` until `status` reaches\n`processed`, then carries the extraction results envelope. A run that ended in `error` or\n`cancelled` stays readable with `results: null`. Results above 6 MB, or any size with\n`?delivery=url`, arrive as `results_url` with `results: null`; SDK 1.x, which never follows\n`results_url`, gets them inline at any size unless it asks for `delivery=url`. A store or a\nread of the results that fails answers 502 (`OBJECT_STORAGE_UNAVAILABLE`), and 409\n(`CONCURRENT_EDIT`) when the results changed during the read; both are retryable. A file parsed\nbefore blocks were stored answers 400 (`REPARSE_REQUIRED`) to `parse_format=blocks`. A packet whose\nfiles have no readable parse answers 400 (`REPARSE_REQUIRED`) too, as does a packet with a file that\nhas another file after it and a page count that is not known; a packet whose parse disagrees with\nits page counts answers 400 (`INTERNAL_INCONSISTENCY`).\n\nUnknown ids — including runs belonging to another organization —\nreturn 404.","operationId":"v3_get_run","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"name":"parse_format","in":"query","required":false,"schema":{"enum":["markdown","blocks","none"],"type":"string","description":"The form `results.parse` takes. `markdown`: the anchored markdown beside its blocks. `blocks`: pages of blocks in reading order, each with its `content`, and no markdown. `none`: no parse, so `results.parse` is `null` and the results stay small at any document size. `results.parse.format` names the form served.","default":"markdown","title":"Parse Format"},"description":"The form `results.parse` takes. `markdown`: the anchored markdown beside its blocks. `blocks`: pages of blocks in reading order, each with its `content`, and no markdown. `none`: no parse, so `results.parse` is `null` and the results stay small at any document size. `results.parse.format` names the form served."},{"name":"delivery","in":"query","required":false,"schema":{"enum":["inline","url"],"type":"string","description":"`url` returns the results as `results_url` at any size, for a client that wants one code path. With `inline`, the default, results above 6 MB still arrive as `results_url`.","default":"inline","title":"Delivery"},"description":"`url` returns the results as `results_url` at any size, for a client that wants one code path. With `inline`, the default, results above 6 MB still arrive as `results_url`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunDetailV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"`VALIDATION_ERROR` — The request failed validation. `detail` is a list of `{type, loc, msg}`, one per failure; `loc[0]` is the request part.\n`REPARSE_REQUIRED` — The file must be re-parsed before it can be read this way.\n`INTERNAL_INCONSISTENCY` — The server found an internal inconsistency.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}},"REPARSE_REQUIRED":{"value":{"error":"The file must be re-parsed before it can be read this way.","detail":"The file must be re-parsed before it can be read this way.","error_code":"REPARSE_REQUIRED","retryable":false,"request_id":"req_abc123","recovery":"Re-parse the file, then read the run again."}},"INTERNAL_INCONSISTENCY":{"value":{"error":"The server found an internal inconsistency.","detail":"The server found an internal inconsistency.","error_code":"INTERNAL_INCONSISTENCY","retryable":false,"request_id":"req_abc123","recovery":"Contact support with the `request_id`, because the same request will fail again."}}}}}},"409":{"description":"`CONCURRENT_EDIT` — Someone else changed this at the same time. Reload it and try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"CONCURRENT_EDIT":{"value":{"error":"Someone else changed this at the same time. Reload it and try again.","detail":"Someone else changed this at the same time. Reload it and try again.","error_code":"CONCURRENT_EDIT","retryable":true,"request_id":"req_abc123","recovery":"Fetch the resource again, reapply your change and retry."}}}}}},"502":{"description":"`OBJECT_STORAGE_UNAVAILABLE` — Object storage did not complete the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"OBJECT_STORAGE_UNAVAILABLE":{"value":{"error":"Object storage did not complete the request.","detail":"Object storage did not complete the request.","error_code":"OBJECT_STORAGE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}},"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"504":{"description":"`GATEWAY_TIMEOUT` — The upstream service did not answer in time.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/splits/{split_id}/pdf/":{"get":{"tags":["splits"],"summary":"Download a split as a PDF","description":"Download one split's pages as a PDF.\n\nThe document is built from the run's source files when you ask for it and\nis never stored, so the response reflects the split's current geometry. Take\nthe id from `splits[].id` on a run's results, or from\n`splits[].partitions[].id` when the splitter partitions the category.\n\nThe response carries an opaque `ETag` — send it back verbatim in\n`If-None-Match` and a still-current split answers `304` without\ntransferring the document again. Do not build the tag yourself.","operationId":"v3_download_split_pdf","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"split_id","in":"path","required":true,"schema":{"type":"string","title":"Split Id"}},{"name":"if-none-match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"If-None-Match"}}],"responses":{"200":{"description":"The split's pages as a PDF.","content":{"application/pdf":{}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"304":{"description":"Not modified — the `ETag` you sent is still current."},"404":{"description":"`NOT_FOUND` — The resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"409":{"description":"`SPLIT_HAS_NO_PAGES` — The split holds no pages.\n`SPLIT_SOURCE_NOT_PDF` — The split's source document is not a PDF.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SPLIT_HAS_NO_PAGES":{"value":{"error":"The split holds no pages.","detail":"The split holds no pages.","error_code":"SPLIT_HAS_NO_PAGES","retryable":false,"request_id":"req_abc123","recovery":"Request a split of the run that holds at least one page."}},"SPLIT_SOURCE_NOT_PDF":{"value":{"error":"The split's source document is not a PDF.","detail":"The split's source document is not a PDF.","error_code":"SPLIT_SOURCE_NOT_PDF","retryable":false,"request_id":"req_abc123","recovery":"Download the source document itself, because only a PDF source is cut into split PDFs."}}}}}},"422":{"description":"`INTERNAL_INCONSISTENCY` — The server found an internal inconsistency.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_INCONSISTENCY":{"value":{"error":"The server found an internal inconsistency.","detail":"The server found an internal inconsistency.","error_code":"INTERNAL_INCONSISTENCY","retryable":false,"request_id":"req_abc123","recovery":"Contact support with the `request_id`, because the same request will fail again."}}}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/parse/":{"post":{"tags":["parse"],"summary":"Parse a document","description":"Parse one document with the platform's fast lite parse (atomic).\n\nOne file per call. The upload runs against your organization's system\nparse workflow, provisioned automatically on first use. Poll\n`GET /v3/runs/{run_id}/` until `status` is `processed`; the markdown is\nat `results.parse.markdown`.\n\nHonors `Idempotency-Key`: a retried request with the same key replays\nthe original packet and run.","operationId":"v3_parse","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional caller-supplied key (Stripe convention). Retrying the request with the same key replays the original packet AND run — no duplicate upload, no second extraction.","title":"Idempotency-Key"},"description":"Optional caller-supplied key (Stripe convention). Retrying the request with the same key replays the original packet AND run — no duplicate upload, no second extraction."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_v3_parse"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunTriggeredV3"}}},"headers":{"Idempotent-Replayed":{"description":"`true` when this response replays an earlier request sent with the same `Idempotency-Key`; absent on a first request.","schema":{"type":"string","enum":["true"]}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"`VALIDATION_ERROR` — The request failed validation. `detail` is a list of `{type, loc, msg}`, one per failure; `loc[0]` is the request part.\n`UNSUPPORTED_FILE_TYPE` — The file type is not supported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}},"UNSUPPORTED_FILE_TYPE":{"value":{"error":"The file type is not supported.","detail":"The file type is not supported.","error_code":"UNSUPPORTED_FILE_TYPE","retryable":false,"request_id":"req_abc123","recovery":"Convert the file to a type the API reference lists, and upload it again."}}}}}},"413":{"description":"`REQUEST_TOO_LARGE` — The request body is larger than the maximum allowed size.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"REQUEST_TOO_LARGE":{"value":{"error":"The request body is larger than the maximum allowed size.","detail":"The request body is larger than the maximum allowed size.","error_code":"REQUEST_TOO_LARGE","retryable":false,"request_id":"req_abc123","recovery":"Send a request, and a file, smaller than `params.max_bytes` bytes."}}}}}},"402":{"description":"`INSUFFICIENT_CREDIT` — The organization has no extraction credit left.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INSUFFICIENT_CREDIT":{"value":{"error":"The organization has no extraction credit left.","detail":"The organization has no extraction credit left.","error_code":"INSUFFICIENT_CREDIT","retryable":false,"request_id":"req_abc123","recovery":"Top up the organization's credit or upgrade its plan, then run again."}}}}}},"502":{"description":"`OBJECT_STORAGE_UNAVAILABLE` — Object storage did not complete the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"OBJECT_STORAGE_UNAVAILABLE":{"value":{"error":"Object storage did not complete the request.","detail":"Object storage did not complete the request.","error_code":"OBJECT_STORAGE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}},"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"422":{"description":"`IDEMPOTENCY_KEY_REUSED` — The idempotency key was already used with a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"IDEMPOTENCY_KEY_REUSED":{"value":{"error":"The idempotency key was already used with a different request.","detail":"The idempotency key was already used with a different request.","error_code":"IDEMPOTENCY_KEY_REUSED","retryable":false,"request_id":"req_abc123","recovery":"Resend the original request unchanged to get its result, or read the resource it created from `params.resource_id`; use a new `Idempotency-Key` only for a genuinely new request."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/parse/from-url/":{"post":{"tags":["parse"],"summary":"Parse a document from a URL","description":"Parse one document fetched from a URL with the platform's fast lite\nparse (atomic).\n\nOne document per call: an HTTPS `url`, or the `object_id` (plus\n`filename`) of a file staged via `POST /v3/blobs/slots/`. The upload runs\nagainst your organization's system parse workflow, provisioned\nautomatically on first use. Poll `GET /v3/runs/{run_id}/` until `status`\nis `processed`; the markdown is at `results.parse.markdown`.\n\nA URL-fetched file is named by the response's `Content-Disposition`\nfilename when present, else by the last segment of the URL's path.\n\nNot idempotent: every call fetches the document, creates a packet and starts\na new run. For a retry-safe flow use `POST /v3/workflows/{id}/upload/from-url/`\nand then `POST /v3/document-packets/{id}/run/` with an `Idempotency-Key`.","operationId":"v3_parse_from_url","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParseFromUrlRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunTriggeredV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"`VALIDATION_ERROR` — The request failed validation. `detail` is a list of `{type, loc, msg}`, one per failure; `loc[0]` is the request part.\n`INVALID_VALUE` — A value in the request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}},"INVALID_VALUE":{"value":{"error":"A value in the request is not valid.","detail":"A value in the request is not valid.","error_code":"INVALID_VALUE","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for the value that was rejected, correct it, and send the request again."}}}}}},"402":{"description":"`INSUFFICIENT_CREDIT` — The organization has no extraction credit left.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INSUFFICIENT_CREDIT":{"value":{"error":"The organization has no extraction credit left.","detail":"The organization has no extraction credit left.","error_code":"INSUFFICIENT_CREDIT","retryable":false,"request_id":"req_abc123","recovery":"Top up the organization's credit or upgrade its plan, then run again."}}}}}},"504":{"description":"`GATEWAY_TIMEOUT` — The upstream service did not answer in time.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"413":{"description":"The request body is larger than `params.max_bytes` (`REQUEST_TOO_LARGE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"REQUEST_TOO_LARGE":{"value":{"error":"The request body is larger than the maximum allowed size.","detail":"The request body is larger than the maximum allowed size.","error_code":"REQUEST_TOO_LARGE","retryable":false,"request_id":"req_abc123","recovery":"Send a request, and a file, smaller than `params.max_bytes` bytes."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/v3/blobs/slots/":{"post":{"tags":["blobs"],"summary":"Stage a file you hold, and get the URL it will be readable at","description":"Get somewhere to put a file you hold, plus the URL it will read back at.\n\nEvery other ingestion path takes a URL this API can fetch, which a file on\nyour own machine is not. Staging closes that gap in one call: the bytes go\nstraight from you to storage without passing through this API, and the\n`read_url` is minted here because the destination is known before a byte\nmoves.\n\nPer slot, POST `upload.fields` verbatim followed by the file part as\nmultipart/form-data to `upload.url`. Then refer to the file by its\n`object_id` — `POST /v3/parse/from-url/` takes `{object_id, filename}` and\n`POST /v3/workflows/{id}/upload/from-url/` takes `staged_files` — or hand\n`read_url` to something outside this API; the filename is signed into that\nURL, so the file is named correctly on the other side.\n\nEach policy pins the destination, the content type and the exact\n`declared_size`, so a slot accepts one intended file and nothing else. A\nbatch is all-or-nothing: a file above your plan's size limit fails the whole\ncall with a 413 `FILE_TOO_LARGE` and mints no slots, before a byte moves.\n\nStaged bytes are scratch: they belong to no workflow, and storage deletes\nthem within a day. Anything that must outlive that belongs in a workflow.","operationId":"v3_create_blob_slots","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlobSlotsRequestV3"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlobSlotsResponseV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"404":{"description":"`NOT_FOUND` — The resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"413":{"description":"`FILE_TOO_LARGE` — The file is larger than the maximum allowed size.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"FILE_TOO_LARGE":{"value":{"error":"The file is larger than the maximum allowed size.","detail":"The file is larger than the maximum allowed size.","error_code":"FILE_TOO_LARGE","retryable":false,"request_id":"req_abc123","recovery":"Split or compress the file until it is under `params.max_bytes` bytes, and upload it again."}},"REQUEST_TOO_LARGE":{"value":{"error":"The request body is larger than the maximum allowed size.","detail":"The request body is larger than the maximum allowed size.","error_code":"REQUEST_TOO_LARGE","retryable":false,"request_id":"req_abc123","recovery":"Send a request, and a file, smaller than `params.max_bytes` bytes."}}}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/v3/workflows/{workflow_id}/evals/":{"post":{"tags":["evals"],"summary":"Launch an eval","description":"Launch an eval over a workflow's dataset, or a tagged subset of it (async,\nfire-and-forget).\n\nEnqueues one fresh extraction per dataset document on the target version and\npins the realized cohort into a new eval, then returns `202` immediately with\n`eval_id` and `run_number` to poll. Grading finalizes on a worker path — read\nthe eval by `eval_id` for the headline once it leaves `in_progress`.\n\nWithout an `Idempotency-Key` every launch creates a NEW eval — re-launching\nruns a fresh cohort. Supplying the header replays: a retry with the same key\nreturns the original eval instead of launching a second run. Omit `version_id`\nto evaluate the workflow's current version; pass one to override. (With an\nomitted version, a replayed key sent after a new version was published targets\na different version than the first call, so the backend answers `422` for the\nkey reuse — pass an explicit `version_id` for a stable replay. That error's\n`params.resource_id` is the original eval's `eval_id`.)\n\nPass `dataset_tag_ids` to run only the documents carrying at least one of\nthose tags, and `untagged: true` to run the documents with no tag; send both\nto run their union. Omit both to run the whole dataset. An empty\n`dataset_tag_ids` without `untagged: true` selects nothing and returns\n`400 VALIDATION_ERROR`. A tag that is not one of this workflow's dataset tags\nreturns `422 DATASET_INVALID_REQUEST`.\n\nA run that enqueues zero documents (empty dataset or selection, or every\ndocument failed to enqueue) creates no eval and returns `422 EMPTY_EVAL`.\n\nRunning out of credit does not answer `402`: the documents fail, and the eval\nends with failures or empty.","operationId":"v3_launch_eval","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional caller-supplied key (Stripe convention). Retrying with the same key returns the original eval instead of launching (and billing) a second full-dataset run.","title":"Idempotency-Key"},"description":"Optional caller-supplied key (Stripe convention). Retrying with the same key returns the original eval instead of launching (and billing) a second full-dataset run."}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/EvalLaunchRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalLaunchedV3"}}},"headers":{"Idempotent-Replayed":{"description":"`true` when this response replays an earlier request sent with the same `Idempotency-Key`; absent on a first request.","schema":{"type":"string","enum":["true"]}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"422":{"description":"`EMPTY_EVAL` — The eval has no rows to run.\n`DATASET_INVALID_REQUEST` — The dataset registration request is not valid.\n`IDEMPOTENCY_KEY_REUSED` — The idempotency key was already used with a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"EMPTY_EVAL":{"value":{"error":"The eval has no rows to run.","detail":"The eval has no rows to run.","error_code":"EMPTY_EVAL","retryable":false,"request_id":"req_abc123","recovery":"Add documents with ground truth to the workflow's dataset before you run an eval."}},"DATASET_INVALID_REQUEST":{"value":{"error":"The dataset registration request is not valid.","detail":"The dataset registration request is not valid.","error_code":"DATASET_INVALID_REQUEST","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for the part of the request that is not valid, correct it, and send it again."}},"IDEMPOTENCY_KEY_REUSED":{"value":{"error":"The idempotency key was already used with a different request.","detail":"The idempotency key was already used with a different request.","error_code":"IDEMPOTENCY_KEY_REUSED","retryable":false,"request_id":"req_abc123","recovery":"Resend the original request unchanged to get its result, or read the resource it created from `params.resource_id`; use a new `Idempotency-Key` only for a genuinely new request."}}}}}},"400":{"description":"`VALIDATION_ERROR` — The request failed validation. `detail` is a list of `{type, loc, msg}`, one per failure; `loc[0]` is the request part.\n`OPERATOR_DEPRECATED` — This workflow version uses a deprecated operator and cannot run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}},"OPERATOR_DEPRECATED":{"value":{"error":"This workflow version uses a deprecated operator and cannot run.","detail":"This workflow version uses a deprecated operator and cannot run.","error_code":"OPERATOR_DEPRECATED","retryable":false,"request_id":"req_abc123","recovery":"Replace the operator on the nodes in `params.node_ids`, save a new version, and run again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"413":{"description":"The request body is larger than `params.max_bytes` (`REQUEST_TOO_LARGE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"REQUEST_TOO_LARGE":{"value":{"error":"The request body is larger than the maximum allowed size.","detail":"The request body is larger than the maximum allowed size.","error_code":"REQUEST_TOO_LARGE","retryable":false,"request_id":"req_abc123","recovery":"Send a request, and a file, smaller than `params.max_bytes` bytes."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}},"get":{"tags":["evals"],"summary":"List evals","description":"List a workflow's evals, newest first.\n\nKeyset-paginated: follow `next_cursor` until it is `null`. The sort order is\nfixed (`-created_at, -id`); there are no totals or page numbers. Each item is\nthe same headline `GET /v3/workflows/{workflow_id}/evals/{eval_id}/` returns.\n\nAn unknown or cross-org workflow returns 404.","operationId":"v3_list_evals","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size, capped at 100.","default":20,"title":"Limit"},"description":"Page size, capped at 100."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque token from a previous response's `next_cursor`.","title":"Cursor"},"description":"Opaque token from a previous response's `next_cursor`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalListPageV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/workflows/{workflow_id}/evals/{eval_id}/":{"get":{"tags":["evals"],"summary":"Get eval","description":"Retrieve one eval's frozen headline — poll this until `status` leaves\n`in_progress`.\n\n`accuracy`, `matched`, `mismatched` and `ungraded` are `null` while the eval\nis `in_progress`; `accuracy` also stays `null` on a `processed` eval with a 0\ngraded denominator. `error` means at least one document's extraction failed\nor was cancelled; the headline still covers the documents that finished.\n`id` here equals the launch's `eval_id`.\n`dataset_tag_ids` and `untagged` give a tag-scoped eval's selection; both are\nabsent on an eval of the whole dataset.\n\nAn unknown eval, or one on another workflow or organization, returns 404\n(existence never leaks).","operationId":"v3_get_eval","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"eval_id","in":"path","required":true,"schema":{"type":"string","title":"Eval Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalDetailV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/workflows/{workflow_id}/evals/{eval_id}/accuracy/":{"get":{"tags":["evals"],"summary":"Get eval accuracy","description":"Retrieve an eval's accuracy per field, per document and per dataset tag.\n\nGrades the documents the eval itself ran, so a later eval or run on the same\nversion never changes these numbers. While the eval's `status` is\n`in_progress` the numbers are partial: they grade the documents finished so\nfar. Read them once `status` leaves `in_progress`.\n\n`by_document_packet` names each document by the dataset copy's\n`document_packet_id`, the id `GET …/evals/{eval_id}/document-packets/{document_packet_id}/fields/`\ntakes. An unknown eval, or one on another workflow or organization, returns 404.","operationId":"v3_get_eval_accuracy","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"eval_id","in":"path","required":true,"schema":{"type":"string","title":"Eval Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccuracyV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/workflows/{workflow_id}/evals/{eval_id}/document-packets/{document_packet_id}/fields/":{"get":{"tags":["evals"],"summary":"Get eval document fields","description":"Compare one document's extracted values with its ground truth, field by field.\n\n`document_packet_id` is the dataset copy's id, as `by_document_packet` in\n`GET …/evals/{eval_id}/accuracy/` returns it, not the id of the production\npacket the document was added from. The extracted values are the ones the eval\ngraded. A document outside the eval, an unknown eval, or one on another\nworkflow or organization returns 404.","operationId":"v3_get_eval_document_packet_fields","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"eval_id","in":"path","required":true,"schema":{"type":"string","title":"Eval Id"}},{"name":"document_packet_id","in":"path","required":true,"schema":{"type":"string","title":"Document Packet Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalDocumentPacketFieldsV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/workflows/{workflow_id}/dataset/tags/":{"get":{"tags":["evals"],"summary":"List dataset tags","description":"List a workflow's dataset tags, ordered by name.\n\nA tag's `id` is what `dataset_tag_ids` takes when you launch an eval, and what\n`by_dataset_tag[].dataset_tag_id` names in an eval's accuracy. Tags are created and assigned in the app. An unknown or\ncross-org workflow returns 404.","operationId":"v3_list_dataset_tags","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetTagListV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/workflows/{workflow_id}/optimizations/":{"post":{"tags":["optimizations"],"summary":"Start an optimization","description":"Start an optimization of a workflow's field descriptions (async, fire-and-forget).\n\n`kind: \"extraction\"` is a measured run. It scores the workflow against the dataset's\nground truth, then tries up to `max_rounds` rewrites and keeps those that raise accuracy.\nIt needs ground truth in the dataset, else `422 GT_INVALID`.\n\n`kind: \"extraction_oneshot\"` is a single unmeasured round. It reflects once on the\ndataset's existing extractions and the optional `user_context`, then applies its suggestion\nwithout checking it. It needs one of the two, else `422 ONESHOT_SIGNALS_MISSING`.\n\nBoth return `202` with the new optimization; poll `GET …/optimizations/{optimization_id}/`\nuntil `status` is `done` or `failed`. One optimization runs per workflow at a time: a second\nstart while one runs returns `409 OPTIMIZATION_ALREADY_RUNNING`.\n\nWithout an `Idempotency-Key` every call starts a NEW optimization. Supplying the header\nreplays: a retry with the same key and body returns the original optimization, with its status\nas of the first call, instead of starting another.","operationId":"v3_start_optimization","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional caller-supplied key (Stripe convention). Retrying with the same key returns the original optimization instead of starting (and billing) a second one.","title":"Idempotency-Key"},"description":"Optional caller-supplied key (Stripe convention). Retrying with the same key returns the original optimization instead of starting (and billing) a second one."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptimizationStartRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptimizationV3"}}},"headers":{"Idempotent-Replayed":{"description":"`true` when this response replays an earlier request sent with the same `Idempotency-Key`; absent on a first request.","schema":{"type":"string","enum":["true"]}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"409":{"description":"`OPTIMIZATION_ALREADY_RUNNING` — An optimization is already running for this workflow.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"OPTIMIZATION_ALREADY_RUNNING":{"value":{"error":"An optimization is already running for this workflow.","detail":"An optimization is already running for this workflow.","error_code":"OPTIMIZATION_ALREADY_RUNNING","retryable":true,"request_id":"req_abc123","recovery":"Wait for the running optimization to finish, then start a new one; list the workflow's optimizations to see it."}}}}}},"402":{"description":"`INSUFFICIENT_CREDIT` — The organization has no extraction credit left.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INSUFFICIENT_CREDIT":{"value":{"error":"The organization has no extraction credit left.","detail":"The organization has no extraction credit left.","error_code":"INSUFFICIENT_CREDIT","retryable":false,"request_id":"req_abc123","recovery":"Top up the organization's credit or upgrade its plan, then run again."}}}}}},"422":{"description":"`GT_INVALID` — The ground truth is not valid.\n`ONESHOT_SIGNALS_MISSING` — The one-shot optimization has nothing to learn from.\n`EXTRACT_NODE_UNRESOLVED` — The request does not say which extract node to use.\n`IDEMPOTENCY_KEY_REUSED` — The idempotency key was already used with a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GT_INVALID":{"value":{"error":"The ground truth is not valid.","detail":"The ground truth is not valid.","error_code":"GT_INVALID","retryable":false,"request_id":"req_abc123","recovery":"Correct the ground truth against `detail` so it matches the workflow's fields, and upload it again."}},"ONESHOT_SIGNALS_MISSING":{"value":{"error":"The one-shot optimization has nothing to learn from.","detail":"The one-shot optimization has nothing to learn from.","error_code":"ONESHOT_SIGNALS_MISSING","retryable":false,"request_id":"req_abc123","recovery":"Run documents through the workflow's dataset first, or send a `user_context` that describes what the extraction gets wrong, then start it again."}},"EXTRACT_NODE_UNRESOLVED":{"value":{"error":"The request does not say which extract node to use.","detail":"The request does not say which extract node to use.","error_code":"EXTRACT_NODE_UNRESOLVED","retryable":false,"request_id":"req_abc123","recovery":"Name in the request the extract node the ground truth belongs to."}},"IDEMPOTENCY_KEY_REUSED":{"value":{"error":"The idempotency key was already used with a different request.","detail":"The idempotency key was already used with a different request.","error_code":"IDEMPOTENCY_KEY_REUSED","retryable":false,"request_id":"req_abc123","recovery":"Resend the original request unchanged to get its result, or read the resource it created from `params.resource_id`; use a new `Idempotency-Key` only for a genuinely new request."}}}}}},"400":{"description":"`OPERATOR_DEPRECATED` — This workflow version uses a deprecated operator and cannot run.\n`VALIDATION_ERROR` — The request failed validation. `detail` is a list of `{type, loc, msg}`, one per failure; `loc[0]` is the request part.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"OPERATOR_DEPRECATED":{"value":{"error":"This workflow version uses a deprecated operator and cannot run.","detail":"This workflow version uses a deprecated operator and cannot run.","error_code":"OPERATOR_DEPRECATED","retryable":false,"request_id":"req_abc123","recovery":"Replace the operator on the nodes in `params.node_ids`, save a new version, and run again."}},"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"413":{"description":"The request body is larger than `params.max_bytes` (`REQUEST_TOO_LARGE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"REQUEST_TOO_LARGE":{"value":{"error":"The request body is larger than the maximum allowed size.","detail":"The request body is larger than the maximum allowed size.","error_code":"REQUEST_TOO_LARGE","retryable":false,"request_id":"req_abc123","recovery":"Send a request, and a file, smaller than `params.max_bytes` bytes."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}},"get":{"tags":["optimizations"],"summary":"List optimizations","description":"List a workflow's optimizations, newest first.\n\nKeyset-paginated: follow `next_cursor` until it is `null`. There are no totals or page\nnumbers. Items leave `per_field` empty in every round: read one optimization by id for the\nper-field scores. An unknown or cross-org workflow returns 404.","operationId":"v3_list_optimizations","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/OptimizationKind"},{"type":"null"}],"description":"Only optimizations of this kind.","title":"Kind"},"description":"Only optimizations of this kind."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size, capped at 100.","default":20,"title":"Limit"},"description":"Page size, capped at 100."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque token from a previous response's `next_cursor`.","title":"Cursor"},"description":"Opaque token from a previous response's `next_cursor`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptimizationListPageV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"`VALIDATION_ERROR` — The request failed validation. `detail` is a list of `{type, loc, msg}`, one per failure; `loc[0]` is the request part.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/workflows/{workflow_id}/optimizations/{optimization_id}/":{"get":{"tags":["optimizations"],"summary":"Get optimization","description":"Retrieve one optimization with its rounds and per-field scores.\n\nPoll this until `status` is `done` or `failed`. `result_version_id` names the workflow\nversion that holds the optimized descriptions. An unknown optimization, or one on another\nworkflow or organization, returns 404.","operationId":"v3_get_optimization","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"optimization_id","in":"path","required":true,"schema":{"type":"string","title":"Optimization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptimizationV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/document-packets/{document_packet_id}/ground-truth/":{"get":{"tags":["datasets"],"summary":"Get ground truth","description":"Read a dataset document packet's ground truth, keyed by field `persistent_id`.\n\nOmit `version` for the workflow's current version. `ground_truth` is `null`\nuntil it is first set for that version and node. An unknown packet, one in\nanother organization, or an unknown version returns `404`;\n`params.resource_type` says which. A production packet returns\n`409 NOT_IN_DATASET`.","operationId":"v3_get_ground_truth","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"document_packet_id","in":"path","required":true,"schema":{"type":"string","title":"Document Packet Id"}},{"name":"version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A `version_id` from `GET /v3/workflows/{workflow_id}/versions/`. Omit it for the workflow's current version, the one an eval grades by default.","title":"Version"},"description":"A `version_id` from `GET /v3/workflows/{workflow_id}/versions/`. Omit it for the workflow's current version, the one an eval grades by default."},{"name":"node_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The extract node's `id` in the workflow graph, as `GET /v3/workflows/{workflow_id}/` returns it. Required only when the version has more than one extract node.","title":"Node Id"},"description":"The extract node's `id` in the workflow graph, as `GET /v3/workflows/{workflow_id}/` returns it. Required only when the version has more than one extract node."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroundTruthV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"409":{"description":"`NOT_IN_DATASET` — The document is not in the workflow's dataset.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_IN_DATASET":{"value":{"error":"The document is not in the workflow's dataset.","detail":"The document is not in the workflow's dataset.","error_code":"NOT_IN_DATASET","retryable":false,"request_id":"req_abc123","recovery":"Add the document to the workflow's dataset first, then set ground truth on the dataset's document packet, not the production one."}}}}}},"422":{"description":"`EXTRACT_NODE_UNRESOLVED` — The request does not say which extract node to use. `detail` is a list of one `{type, loc, msg}`; `msg` is `ambiguous` or `unknown`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"EXTRACT_NODE_UNRESOLVED":{"value":{"error":"The request does not say which extract node to use.","detail":[{"type":"extract_node","loc":["node_id"],"msg":"ambiguous"}],"error_code":"EXTRACT_NODE_UNRESOLVED","retryable":false,"request_id":"req_abc123","recovery":"Name in the request the extract node the ground truth belongs to."}}}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}},"put":{"tags":["datasets"],"summary":"Set ground truth","description":"Create or replace a dataset document packet's complete ground truth.\n\nAnswers `201` on the first write and `200` on a replace, both with the\nstored document keyed by `persistent_id`. Only a dataset document packet\nholds ground truth: a production packet returns `409 NOT_IN_DATASET`. A\nViewer, or an API key without the `write` scope, gets `403`.","operationId":"v3_set_ground_truth","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"document_packet_id","in":"path","required":true,"schema":{"type":"string","title":"Document Packet Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroundTruthSetRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroundTruthV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"201":{"description":"Ground truth was created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroundTruthV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"409":{"description":"`NOT_IN_DATASET` — The document is not in the workflow's dataset.\n`ZERO_DATA_RETENTION_REFUSES_DATASET` — This organization keeps no data, so it has no dataset.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_IN_DATASET":{"value":{"error":"The document is not in the workflow's dataset.","detail":"The document is not in the workflow's dataset.","error_code":"NOT_IN_DATASET","retryable":false,"request_id":"req_abc123","recovery":"Add the document to the workflow's dataset first, then set ground truth on the dataset's document packet, not the production one."}},"ZERO_DATA_RETENTION_REFUSES_DATASET":{"value":{"error":"This organization keeps no data, so it has no dataset.","detail":"This organization keeps no data, so it has no dataset.","error_code":"ZERO_DATA_RETENTION_REFUSES_DATASET","retryable":false,"request_id":"req_abc123","recovery":"Keep datasets in an organization that retains data, because a zero-data-retention one cannot hold them."}}}}}},"422":{"description":"`GT_INVALID` — The ground truth is not valid. `detail` is a list of `{type, loc, msg}`, one per failure; `loc` holds the field's `persistent_id`, or an unknown key as sent.\n`EXTRACT_NODE_UNRESOLVED` — The request does not say which extract node to use. `detail` is a list of one `{type, loc, msg}`; `msg` is `ambiguous` or `unknown`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GT_INVALID":{"value":{"error":"The ground truth is not valid.","detail":[{"type":"missing","loc":["069dcc2ce14c760680002ee4fb17b4f0"],"msg":"Field required"}],"error_code":"GT_INVALID","retryable":false,"request_id":"req_abc123","recovery":"Correct the ground truth against `detail` so it matches the workflow's fields, and upload it again."}},"EXTRACT_NODE_UNRESOLVED":{"value":{"error":"The request does not say which extract node to use.","detail":[{"type":"extract_node","loc":["node_id"],"msg":"ambiguous"}],"error_code":"EXTRACT_NODE_UNRESOLVED","retryable":false,"request_id":"req_abc123","recovery":"Name in the request the extract node the ground truth belongs to."}}}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"403":{"description":"Access denied — the API key lacks access to this resource or the scope this call needs (`ACCESS_DENIED`, `insufficient_api_key_scope`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}}}}}},"413":{"description":"The request body is larger than `params.max_bytes` (`REQUEST_TOO_LARGE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"REQUEST_TOO_LARGE":{"value":{"error":"The request body is larger than the maximum allowed size.","detail":"The request body is larger than the maximum allowed size.","error_code":"REQUEST_TOO_LARGE","retryable":false,"request_id":"req_abc123","recovery":"Send a request, and a file, smaller than `params.max_bytes` bytes."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/extractions/{extraction_id}/fields/edit/":{"post":{"tags":["extractions"],"summary":"Edit a field","description":"Set the value of one field of one extraction, as a person reviewing it would.\n\n`extraction_id` is the `id` of an entry of `results.extractions`. Name the field by its\nkey in the results (`sanitized_name`) or by `persistent_id`, the one `get_workflow` returns\nfor the field. A table column is named by `sanitized_name`, `column` and `row_index`, or by\nthe column's `persistent_id` and `row_index`; a column of a single object takes `row_index: 0`.\nA name that reaches a table, or a column sent without a `row_index`, answers `400` with the\nmissing part named. The field becomes\n`human_edited`, or `human_verified` when `value` is the same text as the original value;\na yes/no field edited back to its original answer still counts as an edit when the text\ndiffers (`\"true\"` and `\"True\"`). An unknown extraction answers `404` with\n`params.resource_type` `extraction`, a `sanitized_name` or `column` that names no field answers\n`field`, and a `persistent_id` or `row_index` that names no cell answers `datapoint`. An `id`\nor `persistent_id` that is not a UUID answers `404` without `params`. On a dataset document whose extraction is\nfully verified, the edit rewrites its ground truth. A document packet with an assigned\nverifier refuses every other user with `403` `NOT_ASSIGNED_VERIFIER`.","operationId":"v3_edit_field","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"extraction_id","in":"path","required":true,"schema":{"type":"string","title":"Extraction Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditFieldRequest"}}}},"responses":{"204":{"description":"Successful Response","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"403":{"description":"`ACCESS_DENIED` — You do not have access to this resource.\n`insufficient_api_key_scope` — The API key does not carry the scope this call needs.\n`NOT_ASSIGNED_VERIFIER` — Another user is the assigned verifier for this file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}},"NOT_ASSIGNED_VERIFIER":{"value":{"error":"Another user is the assigned verifier for this file.","detail":"Another user is the assigned verifier for this file.","error_code":"NOT_ASSIGNED_VERIFIER","retryable":false,"request_id":"req_abc123","recovery":"Correct this document with the API key of its assigned verifier, or ask an organization admin to remove the verifier in the app."}}}}}},"404":{"description":"`NOT_FOUND` — The resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"400":{"description":"`VALIDATION_ERROR` — The request failed validation. `detail` is a list of `{type, loc, msg}`, one per failure; `loc[0]` is the request part.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"413":{"description":"The request body is larger than `params.max_bytes` (`REQUEST_TOO_LARGE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"REQUEST_TOO_LARGE":{"value":{"error":"The request body is larger than the maximum allowed size.","detail":"The request body is larger than the maximum allowed size.","error_code":"REQUEST_TOO_LARGE","retryable":false,"request_id":"req_abc123","recovery":"Send a request, and a file, smaller than `params.max_bytes` bytes."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/extractions/{extraction_id}/rows/add/":{"post":{"tags":["extractions"],"summary":"Add a table row","description":"Insert an empty row into a table of one extraction, at `index`.\n\nThe rows from `index` on move down by one. `index` runs from 0 to the number of rows;\na larger one answers `400`, as does a name that reaches a field with no rows. Fill the new\nrow with `edit_field` calls that name the table by `sanitized_name` or `persistent_id`.","operationId":"v3_add_row","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"extraction_id","in":"path","required":true,"schema":{"type":"string","title":"Extraction Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowRequest"}}}},"responses":{"204":{"description":"Successful Response","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"403":{"description":"`ACCESS_DENIED` — You do not have access to this resource.\n`insufficient_api_key_scope` — The API key does not carry the scope this call needs.\n`NOT_ASSIGNED_VERIFIER` — Another user is the assigned verifier for this file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}},"NOT_ASSIGNED_VERIFIER":{"value":{"error":"Another user is the assigned verifier for this file.","detail":"Another user is the assigned verifier for this file.","error_code":"NOT_ASSIGNED_VERIFIER","retryable":false,"request_id":"req_abc123","recovery":"Correct this document with the API key of its assigned verifier, or ask an organization admin to remove the verifier in the app."}}}}}},"404":{"description":"`NOT_FOUND` — The resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"400":{"description":"`VALIDATION_ERROR` — The request failed validation. `detail` is a list of `{type, loc, msg}`, one per failure; `loc[0]` is the request part.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"413":{"description":"The request body is larger than `params.max_bytes` (`REQUEST_TOO_LARGE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"REQUEST_TOO_LARGE":{"value":{"error":"The request body is larger than the maximum allowed size.","detail":"The request body is larger than the maximum allowed size.","error_code":"REQUEST_TOO_LARGE","retryable":false,"request_id":"req_abc123","recovery":"Send a request, and a file, smaller than `params.max_bytes` bytes."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/extractions/{extraction_id}/rows/delete/":{"post":{"tags":["extractions"],"summary":"Delete a table row","description":"Delete the row at `index` from a table of one extraction.\n\nThe rows after it move up by one. The values of the row are removed from the results;\nno endpoint restores them. No row at `index` answers `404`, and a name that reaches a\nfield with no rows answers `400`.","operationId":"v3_delete_row","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"extraction_id","in":"path","required":true,"schema":{"type":"string","title":"Extraction Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowRequest"}}}},"responses":{"204":{"description":"Successful Response","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"403":{"description":"`ACCESS_DENIED` — You do not have access to this resource.\n`insufficient_api_key_scope` — The API key does not carry the scope this call needs.\n`NOT_ASSIGNED_VERIFIER` — Another user is the assigned verifier for this file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}},"NOT_ASSIGNED_VERIFIER":{"value":{"error":"Another user is the assigned verifier for this file.","detail":"Another user is the assigned verifier for this file.","error_code":"NOT_ASSIGNED_VERIFIER","retryable":false,"request_id":"req_abc123","recovery":"Correct this document with the API key of its assigned verifier, or ask an organization admin to remove the verifier in the app."}}}}}},"404":{"description":"`NOT_FOUND` — The resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"400":{"description":"`VALIDATION_ERROR` — The request failed validation. `detail` is a list of `{type, loc, msg}`, one per failure; `loc[0]` is the request part.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"413":{"description":"The request body is larger than `params.max_bytes` (`REQUEST_TOO_LARGE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"REQUEST_TOO_LARGE":{"value":{"error":"The request body is larger than the maximum allowed size.","detail":"The request body is larger than the maximum allowed size.","error_code":"REQUEST_TOO_LARGE","retryable":false,"request_id":"req_abc123","recovery":"Send a request, and a file, smaller than `params.max_bytes` bytes."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/extractions/{extraction_id}/verify/":{"post":{"tags":["extractions"],"summary":"Verify an extraction","description":"Mark every field of one extraction as verified by a person.\n\nEdited values stay as they are. On a dataset document, this also writes the extraction\nas the ground truth of the document. An extraction with no fields, such as the main extraction of a split\nrun, answers `204` and verifies nothing: verify the extractions of its splits.","operationId":"v3_verify_extraction","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"extraction_id","in":"path","required":true,"schema":{"type":"string","title":"Extraction Id"}}],"responses":{"204":{"description":"Successful Response","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"403":{"description":"`ACCESS_DENIED` — You do not have access to this resource.\n`insufficient_api_key_scope` — The API key does not carry the scope this call needs.\n`NOT_ASSIGNED_VERIFIER` — Another user is the assigned verifier for this file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}},"insufficient_api_key_scope":{"value":{"error":"The API key does not carry the scope this call needs.","detail":"The API key does not carry the scope this call needs.","error_code":"insufficient_api_key_scope","retryable":false,"request_id":"req_abc123","recovery":"Create an API key with the scope `params.required_scope` names, and use it for this call."}},"NOT_ASSIGNED_VERIFIER":{"value":{"error":"Another user is the assigned verifier for this file.","detail":"Another user is the assigned verifier for this file.","error_code":"NOT_ASSIGNED_VERIFIER","retryable":false,"request_id":"req_abc123","recovery":"Correct this document with the API key of its assigned verifier, or ask an organization admin to remove the verifier in the app."}}}}}},"404":{"description":"`NOT_FOUND` — The resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/webhooks/":{"get":{"tags":["webhooks"],"summary":"List webhooks","description":"List the organization's webhooks, oldest first. A listed webhook never carries its secret.\n\nOnly an admin or owner of the organization manages its webhooks: an API key whose owner\nhas a lower role gets `403`.","operationId":"v3_list_webhooks","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookListPageV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"403":{"description":"`ACCESS_DENIED` — You do not have access to this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}}}}}},"404":{"description":"`NOT_FOUND` — The resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}},"security":[{"ApiKeyAuth":[]}]},"post":{"tags":["webhooks"],"summary":"Create a webhook","description":"Subscribe an HTTPS endpoint to run events.\n\nEach delivery is a `POST` signed per [Standard Webhooks](https://www.standardwebhooks.com/):\nverify the `webhook-signature` header with the `secret` this response returns, once. An\norganization holds at most 50 webhooks.\n\nOnly an admin or owner of the organization manages its webhooks: an API key whose owner\nhas a lower role gets `403`.","operationId":"v3_create_webhook","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreateRequestV3"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreatedV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"400":{"description":"`VALIDATION_ERROR` — The request failed validation. `detail` is a list of `{type, loc, msg}`, one per failure; `loc[0]` is the request part.\n`INVALID_VALUE` — A value in the request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}},"INVALID_VALUE":{"value":{"error":"A value in the request is not valid.","detail":"A value in the request is not valid.","error_code":"INVALID_VALUE","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for the value that was rejected, correct it, and send the request again."}}}}}},"403":{"description":"`ACCESS_DENIED` — You do not have access to this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}}}}}},"404":{"description":"`NOT_FOUND` — The resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"409":{"description":"`WEBHOOK_SUBSCRIPTION_LIMIT` — The organization has reached its webhook subscription limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"WEBHOOK_SUBSCRIPTION_LIMIT":{"value":{"error":"The organization has reached its webhook subscription limit.","detail":"The organization has reached its webhook subscription limit.","error_code":"WEBHOOK_SUBSCRIPTION_LIMIT","retryable":false,"request_id":"req_abc123","recovery":"Delete a webhook the organization no longer needs, then create this one again."}}}}}},"422":{"description":"`URL_UNREACHABLE` — The URL's hostname could not be resolved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"URL_UNREACHABLE":{"value":{"error":"The URL's hostname could not be resolved.","detail":"The URL's hostname could not be resolved.","error_code":"URL_UNREACHABLE","retryable":false,"request_id":"req_abc123","recovery":"Check that the URL's hostname resolves in public DNS, then send the request again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"413":{"description":"The request body is larger than `params.max_bytes` (`REQUEST_TOO_LARGE`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"REQUEST_TOO_LARGE":{"value":{"error":"The request body is larger than the maximum allowed size.","detail":"The request body is larger than the maximum allowed size.","error_code":"REQUEST_TOO_LARGE","retryable":false,"request_id":"req_abc123","recovery":"Send a request, and a file, smaller than `params.max_bytes` bytes."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}},"security":[{"ApiKeyAuth":[]}]}},"/v3/webhooks/{webhook_id}/":{"delete":{"tags":["webhooks"],"summary":"Delete a webhook","description":"Delete a webhook. No delivery reaches its endpoint afterwards, retries of earlier events included.\n\nTo pause a webhook, delete it and create it again later.\n\nOnly an admin or owner of the organization manages its webhooks: an API key whose owner\nhas a lower role gets `403`.","operationId":"v3_delete_webhook","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"responses":{"204":{"description":"Successful Response","headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"403":{"description":"`ACCESS_DENIED` — You do not have access to this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}}}}}},"404":{"description":"`NOT_FOUND` — The resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/webhooks/{webhook_id}/ping/":{"post":{"tags":["webhooks"],"summary":"Send a test event to a webhook","description":"Send one signed `webhook.ping` event to the webhook's endpoint and report how it answered.\n\nThe ping goes out once, without retries, whatever events the webhook subscribes to. Use it to\ncheck the endpoint is reachable and verifies signatures.\n\nOnly an admin or owner of the organization manages its webhooks: an API key whose owner\nhas a lower role gets `403`.","operationId":"v3_ping_webhook","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookPingV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"403":{"description":"`ACCESS_DENIED` — You do not have access to this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ACCESS_DENIED":{"value":{"error":"You do not have access to this resource.","detail":"You do not have access to this resource.","error_code":"ACCESS_DENIED","retryable":false,"request_id":"req_abc123","recovery":"Use an API key from the organization that owns this resource, or ask one of its admins for access."}}}}}},"404":{"description":"`NOT_FOUND` — The resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/workflows/{workflow_id}/deletion-certificates/":{"get":{"tags":["deletion-certificates"],"summary":"List deletion certificates","description":"List a workflow's deletion certificates, one per deleted document packet, newest issued first.\n\nIt answers after the workflow is deleted, and a workflow with no deleted packet is an empty page.\nFollow `next_cursor` until it is `null`.\n\nOnly an organization with zero data retention reads it; any other gets\n`403 ZERO_DATA_RETENTION_REQUIRED`.","operationId":"v3_list_deletion_certificates","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Page size, capped at 100.","default":20,"title":"Limit"},"description":"Page size, capped at 100."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque token from a previous response's `next_cursor`.","title":"Cursor"},"description":"Opaque token from a previous response's `next_cursor`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletionCertificateListPageV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"403":{"description":"`ZERO_DATA_RETENTION_REQUIRED` — Only an organization with zero data retention can use this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ZERO_DATA_RETENTION_REQUIRED":{"value":{"error":"Only an organization with zero data retention can use this.","detail":"Only an organization with zero data retention can use this.","error_code":"ZERO_DATA_RETENTION_REQUIRED","retryable":false,"request_id":"req_abc123","recovery":"Call it with an API key of an organization that has zero data retention enabled."}}}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}},"/v3/deletion-certificates/{certificate_id}/":{"get":{"tags":["deletion-certificates"],"summary":"Get deletion certificate","description":"Retrieve one deletion certificate with its signed XML document.\n\nThe document and its detached signature are base64, so the bytes the signature covers arrive\nunchanged; all four signature fields are `null` until the certificate is signed. Another\norganization's certificate returns 404.\n\nOnly an organization with zero data retention reads it; any other gets\n`403 ZERO_DATA_RETENTION_REQUIRED`.","operationId":"v3_get_deletion_certificate","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"certificate_id","in":"path","required":true,"schema":{"type":"string","title":"Certificate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletionCertificateV3"}}},"headers":{"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}}},"403":{"description":"`ZERO_DATA_RETENTION_REQUIRED` — Only an organization with zero data retention can use this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"ZERO_DATA_RETENTION_REQUIRED":{"value":{"error":"Only an organization with zero data retention can use this.","detail":"Only an organization with zero data retention can use this.","error_code":"ZERO_DATA_RETENTION_REQUIRED","retryable":false,"request_id":"req_abc123","recovery":"Call it with an API key of an organization that has zero data retention enabled."}}}}}},"400":{"description":"Validation failed — the request body or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"VALIDATION_ERROR":{"value":{"error":"The request failed validation.","detail":[{"type":"missing","loc":["body","name"],"msg":"Field required"}],"error_code":"VALIDATION_ERROR","retryable":false,"request_id":"req_abc123","recovery":"Read `detail` for what failed validation, correct the request, and send it again."}}}}}},"401":{"description":"Authentication failed — the API key is not valid (`INVALID_API_KEY`) or the request carries none (`MISSING_API_KEY`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INVALID_API_KEY":{"value":{"error":"The API key is not valid.","detail":"The API key is not valid.","error_code":"INVALID_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Check that the key is complete and has not been revoked, or create a new key."}},"MISSING_API_KEY":{"value":{"error":"The request carries no API key.","detail":"The request carries no API key.","error_code":"MISSING_API_KEY","retryable":false,"request_id":"req_abc123","recovery":"Send your API key in the `Authorization: Bearer <key>` header."}}}}}},"404":{"description":"Resource not found — the workflow, document packet, or run ID does not exist or is not visible to this API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"NOT_FOUND":{"value":{"error":"The resource does not exist.","detail":"The resource does not exist.","error_code":"NOT_FOUND","retryable":false,"request_id":"req_abc123","recovery":"Check the ID, and that it belongs to your API key's organization; `params.resource_type` names what is missing."}}}}}},"429":{"description":"Rate limited — retry after the `Retry-After` header. Default windows: 60 requests/minute for extraction submission, 600 requests/minute for general endpoints.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window (60s).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"RATE_LIMITED":{"value":{"error":"Too many requests.","detail":"Too many requests.","error_code":"RATE_LIMITED","retryable":true,"request_id":"req_abc123","recovery":"Wait the seconds the `Retry-After` header gives, or back off exponentially without one, then retry."}}}}}},"500":{"description":"An internal error stopped the request — `retryable=true`. Retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"502":{"description":"A backend service broke the connection before it answered, or failed. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"INTERNAL_ERROR":{"value":{"error":"An internal error stopped the request.","detail":"An internal error stopped the request.","error_code":"INTERNAL_ERROR","retryable":true,"request_id":"req_abc123","recovery":"Retry with exponential backoff, and contact support with the `request_id` if it keeps failing."}}}}}},"503":{"description":"A backend service could not be reached or is unavailable (`SERVICE_UNAVAILABLE`). Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"SERVICE_UNAVAILABLE":{"value":{"error":"The service is temporarily unavailable.","detail":"The service is temporarily unavailable.","error_code":"SERVICE_UNAVAILABLE","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}},"504":{"description":"A backend service did not answer in time. Retry with backoff when `retryable` is true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"GATEWAY_TIMEOUT":{"value":{"error":"The upstream service did not answer in time.","detail":"The upstream service did not answer in time.","error_code":"GATEWAY_TIMEOUT","retryable":true,"request_id":"req_abc123","recovery":"Retry the request with exponential backoff."}}}}}}}}}},"components":{"schemas":{"AccuracyCoverageV3":{"properties":{"graded_persistent_ids":{"items":{"type":"string"},"type":"array","title":"Graded Persistent Ids","description":"Fields graded on at least one document."},"ungraded_persistent_ids":{"items":{"type":"string"},"type":"array","title":"Ungraded Persistent Ids","description":"Fields graded on no document."}},"type":"object","required":["graded_persistent_ids","ungraded_persistent_ids"],"title":"AccuracyCoverageV3","description":"Which fields have ground truth to grade against."},"AccuracyV3":{"properties":{"matched":{"type":"integer","title":"Matched","description":"Values that matched ground truth."},"mismatched":{"type":"integer","title":"Mismatched","description":"Values that did not match ground truth."},"ungraded":{"type":"integer","title":"Ungraded","description":"Values with no ground truth to grade against."},"by_field":{"items":{"$ref":"#/components/schemas/FieldAccuracyV3"},"type":"array","title":"By Field","description":"Counts per field."},"by_document_packet":{"items":{"$ref":"#/components/schemas/DocumentPacketAccuracyV3"},"type":"array","title":"By Document Packet","description":"Counts per document."},"coverage":{"$ref":"#/components/schemas/AccuracyCoverageV3"},"by_dataset_tag":{"items":{"$ref":"#/components/schemas/DatasetTagAccuracyV3"},"type":"array","title":"By Dataset Tag","description":"Counts per dataset tag, ordered by tag name."}},"type":"object","required":["matched","mismatched","ungraded","by_field","by_document_packet","coverage","by_dataset_tag"],"title":"AccuracyV3","description":"An accuracy breakdown: totals, per field, per document and per dataset tag.\n\nAccuracy is `matched / (matched + mismatched)`; `ungraded` values are left\nout of it."},"AllOfCheck":{"properties":{"type":{"type":"string","const":"all_of","title":"Type"},"checks":{"items":{"oneOf":[{"$ref":"#/components/schemas/RangeCheck"},{"$ref":"#/components/schemas/DateCheck"},{"$ref":"#/components/schemas/ArithmeticCheck"},{"$ref":"#/components/schemas/ComparisonCheck"},{"$ref":"#/components/schemas/OneOfCheck"},{"$ref":"#/components/schemas/RegexCheck"},{"$ref":"#/components/schemas/RequiredCheck"},{"$ref":"#/components/schemas/ConfidenceCheck"},{"$ref":"#/components/schemas/ExpressionCheck"},{"$ref":"#/components/schemas/ValidationCheck"},{"$ref":"#/components/schemas/AllOfCheck"},{"$ref":"#/components/schemas/AnyOfCheck"}],"discriminator":{"propertyName":"type","mapping":{"all_of":"#/components/schemas/AllOfCheck","any_of":"#/components/schemas/AnyOfCheck","arithmetic":"#/components/schemas/ArithmeticCheck","comparison":"#/components/schemas/ComparisonCheck","confidence":"#/components/schemas/ConfidenceCheck","date":"#/components/schemas/DateCheck","expression":"#/components/schemas/ExpressionCheck","one_of":"#/components/schemas/OneOfCheck","range":"#/components/schemas/RangeCheck","regex":"#/components/schemas/RegexCheck","required":"#/components/schemas/RequiredCheck","validation":"#/components/schemas/ValidationCheck"}}},"type":"array","maxItems":32,"minItems":1,"title":"Checks"}},"additionalProperties":false,"type":"object","required":["type","checks"],"title":"AllOfCheck","description":"AND combinator — passes iff every sub-check passes.\n\nTri-state: FAIL if any child fails; else INCONCLUSIVE if any child is\ninconclusive; else PASS. Children are the same closed ``Check`` union\n(mutual recursion via forward ref) so combinators nest by construction —\nthe CheckBuilder UI restricts nesting to a single level for MVP.\n\n``max_length=32`` bounds runaway fan-out per combinator. Practical rules\nstay well below the cap; a legitimate use case wanting more should motivate\nthe raise rather than land silently. Nesting-depth is bounded by pydantic's\nown recursion during parse."},"AnyOfCheck":{"properties":{"type":{"type":"string","const":"any_of","title":"Type"},"checks":{"items":{"oneOf":[{"$ref":"#/components/schemas/RangeCheck"},{"$ref":"#/components/schemas/DateCheck"},{"$ref":"#/components/schemas/ArithmeticCheck"},{"$ref":"#/components/schemas/ComparisonCheck"},{"$ref":"#/components/schemas/OneOfCheck"},{"$ref":"#/components/schemas/RegexCheck"},{"$ref":"#/components/schemas/RequiredCheck"},{"$ref":"#/components/schemas/ConfidenceCheck"},{"$ref":"#/components/schemas/ExpressionCheck"},{"$ref":"#/components/schemas/ValidationCheck"},{"$ref":"#/components/schemas/AllOfCheck"},{"$ref":"#/components/schemas/AnyOfCheck"}],"discriminator":{"propertyName":"type","mapping":{"all_of":"#/components/schemas/AllOfCheck","any_of":"#/components/schemas/AnyOfCheck","arithmetic":"#/components/schemas/ArithmeticCheck","comparison":"#/components/schemas/ComparisonCheck","confidence":"#/components/schemas/ConfidenceCheck","date":"#/components/schemas/DateCheck","expression":"#/components/schemas/ExpressionCheck","one_of":"#/components/schemas/OneOfCheck","range":"#/components/schemas/RangeCheck","regex":"#/components/schemas/RegexCheck","required":"#/components/schemas/RequiredCheck","validation":"#/components/schemas/ValidationCheck"}}},"type":"array","maxItems":32,"minItems":1,"title":"Checks"}},"additionalProperties":false,"type":"object","required":["type","checks"],"title":"AnyOfCheck","description":"OR combinator — passes iff any sub-check passes.\n\nTri-state: PASS if any child passes; else INCONCLUSIVE if any child is\ninconclusive; else FAIL.\n\n``max_length=32`` — see :class:`AllOfCheck` for the rationale."},"ArithmeticCheck":{"properties":{"type":{"type":"string","const":"arithmetic","title":"Type"},"operands":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Operands","description":"The fields combined by `operator`. Either the field's ``persistent_id`` (Studio field-picker path) or its ``sanitized_name`` as it appears in the extraction response (SDK/API/assistant path) — the executor resolves both."},"operator":{"type":"string","enum":["sum","subtract","product"],"title":"Operator","default":"sum"},"equals":{"type":"string","minLength":1,"title":"Equals","description":"The field whose value the result must equal. Either the field's ``persistent_id`` (Studio field-picker path) or its ``sanitized_name`` as it appears in the extraction response (SDK/API/assistant path) — the executor resolves both."},"tolerance":{"type":"number","minimum":0.0,"title":"Tolerance","description":"Absolute slack allowed around `equals`.","default":0.0}},"additionalProperties":false,"type":"object","required":["type","operands","equals"],"title":"ArithmeticCheck"},"AskCitationV3":{"properties":{"path":{"type":"string","title":"Path","description":"Document path inside the workflow's corpus."},"quote":{"type":"string","title":"Quote","description":"The exact span the answer rests on."},"document_packet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Packet Id","description":"The document packet the quote is read in. Null for a corpus built before packets."},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id","description":"The file of the packet that holds the quote, for downloads and links."},"block_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Block Id","description":"Anchor within the document."},"page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page","description":"1-based page in the document: the packet page. It equals `file_page` for a single-file packet."},"file_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Page","description":"1-based page in `file_id`, where the region is drawn."},"bbox":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Bbox","description":"Region on that page, as `{x0, y0, x1, y1}` in relative coordinates."}},"type":"object","required":["path","quote","file_id","block_id","page","bbox"],"title":"AskCitationV3","description":"Where an answer came from, resolved to a place in the source PDF."},"AskRequestV3":{"properties":{"question":{"type":"string","minLength":1,"title":"Question","description":"A question about the content of this workflow's documents.","examples":["Which contracts renew before March and what notice do they need?"]},"thread_id":{"anyOf":[{"type":"string","maxLength":64,"pattern":"^kb-[A-Za-z0-9._-]+$"},{"type":"null"}],"title":"Thread Id","description":"Optional conversation id, minted by you, to ask a follow-up in context. Must start with `kb-`. Reuse it to continue; omit it for a fresh question.","examples":["kb-renewals-q3"]}},"type":"object","required":["question"],"title":"AskRequestV3"},"AskResponseV3":{"properties":{"answer":{"type":"string","title":"Answer"},"citations":{"items":{"$ref":"#/components/schemas/AskCitationV3"},"type":"array","title":"Citations"},"path":{"items":{"$ref":"#/components/schemas/AskStepV3"},"type":"array","title":"Path","description":"The route the agent took to the answer — auditable, not decorative."},"steps_used":{"type":"integer","title":"Steps Used"},"thread_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thread Id","description":"Present when the question was asked in a thread."}},"type":"object","required":["answer","citations","path","steps_used"],"title":"AskResponseV3"},"AskStepV3":{"properties":{"tool":{"type":"string","title":"Tool"},"args":{"additionalProperties":true,"type":"object","title":"Args"}},"type":"object","required":["tool","args"],"title":"AskStepV3","description":"One navigation step the agent took, in order."},"BlobSlotFileV3":{"properties":{"filename":{"type":"string","minLength":1,"title":"Filename","description":"Name for the file. Signed into `read_url`, so whatever reads that URL names the file this without being told again."},"declared_size":{"type":"integer","exclusiveMinimum":0.0,"title":"Declared Size","description":"Exact byte length of the file. Baked into the upload policy, so an upload whose real size differs is refused by storage."},"content_type":{"type":"string","minLength":1,"title":"Content Type","description":"MIME type, pinned by the policy. `application/pdf`, `image/png`, …"}},"type":"object","required":["filename","declared_size","content_type"],"title":"BlobSlotFileV3","description":"One file the caller intends to upload."},"BlobSlotV3":{"properties":{"object_id":{"type":"string","title":"Object Id","description":"Identity of the staged file."},"upload":{"$ref":"#/components/schemas/PresignedPostV3"},"read_url":{"type":"string","title":"Read Url","description":"URL the file is readable at once uploaded — hand it to any endpoint that takes one, `POST /v3/parse/from-url/` included. Minted here because the destination is known before the bytes move, so a caller needs no second call."},"read_url_expires_in_seconds":{"type":"integer","title":"Read Url Expires In Seconds","description":"Lifetime of `read_url` from now."}},"type":"object","required":["object_id","upload","read_url","read_url_expires_in_seconds"],"title":"BlobSlotV3","description":"Somewhere to put one file, and the URL it will be readable at."},"BlobSlotsRequestV3":{"properties":{"files":{"items":{"$ref":"#/components/schemas/BlobSlotFileV3"},"type":"array","maxItems":10,"minItems":1,"title":"Files"}},"type":"object","required":["files"],"title":"BlobSlotsRequestV3","description":"Body for ``POST /v3/blobs/slots/``.","examples":[{"files":[{"content_type":"application/pdf","declared_size":182344,"filename":"april.pdf"}]}]},"BlobSlotsResponseV3":{"properties":{"slots":{"items":{"$ref":"#/components/schemas/BlobSlotV3"},"type":"array","title":"Slots"}},"type":"object","required":["slots"],"title":"BlobSlotsResponseV3","description":"Somewhere to put each file.\n\nA batch is all-or-nothing: one unacceptable file fails the whole call\nbefore a byte moves, so only the call is lost."},"Block":{"properties":{"id":{"type":"string","title":"Id","description":"Stable block identifier in the form `p<page>_b<index>`, numbered by the packet page `page`."},"type":{"type":"string","title":"Type","description":"Semantic type: `text`, `title`, `section-header`, `table`, `picture`, `other`."},"page":{"type":"integer","title":"Page","description":"1-indexed page number this block belongs to, counted across the packet's files in packet order. Equal to `file_page` for a packet of one file."},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id","description":"The file this block was parsed from."},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Name","description":"The name of that file, as `files[].name` of the packet."},"file_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Page","description":"1-indexed page of that file this block belongs to."},"bbox":{"additionalProperties":{"type":"number"},"type":"object","title":"Bbox","description":"Normalised bounding box in [0, 1] page coordinates with keys `x0`/`y0`/`x1`/`y1`."},"layout_confidence":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Layout Confidence","description":"Layout detection confidence for this block, a whole number from 0 to 100. `null` when no layout detector ran — the `lite` tier gets its layout from the OCR response, which reports no confidence in the type it assigned."},"parse_confidence":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Parse Confidence","description":"Parse confidence calibrated from LLM logprobs, a whole number from 0 to 100. `null` when logprobs were unavailable (e.g. text-bytes strategy)."},"regions":{"items":{"$ref":"#/components/schemas/Detection"},"type":"array","title":"Regions","description":"The layout detections this block is made of, each with the words printed inside it. A block the detector reported as one box has one region, that box. Empty only for a block parsed before detections were reported, one that has no box at all, or one whose parse stored no detections object or one that could not be read back."},"content":{"type":"string","title":"Content","description":"Raw section body — markdown for text/title blocks, HTML for tables, `<figure-content>` for pictures."},"hyperlinks":{"items":{"$ref":"#/components/schemas/Hyperlink"},"type":"array","title":"Hyperlinks","description":"Hyperlinks found in the content via `[text](uri)` markdown syntax."},"rows":{"anyOf":[{"items":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array"},"type":"array"},{"type":"null"}],"title":"Rows","description":"2D array of table cells for `type=table` blocks — each cell is `{cell_id, text}`. `null` for non-table blocks."},"image_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Base64","description":"Inline base64-encoded cropped image for `type=picture` blocks. Currently `null` for all blocks — image hydration is performed client-side by the SDK consumer."}},"type":"object","required":["id","type","page","bbox","content"],"title":"Block","description":"One semantic block of a parsed document — a structured alternative to\nwalking `<a id></a>` anchors in `markdown`.\n\nAll blocks expose the common fields (`id`, `type`, `page`, `bbox`,\n`confidence`, `content`). Type-specific structured data lives in the\noptional fields (`rows` for tables, `image_base64` for pictures).\nConsumers can switch on `type` to access the per-type fields, or treat\n`content` as the universal fallback."},"Body_v3_parse":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"The document to parse."}},"type":"object","required":["file"],"title":"Body_v3_parse"},"Body_v3_upload_and_run_workflow":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files","description":"1..100 files forming one document packet."},"metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metadata","description":"Optional JSON-encoded object of free-form metadata attached to the packet. The extract operator may source datapoints from a top-level key whose name matches a schema field, and from free text in natural language under `__anyformat_free_text__`."},"on_conflict":{"type":"string","enum":["error","rename"],"title":"On Conflict","description":"How to handle an uploaded filename that already exists in the workflow (filenames are unique within a workflow). `error` (the default) rejects the whole request with `409` and lists the conflicting names, so a rename is never silent — the caller must opt in. `rename` accepts the collision and lets the server auto-rename the file by inserting a ` (n)` counter before the extension (`invoice.pdf` → `invoice (1).pdf`).","default":"error"},"workflow_version_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Workflow Version Id","description":"A `version_id` from `GET /v3/workflows/{workflow_id}/versions/`. Runs the packet on that version instead of the latest one. A version of another workflow answers `404`."}},"type":"object","required":["files"],"title":"Body_v3_upload_and_run_workflow"},"Body_v3_upload_edit_references":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files","description":"1..10 reference documents. Accepted: `.csv`, `.txt`, `.md`, `.rst` and `.pdf`. Content is checked by its bytes, not its extension."}},"type":"object","required":["files"],"title":"Body_v3_upload_edit_references"},"Body_v3_upload_report_template":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"One Word (.docx) document, at most 20 MB."}},"type":"object","required":["file"],"title":"Body_v3_upload_report_template"},"Body_v3_upload_to_dataset":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files","description":"1..100 files forming ONE document (one document packet in the dataset)."},"ground_truth":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ground Truth","description":"Optional JSON-encoded object: the expected document for this document packet. Keys are the workflow schema's field identifiers — advertise `persistent_id` (the API also accepts `sanitized_name`). A scalar field maps to `string | null`; a table/object field maps to an array of row objects. Ground truth attaches to the workflow's current version."},"on_conflict":{"type":"string","enum":["error","rename"],"title":"On Conflict","description":"How to handle an uploaded filename that already exists in the workflow (filenames are unique within a workflow). `error` (the default) rejects the whole request with `409` and lists the conflicting names, so a rename is never silent — the caller must opt in. `rename` accepts the collision and lets the server auto-rename the file by inserting a ` (n)` counter before the extension (`invoice.pdf` → `invoice (1).pdf`).","default":"error"}},"type":"object","required":["files"],"title":"Body_v3_upload_to_dataset"},"Body_v3_upload_to_workflow":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files","description":"1..100 files forming one document packet."},"metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metadata","description":"Optional JSON-encoded object of free-form metadata attached to the packet. The extract operator may source datapoints from a top-level key whose name matches a schema field, and from free text in natural language under `__anyformat_free_text__`."},"on_conflict":{"type":"string","enum":["error","rename"],"title":"On Conflict","description":"How to handle an uploaded filename that already exists in the workflow (filenames are unique within a workflow). `error` (the default) rejects the whole request with `409` and lists the conflicting names, so a rename is never silent — the caller must opt in. `rename` accepts the collision and lets the server auto-rename the file by inserting a ` (n)` counter before the extension (`invoice.pdf` → `invoice (1).pdf`).","default":"error"}},"type":"object","required":["files"],"title":"Body_v3_upload_to_workflow"},"BooleanField":{"properties":{"persistent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persistent Id","description":"Server-assigned stable field identity (UUID), emitted by GET /definition/. Echo it back on updates — including across renames — to keep quality metrics, ground-truth links and analytics attached to the field. Matching is scoped to the field's nesting level in the immediately-prior version; an id that matches nothing at its level, appears on more than one field, or is sent at workflow creation is rejected with 400. Omit only for genuinely new fields: there is no matching by name, so a field sent without one is always treated as new and minted a fresh id, silently detaching that field's metrics, ground truth and analytics."},"name":{"type":"string","minLength":1,"title":"Name","description":"Field name. Used as the key in the extraction response."},"description":{"type":"string","title":"Description","description":"Free-form description shown to the extraction model.","default":""},"source":{"type":"string","enum":["extraction","smart_lookup","lookup_if_missing"],"title":"Source","description":"How the field gets its value: extraction (from the document), smart_lookup (from the lookup file, always overwrites) or lookup_if_missing (extracted too; the lookup only fills it where extraction left no value).","default":"extraction"},"data_type":{"type":"string","const":"boolean","title":"Data Type"}},"additionalProperties":false,"type":"object","required":["name","data_type"],"title":"BooleanField"},"ClassificationResult":{"properties":{"node_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Node Id","description":"The `id` of the classify node that gave this verdict. Verdicts are listed in the order the run reached their nodes, so a nested classifier comes after the one that routed to it. `null` only from a server that predates this field."},"category":{"type":"string","title":"Category","description":"The category the document was classified as."},"confidence":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Confidence","description":"Model confidence in the verdict, a whole number from 0 to 100. `null` when the verdict carries no score, because nothing was measured."},"evidence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evidence","description":"Free-form evidence text (the snippets the classifier cited). `null` when none captured."}},"type":"object","required":["category","confidence"],"title":"ClassificationResult","description":"One classifier verdict for the collection."},"ClassifyCategory":{"properties":{"id":{"type":"string","minLength":1,"title":"Id","description":"Stable category id used as the edge `branch` value when routing."},"name":{"type":"string","minLength":1,"title":"Name","description":"Display name shown to the LLM; classification and routing key off it, so it must be unique across categories."},"description":{"type":"string","minLength":1,"title":"Description","description":"Free-form description shown to the LLM."}},"additionalProperties":false,"type":"object","required":["id","name","description"],"title":"ClassifyCategory"},"ClassifyNode":{"properties":{"id":{"type":"string","minLength":1,"title":"Id","description":"Stable identifier for this node within the graph."},"type":{"type":"string","const":"classify","title":"Type"},"user_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Prompt","description":"Optional extra instructions inserted between the classifier's system prompt and the document text."},"categories":{"items":{"$ref":"#/components/schemas/ClassifyCategory"},"type":"array","minItems":1,"title":"Categories"}},"additionalProperties":false,"type":"object","required":["id","type","categories"],"title":"ClassifyNode"},"CodeOutput":{"properties":{"node_id":{"type":"string","title":"Node Id","description":"The `id` of the `code` node in the workflow graph."},"split_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Split Id","description":"The split the function ran for. `null` when the node ran outside any split."},"status":{"type":"string","const":"succeeded","title":"Status","description":"Always `succeeded`: a function that fails ends the whole run in `error`, and a failed run has no results."},"output":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output","description":"The JSON object the function returned, shaped by the node's `output_schema`. `null` when its stored output is no longer available."}},"type":"object","required":["node_id","status"],"title":"CodeOutput","description":"Beta. One function-mode `code` node's `Output`, one entry per split the node ran for."},"ComparisonCheck":{"properties":{"type":{"type":"string","const":"comparison","title":"Type"},"left":{"type":"string","minLength":1,"title":"Left","description":"The left-hand field. Either the field's ``persistent_id`` (Studio field-picker path) or its ``sanitized_name`` as it appears in the extraction response (SDK/API/assistant path) — the executor resolves both."},"op":{"type":"string","enum":["==","!=",">",">=","<","<="],"title":"Op"},"right":{"oneOf":[{"$ref":"#/components/schemas/_FieldOperand"},{"$ref":"#/components/schemas/_LiteralOperand"}],"title":"Right","discriminator":{"propertyName":"source","mapping":{"field":"#/components/schemas/_FieldOperand","literal":"#/components/schemas/_LiteralOperand"}}}},"additionalProperties":false,"type":"object","required":["type","left","op","right"],"title":"ComparisonCheck"},"ConfidenceCheck":{"properties":{"type":{"type":"string","const":"confidence","title":"Type"},"field":{"type":"string","minLength":1,"title":"Field","description":"The field whose extraction confidence to compare. Either the field's ``persistent_id`` (Studio field-picker path) or its ``sanitized_name`` as it appears in the extraction response (SDK/API/assistant path) — the executor resolves both."},"op":{"type":"string","enum":["<","<=",">",">=","==","!="],"title":"Op"},"threshold":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Threshold","description":"Confidence percentile 0..100."}},"additionalProperties":false,"type":"object","required":["type","field","op","threshold"],"title":"ConfidenceCheck"},"Consolidation":{"properties":{"status":{"type":"string","const":"unresolved","title":"Status","description":"Always `unresolved`: no value could be chosen."},"candidates":{"items":{"$ref":"#/components/schemas/ConsolidationCandidate"},"type":"array","title":"Candidates","description":"Each part's answer, to compare against the document before entering the value."}},"type":"object","required":["status","candidates"],"title":"Consolidation","description":"Why a field of a long document has no value: its parts gave answers that could not be combined."},"ConsolidationCandidate":{"properties":{"value":{"anyOf":[{},{"type":"null"}],"title":"Value","description":"The value this part of the document gave."},"value_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value Unit","description":"The unit of `value`, when it has one."},"evidence":{"items":{"$ref":"#/components/schemas/Evidence"},"type":"array","title":"Evidence","description":"Source-text snippets this part cited. Empty when it cited none."}},"type":"object","title":"ConsolidationCandidate","description":"One part of a long document's answer for a field whose parts disagreed."},"DatasetTagAccuracyV3":{"properties":{"dataset_tag_id":{"type":"string","title":"Dataset Tag Id","description":"The dataset tag's id (hyphenated UUID)."},"matched":{"type":"integer","title":"Matched","description":"Values that matched ground truth."},"mismatched":{"type":"integer","title":"Mismatched","description":"Values that did not match ground truth."}},"type":"object","required":["dataset_tag_id","matched","mismatched"],"title":"DatasetTagAccuracyV3","description":"Grading counts for the documents carrying one dataset tag.\n\nA document counts under every tag it carries, so the rows do not add up to\nthe totals."},"DatasetTagListV3":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DatasetTagV3"},"type":"array","title":"Items","description":"The workflow's dataset tags, ordered by name."}},"type":"object","required":["items"],"title":"DatasetTagListV3","description":"Every dataset tag of a workflow, ordered by name."},"DatasetTagV3":{"properties":{"id":{"type":"string","title":"Id","description":"The dataset tag's id (hyphenated UUID); pass it in `dataset_tag_ids` to launch an eval on the documents carrying it.","examples":["069dcc2c-e14c-7606-8000-2ee4fb17aaaa"]},"name":{"type":"string","title":"Name","description":"The tag's name, unique within the workflow.","examples":["Q3 invoices"]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Timestamp when the tag was created (ISO 8601)."}},"type":"object","required":["id","name"],"title":"DatasetTagV3","description":"One of a workflow's dataset tags."},"DatasetUploadFileV3":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier of the file (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4e2"]},"name":{"type":"string","title":"Name","description":"Filename the file is stored under.","examples":["invoice.pdf"]},"original_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Name","description":"The name you uploaded, present only when the file was auto-renamed (`on_conflict=rename` resolving a collision). `null` when the stored `name` is the name you sent."}},"type":"object","required":["id","name"],"title":"DatasetUploadFileV3","description":"Per-file entry in a dataset-upload response."},"DatasetUploadResponseV3":{"properties":{"document_packet_id":{"type":"string","title":"Document Packet Id","description":"Unique identifier of the created dataset document packet (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4e1"]},"files":{"items":{"$ref":"#/components/schemas/DatasetUploadFileV3"},"type":"array","title":"Files","description":"Files in the packet, in the order they were provided."},"ground_truth_saved":{"type":"boolean","title":"Ground Truth Saved","description":"Whether ground truth was supplied and saved for this document packet."}},"type":"object","required":["document_packet_id","files","ground_truth_saved"],"title":"DatasetUploadResponseV3","description":"Response for `POST /v3/workflows/{workflow_id}/dataset/upload/`.\n\nOne dataset document packet, all-or-nothing. `document_packet_id` is the\nstable handle for the deferred ground-truth-edit follow-up."},"DateCheck":{"properties":{"type":{"type":"string","const":"date","title":"Type"},"field":{"type":"string","minLength":1,"title":"Field","description":"The date field. Either the field's ``persistent_id`` (Studio field-picker path) or its ``sanitized_name`` as it appears in the extraction response (SDK/API/assistant path) — the executor resolves both."},"earliest":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Earliest"},"latest":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest"}},"additionalProperties":false,"type":"object","required":["type","field"],"title":"DateCheck"},"DateField":{"properties":{"persistent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persistent Id","description":"Server-assigned stable field identity (UUID), emitted by GET /definition/. Echo it back on updates — including across renames — to keep quality metrics, ground-truth links and analytics attached to the field. Matching is scoped to the field's nesting level in the immediately-prior version; an id that matches nothing at its level, appears on more than one field, or is sent at workflow creation is rejected with 400. Omit only for genuinely new fields: there is no matching by name, so a field sent without one is always treated as new and minted a fresh id, silently detaching that field's metrics, ground truth and analytics."},"name":{"type":"string","minLength":1,"title":"Name","description":"Field name. Used as the key in the extraction response."},"description":{"type":"string","title":"Description","description":"Free-form description shown to the extraction model.","default":""},"source":{"type":"string","enum":["extraction","smart_lookup","lookup_if_missing"],"title":"Source","description":"How the field gets its value: extraction (from the document), smart_lookup (from the lookup file, always overwrites) or lookup_if_missing (extracted too; the lookup only fills it where extraction left no value).","default":"extraction"},"data_type":{"type":"string","const":"date","title":"Data Type"}},"additionalProperties":false,"type":"object","required":["name","data_type"],"title":"DateField"},"DatetimeField":{"properties":{"persistent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persistent Id","description":"Server-assigned stable field identity (UUID), emitted by GET /definition/. Echo it back on updates — including across renames — to keep quality metrics, ground-truth links and analytics attached to the field. Matching is scoped to the field's nesting level in the immediately-prior version; an id that matches nothing at its level, appears on more than one field, or is sent at workflow creation is rejected with 400. Omit only for genuinely new fields: there is no matching by name, so a field sent without one is always treated as new and minted a fresh id, silently detaching that field's metrics, ground truth and analytics."},"name":{"type":"string","minLength":1,"title":"Name","description":"Field name. Used as the key in the extraction response."},"description":{"type":"string","title":"Description","description":"Free-form description shown to the extraction model.","default":""},"source":{"type":"string","enum":["extraction","smart_lookup","lookup_if_missing"],"title":"Source","description":"How the field gets its value: extraction (from the document), smart_lookup (from the lookup file, always overwrites) or lookup_if_missing (extracted too; the lookup only fills it where extraction left no value).","default":"extraction"},"data_type":{"type":"string","const":"datetime","title":"Data Type"}},"additionalProperties":false,"type":"object","required":["name","data_type"],"title":"DatetimeField"},"DeletionAssurance":{"type":"string","enum":["destroyed","recorded"],"title":"DeletionAssurance"},"DeletionCertificateFileV3":{"properties":{"id":{"type":"string","title":"Id","description":"The deleted file's id.","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4e2"]},"filename":{"type":"string","title":"Filename","description":"The file's name when it was deleted.","examples":["invoice-0042.pdf"]},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the file was uploaded (ISO 8601)."}},"type":"object","required":["id","filename","created_at"],"title":"DeletionCertificateFileV3"},"DeletionCertificateListPageV3":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DeletionCertificateSummaryV3"},"type":"array","title":"Items","description":"Certificates on this page, newest issued first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Opaque token to fetch the next page; pass it back as `?cursor=`. `null` on the last page."}},"type":"object","required":["items"],"title":"DeletionCertificateListPageV3","description":"One keyset page of a workflow's deletion certificates, newest issued first."},"DeletionCertificateStatus":{"type":"string","enum":["pending","final"],"title":"DeletionCertificateStatus"},"DeletionCertificateSummaryV3":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier of the certificate (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4f0"]},"workflow_id":{"type":"string","title":"Workflow Id","description":"The workflow the packet belonged to (hyphenated UUID). It may since have been deleted.","examples":["0686bb97-8c30-70f0-8000-97669e000eb8"]},"document_packet_id":{"type":"string","title":"Document Packet Id","description":"The deleted document packet (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4e1"]},"deletion_kind":{"$ref":"#/components/schemas/DeletionKind","description":"`packet` when the packet was deleted on its own, `workflow` when it went with its workflow.","examples":["packet"]},"status":{"$ref":"#/components/schemas/DeletionCertificateStatus","description":"`pending` while a stored object of the packet is still queued for deletion, then `final`.","examples":["final"]},"assurance":{"anyOf":[{"$ref":"#/components/schemas/DeletionAssurance"},{"type":"null"}],"description":"Set once `final`. `destroyed`: storage confirmed every object of the packet deleted, with no version left behind. `recorded`: the deletion is recorded, but not every object carries that confirmation.","examples":["destroyed"]},"files":{"items":{"$ref":"#/components/schemas/DeletionCertificateFileV3"},"type":"array","title":"Files","description":"Every file of the packet."},"requested_at":{"type":"string","format":"date-time","title":"Requested At","description":"When the delete was requested (ISO 8601)."},"forgotten_at":{"type":"string","format":"date-time","title":"Forgotten At","description":"When the packet's rows were forgotten (ISO 8601)."},"issued_at":{"type":"string","format":"date-time","title":"Issued At","description":"When the certificate was issued (ISO 8601)."},"finalized_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finalized At","description":"When it became `final` (ISO 8601)."},"signed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Signed At","description":"When its document was signed (ISO 8601)."}},"type":"object","required":["id","workflow_id","document_packet_id","deletion_kind","status","files","requested_at","forgotten_at","issued_at"],"title":"DeletionCertificateSummaryV3","description":"What one document packet's deletion destroyed, issued when its rows were forgotten."},"DeletionCertificateV3":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier of the certificate (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4f0"]},"workflow_id":{"type":"string","title":"Workflow Id","description":"The workflow the packet belonged to (hyphenated UUID). It may since have been deleted.","examples":["0686bb97-8c30-70f0-8000-97669e000eb8"]},"document_packet_id":{"type":"string","title":"Document Packet Id","description":"The deleted document packet (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4e1"]},"deletion_kind":{"$ref":"#/components/schemas/DeletionKind","description":"`packet` when the packet was deleted on its own, `workflow` when it went with its workflow.","examples":["packet"]},"status":{"$ref":"#/components/schemas/DeletionCertificateStatus","description":"`pending` while a stored object of the packet is still queued for deletion, then `final`.","examples":["final"]},"assurance":{"anyOf":[{"$ref":"#/components/schemas/DeletionAssurance"},{"type":"null"}],"description":"Set once `final`. `destroyed`: storage confirmed every object of the packet deleted, with no version left behind. `recorded`: the deletion is recorded, but not every object carries that confirmation.","examples":["destroyed"]},"files":{"items":{"$ref":"#/components/schemas/DeletionCertificateFileV3"},"type":"array","title":"Files","description":"Every file of the packet."},"requested_at":{"type":"string","format":"date-time","title":"Requested At","description":"When the delete was requested (ISO 8601)."},"forgotten_at":{"type":"string","format":"date-time","title":"Forgotten At","description":"When the packet's rows were forgotten (ISO 8601)."},"issued_at":{"type":"string","format":"date-time","title":"Issued At","description":"When the certificate was issued (ISO 8601)."},"finalized_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finalized At","description":"When it became `final` (ISO 8601)."},"signed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Signed At","description":"When its document was signed (ISO 8601)."},"document_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Base64","description":"The XML document exactly as signed, base64-encoded."},"signature_base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signature Base64","description":"The detached ECDSA P-256 signature over the SHA-256 of the document's bytes, DER, base64-encoded."},"document_sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Sha256","description":"The SHA-256 of the document's bytes, hex."},"signing_key_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signing Key Id","description":"The ARN of the KMS key that signed it."}},"type":"object","required":["id","workflow_id","document_packet_id","deletion_kind","status","files","requested_at","forgotten_at","issued_at"],"title":"DeletionCertificateV3","description":"A deletion certificate with its signed document. The four signature fields are `null` until it is signed."},"DeletionKind":{"type":"string","enum":["packet","workflow"],"title":"DeletionKind","description":"``packet`` when the packet was deleted on its own, ``workflow`` when it went with its workflow."},"Detection":{"properties":{"bbox":{"additionalProperties":{"type":"number"},"type":"object","title":"Bbox","description":"Normalised bounding box in [0, 1] page coordinates with keys `x0`/`y0`/`x1`/`y1`."},"type":{"type":"string","title":"Type","description":"What the layout detector called this box."},"text":{"type":"string","title":"Text","description":"The words the page prints inside this box."}},"type":"object","required":["bbox","type","text"],"title":"Detection","description":"One layout detection a block is made of: where it is and what is printed inside it.\n\nA block is often the fusion of several detections, and a consumer that has to point at what\nthe page prints needs the parts, not only their union."},"DocumentPacketAccuracyV3":{"properties":{"document_packet_id":{"type":"string","title":"Document Packet Id","description":"The dataset copy's document packet id (hyphenated UUID), not the id of the production packet it was added from.","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4f9"]},"first_file_name":{"type":"string","title":"First File Name","description":"Name of the document's first file."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The document packet's own name. Absent when it has none."},"file_count":{"type":"integer","title":"File Count","description":"Number of files in the document packet."},"matched":{"type":"integer","title":"Matched","description":"Values that matched ground truth."},"mismatched":{"type":"integer","title":"Mismatched","description":"Values that did not match ground truth."},"ungraded":{"type":"integer","title":"Ungraded","description":"Values with no ground truth to grade against."},"has_extraction":{"type":"boolean","title":"Has Extraction","description":"`false` when the eval produced no extraction for this document."},"failed_persistent_ids":{"items":{"type":"string"},"type":"array","title":"Failed Persistent Ids","description":"`persistent_id` of every field with at least one mismatched value."}},"type":"object","required":["document_packet_id","first_file_name","file_count","matched","mismatched","ungraded","has_extraction","failed_persistent_ids"],"title":"DocumentPacketAccuracyV3","description":"Grading counts for one dataset document."},"DocumentPacketCreatedFileV3":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier of the file (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4e2"]},"name":{"type":"string","title":"Name","description":"Filename the file is stored under. Filenames are unique within a workflow: a name that collides with an existing file is auto-renamed by inserting a ` (n)` counter before the extension (e.g. `invoice.pdf` → `invoice (1).pdf`).","examples":["invoice.pdf"]},"original_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Name","description":"The name you uploaded, present only when the file was auto-renamed to avoid a duplicate name in the workflow. `null` when `name` is the name you uploaded.","examples":["invoice.pdf"]}},"type":"object","required":["id","name"],"title":"DocumentPacketCreatedFileV3","description":"Per-file entry in an upload/create response.\n\nAdds ``original_name`` on top of the slim projection: the name the caller\nuploaded, surfaced only when the file was auto-renamed to avoid a duplicate\nname in the workflow. The original name is not persisted alongside the\nstored ``name``, so this only appears on the response to the request that\ncreated the file — later reads expose ``name`` alone."},"DocumentPacketCreatedV3":{"properties":{"document_packet_id":{"type":"string","title":"Document Packet Id","description":"Unique identifier of the newly created document packet (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4e1"]},"workflow_id":{"type":"string","title":"Workflow Id","description":"The workflow the packet was created under (hyphenated UUID).","examples":["0686bb97-8c30-70f0-8000-97669e000eb8"]},"files":{"items":{"$ref":"#/components/schemas/DocumentPacketCreatedFileV3"},"type":"array","title":"Files","description":"Files in the packet, in the order they were provided."}},"type":"object","required":["document_packet_id","workflow_id","files"],"title":"DocumentPacketCreatedV3","description":"Response for the packet-creating uploads (multipart and from-url)."},"DocumentPacketDetailFileV3":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier of the file (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4e2"]},"name":{"type":"string","title":"Name","description":"Filename the file is stored under. Filenames are unique within a workflow: a name that collides with an existing file is auto-renamed by inserting a ` (n)` counter before the extension (e.g. `invoice.pdf` → `invoice (1).pdf`).","examples":["invoice.pdf"]},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type","description":"The file's media type, as stored; `null` when `download_url` is.","examples":["application/pdf"]},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Download Url","description":"A presigned GET of the file's original bytes, signed by this read; send no `Authorization` header. `null` when the file's stored bytes cannot be linked."},"download_url_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Download Url Expires At","description":"When `download_url` stops working (UTC); `null` when `download_url` is."}},"type":"object","required":["id","name","content_type","download_url","download_url_expires_at"],"title":"DocumentPacketDetailFileV3","description":"One file of a packet read, with a presigned link to its original bytes."},"DocumentPacketDetailV3":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier of the document packet (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4e1"]},"workflow_id":{"type":"string","title":"Workflow Id","description":"The workflow this packet belongs to (hyphenated UUID).","examples":["0686bb97-8c30-70f0-8000-97669e000eb8"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Human-readable name of the packet."},"status":{"$ref":"#/components/schemas/DocumentPacketStatus","description":"Processing status. Non-terminal: `not_started`, `queued`, `in_progress`. Terminal: `processed` (success), `error`, `cancelled`.","examples":["processed"]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Timestamp when the packet was created (ISO 8601)."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Timestamp when the packet was last updated (ISO 8601)."},"files":{"items":{"$ref":"#/components/schemas/DocumentPacketDetailFileV3"},"type":"array","title":"Files","description":"Files in this packet, in packet order."},"latest_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Run Id","description":"Id of the packet's most recent run (hyphenated UUID); `null` until the packet has been run."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Free-form JSON supplied at packet creation. No schema is enforced; the extract operator may source datapoints from a top-level key whose name matches a schema field, and from free text under `__anyformat_free_text__`. `null` when no metadata was attached."}},"type":"object","required":["id","workflow_id","status","files"],"title":"DocumentPacketDetailV3","description":"A packet with its per-file breakdown and latest run reference."},"DocumentPacketFromUrlsRequest":{"properties":{"urls":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"Urls","description":"HTTPS URLs the backend fetches server-side. Each file is named by the response's `Content-Disposition` filename when present, else by the last segment of the URL's path.","examples":[["https://example.com/invoices/april.pdf"]]},"staged_files":{"items":{"$ref":"#/components/schemas/StagedFileRef"},"type":"array","maxItems":100,"title":"Staged Files","description":"Files staged via `POST /v3/blobs/slots/` and uploaded already, referenced by `object_id` so the long presigned `read_url` never needs to be passed around. They land after the `urls` entries."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Free-form JSON to attach to the packet. No schema is enforced; the extract operator may source datapoints from a top-level key whose name matches a schema field, and from free text in natural language under `__anyformat_free_text__`."},"on_conflict":{"type":"string","enum":["error","rename"],"title":"On Conflict","description":"How to handle an uploaded filename that already exists in the workflow (filenames are unique within a workflow). `error` (the default) rejects the whole request with `409` and lists the conflicting names, so a rename is never silent — the caller must opt in. `rename` accepts the collision and lets the server auto-rename the file by inserting a ` (n)` counter before the extension (`invoice.pdf` → `invoice (1).pdf`).","default":"error"}},"type":"object","title":"DocumentPacketFromUrlsRequest","description":"Body for ``POST /v3/workflows/{workflow_id}/upload/from-url/``.\n\nEvery URL imports into a single packet atomically — any fetch or\nvalidation failure means nothing is persisted. Files arrive as fetchable\nHTTPS ``urls``, as ``staged_files`` ids from ``POST /v3/blobs/slots/``, or\na mix; 1 to 100 files in total.","examples":[{"urls":["https://example.com/invoices/april.pdf","https://example.com/invoices/april-annex.pdf"]},{"staged_files":[{"filename":"april.pdf","object_id":"06a953d9792572568000f838b051ca9b"}]}]},"DocumentPacketListPageV3":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DocumentPacketSummaryV3"},"type":"array","title":"Items","description":"Packets on this page, newest first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Opaque token to fetch the next page; pass it back as `?cursor=`. `null` on the last page."}},"type":"object","required":["items"],"title":"DocumentPacketListPageV3","description":"One keyset page of document packets.\n\nFixed ``(-created_at, -id)`` order. No totals or page numbers —\niterate by following ``next_cursor`` until it is null."},"DocumentPacketStatus":{"type":"string","enum":["not_started","queued","in_progress","processed","error","cancelled"],"title":"DocumentPacketStatus","description":"Extraction lifecycle of a packet. Non-terminal: ``not_started``\n(no run yet), ``queued``, ``in_progress``. Terminal: ``processed``\n(success), ``error``, ``cancelled``."},"DocumentPacketSummaryV3":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier of the document packet (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4e1"]},"workflow_id":{"type":"string","title":"Workflow Id","description":"The workflow this packet belongs to (hyphenated UUID).","examples":["0686bb97-8c30-70f0-8000-97669e000eb8"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Human-readable name of the packet."},"status":{"$ref":"#/components/schemas/DocumentPacketStatus","description":"Processing status. Non-terminal: `not_started`, `queued`, `in_progress`. Terminal: `processed` (success), `error`, `cancelled`.","examples":["processed"]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Timestamp when the packet was created (ISO 8601)."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Timestamp when the packet was last updated (ISO 8601)."}},"type":"object","required":["id","workflow_id","status"],"title":"DocumentPacketSummaryV3","description":"Slim packet projection returned by list pages."},"Edge":{"properties":{"source":{"type":"string","minLength":1,"title":"Source"},"target":{"type":"string","minLength":1,"title":"Target"},"branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch","description":"Source-port label for branch routing. Required when leaving a classify or splitter node by category/rule."}},"additionalProperties":false,"type":"object","required":["source","target"],"title":"Edge","description":"A directed edge between two nodes. ``branch`` carries the source-port label\nused for routing out of ``classify`` (category id) or ``splitter`` (rule id) nodes."},"Edit":{"properties":{"file_id":{"type":"string","title":"File Id","description":"The UUID of the file this form was filled from."},"file_name":{"type":"string","title":"File Name","description":"The file's display name."},"fields":{"items":{"$ref":"#/components/schemas/EditFormField"},"type":"array","title":"Fields","description":"Every form field detected in the document, filled or not, in document order."},"unmatched_instructions":{"items":{"type":"string"},"type":"array","title":"Unmatched Instructions","description":"Instruction fragments, quoted verbatim, that matched no field in this document."},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Download Url","description":"Presigned link to the filled PDF, valid for 15 minutes from the moment this response was built. Re-read the results endpoint for a fresh link. `null` when no filled PDF was stored."}},"type":"object","required":["file_id","file_name"],"title":"Edit","description":"One edit node's filled form for one file of the collection: the values\nwritten into the document's fields, plus a short-lived link to the filled\nPDF. One entry per file the edit node processed."},"EditFieldRequest":{"properties":{"sanitized_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sanitized Name","description":"The field's key in `results.extractions[].fields`. Name the field by this or by `persistent_id`, not both. Inside a table, the table's key.","examples":["holdings"]},"persistent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persistent Id","description":"The field's `persistent_id`, which survives a rename. Name the field by this or by `sanitized_name`, not both. Inside a table, the column's own `persistent_id`.","examples":["0686bb978c3070f0800097669e00aaaa"]},"column":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Column","description":"The column's key inside the table that `sanitized_name` names. A column key is unique only within its table. Send it only with `sanitized_name`; a `persistent_id` already names the column.","examples":["quantity"]},"row_index":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Row Index","description":"The position of the row in the table, from 0. Send it for a table column, and use 0 for a column of a single object. Omit it for a field that is not in a table.","examples":[2]},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value","description":"The corrected value, or `null` for an empty one. Send the type that `results` returns for the field. Today every value is a string, and a later release can return numbers, booleans, dates or lists in the same key. A yes/no field edited back to its original answer still counts as an edit when the text differs, as `\"true\"` and `\"True\"` do.","examples":["4594.62"]}},"additionalProperties":false,"type":"object","required":["value"],"title":"EditFieldRequest","description":"Body for `POST /v3/extractions/{extraction_id}/fields/edit/`."},"EditFormField":{"properties":{"form_field_id":{"type":"string","title":"Form Field Id","description":"Stable identifier for this form field within the document, in the form `p<page>_f<index>`."},"label":{"type":"string","title":"Label","description":"The field's own printed caption, verbatim from the document."},"kind":{"type":"string","title":"Kind","description":"`checkbox` for a tick target, `text` for anything else."},"state":{"type":"string","title":"State","description":"`empty` if the field was blank in the source document and therefore fillable, `prefilled` if the document already carried a value. Prefilled fields are never overwritten, so they always read back with `value: null`."},"page":{"type":"integer","title":"Page","description":"1-indexed page number the field sits on."},"bbox":{"additionalProperties":{"type":"number"},"type":"object","title":"Bbox","description":"The field's fillable area as a normalised bounding box in [0, 1] page coordinates, keys `x0`/`y0`/`x1`/`y1`."},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value","description":"The value written into the field — the literal string `true`/`false` for a `checkbox`. `null` when no instruction addressed this field."},"confidence":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Confidence","description":"Raw, uncalibrated match score, a whole number from 0 to 100, for pairing an instruction with this field. It grades how surely the instruction addresses the field, not whether the written value is correct, and it is not a probability. `null` when no instruction addressed this field, because nothing was measured."}},"type":"object","required":["form_field_id","label","kind","state","page","bbox","value","confidence"],"title":"EditFormField","description":"One form field the edit node detected, with the value it wrote in."},"EditReferenceDocumentV3":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier of the reference document (hyphenated UUID). This is the value to put in an Edit node's `reference_document_ids`.","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4e2"]},"name":{"type":"string","title":"Name","description":"Filename the reference is stored under.","examples":["company-profile.csv"]},"status":{"type":"string","enum":["pending","ready","failed"],"title":"Status","description":"`ready`: usable by a run. `pending`: a PDF still being parsed — text formats are never pending. `failed`: parsing did not complete; `error` says why. A run whose Edit node names a reference that is not `ready` is refused rather than filled from a partial reference."},"truncated":{"type":"boolean","title":"Truncated","description":"Whether the parsed text was cut at the per-reference size cap. The document is still usable; the tail of it simply is not part of what the node fills from."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Why parsing failed. `null` unless `status` is `failed`."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","status","truncated","created_at","updated_at"],"title":"EditReferenceDocumentV3"},"EditReferenceListResponseV3":{"properties":{"documents":{"items":{"$ref":"#/components/schemas/EditReferenceDocumentV3"},"type":"array","title":"Documents","description":"Reference documents on this workflow, newest last."}},"type":"object","required":["documents"],"title":"EditReferenceListResponseV3","description":"Response for the upload and list endpoints alike.\n\nThe same shape both ways so a caller can poll the list endpoint with the\nexact model it got back from the upload."},"EnumField":{"properties":{"persistent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persistent Id","description":"Server-assigned stable field identity (UUID), emitted by GET /definition/. Echo it back on updates — including across renames — to keep quality metrics, ground-truth links and analytics attached to the field. Matching is scoped to the field's nesting level in the immediately-prior version; an id that matches nothing at its level, appears on more than one field, or is sent at workflow creation is rejected with 400. Omit only for genuinely new fields: there is no matching by name, so a field sent without one is always treated as new and minted a fresh id, silently detaching that field's metrics, ground truth and analytics."},"name":{"type":"string","minLength":1,"title":"Name","description":"Field name. Used as the key in the extraction response."},"description":{"type":"string","title":"Description","description":"Free-form description shown to the extraction model.","default":""},"source":{"type":"string","enum":["extraction","smart_lookup","lookup_if_missing"],"title":"Source","description":"How the field gets its value: extraction (from the document), smart_lookup (from the lookup file, always overwrites) or lookup_if_missing (extracted too; the lookup only fills it where extraction left no value).","default":"extraction"},"data_type":{"type":"string","const":"enum","title":"Data Type"},"enum_options":{"items":{"$ref":"#/components/schemas/EnumOption"},"type":"array","minItems":1,"title":"Enum Options"}},"additionalProperties":false,"type":"object","required":["name","data_type","enum_options"],"title":"EnumField"},"EnumOption":{"properties":{"name":{"type":"string","minLength":1,"title":"Name"},"description":{"type":"string","minLength":1,"title":"Description","description":"Free-form description shown to the model."}},"additionalProperties":false,"type":"object","required":["name","description"],"title":"EnumOption"},"EvalDetailV3":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier of the eval (hyphenated UUID); equals the launch's `eval_id`.","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4f9"]},"run_number":{"type":"integer","title":"Run Number","description":"Per-workflow run counter (#1, #2, …) for this eval.","examples":[3]},"version_id":{"type":"string","title":"Version Id","description":"Workflow version the eval scored.","examples":["abcdef1234"]},"status":{"$ref":"#/components/schemas/EvalStatus","description":"Grading status. Non-terminal: `in_progress`. Terminal: `processed`, `error`.","examples":["processed"]},"accuracy":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accuracy","description":"Headline accuracy in [0, 1]; `null` while `in_progress` and on a `processed` eval with a 0 graded denominator.","examples":[0.94]},"matched":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Matched","description":"Values that matched ground truth; `null` while `in_progress`."},"mismatched":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mismatched","description":"Values that did not match ground truth; `null` while `in_progress`."},"ungraded":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ungraded","description":"Values with no ground truth to grade against; `null` while `in_progress`."},"file_count":{"type":"integer","title":"File Count","description":"Number of dataset documents in the eval's realized cohort.","examples":[42]},"failed_count":{"type":"integer","title":"Failed Count","description":"Number of dataset documents that failed to enqueue for this run.","examples":[0]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Timestamp when the eval was created (ISO 8601)."},"dataset_tag_ids":{"items":{"type":"string"},"type":"array","title":"Dataset Tag Ids","description":"Dataset tags the eval was launched on, as sent at launch. Absent on an eval of the whole dataset."},"untagged":{"type":"boolean","title":"Untagged","description":"`true` when the eval also ran the untagged documents. Absent otherwise.","default":false}},"type":"object","required":["id","run_number","version_id","status","file_count","failed_count"],"title":"EvalDetailV3","description":"One eval's frozen headline — the poll target for a launched run.\n\n``id`` here is the same identifier the launch returned as ``eval_id``. The\nheadline fields (``accuracy``, ``matched``, ``mismatched``, ``ungraded``)\nare ``null`` while ``status`` is ``in_progress``; ``accuracy`` stays ``null``\non a ``processed`` eval whose graded denominator is 0."},"EvalDocumentPacketFieldsV3":{"properties":{"document_packet_id":{"type":"string","title":"Document Packet Id","description":"The dataset copy's document packet id (hyphenated UUID), not the id of the production packet it was added from.","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4f9"]},"first_file_name":{"type":"string","title":"First File Name","description":"Name of the document's first file."},"has_extraction":{"type":"boolean","title":"Has Extraction","description":"`false` when the eval produced no extraction for this document."},"fields":{"items":{"$ref":"#/components/schemas/FieldValuesV3"},"type":"array","title":"Fields","description":"One entry per graded field."}},"type":"object","required":["document_packet_id","first_file_name","has_extraction","fields"],"title":"EvalDocumentPacketFieldsV3","description":"Extracted against expected values for one document of an eval."},"EvalLaunchRequest":{"properties":{"version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version Id","description":"Workflow version to evaluate. Omit to run against the workflow's current version; pass a value to override.","examples":["abcdef1234"]},"dataset_tag_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Dataset Tag Ids","description":"Run only the dataset documents carrying at least one of these dataset tags. Omit both this and `untagged` to run the whole dataset. An empty list selects no document, so it is valid only with `untagged: true`.","examples":[["069dcc2c-e14c-7606-8000-2ee4fb17b4f9"]]},"untagged":{"type":"boolean","title":"Untagged","description":"Also run the dataset documents that carry no dataset tag.","default":false}},"type":"object","title":"EvalLaunchRequest","description":"Body for ``POST /v3/workflows/{workflow_id}/evals/`` (JSON, optional).\n\nSend ``{}`` (or no body) to evaluate the workflow's current version."},"EvalLaunchedV3":{"properties":{"eval_id":{"type":"string","title":"Eval Id","description":"Unique identifier of the new eval (hyphenated UUID); the poll handle.","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4f9"]},"run_number":{"type":"integer","title":"Run Number","description":"Per-workflow run counter (#1, #2, …) for this eval.","examples":[3]},"enqueued_count":{"type":"integer","title":"Enqueued Count","description":"Number of dataset documents whose extraction was enqueued for this run.","examples":[42]},"failed_count":{"type":"integer","title":"Failed Count","description":"Number of dataset documents that failed to enqueue. Read the eval for the failed document ids.","examples":[0]}},"type":"object","required":["eval_id","run_number","enqueued_count","failed_count"],"title":"EvalLaunchedV3","description":"202 response: the eval was created and its cohort enqueued.\n\nExposes counts, never the internal extraction/file ids. Read the eval by\n``eval_id`` for the per-document breakdown (including which documents\nfailed to enqueue)."},"EvalListPageV3":{"properties":{"items":{"items":{"$ref":"#/components/schemas/EvalDetailV3"},"type":"array","title":"Items","description":"Evals on this page, newest first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Opaque token to fetch the next page; pass it back as `?cursor=`. `null` on the last page."}},"type":"object","required":["items"],"title":"EvalListPageV3","description":"One keyset page of evals.\n\nFixed ``(-created_at, -id)`` order. No totals or page numbers — iterate by\nfollowing ``next_cursor`` until it is null."},"EvalStatus":{"type":"string","enum":["in_progress","processed","error"],"title":"EvalStatus","description":"Grading lifecycle of an eval. Non-terminal: ``in_progress`` (the headline\nfields are null). Terminal: ``processed`` (graded) and ``error``."},"Evidence":{"properties":{"text":{"type":"string","title":"Text","description":"The exact source-text snippet that supports the extracted value."},"page_number":{"type":"integer","title":"Page Number","description":"1-indexed page number where the snippet was found. In a run's results it counts pages across the packet's files in packet order; `file_page` is the page inside `file_id`."},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id","description":"The file the snippet was found in. Absent for evidence taken from the packet's metadata."},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Name","description":"The name of that file, as `files[].name` of the packet. `file_id` tells apart files with one name."},"file_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Page","description":"1-indexed page of that file. Equal to `page_number` for a packet of one file."},"bbox":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Bbox","description":"Where on the page the snippet was found: a box with keys `x0`/`y0`/`x1`/`y1` in [0, 1], measured from the page's top-left corner, so `y` grows down the page. It is the box of the snippet itself, of its row for a value read from a table, or of the parse block holding it when the snippet could not be matched more precisely. Absent when no box was found."},"block_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Block Id","description":"The id of the parse block the snippet was read from: one of `results.parse` `blocks[].id`, numbered by the packet page. Block ids are stable within one response. Absent for evidence taken from the packet's metadata, for a run saved before block ids were kept, and when the id names no block of the packet's parse."},"cell_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Cell Ids","description":"The table cells of `block_id` the value was read from, each as `<block_id>.r<row>c<col>`: the block's id and a cell id as its `rows` name it. The one cell the value came from when it is known, otherwise every cell the snippet cites, which can be its whole row. They are the extraction's citation, not checked against the block's table, and `bbox` can be the box of another row when the cited row did not hold the value. Absent when the snippet cites no cell, when `block_id` is absent, and for a run saved before cell ids were kept that named no single cell.","examples":[["p3_b0.r1c2"]]}},"type":"object","required":["text","page_number"],"title":"Evidence","description":"A snippet of source text supporting an extracted value, with the page it came from.\n\nWhen ``text`` starts with ``metadata.``, the value was sourced from the\npacket's caller-supplied metadata (not the document): the remainder is\nthe JSON path into that metadata, and ``page_number`` is ``0``. Encoded\nin ``text`` on purpose — same wire shape as document evidence, no schema\nchange for SDK consumers."},"ExpressionCheck":{"properties":{"type":{"type":"string","const":"expression","title":"Type"},"expression":{"type":"string","maxLength":1000,"minLength":1,"title":"Expression"}},"additionalProperties":false,"type":"object","required":["type","expression"],"title":"ExpressionCheck","description":"A CEL expression over the whole extraction, evaluated in a sandbox.\n\nThe expression reads one root variable ``data`` and addresses fields by\nextracted name (``data.total``, ``data.lineas.map(l, l.importe)``), never by\n``persistent_id`` — so ``field_ids`` returns ``[]`` for it, and a field\nrename silently breaks the rule. An expression the evaluator cannot parse,\ncannot answer with a boolean, or prices above its evaluation budget reports\n``inconclusive``.\n\nADR platform/0036 records why the CEL parser stays out of this package, so\n``expression`` is unvalidated here."},"ExtractedField":{"properties":{"value":{"anyOf":[{},{"type":"null"}],"title":"Value","description":"The extracted value, always as a string — a field declared `integer` returns `\"3\"`, not `3`. Values are stored as text, so `data_type` governs how the field is extracted and validated, not the JSON type you get back; parse it yourself, minding that a document may write a number as `1.026,00`. `null` when extraction produced no value."},"value_override":{"anyOf":[{},{"type":"null"}],"title":"Value Override","description":"A human-supplied override of the extracted `value`, if one was set during verification. `null` when no override exists."},"verification_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verification Status","description":"Verification state for this datapoint (e.g. `not_verified`, `verified`). `null` when not yet reviewed."},"confidence":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Confidence","description":"Model confidence in the extracted value, a whole number from 0 to 100. `null` when the backend did not produce a confidence (e.g. manual entry)."},"evidence":{"items":{"$ref":"#/components/schemas/Evidence"},"type":"array","title":"Evidence","description":"Source-text snippets the model used to derive this value."},"value_source":{"anyOf":[{"type":"string","enum":["document","lookup"]},{"type":"null"}],"title":"Value Source","description":"Where a smart-lookup field's value came from. Omitted for other fields."},"lookup_check":{"anyOf":[{"type":"string","enum":["confirmed","conflict"]},{"type":"null"}],"title":"Lookup Check","description":"Whether the lookup `confirmed` the document value or was in `conflict` with it (the document value is kept). Omitted when no lookup compared the two."},"consolidation":{"anyOf":[{"$ref":"#/components/schemas/Consolidation"},{"type":"null"}],"description":"Set when a long document's parts gave answers that could not be combined; `value` is then `null`. Omitted otherwise."}},"type":"object","required":["value"],"title":"ExtractedField","description":"One extracted field's value, confidence, and supporting evidence."},"Extraction":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"The extraction's UUID, the id the review routes under `/v3/extractions/` take. Present in a run's results."},"node_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Node Id","description":"The `id` of the extract node that produced this extraction. It tells the entries of an if/else fan-out apart. Absent for a run that predates it."},"split_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Split Id","description":"The split this extraction belongs to, by id: `splits[].partitions[].id` when it has a partition value, `splits[].id` otherwise. One case joins to no entry: the pages of a partitioned rule with no partition value. Their id is a real split that `GET /v3/splits/{split_id}/pdf/` accepts, but no `splits[]` or `partitions[]` entry carries it, so join those on `split_name`. Absent when the extraction belongs to no split. Join on the id, not on `split_name`: two splitter nodes can name a split alike."},"split_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Split Name","description":"The split category this extraction belongs to. `null` for linear workflows."},"partition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partition","description":"The partition value within the split. `null` when the split has no partitions."},"fields":{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/ExtractedField"},{"items":{"additionalProperties":{"$ref":"#/components/schemas/ExtractedField"},"type":"object"},"type":"array"}]},"type":"object","title":"Fields","description":"Extracted fields keyed by field name. Same shape as the legacy top-level `extraction`."},"validations":{"items":{"$ref":"#/components/schemas/Validation"},"type":"array","title":"Validations","description":"Verdicts of the workflow's validate nodes."}},"type":"object","required":["fields"],"title":"Extraction","description":"One unit of extracted data. For linear (parse->extract) workflows there\nis exactly one entry with `split_name=null` and `partition=null`. For split\nworkflows there is one entry per (split, partition) pair; join with\n`splits[]` by `split_id` to look up geometry."},"ExtractionOptimizationRequest":{"properties":{"kind":{"type":"string","const":"extraction","title":"Kind","description":"A measured run: every round is scored against the dataset's ground truth."},"max_rounds":{"type":"integer","maximum":10.0,"minimum":1.0,"title":"Max Rounds","description":"Most rounds the run may try. It stops earlier when rounds stop improving accuracy.","default":3}},"additionalProperties":false,"type":"object","required":["kind"],"title":"ExtractionOptimizationRequest"},"ExtractionSchema":{"properties":{"fields":{"items":{"oneOf":[{"$ref":"#/components/schemas/StringField"},{"$ref":"#/components/schemas/IntegerField"},{"$ref":"#/components/schemas/FloatField"},{"$ref":"#/components/schemas/BooleanField"},{"$ref":"#/components/schemas/DateField"},{"$ref":"#/components/schemas/DatetimeField"},{"$ref":"#/components/schemas/EnumField"},{"$ref":"#/components/schemas/MultiSelectField"},{"$ref":"#/components/schemas/ObjectField"}],"discriminator":{"propertyName":"data_type","mapping":{"boolean":"#/components/schemas/BooleanField","date":"#/components/schemas/DateField","datetime":"#/components/schemas/DatetimeField","enum":"#/components/schemas/EnumField","float":"#/components/schemas/FloatField","integer":"#/components/schemas/IntegerField","multi_select":"#/components/schemas/MultiSelectField","object":"#/components/schemas/ObjectField","string":"#/components/schemas/StringField"}}},"type":"array","minItems":1,"title":"Fields","description":"Field definitions making up this extract's output."}},"additionalProperties":false,"type":"object","required":["fields"],"title":"ExtractionSchema","description":"Schema describing what an extract node produces.\n\nModeled as a typed object (not a bare ``list[AnyField]``) so metadata\ncan be added later (versioning, derived flags, output-shape hints)\nwithout another wire-format break. At least one field is required."},"FieldAccuracyV3":{"properties":{"persistent_id":{"type":"string","title":"Persistent Id","description":"The field's `persistent_id` in the workflow schema."},"matched":{"type":"integer","title":"Matched","description":"Values of this field that matched ground truth."},"mismatched":{"type":"integer","title":"Mismatched","description":"Values of this field that did not match ground truth."},"ungraded":{"type":"integer","title":"Ungraded","description":"Values of this field with no ground truth to grade against."}},"type":"object","required":["persistent_id","matched","mismatched","ungraded"],"title":"FieldAccuracyV3","description":"Grading counts for one field across the graded documents."},"FieldValuesV3":{"properties":{"persistent_id":{"type":"string","title":"Persistent Id","description":"The field's `persistent_id` in the workflow schema."},"extracted":{"title":"Extracted","description":"The value the eval extracted. A scalar for a scalar field; for a field inside a list or object, one value per row, in row order."},"expected":{"title":"Expected","description":"The ground-truth value, in the same shape."}},"type":"object","required":["persistent_id"],"title":"FieldValuesV3","description":"One field's extracted value beside its ground truth."},"FilePages":{"properties":{"file_id":{"type":"string","title":"File Id","description":"The file's UUID."},"file_name":{"type":"string","title":"File Name","description":"The file's display name."},"pages":{"items":{"type":"integer"},"type":"array","title":"Pages","description":"1-indexed page numbers from this file."}},"type":"object","required":["file_id","file_name","pages"],"title":"FilePages","description":"A file's contribution of pages to a split or partition. 1-indexed."},"FloatField":{"properties":{"persistent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persistent Id","description":"Server-assigned stable field identity (UUID), emitted by GET /definition/. Echo it back on updates — including across renames — to keep quality metrics, ground-truth links and analytics attached to the field. Matching is scoped to the field's nesting level in the immediately-prior version; an id that matches nothing at its level, appears on more than one field, or is sent at workflow creation is rejected with 400. Omit only for genuinely new fields: there is no matching by name, so a field sent without one is always treated as new and minted a fresh id, silently detaching that field's metrics, ground truth and analytics."},"name":{"type":"string","minLength":1,"title":"Name","description":"Field name. Used as the key in the extraction response."},"description":{"type":"string","title":"Description","description":"Free-form description shown to the extraction model.","default":""},"source":{"type":"string","enum":["extraction","smart_lookup","lookup_if_missing"],"title":"Source","description":"How the field gets its value: extraction (from the document), smart_lookup (from the lookup file, always overwrites) or lookup_if_missing (extracted too; the lookup only fills it where extraction left no value).","default":"extraction"},"data_type":{"type":"string","const":"float","title":"Data Type"}},"additionalProperties":false,"type":"object","required":["name","data_type"],"title":"FloatField"},"GroundTruthSetRequest":{"properties":{"ground_truth":{"additionalProperties":true,"type":"object","title":"Ground Truth","description":"The complete expected document. Keys are the workflow schema's field identifiers: advertise `persistent_id` (the API also accepts `sanitized_name`). A scalar field maps to `string | null`; a table or object field maps to an array of row objects. Every field must be present; a list field may be `[]`.","examples":[{"0686bb978c3070f0800097669e00aaaa":"INV-001"}]},"version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version Id","description":"A `version_id` from `GET /v3/workflows/{workflow_id}/versions/`. Omit it for the workflow's current version, the one an eval grades by default.","examples":["FGaV4I2JAA"]},"node_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Node Id","description":"The extract node's `id` in the workflow graph, as `GET /v3/workflows/{workflow_id}/` returns it. Required only when the version has more than one extract node.","examples":["extract_1"]}},"type":"object","required":["ground_truth"],"title":"GroundTruthSetRequest","description":"Body for `PUT /v3/document-packets/{document_packet_id}/ground-truth/`."},"GroundTruthV3":{"properties":{"ground_truth":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ground Truth","description":"The expected document, keyed by the workflow's field `persistent_id`s. A scalar field maps to `string | null`; a table or object field maps to an array of row objects keyed the same way. `null` until ground truth is first set for this version and node.","examples":[{"0686bb978c3070f0800097669e00aaaa":"INV-001"}]},"version_id":{"type":"string","title":"Version Id","description":"The workflow version the ground truth belongs to.","examples":["FGaV4I2JAA"]},"node_id":{"type":"string","title":"Node Id","description":"The extract node's `id` in the workflow graph.","examples":["extract_1"]}},"type":"object","required":["ground_truth","version_id","node_id"],"title":"GroundTruthV3","description":"A document packet's stored ground truth and the `(version, node)` it belongs to."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthCheckResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Status message. Returns `\"ok\"` when the service is healthy.","examples":["ok"]}},"type":"object","required":["message"],"title":"HealthCheckResponse","description":"Health check response confirming the API is operational."},"Hyperlink":{"properties":{"text":{"type":"string","title":"Text","description":"The display text of the link."},"uri":{"type":"string","title":"Uri","description":"The link target (URL, mailto:, etc.)."}},"type":"object","required":["text","uri"],"title":"Hyperlink","description":"A hyperlink found inside a block's content."},"IntegerField":{"properties":{"persistent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persistent Id","description":"Server-assigned stable field identity (UUID), emitted by GET /definition/. Echo it back on updates — including across renames — to keep quality metrics, ground-truth links and analytics attached to the field. Matching is scoped to the field's nesting level in the immediately-prior version; an id that matches nothing at its level, appears on more than one field, or is sent at workflow creation is rejected with 400. Omit only for genuinely new fields: there is no matching by name, so a field sent without one is always treated as new and minted a fresh id, silently detaching that field's metrics, ground truth and analytics."},"name":{"type":"string","minLength":1,"title":"Name","description":"Field name. Used as the key in the extraction response."},"description":{"type":"string","title":"Description","description":"Free-form description shown to the extraction model.","default":""},"source":{"type":"string","enum":["extraction","smart_lookup","lookup_if_missing"],"title":"Source","description":"How the field gets its value: extraction (from the document), smart_lookup (from the lookup file, always overwrites) or lookup_if_missing (extracted too; the lookup only fills it where extraction left no value).","default":"extraction"},"data_type":{"type":"string","const":"integer","title":"Data Type"}},"additionalProperties":false,"type":"object","required":["name","data_type"],"title":"IntegerField"},"KeyCheckResponse":{"properties":{"valid":{"type":"boolean","title":"Valid","description":"Always `true` — a failed check returns the standard error envelope with `error_code` `MISSING_API_KEY` or `INVALID_API_KEY`.","examples":[true]},"organization_id":{"type":"string","title":"Organization Id","description":"UUID of the organization the key belongs to.","examples":["7f4a1c2e-0000-4000-8000-000000000001"]},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Name","description":"Display name of the owning organization, when the backend surfaces it.","examples":["Acme Corp"]},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes","description":"Scopes granted to the key (`read`, `write`). `null` when the backend does not report them.","examples":[["read","write"]]}},"type":"object","required":["valid","organization_id"],"title":"KeyCheckResponse","description":"Confirms the API key is valid and names its owning organization."},"KnowledgeEntryPageV3":{"properties":{"items":{"items":{"$ref":"#/components/schemas/KnowledgeEntryV3"},"type":"array","title":"Items","description":"Entries on this page."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Opaque token to fetch the next page; pass it back as `?cursor=`. `null` on the last page."}},"type":"object","required":["items"],"title":"KnowledgeEntryPageV3","description":"One page of a workflow's knowledge corpus tree."},"KnowledgeEntryV3":{"properties":{"path":{"type":"string","title":"Path","description":"Document path inside the workflow's corpus."},"kind":{"type":"string","title":"Kind","description":"Always `document`; kept so existing clients keep parsing the entry."},"folder":{"type":"string","title":"Folder","description":"Parent folder of `path`; empty string at the corpus root."},"title":{"type":"string","title":"Title","description":"Document title."},"page_count":{"type":"integer","title":"Page Count","description":"Page count of the source document."}},"type":"object","required":["path","kind","folder","title","page_count"],"title":"KnowledgeEntryV3","description":"One node of a workflow's knowledge corpus tree."},"KnowledgeNode":{"properties":{"id":{"type":"string","minLength":1,"title":"Id","description":"Stable identifier for this node within the graph."},"type":{"type":"string","const":"knowledge","title":"Type"}},"additionalProperties":false,"type":"object","required":["id","type"],"title":"KnowledgeNode","description":"Terminal knowledge sink — its presence opts the workflow into the\nknowledge base (priced separately, so absent by default).\n\nThe backend reacts to parse callbacks by ingesting parsed markdown into\nthe workflow's navigable corpus; core never executes this node — the\nexecution builder keeps it and its edges off the worker message. Emits\nnothing downstream."},"KnowledgeReadResultV3":{"properties":{"path":{"type":"string","title":"Path","description":"Document path inside the workflow's corpus."},"kind":{"type":"string","title":"Kind","description":"Always `document`; kept so existing clients keep parsing the entry."},"folder":{"type":"string","title":"Folder","description":"Parent folder of `path`; empty string at the corpus root."},"title":{"type":"string","title":"Title","description":"Document title."},"page_count":{"type":"integer","title":"Page Count","description":"Page count of the source document."},"content":{"type":"string","title":"Content","description":"The document's text, capped; see `truncated`. Empty when `as_url` returned a `content_url`."},"truncated":{"type":"boolean","title":"Truncated","description":"True when `content` was cut off at the cap."},"content_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Url","description":"With `as_url=true`, a presigned GET URL of the document's whole body text, valid for 900 seconds, and `content` is empty. Null otherwise."},"document_packet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Packet Id","description":"The document packet this document is read from. Null for a document built before packets."},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id","description":"The source file of a document built before packets. Null for a packet document, whose files are named by its citations."},"source_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Version Id","description":"The workflow version whose run produced this content."}},"type":"object","required":["path","kind","folder","title","page_count","content","truncated","file_id","source_version_id"],"title":"KnowledgeReadResultV3","description":"The rendered content of one entry in a workflow's knowledge corpus."},"KnowledgeSearchHitV3":{"properties":{"path":{"type":"string","title":"Path","description":"Document path inside the workflow's corpus."},"folder":{"type":"string","title":"Folder","description":"Parent folder of `path`."},"title":{"type":"string","title":"Title","description":"Document title."},"page_count":{"type":"integer","title":"Page Count","description":"Page count of the source document."},"snippet":{"type":"string","title":"Snippet","description":"The text of the best-matching block, up to 600 characters."},"rank":{"type":"number","title":"Rank","description":"Full-text search score of the best-matching block; higher ranks first."},"block_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Block Id","description":"Anchor of the best-matching block, the `block_id` that `read_knowledge` content and citations use."},"content_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Url","description":"Presigned GET URL of the document's body text, valid for 900 seconds. Possession of the URL is read permission until it expires. Null when the document changed after the snapshot was published."}},"type":"object","required":["path","folder","title","page_count","snippet","rank"],"title":"KnowledgeSearchHitV3","description":"One ranked hit from a workflow's knowledge corpus."},"KnowledgeSnapshotV3":{"properties":{"corpus_version":{"type":"string","title":"Corpus Version","description":"Version identifier of the snapshot this URL points to."},"url":{"type":"string","title":"Url","description":"Presigned GET URL for the corpus tar."},"size_bytes":{"type":"integer","title":"Size Bytes","description":"Size of the tar in bytes."},"document_count":{"type":"integer","title":"Document Count","description":"Number of documents in the corpus."},"built_at":{"type":"string","format":"date-time","title":"Built At","description":"When this snapshot was built."},"expires_in_seconds":{"type":"integer","title":"Expires In Seconds","description":"TTL of `url` from the moment of this response."}},"type":"object","required":["corpus_version","url","size_bytes","document_count","built_at","expires_in_seconds"],"title":"KnowledgeSnapshotV3","description":"A presigned URL to the whole knowledge corpus tar for a workflow."},"LookupFileUpload":{"properties":{"filename":{"type":"string","minLength":1,"title":"Filename"},"content":{"type":"string","minLength":1,"title":"Content","description":"Base64-encoded file bytes."}},"additionalProperties":false,"type":"object","required":["filename","content"],"title":"LookupFileUpload","description":"Inline lookup-file content carried on the typed create call.\n\nThe backend reads ``filename`` + ``content`` (base64-encoded bytes),\nuploads the file, and appends the new lookup file's id to\n``ExtractNode.lookup_file_ids``. Create-input only — not persisted on\nthe node after upload."},"MultiSelectField":{"properties":{"persistent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persistent Id","description":"Server-assigned stable field identity (UUID), emitted by GET /definition/. Echo it back on updates — including across renames — to keep quality metrics, ground-truth links and analytics attached to the field. Matching is scoped to the field's nesting level in the immediately-prior version; an id that matches nothing at its level, appears on more than one field, or is sent at workflow creation is rejected with 400. Omit only for genuinely new fields: there is no matching by name, so a field sent without one is always treated as new and minted a fresh id, silently detaching that field's metrics, ground truth and analytics."},"name":{"type":"string","minLength":1,"title":"Name","description":"Field name. Used as the key in the extraction response."},"description":{"type":"string","title":"Description","description":"Free-form description shown to the extraction model.","default":""},"source":{"type":"string","enum":["extraction","smart_lookup","lookup_if_missing"],"title":"Source","description":"How the field gets its value: extraction (from the document), smart_lookup (from the lookup file, always overwrites) or lookup_if_missing (extracted too; the lookup only fills it where extraction left no value).","default":"extraction"},"data_type":{"type":"string","const":"multi_select","title":"Data Type"},"enum_options":{"items":{"$ref":"#/components/schemas/EnumOption"},"type":"array","minItems":1,"title":"Enum Options"}},"additionalProperties":false,"type":"object","required":["name","data_type","enum_options"],"title":"MultiSelectField"},"ObjectField":{"properties":{"persistent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persistent Id","description":"Server-assigned stable field identity (UUID), emitted by GET /definition/. Echo it back on updates — including across renames — to keep quality metrics, ground-truth links and analytics attached to the field. Matching is scoped to the field's nesting level in the immediately-prior version; an id that matches nothing at its level, appears on more than one field, or is sent at workflow creation is rejected with 400. Omit only for genuinely new fields: there is no matching by name, so a field sent without one is always treated as new and minted a fresh id, silently detaching that field's metrics, ground truth and analytics."},"name":{"type":"string","minLength":1,"title":"Name","description":"Field name. Used as the key in the extraction response."},"description":{"type":"string","title":"Description","description":"Free-form description shown to the extraction model.","default":""},"source":{"type":"string","enum":["extraction","smart_lookup","lookup_if_missing"],"title":"Source","description":"How the field gets its value: extraction (from the document), smart_lookup (from the lookup file, always overwrites) or lookup_if_missing (extracted too; the lookup only fills it where extraction left no value).","default":"extraction"},"data_type":{"type":"string","const":"object","title":"Data Type"},"nested_fields":{"items":{"oneOf":[{"$ref":"#/components/schemas/StringField"},{"$ref":"#/components/schemas/IntegerField"},{"$ref":"#/components/schemas/FloatField"},{"$ref":"#/components/schemas/BooleanField"},{"$ref":"#/components/schemas/DateField"},{"$ref":"#/components/schemas/DatetimeField"},{"$ref":"#/components/schemas/EnumField"},{"$ref":"#/components/schemas/MultiSelectField"}],"discriminator":{"propertyName":"data_type","mapping":{"boolean":"#/components/schemas/BooleanField","date":"#/components/schemas/DateField","datetime":"#/components/schemas/DatetimeField","enum":"#/components/schemas/EnumField","float":"#/components/schemas/FloatField","integer":"#/components/schemas/IntegerField","multi_select":"#/components/schemas/MultiSelectField","string":"#/components/schemas/StringField"}}},"type":"array","minItems":1,"title":"Nested Fields","description":"Columns of one row. The extracted value is an array of objects with these keys, one entry per row found. Only one level of nesting is supported — an object field's children must be non-object types."}},"additionalProperties":false,"type":"object","required":["name","data_type","nested_fields"],"title":"ObjectField","description":"A repeating group — the way a table or line-item list is modelled.\n\nThere is no separate list type: one ``object`` field describes the shape of\na single row, and the extraction returns an array of those rows."},"OneOfCheck":{"properties":{"type":{"type":"string","const":"one_of","title":"Type"},"field":{"type":"string","minLength":1,"title":"Field","description":"The field to test. Either the field's ``persistent_id`` (Studio field-picker path) or its ``sanitized_name`` as it appears in the extraction response (SDK/API/assistant path) — the executor resolves both."},"allowed":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Allowed"},"case_sensitive":{"type":"boolean","title":"Case Sensitive","default":false}},"additionalProperties":false,"type":"object","required":["type","field","allowed"],"title":"OneOfCheck"},"OneshotOptimizationRequest":{"properties":{"kind":{"type":"string","const":"extraction_oneshot","title":"Kind","description":"A single unmeasured round that needs no ground truth."},"user_context":{"type":"string","maxLength":4000,"title":"User Context","description":"Free text on what the extraction gets wrong. Required when the dataset holds no extraction to learn from.","default":""}},"additionalProperties":false,"type":"object","required":["kind"],"title":"OneshotOptimizationRequest"},"OptimizationFieldScoreV3":{"properties":{"persistent_id":{"type":"string","title":"Persistent Id","description":"The field's `persistent_id` in the workflow schema."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"The field's name in the round's version."},"matched":{"type":"integer","title":"Matched","description":"Values of this field that matched ground truth."},"mismatched":{"type":"integer","title":"Mismatched","description":"Values of this field that did not match ground truth."},"accuracy":{"type":"number","title":"Accuracy","description":"`matched / (matched + mismatched)`, 0 when nothing was graded."}},"type":"object","required":["persistent_id","matched","mismatched","accuracy"],"title":"OptimizationFieldScoreV3"},"OptimizationKind":{"type":"string","enum":["extraction","extraction_oneshot"],"title":"OptimizationKind"},"OptimizationListPageV3":{"properties":{"items":{"items":{"$ref":"#/components/schemas/OptimizationV3"},"type":"array","title":"Items","description":"Optimizations on this page, newest first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Opaque token to fetch the next page; pass it back as `?cursor=`. `null` on the last page."}},"type":"object","required":["items"],"title":"OptimizationListPageV3","description":"One keyset page of optimizations, newest first."},"OptimizationRoundV3":{"properties":{"round_no":{"type":"integer","title":"Round No","description":"0 is the baseline; rounds that propose a change count from 1."},"version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version Id","description":"Workflow version the round scored; `null` before it is minted."},"matched":{"type":"integer","title":"Matched","description":"Values that matched ground truth."},"mismatched":{"type":"integer","title":"Mismatched","description":"Values that did not match ground truth."},"accuracy":{"type":"number","title":"Accuracy","description":"Round accuracy in [0, 1]."},"accepted":{"type":"boolean","title":"Accepted","description":"Whether the round's change was kept."},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"Why the round was kept or dropped."},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When the round was recorded (ISO 8601)."},"per_field":{"items":{"$ref":"#/components/schemas/OptimizationFieldScoreV3"},"type":"array","title":"Per Field","description":"Scores per field. Empty on a list item: read the optimization by id for them."}},"type":"object","required":["round_no","matched","mismatched","accuracy","accepted","per_field"],"title":"OptimizationRoundV3"},"OptimizationStartRequest":{"oneOf":[{"$ref":"#/components/schemas/ExtractionOptimizationRequest"},{"$ref":"#/components/schemas/OneshotOptimizationRequest"}],"title":"OptimizationStartRequest","description":"Body for `POST /v3/workflows/{workflow_id}/optimizations/`, discriminated on `kind`.","discriminator":{"propertyName":"kind","mapping":{"extraction":"#/components/schemas/ExtractionOptimizationRequest","extraction_oneshot":"#/components/schemas/OneshotOptimizationRequest"}}},"OptimizationStatus":{"type":"string","enum":["evaluating","proposing","done","failed"],"title":"OptimizationStatus","description":"Lifecycle of a run. Non-terminal: `evaluating`, `proposing`. Terminal: `done`, `failed`."},"OptimizationV3":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier of the optimization (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4f9"]},"workflow_id":{"type":"string","title":"Workflow Id","description":"The optimized workflow (hyphenated UUID)."},"kind":{"$ref":"#/components/schemas/OptimizationKind"},"status":{"$ref":"#/components/schemas/OptimizationStatus"},"max_rounds":{"type":"integer","title":"Max Rounds","description":"Most rounds the run may try."},"baseline_accuracy":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Baseline Accuracy","description":"Accuracy before any change; `null` until scored and on a one-shot run."},"best_accuracy":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Best Accuracy","description":"Best accuracy any round reached; `null` until scored and on a one-shot run."},"result_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Version Id","description":"The workflow version that holds the optimized descriptions; `null` until a round is kept."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Why the run failed; `null` unless `status` is `failed`."},"credits":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credits","description":"Credits the run has cost so far: its evaluation runs on a measured run, its flat charge once `done` on a one-shot run. `null` when the cost was not recorded, as for a run that finished before this field existed."},"rounds":{"items":{"$ref":"#/components/schemas/OptimizationRoundV3"},"type":"array","title":"Rounds"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When the run started (ISO 8601)."},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At","description":"When the run reached `done` or `failed` (ISO 8601); `null` while it runs."}},"type":"object","required":["id","workflow_id","kind","status","max_rounds","rounds"],"title":"OptimizationV3","description":"One optimization run."},"ParseBlocksResultV3":{"properties":{"format":{"type":"string","const":"blocks","title":"Format","description":"`blocks`: the parse as `pages` of blocks."},"layout_confidence":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Layout Confidence","description":"Document-level layout confidence, a whole number from 0 to 100: the char-weighted mean across all blocks."},"parse_confidence":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Parse Confidence","description":"Document-level parse confidence, a whole number from 0 to 100: the char-weighted mean across all blocks."},"pages":{"items":{"$ref":"#/components/schemas/ParsePage"},"type":"array","title":"Pages","description":"The pages that hold a block, in page order."}},"type":"object","required":["format"],"title":"ParseBlocksResultV3","description":"The parse as pages of blocks, each block with its text, and no markdown: `parse_format=blocks`.\n\nThe markdown of a run of blocks is their `content` joined by a blank line, in reading order."},"ParseFromUrlRequest":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"HTTPS URL the backend fetches server-side. The file is named by the response's `Content-Disposition` filename when present, else by the last segment of the URL's path. Pass exactly one of `url` or `object_id`.","examples":["https://example.com/invoices/april.pdf"]},"object_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Object Id","description":"`object_id` of a file staged via `POST /v3/blobs/slots/`, uploaded already. Resolved server-side to the staged bytes, so the long presigned `read_url` never needs to be passed around. Requires `filename`. Pass exactly one of `url` or `object_id`.","examples":["06a953d9792572568000f838b051ca9b"]},"filename":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Filename","description":"Name for the staged file — required with `object_id` (a staged blob carries no name of its own) and not accepted with `url`.","examples":["april.pdf"]}},"type":"object","title":"ParseFromUrlRequest","description":"Body for ``POST /v3/parse/from-url/``.\n\nThe document arrives one of two ways: a fetchable HTTPS ``url``, or the\n``object_id`` of a file staged via ``POST /v3/blobs/slots/`` — the id is a\nfew characters where the staged file's presigned ``read_url`` is kilobytes,\nso an id-carrying caller (an MCP agent spending a context window) never has\nto round-trip the long URL.","examples":[{"url":"https://example.com/invoices/april.pdf"},{"filename":"april.pdf","object_id":"06a953d9792572568000f838b051ca9b"}]},"ParseMarkdownResultV3":{"properties":{"markdown":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Markdown","description":"Document content rendered as structured markdown. Each block is preceded by an empty `<a id=\"p{page}_b{idx}\"></a>` anchor (invisible in any markdown renderer; the id joins to `blocks[].id` and can be used as an in-page link target). Image hydration for picture/figure blocks happens client-side. `null` if parsing failed."},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text","description":"`markdown` with `<img>` tags removed and runs of blank lines collapsed. Block anchors are deliberately kept, so on a document whose pictures are markdown images rather than `<img>` tags this is `markdown` verbatim — read one or the other, not both. `null` if `markdown` is null."},"layout_confidence":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Layout Confidence","description":"Document-level layout confidence, a whole number from 0 to 100: the char-weighted mean across all blocks. `null` if no annotated sections."},"parse_confidence":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Parse Confidence","description":"Document-level parse confidence, a whole number from 0 to 100: the char-weighted mean of per-block LLM logprob scores. `null` when no blocks have logprob-based confidence."},"blocks":{"items":{"$ref":"#/components/schemas/Block"},"type":"array","title":"Blocks","description":"Structured per-block representation of the parsed document. One entry per `<a id></a>` anchor in document order, with type-specific structured data (`rows` for tables, `image_base64` for pictures) surfaced as first-class fields so consumers don't have to HTML-parse."},"format":{"type":"string","const":"markdown","title":"Format","description":"`markdown`: the parse as `markdown`. Ask `?parse_format=blocks` for pages of blocks instead.","default":"markdown"}},"type":"object","required":["markdown"],"title":"ParseMarkdownResultV3","description":"The parse as the anchored markdown, beside its blocks: `parse_format=markdown`, the default."},"ParsePage":{"properties":{"page":{"type":"integer","title":"Page","description":"1-indexed page number, counted across the packet's files in packet order."},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id","description":"The file this page belongs to."},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Name","description":"The name of that file, as `files[].name` of the packet."},"file_page":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Page","description":"1-indexed page of that file."},"blocks":{"items":{"$ref":"#/components/schemas/Block"},"type":"array","title":"Blocks","description":"The page's blocks in reading order, each with its `content`."}},"type":"object","required":["page","blocks"],"title":"ParsePage","description":"One page of a parse as its blocks, in reading order."},"PresignedPostV3":{"properties":{"url":{"type":"string","title":"Url","description":"Endpoint to POST the multipart form to."},"fields":{"additionalProperties":{"type":"string"},"type":"object","title":"Fields","description":"Form fields to send verbatim, before the file part. Do not edit them."},"expires_at":{"type":"string","format":"date-time","title":"Expires At","description":"After this the slot is dead; ask for another."}},"type":"object","required":["url","fields","expires_at"],"title":"PresignedPostV3","description":"Where to send the bytes: POST `fields` plus the file as multipart to `url`."},"PublicCodeNode":{"properties":{"id":{"type":"string","minLength":1,"title":"Id","description":"Stable identifier for this node within the graph."},"type":{"type":"string","const":"code","title":"Type"},"code":{"type":"string","minLength":1,"title":"Code","description":"Beta. Python source defining `def transform(input_data: Input) -> Output`. `Input` and `Output` are pydantic models the sandbox provides; the function runs without network access. At most 65536 bytes. Its shape may change without a version."},"output_schema":{"$ref":"#/components/schemas/ExtractionSchema","description":"Beta. The fields of `Output`, in the extraction-schema format. Required."}},"additionalProperties":false,"type":"object","required":["id","type","code","output_schema"],"title":"PublicCodeNode","description":"Beta. Terminal function node. The deprecated `instructions` and `template` are refused."},"PublicEditNode":{"properties":{"id":{"type":"string","minLength":1,"title":"Id","description":"Stable identifier for this node within the graph."},"type":{"type":"string","const":"edit","title":"Type"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions","description":"Free-text values to map onto the fillable fields detected on the upstream parse's PDF, e.g. 'Name: ACME SL; Date: 2026-01-01; I accept the terms: yes'. Takes precedence over a reference document where both address the same field."},"reference_document_ids":{"items":{"type":"string"},"type":"array","title":"Reference Document Ids","description":"Ids of reference documents this node fills from, uploaded to the workflow beforehand. Every id must belong to this workflow and be fully resolved, or the run is refused rather than filled from a partial reference."},"font":{"type":"string","enum":["sans","serif","mono"],"title":"Font","description":"Typeface the filled values are written in.","default":"sans"},"output_mode":{"type":"string","enum":["flattened","editable"],"title":"Output Mode","description":"'flattened' paints the values on and the PDF is final. 'editable' leaves each value in a live form field a reviewer can correct in any PDF viewer.","default":"flattened"}},"additionalProperties":false,"type":"object","required":["id","type"],"title":"PublicEditNode","description":"Terminal form-filler. ``reference_uris`` is resolved server-side at run\ntime from ``reference_document_ids`` — omitted here, and any client-supplied\nvalue is discarded rather than trusted."},"PublicExtractNode":{"properties":{"id":{"type":"string","minLength":1,"title":"Id","description":"Stable identifier for this node within the graph."},"type":{"type":"string","const":"extract","title":"Type"},"mode":{"type":"string","enum":["standard","agentic","lite"],"title":"Mode","description":"Extraction tier. 'standard' (default): single-pass extraction — the best balance for simple documents and layouts. 'agentic': multi-step extraction that maps every table to the schema and reasons across sections — for dense or cross-page tables; extra cost per page. 'lite' (shown as 'Fast' in the app): standard extraction, faster and cheaper; quality may vary on complex layouts.","default":"standard"},"extraction_schema":{"$ref":"#/components/schemas/ExtractionSchema","description":"Schema for the fields this node extracts. Required."},"confidence":{"type":"boolean","title":"Confidence","description":"Score how reliable each extracted field is. When false, the node runs no confidence scoring and every field confidence is null. A confidence check that reads an extract scoring no confidence is refused at save.","default":true},"lookup_file_ids":{"items":{"type":"string"},"type":"array","title":"Lookup File Ids","description":"Ids of the workflow's smart-lookup reference files this node looks values up in. Read it back from GET and echo it to keep the files; write lookup_file_uploads to add one."},"lookup_suggestion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lookup Suggestion","description":"Free-form hint shown to the smart-lookup matcher."},"lookup_reasoning_effort":{"anyOf":[{"type":"string","enum":["minimal","low","medium","high"]},{"type":"null"}],"title":"Lookup Reasoning Effort","description":"Reasoning effort for the smart-lookup matcher (gpt-5 family): minimal | low | medium | high. None = model default. Higher effort improves match reliability on noisy join keys at higher latency/cost."},"lookup_file_uploads":{"items":{"$ref":"#/components/schemas/LookupFileUpload"},"type":"array","title":"Lookup File Uploads","description":"Inline lookup-file content for the typed create call. Each entry is uploaded and its new id is appended to ``lookup_file_ids``; this field is create-input only."},"use_images":{"type":"boolean","title":"Use Images","description":"Retired — accepted for compatibility, ignored. Extraction reads the parsed text only.","default":false}},"additionalProperties":false,"type":"object","required":["id","type","extraction_schema"],"title":"PublicExtractNode"},"PublicIfElseNode":{"properties":{"id":{"type":"string","minLength":1,"title":"Id","description":"Stable identifier for this node within the graph."},"type":{"type":"string","const":"if_else","title":"Type"},"condition":{"oneOf":[{"$ref":"#/components/schemas/RangeCheck"},{"$ref":"#/components/schemas/DateCheck"},{"$ref":"#/components/schemas/ArithmeticCheck"},{"$ref":"#/components/schemas/ComparisonCheck"},{"$ref":"#/components/schemas/OneOfCheck"},{"$ref":"#/components/schemas/RegexCheck"},{"$ref":"#/components/schemas/RequiredCheck"},{"$ref":"#/components/schemas/ConfidenceCheck"},{"$ref":"#/components/schemas/ExpressionCheck"},{"$ref":"#/components/schemas/ValidationCheck"},{"$ref":"#/components/schemas/AllOfCheck"},{"$ref":"#/components/schemas/AnyOfCheck"}],"title":"Condition","discriminator":{"propertyName":"type","mapping":{"all_of":"#/components/schemas/AllOfCheck","any_of":"#/components/schemas/AnyOfCheck","arithmetic":"#/components/schemas/ArithmeticCheck","comparison":"#/components/schemas/ComparisonCheck","confidence":"#/components/schemas/ConfidenceCheck","date":"#/components/schemas/DateCheck","expression":"#/components/schemas/ExpressionCheck","one_of":"#/components/schemas/OneOfCheck","range":"#/components/schemas/RangeCheck","regex":"#/components/schemas/RegexCheck","required":"#/components/schemas/RequiredCheck","validation":"#/components/schemas/ValidationCheck"}}}},"additionalProperties":false,"type":"object","required":["id","type","condition"],"title":"PublicIfElseNode"},"PublicInputNode":{"properties":{"id":{"type":"string","minLength":1,"title":"Id","description":"Stable identifier for this node within the graph."},"type":{"type":"string","const":"input","title":"Type"},"extraction_schema":{"$ref":"#/components/schemas/ExtractionSchema","description":"The fields a caller supplies. A field takes the value of the `metadata` key equal to the key its value is returned under. Required."}},"additionalProperties":false,"type":"object","required":["id","type","extraction_schema"],"title":"PublicInputNode","description":"The values a caller sends with a run, as the graph's entry in place of a parse node."},"PublicParseNode":{"properties":{"id":{"type":"string","minLength":1,"title":"Id","description":"Stable identifier for this node within the graph."},"type":{"type":"string","const":"parse","title":"Type"},"mode":{"type":"string","enum":["standard","agentic","lite","flash"],"title":"Mode","description":"Parse tier. 'standard' (default): page-by-page parsing with reading-order correction — the best quality/speed balance for most documents and tables. 'agentic': adaptive parsing that works hardest on dense tables (50+ rows, many columns) — highest fidelity on complex documents; extra cost per page. 'lite' (shown as 'Fast' in the app): OCR-only tier — accurate OCR, no LLM call; use standard or agentic when the output needs LLM correction. 'flash': the PDF's own text layer plus layout grounding, no model call — the cheapest and fastest tier; a page with no text layer is OCR'd by default (see scanned_pages).","default":"standard"},"prompt_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt Hint","description":"Free-form hint that biases the parse output. Standard and agentic modes only; ignored in lite."},"figure_enhancement":{"type":"boolean","title":"Figure Enhancement","description":"Standard mode: extract structured data from charts and images — extra processing per figure. Ignored in agentic and in lite.","default":false},"annotation_reading":{"type":"boolean","title":"Annotation Reading","description":"Standard mode, experimental: re-read handwritten numbers inside larger blocks on their own high-resolution crop, and mark handwriting in the markdown as <handwritten>. Ignored in agentic, lite and flash.","default":false},"cache":{"type":"boolean","title":"Cache","description":"Reuse parsed output when the same file was already parsed with the same mode and settings — a hit skips the whole parse. Disable to force a fresh parse.","default":true},"confidence":{"type":"boolean","title":"Confidence","description":"Score how reliable each parsed block is. When false, the node runs no confidence scoring and every confidence it returns is null.","default":true},"effort":{"type":"string","enum":["low","mid","accurate"],"title":"Effort","description":"Agentic mode: quality/cost preset. 'low' = several times cheaper but more errors on dense or low-contrast tables, 'mid' (default) = balanced, 'accurate' = highest fidelity. (Distinct from lite `ocr_effort`.)","default":"mid"},"ocr_effort":{"type":"string","enum":["medium","high"],"title":"Ocr Effort","description":"Lite mode: 'high' (default) = the strongest OCR — best accuracy on complex layouts, tables, and handwriting. 'medium' = faster and cheaper, for clean digital documents. (Distinct from agentic `effort`.)","default":"high"},"scanned_pages":{"type":"string","enum":["ocr","skip","fail"],"title":"Scanned Pages","description":"Flash mode: what to do with a page whose text layer produced no words. 'ocr' (default): OCR the page and parse it like any other, at no extra model cost. 'skip': serve it blank and flag it, don't fail the parse. 'fail': raise, naming the page numbers.","default":"ocr"}},"additionalProperties":false,"type":"object","required":["id","type"],"title":"PublicParseNode"},"PublicReportGeneratorNode":{"properties":{"id":{"type":"string","minLength":1,"title":"Id","description":"Stable identifier for this node within the graph."},"type":{"type":"string","const":"report_generator","title":"Type"},"instructions":{"type":"string","title":"Instructions","description":"Additional instructions for filling the Markdown template.","default":""},"example_report":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Example Report","description":"Markdown template to fill with extracted data. Capped at 65536 bytes."},"template_file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template File Id","description":"Id of a Word (.docx) template uploaded to this workflow. When set, the report is that document with its placeholders filled, no model runs, and `example_report` and `instructions` are unused."}},"additionalProperties":false,"type":"object","required":["id","type"],"title":"PublicReportGeneratorNode","description":"A report over the fields of the node that feeds it: a Markdown template a model fills, or a Word one filled as written."},"PublicSlackAlertNode":{"properties":{"id":{"type":"string","minLength":1,"title":"Id","description":"Stable identifier for this node within the graph."},"type":{"type":"string","const":"slack_alert","title":"Type"},"channel_id":{"type":"string","minLength":1,"title":"Channel Id"},"channel_name":{"type":"string","minLength":1,"title":"Channel Name"},"message_template":{"type":"string","minLength":1,"title":"Message Template"},"severity":{"type":"string","enum":["info","warning","critical"],"title":"Severity","default":"info"}},"additionalProperties":false,"type":"object","required":["id","type","channel_id","channel_name","message_template"],"title":"PublicSlackAlertNode","description":"Terminal alert-sink. ``field_index`` is executor-injected — omitted here."},"PublicValidateNode":{"properties":{"id":{"type":"string","minLength":1,"title":"Id","description":"Stable identifier for this node within the graph."},"type":{"type":"string","const":"validate","title":"Type"},"rules":{"items":{"$ref":"#/components/schemas/ValidationRule"},"type":"array","minItems":1,"title":"Rules"}},"additionalProperties":false,"type":"object","required":["id","type","rules"],"title":"PublicValidateNode"},"RangeCheck":{"properties":{"type":{"type":"string","const":"range","title":"Type"},"field":{"type":"string","minLength":1,"title":"Field","description":"The bounded numeric field. Either the field's ``persistent_id`` (Studio field-picker path) or its ``sanitized_name`` as it appears in the extraction response (SDK/API/assistant path) — the executor resolves both."},"min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min"},"max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max"}},"additionalProperties":false,"type":"object","required":["type","field"],"title":"RangeCheck"},"RegexCheck":{"properties":{"type":{"type":"string","const":"regex","title":"Type"},"field":{"type":"string","minLength":1,"title":"Field","description":"The field to match. Either the field's ``persistent_id`` (Studio field-picker path) or its ``sanitized_name`` as it appears in the extraction response (SDK/API/assistant path) — the executor resolves both."},"pattern":{"type":"string","minLength":1,"title":"Pattern","description":"Evaluated with google-re2 (linear time); never stdlib re."}},"additionalProperties":false,"type":"object","required":["type","field","pattern"],"title":"RegexCheck"},"Report":{"properties":{"node_id":{"type":"string","title":"Node Id","description":"The `id` of the `report_generator` node in the workflow graph."},"split_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Split Id","description":"The split this report was filled for. `null` when the node ran outside any split."},"status":{"type":"string","enum":["pending","succeeded","failed"],"title":"Status","description":"`pending` while the report is being generated, then `succeeded` or `failed`."},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Download Url","description":"Presigned link to the Markdown report, valid for 15 minutes from the moment this response was built. Re-read the results endpoint for a fresh link. `null` when no report was stored. After a regeneration, `pending` and `failed` keep the link to the last succeeded report."}},"type":"object","required":["node_id","status"],"title":"Report","description":"One report node's Markdown report for this run, one entry per split the node ran for."},"ReportTemplateV3":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier of the template (hyphenated UUID). This is the value to put in a report node's `template_file_id`.","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4e2"]},"name":{"type":"string","title":"Name","description":"Filename the template was uploaded under.","examples":["safety-plan.docx"]},"size_bytes":{"type":"integer","title":"Size Bytes","description":"Size of the document in bytes.","examples":[48213]},"placeholders":{"items":{"type":"string"},"type":"array","title":"Placeholders","description":"The field keys the template reads, sorted. A run is refused while one of them is not a field of the node that feeds the report.","examples":[["crew","sections","site_name"]]}},"type":"object","required":["id","name","size_bytes","placeholders"],"title":"ReportTemplateV3"},"RequiredCheck":{"properties":{"type":{"type":"string","const":"required","title":"Type"},"field":{"type":"string","minLength":1,"title":"Field","description":"The field that must be present. Either the field's ``persistent_id`` (Studio field-picker path) or its ``sanitized_name`` as it appears in the extraction response (SDK/API/assistant path) — the executor resolves both."}},"additionalProperties":false,"type":"object","required":["type","field"],"title":"RequiredCheck"},"ResultsResponseV3":{"properties":{"document_packet_id":{"type":"string","title":"Document Packet Id","description":"The document packet's UUID — v3 canonical name for `collection_id`. Same value; both fields are always present.","default":""},"verification_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verification Url","description":"Link to the AnyFormat dashboard for human review of this collection's results. `null` if the dashboard URL cannot be constructed (e.g. no files in the collection, or the deployment has no frontend URL configured)."},"parse":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/ParseMarkdownResultV3"},{"$ref":"#/components/schemas/ParseBlocksResultV3"}]},{"type":"null"}],"title":"Parse","description":"Parse-node output, in the form `parse_format` asked for; `format` says which. `null` when the workflow has no parse node, and with `parse_format=none`."},"classifications":{"items":{"$ref":"#/components/schemas/ClassificationResult"},"type":"array","title":"Classifications","description":"Per-classifier-node verdicts, in the order the run reached them. Empty when the workflow has no classifier."},"splits":{"items":{"$ref":"#/components/schemas/SplitResult"},"type":"array","title":"Splits","description":"Splitter output: category-level geometry with optional partitions. Empty when the workflow has no splitter."},"extractions":{"items":{"$ref":"#/components/schemas/Extraction"},"type":"array","title":"Extractions","description":"Flat list of extraction datapoints. Linear workflows produce one entry with `split_name=null` and `partition=null`. Split workflows produce one entry per (split, partition). Empty when no extraction has run yet."},"edits":{"items":{"$ref":"#/components/schemas/Edit"},"type":"array","title":"Edits","description":"Filled-form output, one entry per file an edit node processed. Empty when the workflow has no edit node."},"reports":{"items":{"$ref":"#/components/schemas/Report"},"type":"array","title":"Reports","description":"Markdown reports of this run, one entry per split a `report_generator` node ran for. Empty when the workflow has no report node."},"code_outputs":{"items":{"$ref":"#/components/schemas/CodeOutput"},"type":"array","title":"Code Outputs","description":"Beta. Output of this run's function-mode `code` nodes, one entry per split a node ran for. Empty when the workflow has no such node."},"extraction":{"anyOf":[{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/ExtractedField"},{"items":{"additionalProperties":{"$ref":"#/components/schemas/ExtractedField"},"type":"object"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Extraction","description":"**Deprecated** — use `extractions` instead. Extracted fields keyed by field name, populated only for linear workflows (single extract node, no splitter). `null` for split workflows; read `extractions[]` instead.","deprecated":true},"usage":{"anyOf":[{"$ref":"#/components/schemas/Usage"},{"type":"null"}],"description":"What the run cost. Absent while the run has no charge recorded."}},"type":"object","required":["document_packet_id"],"title":"ResultsResponseV3","description":"v3-scoped results envelope — same shape as ``ResultsResponse`` minus the\nlegacy ``collection_id`` alias. v3 emits only ``document_packet_id``."},"RowRequest":{"properties":{"sanitized_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sanitized Name","description":"The table's key in `results.extractions[].fields`. Name the table by this or by `persistent_id`, not both.","examples":["holdings"]},"persistent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persistent Id","description":"The table's own `persistent_id`, not a column's. Name the table by this or by `sanitized_name`, not both.","examples":["0686bb978c3070f0800097669e00aaaa"]},"index":{"type":"integer","minimum":0.0,"title":"Index","description":"A position in the table, from 0. `add_row` accepts 0 up to the number of rows, and a larger one is refused with `400`. `delete_row` needs a row at that position.","examples":[2]}},"additionalProperties":false,"type":"object","required":["index"],"title":"RowRequest","description":"Body for `POST /v3/extractions/{extraction_id}/rows/add/` and `.../rows/delete/`."},"RunDetailV3":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier of the run (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4f9"]},"workflow_id":{"type":"string","title":"Workflow Id","description":"The workflow this run executed (hyphenated UUID).","examples":["0686bb97-8c30-70f0-8000-97669e000eb8"]},"workflow_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Version Id","description":"The version of the workflow that produced the run: a `version_id` from `GET /v3/workflows/{workflow_id}/versions/`. The key is absent when the version is not known.","examples":["FGaV4I2JAA"]},"document_packet_id":{"type":"string","title":"Document Packet Id","description":"The document packet the run executed on (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4e1"]},"status":{"$ref":"#/components/schemas/RunStatus","description":"Execution status. Non-terminal: `queued`, `in_progress`. Terminal: `processed` (success), `error`, `cancelled`.","examples":["processed"]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Timestamp when the run was triggered (ISO 8601)."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Timestamp of the run's last status change (ISO 8601)."},"results":{"anyOf":[{"$ref":"#/components/schemas/ResultsResponseV3"},{"type":"null"}],"description":"Extraction results envelope; `null` until `status` is `processed`, and while the results are served as `results_url`."},"results_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Results Url","description":"Presigned URL to the results envelope's JSON, valid for 15 minutes, when the results are not inline: above 6 MB, or with `?delivery=url`. `results` is then `null`. The key is absent when `results` is inline."}},"type":"object","required":["id","workflow_id","document_packet_id","status"],"title":"RunDetailV3","description":"Flat single-run read: lifecycle status plus results, inline or by URL."},"RunListPageV3":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RunSummaryV3"},"type":"array","title":"Items","description":"Runs on this page, newest first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Opaque token to fetch the next page; pass it back as `?cursor=`. `null` on the last page."}},"type":"object","required":["items"],"title":"RunListPageV3","description":"One keyset page of runs.\n\nFixed ``(-created_at, -id)`` order. No totals or page numbers —\niterate by following ``next_cursor`` until it is null."},"RunPacketRequestV3":{"properties":{"workflow_version_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Workflow Version Id","description":"A `version_id` from `GET /v3/workflows/{workflow_id}/versions/`. Runs the packet on that version instead of the latest one. A version of another workflow answers `404`.","examples":["FGaV4I2JAA"]}},"additionalProperties":false,"type":"object","title":"RunPacketRequestV3","description":"Optional body of `POST /v3/document-packets/{document_packet_id}/run/`."},"RunStatus":{"type":"string","enum":["queued","in_progress","processed","error","cancelled"],"title":"RunStatus","description":"Execution lifecycle of a run. Non-terminal: ``queued``,\n``in_progress``. Terminal: ``processed`` (success), ``error``,\n``cancelled``."},"RunSummaryV3":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier of the run (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4f9"]},"document_packet_id":{"type":"string","title":"Document Packet Id","description":"The document packet the run executes on (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4e1"]},"status":{"$ref":"#/components/schemas/RunStatus","description":"Execution status. Non-terminal: `queued`, `in_progress`. Terminal: `processed` (success), `error`, `cancelled`.","examples":["processed"]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Timestamp when the run was triggered (ISO 8601)."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Timestamp of the run's last status change (ISO 8601)."},"usage":{"anyOf":[{"$ref":"#/components/schemas/Usage"},{"type":"null"}],"description":"What the run cost, as `results.usage` on `GET /v3/runs/{run_id}/` gives it. Absent while the run has no charge recorded."}},"type":"object","required":["id","document_packet_id","status"],"title":"RunSummaryV3","description":"Slim run projection returned by list pages."},"RunTriggeredV3":{"properties":{"run_id":{"type":"string","title":"Run Id","description":"Unique identifier of the new run (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4f9"]},"document_packet_id":{"type":"string","title":"Document Packet Id","description":"The document packet the run executes on (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4e1"]},"workflow_id":{"type":"string","title":"Workflow Id","description":"The workflow being run (hyphenated UUID).","examples":["0686bb97-8c30-70f0-8000-97669e000eb8"]},"status":{"$ref":"#/components/schemas/RunStatus","description":"Status at acceptance time — normally `queued`.","examples":["queued"]}},"type":"object","required":["run_id","document_packet_id","workflow_id","status"],"title":"RunTriggeredV3","description":"202 response for the parse triggers (`parse/` and `parse/from-url/`).\n\nThe workflow run triggers use `WorkflowRunTriggeredV3`."},"SplitPartition":{"properties":{"id":{"type":"string","title":"Id","description":"The partition's UUID. Pass it to `GET /v3/splits/{split_id}/pdf/` to download these pages as a PDF."},"name":{"type":"string","title":"Name","description":"The partition value (free-form string)."},"files":{"items":{"$ref":"#/components/schemas/FilePages"},"type":"array","title":"Files"},"confidence":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Confidence","description":"The minimum confidence across the partition's ranges, a whole number from 0 to 100. `null` when the partition holds no page, because nothing was measured."}},"type":"object","required":["id","name","files","confidence"],"title":"SplitPartition","description":"A partition value within a split (e.g. `1234-5678` under `Account Holdings`)."},"SplitResult":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"The split's UUID, for `GET /v3/splits/{split_id}/pdf/`. `null` when the splitter partitions this category, because the category is then several sub-documents and no single one of them: download each `partitions[].id` instead."},"name":{"type":"string","title":"Name","description":"The split's category name."},"files":{"items":{"$ref":"#/components/schemas/FilePages"},"type":"array","title":"Files","description":"Per-file page lists, union of all partitions."},"confidence":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Confidence","description":"Aggregate confidence, a whole number from 0 to 100 (min across partitions). `null` when the category matched no page, because nothing was measured."},"partitions":{"items":{"$ref":"#/components/schemas/SplitPartition"},"type":"array","title":"Partitions"}},"type":"object","required":["name","files","confidence"],"title":"SplitResult","description":"A category-level split: which pages of which files fall under it, plus\nany partitions inside it. Extraction data lives under `extractions[]` —\njoin by `split_id`."},"SplitterNode":{"properties":{"id":{"type":"string","minLength":1,"title":"Id","description":"Stable identifier for this node within the graph."},"type":{"type":"string","const":"splitter","title":"Type"},"rules":{"items":{"$ref":"#/components/schemas/SplitterRule"},"type":"array","minItems":1,"title":"Rules"}},"additionalProperties":false,"type":"object","required":["id","type","rules"],"title":"SplitterNode"},"SplitterRule":{"properties":{"id":{"type":"string","minLength":1,"title":"Id"},"name":{"type":"string","minLength":1,"title":"Name"},"description":{"type":"string","minLength":1,"title":"Description"},"partition_key":{"type":"string","title":"Partition Key","description":"Field that further partitions this category into separate sub-documents (e.g. invoice_number): each distinct value becomes its own split, extracted independently. Empty = routing-only, the whole category flows on as one document.","default":""}},"additionalProperties":false,"type":"object","required":["id","name","description"],"title":"SplitterRule"},"StagedFileRef":{"properties":{"object_id":{"type":"string","minLength":1,"title":"Object Id","description":"`object_id` from the staging response, uploaded already.","examples":["06a953d9792572568000f838b051ca9b"]},"filename":{"type":"string","maxLength":255,"minLength":1,"title":"Filename","description":"Name the file lands under in the workflow.","examples":["april.pdf"]}},"type":"object","required":["object_id","filename"],"title":"StagedFileRef","description":"One file staged via ``POST /v3/blobs/slots/``, referenced by id.\n\nThe id replaces the staged file's kilobytes-long presigned ``read_url``;\nthe server resolves it back to the bytes. ``filename`` is required because\na staged blob carries no name of its own."},"StringField":{"properties":{"persistent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persistent Id","description":"Server-assigned stable field identity (UUID), emitted by GET /definition/. Echo it back on updates — including across renames — to keep quality metrics, ground-truth links and analytics attached to the field. Matching is scoped to the field's nesting level in the immediately-prior version; an id that matches nothing at its level, appears on more than one field, or is sent at workflow creation is rejected with 400. Omit only for genuinely new fields: there is no matching by name, so a field sent without one is always treated as new and minted a fresh id, silently detaching that field's metrics, ground truth and analytics."},"name":{"type":"string","minLength":1,"title":"Name","description":"Field name. Used as the key in the extraction response."},"description":{"type":"string","title":"Description","description":"Free-form description shown to the extraction model.","default":""},"source":{"type":"string","enum":["extraction","smart_lookup","lookup_if_missing"],"title":"Source","description":"How the field gets its value: extraction (from the document), smart_lookup (from the lookup file, always overwrites) or lookup_if_missing (extracted too; the lookup only fills it where extraction left no value).","default":"extraction"},"data_type":{"type":"string","const":"string","title":"Data Type"}},"additionalProperties":false,"type":"object","required":["name","data_type"],"title":"StringField"},"Usage":{"properties":{"pages":{"type":"integer","title":"Pages","description":"The pages the run billed, summed over its charges."},"credits":{"type":"integer","title":"Credits","description":"The credits the run spent, summed over its charges."}},"type":"object","required":["pages","credits"],"title":"Usage","description":"What a run cost, as the usage page shows it."},"Validation":{"properties":{"rule_id":{"type":"string","title":"Rule Id","description":"The configured rule ID."},"description":{"type":"string","title":"Description","description":"The rule's natural-language description; empty for a deterministic rule.","default":""},"severity":{"type":"string","title":"Severity","description":"`error` or `warning`, as declared on the rule."},"status":{"type":"string","title":"Status","description":"`pass`, `fail`, or `inconclusive` — the last one when the rule could not be evaluated (no data, an unanswerable expression)."},"detail":{"type":"string","title":"Detail","description":"Human-readable explanation of the verdict.","default":""},"compared_values":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Compared Values","description":"The field values the rule looked at, keyed by field name. `null` when nothing was compared."},"source_fields":{"items":{"type":"string"},"type":"array","title":"Source Fields","description":"`persistent_id`s of the rule's inputs. Empty for automatic extraction warnings; field names are in `compared_values`."}},"type":"object","required":["rule_id","severity","status"],"title":"Validation","description":"A configured rule verdict."},"ValidationCheck":{"properties":{"type":{"type":"string","const":"validation","title":"Type"},"rule_id":{"type":"string","minLength":1,"title":"Rule Id","description":"Stable id of the upstream ValidationRule to route on."},"status":{"type":"string","enum":["fail","pass","inconclusive"],"title":"Status","description":"Outcome to match. ``fail`` (default) is the common case for routing to an alert branch.","default":"fail"}},"additionalProperties":false,"type":"object","required":["type","rule_id"],"title":"ValidationCheck","description":"Routes on the outcome of a named validation rule already run upstream.\n\nReads from ``state.validation_results`` (populated by an upstream\n``ValidateNode``), filtered to the current partition (``split_id``) so\nper-partition IfElse routing matches per-partition rule outcomes. The\n``status`` values mirror the worker enum\n(``anyformat_core.operations.validate_rules`` — ``pass`` / ``fail`` /\n``inconclusive``) verbatim: no translation layer, so template tokens\nlike ``${validation.<rule_id>.status}`` render the same three strings\nthe enum uses.\n\nUnlike every other ``Check`` variant this consumes no extracted fields\n(``field_ids`` returns ``[]``); the rule identity is the entire input.\nA ``rule_id`` with no matching entry evaluates to ``inconclusive`` — the\nrule didn't run for this partition, so the outcome is unknown."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"ValidationRule":{"properties":{"id":{"type":"string","minLength":1,"title":"Id","description":"Stable rule id; round-trips through validation results."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Optional human-readable rule name. Round-trips through the config endpoint so renames are preserved."},"kind":{"type":"string","enum":["ai","deterministic"],"title":"Kind","description":"'deterministic' = a structured check run in code — instant, free, reproducible; 'ai' = a model judges the rule description against the extraction. Prefer deterministic whenever the condition is exact and testable.","default":"ai"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Natural-language description sent to the LLM. Required when kind == 'ai'."},"check":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/RangeCheck"},{"$ref":"#/components/schemas/DateCheck"},{"$ref":"#/components/schemas/ArithmeticCheck"},{"$ref":"#/components/schemas/ComparisonCheck"},{"$ref":"#/components/schemas/OneOfCheck"},{"$ref":"#/components/schemas/RegexCheck"},{"$ref":"#/components/schemas/RequiredCheck"},{"$ref":"#/components/schemas/ConfidenceCheck"},{"$ref":"#/components/schemas/ExpressionCheck"},{"$ref":"#/components/schemas/ValidationCheck"},{"$ref":"#/components/schemas/AllOfCheck"},{"$ref":"#/components/schemas/AnyOfCheck"}],"discriminator":{"propertyName":"type","mapping":{"all_of":"#/components/schemas/AllOfCheck","any_of":"#/components/schemas/AnyOfCheck","arithmetic":"#/components/schemas/ArithmeticCheck","comparison":"#/components/schemas/ComparisonCheck","confidence":"#/components/schemas/ConfidenceCheck","date":"#/components/schemas/DateCheck","expression":"#/components/schemas/ExpressionCheck","one_of":"#/components/schemas/OneOfCheck","range":"#/components/schemas/RangeCheck","regex":"#/components/schemas/RegexCheck","required":"#/components/schemas/RequiredCheck","validation":"#/components/schemas/ValidationCheck"}}},{"type":"null"}],"title":"Check","description":"Structured deterministic check. Required when kind == 'deterministic'."},"severity":{"type":"string","enum":["error","warning"],"title":"Severity","description":"How a failed rule is labelled in results. Display-level only — it never blocks the run.","default":"error"},"source_fields":{"items":{"type":"string"},"type":"array","title":"Source Fields","description":"Persistent ids of fields this rule references."}},"additionalProperties":false,"type":"object","required":["id"],"title":"ValidationRule"},"WebhookCreateRequestV3":{"properties":{"url":{"type":"string","maxLength":2048,"pattern":"^https://","title":"Url","description":"The HTTPS endpoint that receives the events. It must resolve to a public address.","examples":["https://example.com/webhooks/anyformat"]},"events":{"items":{"type":"string","enum":["run.completed","run.failed","run.cancelled","run.validated"]},"type":"array","minItems":1,"title":"Events","description":"Event types the endpoint receives. `run.completed`: a run ended `processed`. `run.failed`: a run ended `error`. `run.cancelled`: a run ended `cancelled`. `run.validated`: a review left every value of a run verified, the first time it did.","examples":[["run.completed","run.failed"]]}},"type":"object","required":["url","events"],"title":"WebhookCreateRequestV3"},"WebhookCreatedV3":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier of the webhook (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4e3"]},"url":{"type":"string","title":"Url","description":"The endpoint that receives the events.","examples":["https://example.com/webhooks/anyformat"]},"events":{"items":{"type":"string","enum":["run.completed","run.failed","run.cancelled","run.validated"]},"type":"array","title":"Events","description":"Event types the endpoint receives. `run.completed`: a run ended `processed`. `run.failed`: a run ended `error`. `run.cancelled`: a run ended `cancelled`. `run.validated`: a review left every value of a run verified, the first time it did.","examples":[["run.completed","run.failed"]]},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Timestamp when the webhook was created (ISO 8601)."},"secret":{"type":"string","title":"Secret","description":"The signing secret, `whsec_` and base64. Verify each delivery's `webhook-signature` with it. **Only this response carries it: store it securely.**","examples":["whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw"]}},"type":"object","required":["id","url","events","created_at","secret"],"title":"WebhookCreatedV3"},"WebhookListPageV3":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WebhookV3"},"type":"array","title":"Items","description":"The organization's webhooks, oldest first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Opaque token to fetch the next page. `null` on the last page."}},"type":"object","required":["items"],"title":"WebhookListPageV3"},"WebhookPingV3":{"properties":{"delivered":{"type":"boolean","title":"Delivered","description":"Whether the endpoint answered with a `2xx` status."},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code","description":"The HTTP status the endpoint answered with. `null` when it did not answer.","examples":[200]}},"type":"object","required":["delivered"],"title":"WebhookPingV3"},"WebhookV3":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier of the webhook (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4e3"]},"url":{"type":"string","title":"Url","description":"The endpoint that receives the events.","examples":["https://example.com/webhooks/anyformat"]},"events":{"items":{"type":"string","enum":["run.completed","run.failed","run.cancelled","run.validated"]},"type":"array","title":"Events","description":"Event types the endpoint receives. `run.completed`: a run ended `processed`. `run.failed`: a run ended `error`. `run.cancelled`: a run ended `cancelled`. `run.validated`: a review left every value of a run verified, the first time it did.","examples":[["run.completed","run.failed"]]},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Timestamp when the webhook was created (ISO 8601)."}},"type":"object","required":["id","url","events","created_at"],"title":"WebhookV3"},"WorkflowCreateRequest":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","examples":["Invoice or receipt"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","default":""},"nodes":{"items":{"oneOf":[{"$ref":"#/components/schemas/PublicParseNode"},{"$ref":"#/components/schemas/ClassifyNode"},{"$ref":"#/components/schemas/SplitterNode"},{"$ref":"#/components/schemas/PublicExtractNode"},{"$ref":"#/components/schemas/PublicValidateNode"},{"$ref":"#/components/schemas/PublicIfElseNode"},{"$ref":"#/components/schemas/PublicSlackAlertNode"},{"$ref":"#/components/schemas/PublicEditNode"},{"$ref":"#/components/schemas/PublicCodeNode"},{"$ref":"#/components/schemas/PublicReportGeneratorNode"},{"$ref":"#/components/schemas/PublicInputNode"},{"$ref":"#/components/schemas/KnowledgeNode"}],"discriminator":{"propertyName":"type","mapping":{"classify":"#/components/schemas/ClassifyNode","code":"#/components/schemas/PublicCodeNode","edit":"#/components/schemas/PublicEditNode","extract":"#/components/schemas/PublicExtractNode","if_else":"#/components/schemas/PublicIfElseNode","input":"#/components/schemas/PublicInputNode","knowledge":"#/components/schemas/KnowledgeNode","parse":"#/components/schemas/PublicParseNode","report_generator":"#/components/schemas/PublicReportGeneratorNode","slack_alert":"#/components/schemas/PublicSlackAlertNode","splitter":"#/components/schemas/SplitterNode","validate":"#/components/schemas/PublicValidateNode"}}},"type":"array","minItems":1,"title":"Nodes"},"edges":{"items":{"$ref":"#/components/schemas/Edge"},"type":"array","title":"Edges"}},"additionalProperties":false,"type":"object","required":["name","nodes"],"title":"WorkflowCreateRequest","description":"Public-surface workflow create body — typed graph of parse / classify / splitter / extract / validate nodes.\n\nA ``validate`` node carries ``rules``; each rule is either AI-evaluated\n(``kind=\"ai\"`` + a natural-language ``description``) or deterministic\n(``kind=\"deterministic\"`` + a structured ``check``, evaluated in pure\nPython with no model call).\n\nUses ``PublicNode`` (public request models with only the fields callers\nmay set); the domain ``AnyNode`` also carries ``filter`` (worker-only)\nand executor-injected / staff-only fields, so the public bodies pin a\nstricter node schema. Call :meth:`to_domain` before forwarding to the\nbackend.","examples":[{"description":"Pull the invoice number and total from each document.","edges":[{"source":"parse","target":"extract"}],"name":"Invoice totals","nodes":[{"id":"parse","mode":"standard","type":"parse"},{"extraction_schema":{"fields":[{"data_type":"string","description":"Invoice number as printed on the document.","name":"invoice_number"},{"data_type":"float","description":"Invoice total in the document's currency.","name":"total_amount"}]},"id":"extract","mode":"standard","type":"extract"}]}]},"WorkflowDetailV3":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier of the workflow (hyphenated UUID).","examples":["0686bb97-8c30-70f0-8000-97669e000eb8"]},"name":{"type":"string","title":"Name","description":"Human-readable name of the workflow.","examples":["Invoice Processing"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Optional description of what this workflow extracts.","examples":["A workflow for processing invoices and retrieving invoice details."]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Timestamp when the workflow was created (ISO 8601)."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Timestamp when the workflow was last modified (ISO 8601)."},"nodes":{"items":{"oneOf":[{"$ref":"#/components/schemas/PublicParseNode"},{"$ref":"#/components/schemas/ClassifyNode"},{"$ref":"#/components/schemas/SplitterNode"},{"$ref":"#/components/schemas/PublicExtractNode"},{"$ref":"#/components/schemas/PublicValidateNode"},{"$ref":"#/components/schemas/PublicIfElseNode"},{"$ref":"#/components/schemas/PublicSlackAlertNode"},{"$ref":"#/components/schemas/PublicEditNode"},{"$ref":"#/components/schemas/PublicCodeNode"},{"$ref":"#/components/schemas/PublicReportGeneratorNode"},{"$ref":"#/components/schemas/PublicInputNode"},{"$ref":"#/components/schemas/KnowledgeNode"}],"discriminator":{"propertyName":"type","mapping":{"classify":"#/components/schemas/ClassifyNode","code":"#/components/schemas/PublicCodeNode","edit":"#/components/schemas/PublicEditNode","extract":"#/components/schemas/PublicExtractNode","if_else":"#/components/schemas/PublicIfElseNode","input":"#/components/schemas/PublicInputNode","knowledge":"#/components/schemas/KnowledgeNode","parse":"#/components/schemas/PublicParseNode","report_generator":"#/components/schemas/PublicReportGeneratorNode","slack_alert":"#/components/schemas/PublicSlackAlertNode","splitter":"#/components/schemas/SplitterNode","validate":"#/components/schemas/PublicValidateNode"}}},"type":"array","title":"Nodes","description":"Typed graph nodes (parse / classify / splitter / extract / validate / if_else)."},"edges":{"items":{"$ref":"#/components/schemas/Edge"},"type":"array","title":"Edges","description":"Directed edges between the graph nodes."}},"type":"object","required":["id","name","nodes"],"title":"WorkflowDetailV3","description":"A workflow with its complete typed graph inline.\n\n``{name, description, nodes, edges}`` is the exact shape\n``POST /v3/workflows/`` accepts — mutate it and feed it back to edit."},"WorkflowListPageV3":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WorkflowSummaryV3"},"type":"array","title":"Items","description":"Workflows on this page, newest first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Opaque token to fetch the next page; pass it back as `?cursor=`. `null` on the last page."}},"type":"object","required":["items"],"title":"WorkflowListPageV3","description":"One keyset page of workflows.\n\nFixed ``(-created_at, -id)`` order. No totals or page numbers by design\n(ANY-1608) — iterate by following ``next_cursor`` until it is null."},"WorkflowReadV3":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier of the workflow (hyphenated UUID).","examples":["0686bb97-8c30-70f0-8000-97669e000eb8"]},"name":{"type":"string","title":"Name","description":"Human-readable name of the workflow.","examples":["Invoice Processing"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Optional description of what this workflow extracts.","examples":["A workflow for processing invoices and retrieving invoice details."]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Timestamp when the workflow was created (ISO 8601)."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Timestamp when the workflow was last modified (ISO 8601)."},"nodes":{"items":{"oneOf":[{"$ref":"#/components/schemas/PublicParseNode"},{"$ref":"#/components/schemas/ClassifyNode"},{"$ref":"#/components/schemas/SplitterNode"},{"$ref":"#/components/schemas/PublicExtractNode"},{"$ref":"#/components/schemas/PublicValidateNode"},{"$ref":"#/components/schemas/PublicIfElseNode"},{"$ref":"#/components/schemas/PublicSlackAlertNode"},{"$ref":"#/components/schemas/PublicEditNode"},{"$ref":"#/components/schemas/PublicCodeNode"},{"$ref":"#/components/schemas/PublicReportGeneratorNode"},{"$ref":"#/components/schemas/PublicInputNode"},{"$ref":"#/components/schemas/KnowledgeNode"}],"discriminator":{"propertyName":"type","mapping":{"classify":"#/components/schemas/ClassifyNode","code":"#/components/schemas/PublicCodeNode","edit":"#/components/schemas/PublicEditNode","extract":"#/components/schemas/PublicExtractNode","if_else":"#/components/schemas/PublicIfElseNode","input":"#/components/schemas/PublicInputNode","knowledge":"#/components/schemas/KnowledgeNode","parse":"#/components/schemas/PublicParseNode","report_generator":"#/components/schemas/PublicReportGeneratorNode","slack_alert":"#/components/schemas/PublicSlackAlertNode","splitter":"#/components/schemas/SplitterNode","validate":"#/components/schemas/PublicValidateNode"}}},"type":"array","title":"Nodes","description":"Typed graph nodes (parse / classify / splitter / extract / validate / if_else)."},"edges":{"items":{"$ref":"#/components/schemas/Edge"},"type":"array","title":"Edges","description":"Directed edges between the graph nodes."},"workflow_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Version Id","description":"The version of the graph: on GET the latest or the `?version=` one, on PATCH the one the write made. A `version_id` from `GET /v3/workflows/{workflow_id}/versions/`.","examples":["FGaV4I2JAA"]}},"type":"object","required":["id","name","nodes"],"title":"WorkflowReadV3","description":"`GET` and `PATCH /v3/workflows/{workflow_id}/`: the graph, and the version it belongs to."},"WorkflowRunFromValuesRequestV3":{"properties":{"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"The values of the workflow's input node, keyed by each field's result key. A string field takes a string, a number field a number, a date field `YYYY-MM-DD`, an enum one of its option names, a multi-select a list of option names, and a table a list of objects keyed by column.","examples":[{"crew":[{"head_count":3,"trade":"Electrician"}],"floors":2,"site_name":"Mataro Parc"}]},"workflow_version_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Workflow Version Id","description":"A `version_id` from `GET /v3/workflows/{workflow_id}/versions/`. Runs the packet on that version instead of the latest one. A version of another workflow answers `404`."}},"type":"object","required":["metadata"],"title":"WorkflowRunFromValuesRequestV3","description":"Body of the run trigger for a workflow that reads no document."},"WorkflowRunTriggeredV3":{"properties":{"run_id":{"type":"string","title":"Run Id","description":"Unique identifier of the new run (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4f9"]},"document_packet_id":{"type":"string","title":"Document Packet Id","description":"The document packet the run executes on (hyphenated UUID).","examples":["069dcc2c-e14c-7606-8000-2ee4fb17b4e1"]},"workflow_id":{"type":"string","title":"Workflow Id","description":"The workflow being run (hyphenated UUID).","examples":["0686bb97-8c30-70f0-8000-97669e000eb8"]},"status":{"$ref":"#/components/schemas/RunStatus","description":"Status at acceptance time — normally `queued`.","examples":["queued"]},"workflow_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Version Id","description":"The version of the workflow that runs: a `version_id` from `GET /v3/workflows/{workflow_id}/versions/`. The key is absent when the version is not known.","examples":["FGaV4I2JAA"]}},"type":"object","required":["run_id","document_packet_id","workflow_id","status"],"title":"WorkflowRunTriggeredV3","description":"202 response for the two workflow run triggers: the run, and the version it runs on."},"WorkflowSummaryV3":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier of the workflow (hyphenated UUID).","examples":["0686bb97-8c30-70f0-8000-97669e000eb8"]},"name":{"type":"string","title":"Name","description":"Human-readable name of the workflow.","examples":["Invoice Processing"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Optional description of what this workflow extracts.","examples":["A workflow for processing invoices and retrieving invoice details."]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Timestamp when the workflow was created (ISO 8601)."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Timestamp when the workflow was last modified (ISO 8601)."}},"type":"object","required":["id","name"],"title":"WorkflowSummaryV3","description":"Slim workflow projection returned by create and list."},"WorkflowUpdateRequest":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","examples":["Invoice or receipt"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","default":""},"nodes":{"items":{"oneOf":[{"$ref":"#/components/schemas/PublicParseNode"},{"$ref":"#/components/schemas/ClassifyNode"},{"$ref":"#/components/schemas/SplitterNode"},{"$ref":"#/components/schemas/PublicExtractNode"},{"$ref":"#/components/schemas/PublicValidateNode"},{"$ref":"#/components/schemas/PublicIfElseNode"},{"$ref":"#/components/schemas/PublicSlackAlertNode"},{"$ref":"#/components/schemas/PublicEditNode"},{"$ref":"#/components/schemas/PublicCodeNode"},{"$ref":"#/components/schemas/PublicReportGeneratorNode"},{"$ref":"#/components/schemas/PublicInputNode"},{"$ref":"#/components/schemas/KnowledgeNode"}],"discriminator":{"propertyName":"type","mapping":{"classify":"#/components/schemas/ClassifyNode","code":"#/components/schemas/PublicCodeNode","edit":"#/components/schemas/PublicEditNode","extract":"#/components/schemas/PublicExtractNode","if_else":"#/components/schemas/PublicIfElseNode","input":"#/components/schemas/PublicInputNode","knowledge":"#/components/schemas/KnowledgeNode","parse":"#/components/schemas/PublicParseNode","report_generator":"#/components/schemas/PublicReportGeneratorNode","slack_alert":"#/components/schemas/PublicSlackAlertNode","splitter":"#/components/schemas/SplitterNode","validate":"#/components/schemas/PublicValidateNode"}}},"type":"array","minItems":1,"title":"Nodes"},"edges":{"items":{"$ref":"#/components/schemas/Edge"},"type":"array","title":"Edges"}},"additionalProperties":false,"type":"object","required":["name","nodes"],"title":"WorkflowUpdateRequest","description":"Public-surface workflow update body — full replacement of the typed graph.\n\nEcho each existing field's ``persistent_id`` (from ``GET``) unchanged —\nincluding across renames — to keep the field's identity; omit it for\nnew fields. Restricts the node union to the public types (see\n``WorkflowCreateRequest``). Call :meth:`to_domain` before forwarding to\nthe backend.","examples":[{"description":"Pull the invoice number and total from each document.","edges":[{"source":"parse","target":"extract"}],"name":"Invoice totals","nodes":[{"id":"parse","mode":"standard","type":"parse"},{"extraction_schema":{"fields":[{"data_type":"string","description":"Invoice number as printed on the document.","name":"invoice_number","persistent_id":"0686bb97-8c30-70f0-8000-97669e00aaaa"},{"data_type":"float","description":"Invoice total in the document's currency.","name":"total_amount"}]},"id":"extract","mode":"standard","type":"extract"}]}]},"WorkflowUsageV3":{"properties":{"pages":{"type":"integer","title":"Pages","description":"The pages the workflow's document runs billed, over the charges made on those days."},"error_pages":{"type":"integer","title":"Error Pages","description":"The pages of the runs that ended in error, over the runs started on those days."},"credits":{"type":"integer","title":"Credits","description":"The credits the workflow's document runs spent, over the charges made on those days."}},"type":"object","required":["pages","error_pages","credits"],"title":"WorkflowUsageV3","description":"What a workflow's document runs processed: the workflow's row on the usage page.\n\nCredits spent without a document (knowledge asks, optimization proposals and\nedit-reference parses) are not counted."},"WorkflowVersionListPageV3":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WorkflowVersionSummaryV3"},"type":"array","title":"Items","description":"Versions on this page, newest first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Opaque token to fetch the next page; pass it back as `?cursor=`. `null` on the last page."}},"type":"object","required":["items"],"title":"WorkflowVersionListPageV3","description":"One keyset page of a workflow's versions, newest first.\n\nItem 0 of the first page is the version a run uses by default. Follow ``next_cursor``\nuntil it is null; there are no totals or page numbers."},"WorkflowVersionSummaryV3":{"properties":{"version_id":{"type":"string","title":"Version Id","description":"Identifier of the version; pass it as `?version=` on `GET /v3/workflows/{workflow_id}/`.","examples":["FGaV4I2JAA"]},"version":{"type":"string","title":"Version","description":"Display number, `major.minor.patch`.","examples":["1.2.0"]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Timestamp when the version was created (ISO 8601)."}},"type":"object","required":["version_id","version"],"title":"WorkflowVersionSummaryV3","description":"One entry in a workflow's version history.\n\nVersions are read-only: they exist for comparison and audit, and a run\nuses the latest version unless it pins one with ``workflow_version_id``.\nPass ``version_id`` as ``GET /v3/workflows/{workflow_id}/?version=`` to\nread that version's graph."},"_FieldOperand":{"properties":{"source":{"type":"string","const":"field","title":"Source"},"field":{"type":"string","minLength":1,"title":"Field","description":"The compared field. Either the field's ``persistent_id`` (Studio field-picker path) or its ``sanitized_name`` as it appears in the extraction response (SDK/API/assistant path) — the executor resolves both."}},"additionalProperties":false,"type":"object","required":["source","field"],"title":"_FieldOperand"},"_LiteralOperand":{"properties":{"source":{"type":"string","const":"literal","title":"Source"},"value":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"boolean"}],"title":"Value"}},"additionalProperties":false,"type":"object","required":["source","value"],"title":"_LiteralOperand"},"ErrorEnvelope":{"type":"object","title":"ErrorEnvelope","description":"Uniform error response. `retryable=true` means the same request may succeed on retry (with backoff); `retryable=false` means the caller must change the request before retrying.","required":["error","error_code","retryable","request_id"],"properties":{"error":{"type":"string","description":"Short human-readable summary."},"detail":{"description":"Machine-readable detail, any JSON value. A string for most errors, a list of `{type, loc, msg}` objects for `VALIDATION_ERROR`, whose `loc` starts with `body`, `query`, `path`, `header`, `form` or `tool`, and an object for a structured error such as `FILENAME_CONFLICT` (`detail.conflicts`)."},"error_code":{"type":"string","enum":["ACCESS_DENIED","AUTH_FAILED","CONCURRENT_EDIT","CONFLICT","DATASET_DOCUMENT_REJECTED","DATASET_GROUND_TRUTH_SAVE_FAILED","DATASET_INVALID_REQUEST","DATASET_UNSUPPORTED","EMPTY_EVAL","ENDPOINT_RETIRED","EXTRACT_MODE_FORBIDDEN","EXTRACT_NODE_UNRESOLVED","FILENAME_CONFLICT","FILE_TOO_LARGE","GATEWAY_TIMEOUT","GONE","GRAPH_READBACK_FAILED","GT_INVALID","IDEMPOTENCY_KEY_REUSED","IMMUTABLE_WORKFLOW","INPUT_VALUES_REFUSED","INSUFFICIENT_CREDIT","INTERNAL_ERROR","INTERNAL_INCONSISTENCY","INVALID_API_KEY","INVALID_JSON","INVALID_LOOKUP_FILE_ENCODING","INVALID_VALUE","INVALID_WORKFLOW_CONFIG","KNOWLEDGE_DOWNLOAD_UNAVAILABLE","KNOWLEDGE_NOT_ENABLED","KNOWLEDGE_NOT_READY","KNOWLEDGE_THREAD_MISMATCH","KNOWLEDGE_UNSUPPORTED_SNAPSHOT_FORMAT","LOOKUP_FIELD_WITHOUT_FILE","METHOD_NOT_ALLOWED","MISSING_API_KEY","MULTIFILE_UNSUPPORTED","NOT_ACCEPTABLE","NOT_ASSIGNED_VERIFIER","NOT_FOUND","NOT_IMPLEMENTED","NOT_IN_DATASET","OBJECT_STORAGE_UNAVAILABLE","ONESHOT_SIGNALS_MISSING","OPERATOR_DEPRECATED","OPERATOR_NOT_AVAILABLE","OPTIMIZATION_ALREADY_RUNNING","PARSE_MODE_FORBIDDEN","PAYMENT_REQUIRED","PRECONDITION_FAILED","RATE_LIMITED","REPARSE_REQUIRED","REPORT_TEMPLATE_UNFILLABLE","REQUEST_REJECTED","REQUEST_TOO_LARGE","RUN_IN_PROGRESS","SERVICE_UNAVAILABLE","SPLIT_HAS_NO_PAGES","SPLIT_SOURCE_NOT_PDF","TOPOLOGY_INVALID","UNSUPPORTED_FILE_TYPE","UNSUPPORTED_LOOKUP_FILE","UNSUPPORTED_MEDIA_TYPE","UPLOAD_SNIFF_BUDGET_EXCEEDED","URL_UNREACHABLE","VALIDATION_ERROR","WEBHOOK_SUBSCRIPTION_LIMIT","WORKFLOW_CONCURRENT_EDIT","WORKFLOW_NAME_CONFLICT","ZERO_DATA_RETENTION_REFUSES_DATASET","ZERO_DATA_RETENTION_REFUSES_KNOWLEDGE","ZERO_DATA_RETENTION_REFUSES_RESULTS_QUERY","ZERO_DATA_RETENTION_REQUIRED","deprecated_operator_ack_required","insufficient_api_key_scope","terms_acceptance_required"],"description":"Stable identifier for programmatic handling. New values can be added at any time, so a client must accept a code it does not know.","examples":["VALIDATION_ERROR","AUTH_FAILED","NOT_FOUND","PRECONDITION_FAILED","RATE_LIMITED","INTERNAL_ERROR","GATEWAY_TIMEOUT"]},"retryable":{"type":"boolean","description":"True when the caller should retry (with backoff for 429/412/5xx)."},"request_id":{"type":"string","description":"Correlates this response with server logs."},"params":{"type":"object","additionalProperties":true,"description":"Values specific to this occurrence of the error that a caller needs to recover, such as `node_ids` or `required_scope`, keyed by name. Absent when the code relays none."},"doc_url":{"type":"string","format":"uri","description":"Link to the documentation of this `error_code`."},"recovery":{"type":"string","description":"One sentence that says what to do next. Absent when the `error_code` has none, or when `retryable` differs from the code's usual value."}}}},"securitySchemes":{"ApiKeyAuth":{"type":"http","description":"API key issued from app.anyformat.ai/api-key. Send as `Authorization: Bearer <key>`.","scheme":"bearer"}}},"tags":[{"name":"workflows","description":"Workflows define extraction templates — what fields to extract from documents. Create workflows, upload files, run extractions, and fetch results."},{"name":"document-packets","description":"Document packets group uploaded documents for a workflow. Address a packet directly to (re-)run its workflow."},{"name":"runs","description":"Extraction runs — the first-class result entity. Each run is a single execution of a workflow against a document packet; fetch its status and results flat by run id."},{"name":"splits","description":"Splits — the sub-documents a splitter node carves out of a packet. Download any one of them as a PDF, built from the source documents on request and never stored."},{"name":"webhooks","description":"Webhooks — an HTTPS endpoint of yours that hears of every run's ending, signed per the Standard Webhooks specification, instead of polling the run."},{"name":"deletion-certificates","description":"Deletion certificates — signed records of what each document packet's deletion destroyed, kept after the workflow is gone. Zero-data-retention organizations only."},{"name":"parse","description":"Parse a single document with the platform's fast lite parse — a one-call shortcut over the workflow upload + run primitives, backed by your organization's system parse workflow."},{"name":"health","description":"Health check endpoints to verify API availability."}]}