Loading...
Business Tools School Tools Document Tool Download About Us
🔍

API Documentation

Integrate FioDesk document processing capabilities into your applications with our RESTful API

Getting Started

The FioDesk API allows you to integrate document processing capabilities into your applications. All API requests are made to our base URL and require authentication via API tokens.

Base URL

https://fiodesks.com/api/v1

Authentication

All API requests require authentication using a Bearer token in the Authorization header. You can generate API tokens from your account dashboard.

// Example: Include token in request header Authorization: Bearer your_api_token_here

🔑 API Token Management

To generate an API token, log in to your account and navigate to your profile settings. API tokens are valid for 6 months and can be revoked at any time. Keep your tokens secure and never share them publicly.

Authentication

All API endpoints require authentication using a Bearer token. Include your API token in the Authorization header of every request.

Headers

Header Type Required Description
Authorization String Required Bearer token: Bearer YOUR_API_TOKEN
Accept String Optional Response format: application/json (default)
Content-Type String Required Request format: multipart/form-data for file uploads

Example Request

# cURL Example curl -X POST "https://fiodesks.com/api/v1/merge-pdfs" \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: multipart/form-data" \ -F "files[]=@document1.pdf" \ -F "files[]=@document2.pdf"

API Endpoints

Merge PDFs

POST /api/v1/merge-pdfs

Merge multiple PDF files into a single document. Supports up to 50 PDF files per request with a maximum total size of 100MB.

Request Parameters

Parameter Type Required Description
files[] File[] Required Array of PDF files to merge (2-50 files)

Example Request

# cURL curl -X POST "https://fiodesks.com/api/v1/merge-pdfs" \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -F "files[]=@document1.pdf" \ -F "files[]=@document2.pdf" \ -F "files[]=@document3.pdf"
// JavaScript (Fetch API) const formData = new FormData(); formData.append('files[]', file1); formData.append('files[]', file2); fetch('https://fiodesks.com/api/v1/merge-pdfs', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_TOKEN' }, body: formData }) .then(response => response.json()) .then(data => console.log(data));

Success Response

200 OK

{ "success": true, "message": "PDFs merged successfully", "file": "merged_document_12345.pdf", "download_url": "https://fiodesks.com/download/merged_document_12345.pdf" }

Split PDFs

POST /api/v1/split-pdfs

Split a PDF file into multiple documents. You can split by page ranges or specify the number of pages per file.

Request Parameters

Parameter Type Required Description
file File Required The PDF file to split
split_type String Required Split method: pages or ranges
pages_per_file Integer Conditional Number of pages per file (required if split_type is "pages")
page_ranges String Conditional Page ranges (e.g., "1-5,6-10,11-15") (required if split_type is "ranges")

Example Request

# Split by pages per file curl -X POST "https://fiodesks.com/api/v1/split-pdfs" \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -F "file=@document.pdf" \ -F "split_type=pages" \ -F "pages_per_file=5"

Success Response

200 OK

{ "success": true, "message": "PDF split successfully", "files": [ "split_document_part1.pdf", "split_document_part2.pdf", "split_document_part3.pdf" ], "download_url": "https://fiodesks.com/download/split_archive_12345.zip" }

Compress PDFs

POST /api/v1/compress-pdfs

Reduce PDF file size while maintaining quality. Supports multiple compression levels from light to maximum compression.

Request Parameters

Parameter Type Required Description
file File Required The PDF file to compress
compression_level String Optional Compression level: low, medium, high (default: medium)

Example Request

curl -X POST "https://fiodesks.com/api/v1/compress-pdfs" \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -F "file=@large_document.pdf" \ -F "compression_level=high"

Success Response

200 OK

{ "success": true, "message": "PDF compressed successfully", "file": "compressed_document_12345.pdf", "original_size": 5242880, "compressed_size": 2097152, "reduction_percent": 60, "download_url": "https://fiodesks.com/download/compressed_document_12345.pdf" }

Encrypt PDFs

POST /api/v1/encrypt-pdfs

Add password protection to PDF files using AES-256 encryption. The encrypted PDF will require the password to open or view.

Request Parameters

Parameter Type Required Description
file File Required The PDF file to encrypt
password String Required Password for encryption (minimum 6 characters)
permissions String[] Optional Access permissions: print, copy, modify

Example Request

curl -X POST "https://fiodesks.com/api/v1/encrypt-pdfs" \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -F "file=@document.pdf" \ -F "password=secure_password_123" \ -F "permissions[]=print"

