Welcome to Lekana API

The Lekana API allows you to programmatically interact with our document processing engine. You can trigger workflows, check execution status, and retrieve processed data seamlessly from your own applications. Our API is built on RESTful principles, using standard HTTP methods and JSON for communication.

Authentication

To authenticate with the Lekana API, you must include your private API key in the `X-API-Key` header of every request. You can manage your API keys in the developer settings of your Lekana dashboard. Treat your API key as a secret—never share it or commit it to version control.

X-API-Key: YOUR_API_KEY

Core Concepts

Workflows

A workflow is a sequence of actions defined in the Lekana editor. Each workflow has a unique ID and must be published before it can be triggered via the API.

Executions

When you run a workflow, an 'Execution' is created. This process is asynchronous. The API will return an `executionId` which you can use to poll for status or receive results via webhooks.

POST

Run Workflow (File Upload)

Trigger a workflow by uploading document files directly.

https://api.lekana.dev/workflows/:workflow_id/run-with-files

Use this endpoint to upload files directly from your application. This endpoint requires a multipart/form-data request body containing the files and an optional message.

Headers

Content-Type
Specifies that the request contains file data.
X-API-Key
Your unique API key for authentication.

Body Parameters

message string

The message or prompt to pass to the workflow.

files file[]

One or more files to be processed by the workflow.

Request Example

curl -X POST https://api.lekana.dev/workflows/:workflow_id/run-with-files \
  -H "X-API-Key: YOUR_API_KEY" \
  -F "message=Analyze these documents" \
  -F "files=@/path/to/document.pdf"

Responses

202 Accepted - Files uploaded and workflow started.
{
  "id": "exec_xyz789",
  "status": "pending",
  "message": "Files uploaded successfully"
}

Error Codes

Lekana uses conventional HTTP response codes to indicate the success or failure of an API request.

CodeDescription
400 Bad RequestThe request was malformed or missing required parameters.
401 UnauthorizedThe API key is missing or invalid.
404 Not FoundThe requested workflow or resource does not exist.

Lekana

An OCR-powered document intake service for businesses. We read your documents, understand them, and route them into your workflow — fully managed, end-to-end.

Product

Resources


Lekana © 2026. All rights reserved.

Built for businesses that are done with the chaos of documents.