POST /public/beta/documents/ai-metadata

Returns AI metadata for a list of documents in a single request. The batch variant of Get AI Metadata for a Document.

Use this endpoint when you need AI metadata for several documents and want to avoid issuing one request per document. Each results[] entry mirrors the per-document outcome of the single-document endpoint.

Partial-success model

The response is always 200 OK when the request itself is valid and the caller is authenticated. Per-document outcomes are reported inside results[] via a status discriminator. A failure for one document (not found, access denied, isolated server-side failure) does not fail the whole request — the response still returns successful entries for the rest.

Per-document status values mirror the HTTP semantics of the single-document endpoint:

| Single-document HTTP | Batch status | Notes | | -------------------- | -------------------------- | ---------------------------------------------------------------------------------- | | 200 | ok | ai_metadata carries the same payload as the single-document 200 body. | | 202 | extraction_pending | Includes retry_after (seconds). Retry the whole batch or just this document_id.| | 204 | extraction_failed | Terminal. Retrying will not help — contact support. | | 409 | extraction_not_started | Typically because the document is not yet completed. | | 404 | not_found | Document does not exist or is deleted. | | 403 | access_denied | Caller cannot access this specific document. | | (none — batch only)| internal_error | Isolated server-side failure for this document. Retrying the affected document is safe. |

Top-level non-2xx responses (400, 401, 403, 429) are reserved for whole-request failures — for example, request validation, missing or invalid authentication, the caller has no read scope at all, or rate limiting.

🚧 Beta > > This endpoint is currently in beta and may change without notice.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
field_keys[] Array No

Optional filter — restrict the response, for each document, to this subset of AI metadata fields, matched by key (the human-readable field name returned as results[].key by the single-document endpoint, e.g. Contract value). Comparison is exact and case-sensitive. Unknown keys are silently ignored. When omitted, every populated field is returned per document.

document_ids[] Array Yes

Documents to fetch AI metadata for. Each entry must be a valid document identifier. Duplicates are not allowed.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.