API referenceExtraction sessions
Create an extraction session (triggers the run)
POST
/extraction-sessionsDocuments must finish preprocessing first (status "processed"). While any target document is still "uploaded"/"processing", responds 202 { status: "pending", documentsReady, documentsTotal } and does NOT start the run — re-POST to poll (or watch GET /documents for status). If any document is "failed", responds 422 with the failed ids — re-process them (POST /documents/process) before extracting.
Requires an API key with one of these roles: admin, editor.
Authorization
bearerAuth AuthorizationBearer <token>
An API key created in Settings → API Keys.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/extraction-sessions" \ -H "Content-Type: application/json" \ -d '{ "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8" }'{ "data": { "extractionSession": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "createdAt": "2019-08-24T14:15:22Z", "completedAt": "2019-08-24T14:15:22Z", "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8", "subscriptionId": "d079718b-ff63-45dd-947b-4950c023750f", "creatorUserId": "85dccef8-89af-4fb6-b2b2-b050e561eeb5", "apiKeyId": "37ba0474-c0bb-4910-bfb5-d6cebb614366", "promptTextSnapshot": "string", "outputFieldsSnapshot": {}, "promptVersionId": "5f2e8d7a-0800-4544-9d08-f64a777977cc", "orchestrationInstanceId": "string", "reference": { "property1": "string", "property2": "string" }, "creator": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "email": "string", "firstName": "string", "lastName": "string" }, "publicDocumentAssociations": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "extractionMode": "string", "llmInputType": "string", "llmModel": "string", "extractionStartedAt": "2019-08-24T14:15:22Z", "extractionCompletedAt": "2019-08-24T14:15:22Z", "extractionStatus": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "isActive": true }, "projectDocumentAssociation": {} } ] }, "status": "orchestration_started", "mode": "durable_functions", "jobId": "string" }, "meta": { "requestId": "string", "timestamp": "string" }}