Initializing Operalta...

Documents

Upload, classify, and collect source documents.

POST
/api/collect

Authorization

AuthorizationBearer <token>

API key obtained from Operalta Settings → API Keys. Format: op_xxxxx. Pass as Authorization: Bearer op_....

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

curl -X POST "https://example.com/api/collect" \  -H "Content-Type: application/json" \  -d '{    "context": {      "companyId": "8bb73d03-06b4-47c7-80c7-59301f770eda"    },    "source": {      "kind": "csv"    },    "sink": {      "kind": "document"    }  }'
{
  "success": true,
  "sinkKind": "document",
  "artifactIds": [
    "e018c1e3-12b2-47d3-8524-fe5f07db979b"
  ],
  "listId": "9fc6ad7d-902a-4834-b161-a4911b883d44",
  "documentId": "4704590c-004e-410d-adf7-acb7ca0a7052",
  "importedCount": 0,
  "skippedCount": 0,
  "batchId": "string",
  "preview": {
    "rows": [
      {}
    ],
    "columns": [
      "string"
    ],
    "notes": [
      "string"
    ]
  },
  "warnings": [
    "string"
  ],
  "errors": [
    "string"
  ]
}
{
  "error": "string",
  "status": 0,
  "details": {}
}
{
  "error": "string",
  "status": 0,
  "details": {}
}
{
  "error": "string",
  "status": 0,
  "details": {}
}
{
  "success": true,
  "sinkKind": "document",
  "artifactIds": [
    "e018c1e3-12b2-47d3-8524-fe5f07db979b"
  ],
  "listId": "9fc6ad7d-902a-4834-b161-a4911b883d44",
  "documentId": "4704590c-004e-410d-adf7-acb7ca0a7052",
  "importedCount": 0,
  "skippedCount": 0,
  "batchId": "string",
  "preview": {
    "rows": [
      {}
    ],
    "columns": [
      "string"
    ],
    "notes": [
      "string"
    ]
  },
  "warnings": [
    "string"
  ],
  "errors": [
    "string"
  ]
}
{
  "error": "string",
  "status": 0,
  "details": {}
}
{
  "error": "string",
  "status": 0,
  "details": {}
}
GET
/api/extract/{documentId}

Authorization

AuthorizationBearer <token>

API key obtained from Operalta Settings → API Keys. Format: op_xxxxx. Pass as Authorization: Bearer op_....

In: header

Path Parameters

documentId*string
Formatuuid

Query Parameters

mode?string

Optional extraction mode override for image-only documents.

Value in"image-skip"

Response Body

text/event-stream

text/plain

text/plain

text/plain

curl -X GET "https://example.com/api/extract/497f6eca-6276-4993-bfeb-53cbbbba6f08"
"data: {\"type\":\"start\",\"documentId\":\"uuid\",\"extractionRunId\":\"uuid\"}\n\ndata: {\"type\":\"progress\",\"textLength\":5120,\"chunkIndex\":3}\n\ndata: {\"type\":\"chunk\",\"chunk\":\"Quarterly revenue reached ...\",\"format\":\"markdown\"}\n\ndata: {\"type\":\"complete\",\"textLength\":12842,\"chunkCount\":9}\n\n"
"Unauthorized"
"Forbidden"
"Document not found"
GET
/api/source-documents

Authorization

AuthorizationBearer <token>

API key obtained from Operalta Settings → API Keys. Format: op_xxxxx. Pass as Authorization: Bearer op_....

In: header

Query Parameters

companyId*string
Formatuuid
limit?integer
Default20
Range1 <= value
offset?integer
Default0
Range0 <= value

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/source-documents?companyId=497f6eca-6276-4993-bfeb-53cbbbba6f08"
{
  "documents": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "fileName": "string",
      "mimeType": "string",
      "documentType": "string",
      "createdAt": "2019-08-24T14:15:22Z"
    }
  ],
  "total": 0,
  "limit": 0,
  "offset": 0
}
{
  "error": "string",
  "status": 0,
  "details": {}
}
{
  "error": "string",
  "status": 0,
  "details": {}
}
{
  "error": "string",
  "status": 0,
  "details": {}
}
POST
/api/uploads

Authorization

AuthorizationBearer <token>

API key obtained from Operalta Settings → API Keys. Format: op_xxxxx. Pass as Authorization: Bearer op_....

