Skip to main content
The FlexOrch REST API gives you programmatic access to every capability of the platform — document processing, dataset management, semantic search, connectors, webhooks, compliance records, and more. All endpoints share a consistent base URL, authentication model, and response envelope so you can integrate quickly and predictably.

Base URL

Every request you send to the FlexOrch API must target the following base URL:
https://api.flexorch.com/v1
All endpoints are versioned under /v1. Future major versions will be introduced at a new path prefix so your existing integrations remain stable.

Authentication

FlexOrch supports two authentication methods. Choose the one that best fits your use case — both are accepted on every endpoint.

API Key

Pass your API key in the X-API-KEY request header. API keys are long-lived credentials best suited for server-to-server integrations and automation pipelines.
curl https://api.flexorch.com/v1/usage \
  -H "X-API-KEY: dfx_your_api_key_here"

Bearer Token (JWT)

Pass a JWT in the Authorization header using the Bearer scheme. JWTs are short-lived and ideal for user-facing applications. Obtain a token via POST /v1/auth/login and refresh it with POST /v1/auth/refresh.
curl https://api.flexorch.com/v1/usage \
  -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."
Never expose API keys in client-side code or public repositories. If a key is compromised, rotate it immediately from the FlexOrch dashboard.

Response Format

Success

Every successful response wraps the result inside a data object:
{
  "data": {
    "job_id": "job_01hx4m...",
    "status": "queued"
  }
}

Error

When a request fails, the response body contains an error object with a machine-readable code and a human-readable message:
{
  "error": {
    "code": "QUOTA_EXCEEDED",
    "message": "You have used all available credits for your current plan."
  }
}
Always check the HTTP status code first, then inspect error.code to determine the exact cause and the appropriate remediation.

Common Error Codes

CodeHTTP StatusDescription
INVALID_API_KEY401The API key provided was not found, has been revoked, or is malformed.
TRIAL_EXPIRED402Your free trial period has ended. Upgrade your plan to continue.
QUOTA_EXCEEDED429You have exhausted your credit quota for the current billing period.
RATE_LIMIT_EXCEEDED429Your request rate exceeds the requests-per-minute limit for your plan.
PLAN_UPGRADE_REQUIRED403The endpoint or feature you requested is not available on your current plan.
FILE_TOO_LARGE413The uploaded file exceeds the maximum file size allowed by your plan.
UNSUPPORTED_FILE415The file type you submitted is not supported for processing.
If you receive a 429 response, back off and retry using exponential backoff. Check your current rate limit headroom at any time with GET /v1/usage/rate-limits.

Endpoint Overview

The table below lists every key endpoint grouped by category. The full interactive reference — including request schemas, response schemas, and a live try-it console — is generated directly from the OpenAPI spec and is always up to date.

Documents

MethodEndpointDescription
POST/v1/data-process/asyncUpload and process one or more documents asynchronously.
POST/v1/documents/{id}/reprocessRe-run processing on a previously uploaded document.

Jobs

MethodEndpointDescription
GET/v1/jobs/{job_id}Retrieve the current status and results of a processing job.
POST/v1/jobs/{id}/feedbackSubmit quality feedback for a completed job.

Datasets

MethodEndpointDescription
POST/v1/datasetsBuild a dataset from processed documents.
GET/v1/datasets/{id}/exportExport a dataset in your preferred format.
GET/v1/datasets/{id}/profileRetrieve a quality profile for a dataset.
POST/v1/datasets/{id}/indexIndex a dataset for semantic search (Pro plan and above).

Connectors

MethodEndpointDescription
POST/v1/connectorsCreate a new data source connector.
POST/v1/connectors/{id}/testTest connectivity for an existing connector.

Webhooks

MethodEndpointDescription
POST/v1/webhooksRegister a webhook endpoint to receive real-time job notifications.
MethodEndpointDescription
POST/v1/searchRun a semantic search query across indexed datasets.

Usage

MethodEndpointDescription
GET/v1/usageCheck your current credit balance.
GET/v1/usage/rate-limitsInspect your current rate limit status and remaining headroom.
GET/v1/usage/quality-trendRetrieve a time-series view of document quality metrics.

Compliance

MethodEndpointDescription
GET/v1/compliance/recordDownload your GDPR Article 30 Record of Processing Activities (ROPA).
GET/v1/audit/exportExport the audit log for NIS2 and KVKK compliance reporting.

Auth

MethodEndpointDescription
POST/v1/auth/signupCreate a new FlexOrch account.
POST/v1/auth/loginAuthenticate and receive a JWT.
POST/v1/auth/refreshExchange a refresh token for a new JWT.

Advanced (Enterprise)

MethodEndpointDescription
POST/v1/settings/llm-configConfigure a bring-your-own LLM provider.
POST/v1/fine-tuneSubmit a fine-tuning job against your document corpus.
GET/v1/fine-tune/{job_id}Track the progress of a fine-tuning job.
The full interactive API reference below — including live request builders, response examples, and schema documentation — is generated automatically from the OpenAPI specification at https://api.flexorch.com/openapi.json. It always reflects the latest version of the API.

Rate Limits

FlexOrch enforces per-plan rate limits on a requests-per-minute (RPM) basis. When you exceed your limit, the API returns a 429 RATE_LIMIT_EXCEEDED response. Use the GET /v1/usage/rate-limits endpoint to check how many requests you have remaining in the current window before you hit the limit.

Rate Limit Status

Query your current RPM headroom with GET /v1/usage/rate-limits.

Credit Balance

Monitor credit consumption in real time with GET /v1/usage.