Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developer.kodexa.ai/llms.txt

Use this file to discover all available pages before exploring further.

Overview

An intake is a named upload endpoint attached to a document store. External systems, customer portals, or automated workflows POST files to the intake URL, and Kodexa handles storage, metadata enrichment, validation, and downstream processing. Each intake has its own URL:
POST /api/intake/{orgSlug}/{intakeSlug}
Intakes support:
  • Metadata merging — intake-level metadata is merged with per-upload metadata, with per-upload taking priority
  • Intake scripts — server-side JavaScript that validates, enriches, or rejects uploads before storage
  • Activity Plans — automatically start processing workflows when documents arrive
  • Knowledge features — auto-assign knowledge features to uploaded documents
  • API tokens — scoped tokens that only allow uploads to a specific intake, no other platform access
  • Large uploads — presigned S3 URLs and multipart uploads for files over 256 MB

Quick Start

1. Create an Intake

In the Kodexa Studio, navigate to your organization’s Intakes section and click New Intake. Configure:
  • Name and slug — the slug becomes part of the upload URL
  • Document Store — where uploaded documents are stored
  • Active — toggle to accept or reject uploads

2. Create an API Token

Each intake can have its own scoped API tokens. These tokens only allow uploads to that specific intake — they cannot access any other platform resources. In the intake’s Tokens tab, click Create Token and save the generated kit_* token securely.

3. Upload a Document

curl -X POST "https://platform.kodexa-enterprise.com/api/intake/my-org/invoice-intake" \
  -H "x-api-key: kit_your-intake-token" \
  -F "file=@invoice.pdf" \
  -F "metadata={\"department\": \"finance\", \"vendor\": \"Acme Corp\"}"
The response is the created document family:
{
  "id": "abc-123",
  "path": "invoice.pdf",
  "metadata": {
    "department": "finance",
    "vendor": "Acme Corp"
  }
}

Upload Parameters

ParameterTypeDescription
filemultipart fileThe document to upload (required)
pathstringDocument path in the store (defaults to filename)
metadataJSON stringPer-upload metadata merged with intake-level metadata
labelsstringComma-separated labels to assign (e.g., "URGENT,REVIEW")
statusIdstringDocument status ID to set
externalDataJSON stringExternal data injected into the KDDB document
documentVersionstringDocument version identifier
knowledgeFeaturesJSON arrayKnowledge feature IDs to assign (e.g., [{"id": "..."}])
Extra form fields (any field not in the list above) are automatically captured as metadata at the lowest priority.

Guides

Intake Scripting

Write server-side JavaScript to validate, enrich, and route uploaded documents.

Large File Uploads

Upload files over 256 MB using presigned S3 URLs or resumable multipart uploads.