Documentation Index
Fetch the complete documentation index at: https://docs.dragdropdo.com/llms.txt
Use this file to discover all available pages before exploring further.
Operations are created via:
POST /api/v1/do
Authorization: Bearer <your-api-key>
Content-Type: application/json
Request schema (ExternalDoRequest)
{
"action": "convert",
"file_keys": ["file_key_1", "file_key_2"],
"parameters": {
"convert_to": "png"
},
"notes": {
"user_id": "user-123",
"source": "api"
}
}
action (required) – the operation to perform:
"convert"
"compress"
"merge"
"zip"
"lock"
"unlock"
"reset_password"
file_keys (required) – array of one or more file keys returned by upload.
parameters (optional) – action‑specific parameters (see below).
notes (optional) – arbitrary key‑value metadata persisted alongside the external operation.
Response (ExternalDoResponse):
{
"main_task_id": "task_abc123"
}
Use main_task_id for status polling and correlating webhook notifications.
Create an operation
curl -X POST https://api.dragdropdo.com/api/v1/do \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"action": "convert",
"file_keys": ["file_key_1"],
"parameters": {
"convert_to": "png"
},
"notes": {
"user_id": "user-123",
"source": "api"
}
}'
Supported operations
Before creating an operation, you can validate that a given extension and action are supported:
curl -X POST https://api.dragdropdo.com/api/v1/supported-operation \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"ext":"jpg",
"action": "CONVERT",
"parameters": {
"convert_to": "png"
}
}'
Server‑side this is backed by SupportedOperationRequest / SupportedOperationResponse:
type SupportedOperationRequest = {
ext: string;
action?: string;
parameters?: Record<string, unknown>;
};
type SupportedOperationResponse = {
supported: boolean;
ext: string;
action?: string;
available_actions?: string[];
parameters?: Record<string, unknown>;
};
Example responses:
- Only
ext provided – returns available_actions for that extension.
ext + action – returns supported + parameters metadata, such as:
- valid
convert_to targets for convert
- valid
compression_value options for compress
Action‑specific parameters
Convert
convert_to (required) – target format (e.g. pdf, png, docx).
Common use cases:
- Document:
docx → pdf, pdf → docx, pptx → pdf.
- Image:
jpg → png, png → webp.
- Media:
mp4 → mp3, wav → mp3.
curl -X POST https://api.dragdropdo.com/api/v1/do \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"action": "convert",
"file_keys": ["file_key_1"],
"parameters": {
"convert_to": "pdf"
}
}'
Compress
compression_value – compression level such as recommended_compression, extreme_compression, or less_compression (see supported‑operation metadata).
curl -X POST https://api.dragdropdo.com/api/v1/do \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"action": "compress",
"file_keys": ["file_key_1"],
"parameters": {
"compression_value": "recommended_compression"
}
}'
Merge
Merges multiple compatible files (typically PDFs) into a single output file.
curl -X POST https://api.dragdropdo.com/api/v1/do \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"action": "merge",
"file_keys": ["file_key_1", "file_key_2"]
}'
Zip
Creates a zip archive containing the given files.
curl -X POST https://api.dragdropdo.com/api/v1/do \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"action": "zip",
"file_keys": ["file_key_1", "file_key_2"]
}'
Lock PDF
Protects PDFs with a password.
curl -X POST https://api.dragdropdo.com/api/v1/do \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"action": "lock",
"file_keys": ["file_key_1"],
"parameters": {
"password": "secure-password"
}
}'
Unlock PDF
Removes password protection from PDFs.
curl -X POST https://api.dragdropdo.com/api/v1/do \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"action": "unlock",
"file_keys": ["file_key_1"],
"parameters": {
"password": "current-password"
}
}'
Reset PDF password
Changes the password on password‑protected PDFs.
curl -X POST https://api.dragdropdo.com/api/v1/do \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"action": "reset_password",
"file_keys": ["file_key_1"],
"parameters": {
"old_password": "old",
"new_password": "new"
}
}'