API reference

Create task

Upload a file and enqueue async processing

POSThttps://api.flimpa.com/api/v1/tasks

Overview

Uploads a single file (max 20 MB), validates and malware-scans it, stores it encrypted, and enqueues a background job. The HTTP response returns immediately with taskId and accessToken.

Idempotency

Send Idempotency-Key (1–128 chars) to safely retry creates. Replays return 200 with idempotentReplay: true.

Endpoint

https://api.flimpa.com/api/v1/tasks

Headers

HeaderRequiredDescription
X-API-KeyNoRaises limits. Format flp_live_…
Idempotency-KeyNoClient key scoped per API key or IP

Multipart fields

FieldRequiredDescription
operationYes
compress-pdfimage-to-webp
fileYesExactly one file, max 20 MB

Request example

RequestcURL
curl -X POST "https://api.flimpa.com/api/v1/tasks" \
  -H "X-API-Key: flp_live_YOUR_API_KEY" \
  -H "Idempotency-Key: unique-request-001" \
  -F "operation=compress-pdf" \
  -F "file=@document.pdf"

Response example

Status 202 for new tasks, 200 for idempotent replays.

202 Acceptedjson
{
  "taskId": "550e8400-e29b-41d4-a716-446655440000",
  "status": "PENDING",
  "pollUrl": "/api/v1/tasks/550e8400-e29b-41d4-a716-446655440000",
  "accessToken": "1735689600000.a1b2c3d4e5f6..."
}

Error example

400json
{
  "error": "Field \"operation\" must be one of: compress-pdf, image-to-webp",
  "code": "validation_error"
}

Status codes

  • 202 — task accepted
  • 200 — idempotent replay
  • 400 / 413 / 429 / 503 — see Errors

Rate limits

Anonymous: 20 creates/hour/IP. API key: per-key window (default 60/min) + daily quota (default 2000) + max 5 concurrent.

Response headers: X-RateLimit-Limit, X-RateLimit-Remaining, and for API keys X-RateLimit-Daily-Remaining.