Batch Create Sessions
Batch Operations
Batch Create Sessions
Create multiple sessions with uploaded documents and optional auto-extraction.
POST
Batch Create Sessions
Authentication & Scope
Requires thesessions-write ability.
Overview
This endpoint creates one session per uploaded file, with each session containing the corresponding document. This is the most efficient way to process multiple documents.Request
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
templateId | uuid | Yes | The template ID to use for extraction |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
files | array | Yes | Array of file keys from signed URL uploads (max 50) |
settings | object | No | Session settings |
settings.auto_extract | boolean | No | When true, extraction starts automatically after document parsing (default: false) |
File keys are obtained from the signed URL upload process. Each file creates a separate session.
Response
201 Created – Array of created sessions.
Session names initially show “Pending…” and are automatically updated to the document filename once processing begins.
Auto-Extract Workflow
Whenauto_extract: true:
- Sessions are created with uploaded documents
- Documents are automatically parsed into searchable chunks
- Once parsing completes, extraction starts automatically
- Results appear in the session’s results endpoint
Example: Complete Workflow
Upload files and get keys
Use signed URLs to upload your documents first.
Error Responses
| Status | Description |
|---|---|
| 403 | Token lacks sessions-write ability |
| 404 | Template not found |
| 422 | Validation error (invalid file keys, exceeds 50 file limit) |
Authorizations
Path Parameters
Body
application/json