In: header

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/uploads" \  -H "Content-Type: application/json" \  -d '{    "fileName": "string",    "mimeType": "string",    "fileSize": 1,    "companyId": "8bb73d03-06b4-47c7-80c7-59301f770eda",    "origin": "onboarding"  }'
{
  "documentId": "4704590c-004e-410d-adf7-acb7ca0a7052",
  "artifactId": "706a3f1e-c357-4634-b1bf-20c221b5bb4e",
  "extractUrl": "string",
  "message": "string"
}
{
  "error": "string",
  "status": 0,
  "details": {}
}
{
  "error": "string",
  "status": 0,
  "details": {}
}
{
  "error": "string",
  "status": 0,
  "details": {}
}
{
  "error": "string",
  "status": 0,
  "details": {}
}
GET
/api/uploads/{documentId}

Authorization

AuthorizationBearer <token>

API key obtained from Operalta Settings → API Keys. Format: op_xxxxx. Pass as Authorization: Bearer op_....

In: header

Path Parameters

documentId*string
Formatuuid

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/uploads/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "file_name": "string",
  "mime_type": "string",
  "file_size": 0,
  "origin": "string",
  "document_type": "string",
  "document_type_confidence": 0,
  "suggested_title": "string",
  "summary": "string",
  "taxonomy": {},
  "sensitivity": "string",
  "processing_status": "string",
  "processing_error": "string",
  "processing_started_at": "2019-08-24T14:15:22Z",
  "processing_completed_at": "2019-08-24T14:15:22Z",
  "embedding_status": "string",
  "extraction_artifact_id": "bef0ba6e-9532-4cc0-9468-1c65905830b9",
  "origin_id": "fa284d86-c703-4b55-825c-a163977fd80a",
  "version_number": 0,
  "is_latest_version": true,
  "created_at": "2019-08-24T14:15:22Z",
  "progress": 0,
  "isComplete": true,
  "isFailed": true
}
{
  "error": "string",
  "status": 0,
  "details": {}
}
{
  "error": "string",
  "status": 0,
  "details": {}
}
{
  "error": "string",
  "status": 0,
  "details": {}
}
DELETE
/api/uploads/{documentId}

Authorization

AuthorizationBearer <token>

API key obtained from Operalta Settings → API Keys. Format: op_xxxxx. Pass as Authorization: Bearer op_....

In: header

Path Parameters

documentId*string
Formatuuid

Response Body

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/api/uploads/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{
  "success": true
}
{
  "error": "string",
  "status": 0,
  "details": {}
}
{
  "error": "string",
  "status": 0,
  "details": {}
}
{
  "error": "string",
  "status": 0,
  "details": {}
}
POST
/api/uploads/{documentId}/confirm

Authorization

AuthorizationBearer <token>

API key obtained from Operalta Settings → API Keys. Format: op_xxxxx. Pass as Authorization: Bearer op_....

In: header

Path Parameters

documentId*string
Formatuuid

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/uploads/497f6eca-6276-4993-bfeb-53cbbbba6f08/confirm"
{
  "documentId": "4704590c-004e-410d-adf7-acb7ca0a7052",
  "status": "string",
  "extractUrl": "string",
  "message": "string"
}
{
  "documentId": "4704590c-004e-410d-adf7-acb7ca0a7052",
  "eventId": "string",
  "extractUrl": "string",
  "message": "string"
}
{
  "error": "string",
  "status": 0,
  "details": {}
}
{
  "error": "string",
  "status": 0,
  "details": {}
}
{
  "error": "string",
  "status": 0,
  "details": {}
}
{
  "error": "string",
  "status": 0,
  "details": {}
}
GET
/api/uploads/{documentId}/file

Authorization

AuthorizationBearer <token>

API key obtained from Operalta Settings → API Keys. Format: op_xxxxx. Pass as Authorization: Bearer op_....

In: header

Path Parameters

documentId*string
Formatuuid

Query Parameters

mode?string

Return signed file metadata as JSON instead of redirecting.

Value in"json"

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/uploads/497f6eca-6276-4993-bfeb-53cbbbba6f08/file"
{
  "downloadUrl": "string",
  "fileName": "string",
  "mimeType": "string",
  "fileSize": 0
}
Empty
{
  "error": "string",
  "status": 0,
  "details": {}
}
{
  "error": "string",
  "status": 0,
  "details": {}
}
{
  "error": "string",
  "status": 0,
  "details": {}
}