Success Response

200 OK

{ "success": true, "message": "PDF encrypted successfully", "file": "encrypted_document_12345.pdf", "download_url": "https://fiodesks.com/download/encrypted_document_12345.pdf" }

Error Handling

The API uses standard HTTP status codes to indicate success or failure. All error responses include a JSON object with error details.

HTTP Status Codes

Code Description
200 Success - Request completed successfully
400 Bad Request - Invalid parameters or malformed request
401 Unauthorized - Invalid or missing API token
403 Forbidden - API access not available for your account
404 Not Found - Endpoint does not exist
413 Payload Too Large - File size exceeds limits
422 Unprocessable Entity - Validation errors
429 Too Many Requests - Rate limit exceeded
500 Internal Server Error - Server processing error

Error Response Format

Example Error Response

{ "success": false, "message": "Validation failed", "errors": { "file": ["The file field is required."], "password": ["The password must be at least 6 characters."] } }

Common Error Scenarios

  • 401 Unauthorized: Check that your API token is valid and included in the Authorization header
  • 403 Forbidden: Ensure your account has API access enabled (premium subscription required)
  • 413 Payload Too Large: Reduce file size or split files into smaller batches
  • 422 Validation Error: Review request parameters and ensure all required fields are provided
  • 429 Rate Limit: You have exceeded the API rate limit. Wait before making additional requests

Rate Limits

API rate limits are in place to ensure fair usage and system stability. Rate limits vary based on your subscription plan.

Plan Requests per Minute Requests per Hour Requests per Day
Free 10 100 1,000
Premium 60 1,000 10,000
Enterprise Unlimited Unlimited Unlimited

When you exceed the rate limit, you will receive a 429 Too Many Requests response. The response headers include information about your current rate limit status:

X-RateLimit-Limit: 60 X-RateLimit-Remaining: 45 X-RateLimit-Reset: 1640995200

File Size & Format Limits

Limit Type Value Description
Maximum file size 50 MB Per individual file
Maximum total size 100 MB Combined size of all files in a request
Maximum files per request 50 For merge operations
Supported formats PDF All endpoints currently support PDF files only

SDKs & Code Examples

Here are code examples for common programming languages and frameworks:

Python

# Python example using requests library import requests url = "https://fiodesks.com/api/v1/merge-pdfs" headers = { "Authorization": "Bearer YOUR_API_TOKEN" } files = [ ('files[]', open('document1.pdf', 'rb')), ('files[]', open('document2.pdf', 'rb')) ] response = requests.post(url, headers=headers, files=files) data = response.json() if data['success']: print(f"Merged PDF: {data['download_url']}") else: print(f"Error: {data['message']}")

Node.js

// Node.js example using axios const axios = require('axios'); const FormData = require('form-data'); const fs = require('fs'); const form = new FormData(); form.append('files[]', fs.createReadStream('document1.pdf')); form.append('files[]', fs.createReadStream('document2.pdf')); axios.post('https://fiodesks.com/api/v1/merge-pdfs', form, { headers: { 'Authorization': 'Bearer YOUR_API_TOKEN', ...form.getHeaders() } }) .then(response => { console.log('Merged PDF:', response.data.download_url); }) .catch(error => { console.error('Error:', error.response.data.message); });

PHP

// PHP example using cURL $ch = curl_init('https://fiodesks.com/api/v1/merge-pdfs'); $files = [ 'files[]' => new CURLFile('document1.pdf'), 'files[]' => new CURLFile('document2.pdf') ]; curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_POSTFIELDS => $files, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer YOUR_API_TOKEN' ], CURLOPT_RETURNTRANSFER => true ]); $response = curl_exec($ch); $data = json_decode($response, true); if ($data['success']) { echo "Merged PDF: " . $data['download_url']; } else { echo "Error: " . $data['message']; } curl_close($ch);

Support & Resources

  • For API integration questions, contact our support team
  • Check our FAQ for common questions and solutions
  • Review our Terms of Service for API usage guidelines
  • Monitor your API usage and rate limits in your account dashboard

📚 Additional Resources

Need help? Check out our FAQ page or contact our support team for assistance with API integration.

Customer Support

We're here to help!

Hello! 👋 I'm here to help you with any questions about FioDesk. Ask me anything!

Frequently asked questions:

🎫 Submit Support Ticket (Login Required)