API reference
Create task
Upload a file and enqueue async processing
POST
https://api.flimpa.com/api/v1/tasksOverview
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
| Header | Required | Description |
|---|---|---|
| X-API-Key | No | Raises limits. Format flp_live_… |
| Idempotency-Key | No | Client key scoped per API key or IP |
Multipart fields
| Field | Required | Description |
|---|---|---|
| operation | Yes | compress-pdfimage-to-webp |
| file | Yes | Exactly 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 accepted200— idempotent replay400/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.