Skip to main content
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"
    }
  }'
import { Dragdropdo } from "dragdropdo-sdk";

const client = new Dragdropdo({
  apiKey: "your-api-key",
  baseURL: "https://api.dragdropdo.com",
});

// Using convenience method
const operation = await client.convert(["file_key_1"], "png", {
  user_id: "user-123",
  source: "api",
});

// Or using createOperation
const operation = await client.createOperation({
  action: "convert",
  fileKeys: ["file_key_1"],
  parameters: {
    convert_to: "png",
  },
  notes: {
    user_id: "user-123",
    source: "api",
  },
});

console.log("Main task ID:", operation.mainTaskId);
from dragdropdo_sdk import Dragdropdo, D3ClientConfig

client = Dragdropdo(
    api_key="your-api-key",
    base_url="https://api.dragdropdo.com"
)

# Using convenience method
operation = client.convert(
    file_keys=["file_key_1"],
    convert_to="png",
    notes={"user_id": "user-123", "source": "api"}
)

# Or using create_operation
operation = client.create_operation(
    action="convert",
    file_keys=["file_key_1"],
    parameters={"convert_to": "png"},
    notes={"user_id": "user-123", "source": "api"}
)

print("Main task ID:", operation.main_task_id)
use DragdropdoSdk\Dragdropdo;

$client = new Dragdropdo([
    'api_key' => 'your-api-key',
    'base_url' => 'https://api.dragdropdo.com',
]);

// Using convenience method
$operation = $client->convert(
    ['file_key_1'],
    'png',
    ['user_id' => 'user-123', 'source' => 'api']
);

// Or using createOperation
$operation = $client->createOperation([
    'action' => 'convert',
    'file_keys' => ['file_key_1'],
    'parameters' => ['convert_to' => 'png'],
    'notes' => ['user_id' => 'user-123', 'source' => 'api'],
]);

echo "Main task ID: " . $operation['main_task_id'] . "\n";
require 'dragdropdo_sdk'

client = DragdropdoSdk::Dragdropdo.new(
  api_key: 'your-api-key',
  base_url: 'https://api.dragdropdo.com'
)

# Using convenience method
operation = client.convert(
  file_keys: ['file_key_1'],
  convert_to: 'png',
  notes: { user_id: 'user-123', source: 'api' }
)

# Or using create_operation
operation = client.create_operation(
  action: 'convert',
  file_keys: ['file_key_1'],
  parameters: { convert_to: 'png' },
  notes: { user_id: 'user-123', source: 'api' }
)

puts "Main task ID: #{operation[:main_task_id]}"
import "github.com/d3/dragdropdo-sdk-go"

client, _ := d3.NewDragdropdo(d3.Config{
    APIKey:  "your-api-key",
    BaseURL: "https://api.dragdropdo.com",
});

// Using convenience method
operation, _ := client.Convert(
    []string{"file_key_1"},
    "png",
    map[string]string{"user_id": "user-123", "source": "api"},
);

// Or using CreateOperation
operation, _ := client.CreateOperation(d3.OperationOptions{
    Action:   "convert",
    FileKeys: []string{"file_key_1"},
    Parameters: map[string]interface{}{
        "convert_to": "png",
    },
    Notes: map[string]string{"user_id": "user-123", "source": "api"},
});

fmt.Printf("Main task ID: %s\n", operation.MainTaskID)
import com.dragdropdo.sdk.Dragdropdo;
import com.dragdropdo.sdk.DragdropdoConfig;
import com.dragdropdo.sdk.models.*;
import java.util.*;

Dragdropdo client = new Dragdropdo(
    new DragdropdoConfig("your-api-key")
        .setBaseUrl("https://api.dragdropdo.com")
);

// Using convenience method
OperationResponse operation = client.convert(
    List.of("file_key_1"),
    "png",
    Map.of("user_id", "user-123", "source", "api")
);

// Or using createOperation
operation = client.createOperation(new OperationOptions(
    "convert",
    List.of("file_key_1"),
    Map.of("convert_to", "png"),
    Map.of("user_id", "user-123", "source", "api")
));

System.out.println("Main task ID: " + operation.getMainTaskId());

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"
    }
  }'
import { Dragdropdo } from "dragdropdo-sdk";

const client = new Dragdropdo({
  apiKey: "your-api-key",
  baseURL: "https://api.dragdropdo.com",
});

// Using convenience method
const operation = await client.convert(["file_key_1"], "png", {
  user_id: "user-123",
  source: "api",
});

// Or using createOperation
const operation = await client.createOperation({
  action: "convert",
  fileKeys: ["file_key_1"],
  parameters: {
    convert_to: "png",
  },
  notes: {
    user_id: "user-123",
    source: "api",
  },
});

console.log("Main task ID:", operation.mainTaskId);
from dragdropdo_sdk import Dragdropdo, D3ClientConfig

client = Dragdropdo(
    api_key="your-api-key",
    base_url="https://api.dragdropdo.com"
)

# Using convenience method
operation = client.convert(
    file_keys=["file_key_1"],
    convert_to="png",
    notes={"user_id": "user-123", "source": "api"}
)

# Or using create_operation
operation = client.create_operation(
    action="convert",
    file_keys=["file_key_1"],
    parameters={"convert_to": "png"},
    notes={"user_id": "user-123", "source": "api"}
)

print("Main task ID:", operation.main_task_id)
use DragdropdoSdk\Dragdropdo;

$client = new Dragdropdo([
    'api_key' => 'your-api-key',
    'base_url' => 'https://api.dragdropdo.com',
]);

// Using convenience method
$operation = $client->convert(
    ['file_key_1'],
    'png',
    ['user_id' => 'user-123', 'source' => 'api']
);

// Or using createOperation
$operation = $client->createOperation([
    'action' => 'convert',
    'file_keys' => ['file_key_1'],
    'parameters' => ['convert_to' => 'png'],
    'notes' => ['user_id' => 'user-123', 'source' => 'api'],
]);

echo "Main task ID: " . $operation['main_task_id'] . "\n";
require 'dragdropdo_sdk'

client = DragdropdoSdk::Dragdropdo.new(
  api_key: 'your-api-key',
  base_url: 'https://api.dragdropdo.com'
)

# Using convenience method
operation = client.convert(
  file_keys: ['file_key_1'],
  convert_to: 'png',
  notes: { user_id: 'user-123', source: 'api' }
)

# Or using create_operation
operation = client.create_operation(
  action: 'convert',
  file_keys: ['file_key_1'],
  parameters: { convert_to: 'png' },
  notes: { user_id: 'user-123', source: 'api' }
)

puts "Main task ID: #{operation[:main_task_id]}"
import "github.com/d3/dragdropdo-sdk-go"

client, _ := d3.NewDragdropdo(d3.Config{
    APIKey:  "your-api-key",
    BaseURL: "https://api.dragdropdo.com",
});

// Using convenience method
operation, _ := client.Convert(
    []string{"file_key_1"},
    "png",
    map[string]string{"user_id": "user-123", "source": "api"},
);

// Or using CreateOperation
operation, _ := client.CreateOperation(d3.OperationOptions{
    Action:   "convert",
    FileKeys: []string{"file_key_1"},
    Parameters: map[string]interface{}{
        "convert_to": "png",
    },
    Notes: map[string]string{"user_id": "user-123", "source": "api"},
});

fmt.Printf("Main task ID: %s\n", operation.MainTaskID)
import com.dragdropdo.sdk.Dragdropdo;
import com.dragdropdo.sdk.DragdropdoConfig;
import com.dragdropdo.sdk.models.*;
import java.util.*;

Dragdropdo client = new Dragdropdo(
    new DragdropdoConfig("your-api-key")
        .setBaseUrl("https://api.dragdropdo.com")
);

// Using convenience method
OperationResponse operation = client.convert(
    List.of("file_key_1"),
    "png",
    Map.of("user_id", "user-123", "source", "api")
);

// Or using createOperation
operation = client.createOperation(new OperationOptions(
    "convert",
    List.of("file_key_1"),
    Map.of("convert_to", "png"),
    Map.of("user_id", "user-123", "source", "api")
));

System.out.println("Main task ID: " + operation.getMainTaskId());
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"
    }
  }'
import { Dragdropdo } from "dragdropdo-sdk";

const client = new Dragdropdo({
  apiKey: "your-api-key",
  baseURL: "https://api.dragdropdo.com",
});

// Convert PDF to PNG
const operation = await client.convert(["file_key_1"], "png");

// Convert DOCX to PDF
const operation = await client.convert(["file_key_1"], "pdf");
from dragdropdo_sdk import Dragdropdo, D3ClientConfig

client = Dragdropdo(
    api_key="your-api-key",
    base_url="https://api.dragdropdo.com"
)

# Convert PDF to PNG
operation = client.convert(["file_key_1"], "png")

# Convert DOCX to PDF
operation = client.convert(["file_key_1"], "pdf")
use DragdropdoSdk\Dragdropdo;

$client = new Dragdropdo([
    'api_key' => 'your-api-key',
    'base_url' => 'https://api.dragdropdo.com',
]);

// Convert PDF to PNG
$operation = $client->convert(['file_key_1'], 'png');

// Convert DOCX to PDF
$operation = $client->convert(['file_key_1'], 'pdf');
require 'dragdropdo_sdk'

client = DragdropdoSdk::Dragdropdo.new(
  api_key: 'your-api-key',
  base_url: 'https://api.dragdropdo.com'
)

# Convert PDF to PNG
operation = client.convert(file_keys: ['file_key_1'], convert_to: 'png')

# Convert DOCX to PDF
operation = client.convert(file_keys: ['file_key_1'], convert_to: 'pdf')
import "github.com/d3/dragdropdo-sdk-go"

client, _ := d3.NewDragdropdo(d3.Config{
    APIKey:  "your-api-key",
    BaseURL: "https://api.dragdropdo.com",
});

// Convert PDF to PNG
operation, _ := client.Convert([]string{"file_key_1"}, "png", nil)

// Convert DOCX to PDF
operation, _ := client.Convert([]string{"file_key_1"}, "pdf", nil)
import com.dragdropdo.sdk.Dragdropdo;
import com.dragdropdo.sdk.DragdropdoConfig;
import java.util.*;

Dragdropdo client = new Dragdropdo(
    new DragdropdoConfig("your-api-key")
        .setBaseUrl("https://api.dragdropdo.com")
);

// Convert PDF to PNG
OperationResponse operation = client.convert(List.of("file_key_1"), "png", null);

// Convert DOCX to PDF
operation = client.convert(List.of("file_key_1"), "pdf", null);

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"
    }
  }'
import { Dragdropdo } from "dragdropdo-sdk";

const client = new Dragdropdo({
  apiKey: "your-api-key",
  baseURL: "https://api.dragdropdo.com",
});

// Compress with recommended level
const operation = await client.compress(["file_key_1"], "recommended");
from dragdropdo_sdk import Dragdropdo, D3ClientConfig

client = Dragdropdo(
    api_key="your-api-key",
    base_url="https://api.dragdropdo.com"
)

# Compress with recommended level
operation = client.compress(["file_key_1"], "recommended")
use DragdropdoSdk\Dragdropdo;

$client = new Dragdropdo([
    'api_key' => 'your-api-key',
    'base_url' => 'https://api.dragdropdo.com',
]);

// Compress with recommended level
$operation = $client->compress(['file_key_1'], 'recommended');
require 'dragdropdo_sdk'

client = DragdropdoSdk::Dragdropdo.new(
  api_key: 'your-api-key',
  base_url: 'https://api.dragdropdo.com'
)

# Compress with recommended level
operation = client.compress(file_keys: ['file_key_1'], compression_value: 'recommended')
import "github.com/d3/dragdropdo-sdk-go"

client, _ := d3.NewDragdropdo(d3.Config{
    APIKey:  "your-api-key",
    BaseURL: "https://api.dragdropdo.com",
});

// Compress with recommended level
operation, _ := client.Compress([]string{"file_key_1"}, "recommended", nil)
import com.dragdropdo.sdk.Dragdropdo;
import com.dragdropdo.sdk.DragdropdoConfig;
import java.util.*;

Dragdropdo client = new Dragdropdo(
    new DragdropdoConfig("your-api-key")
        .setBaseUrl("https://api.dragdropdo.com")
);

// Compress with recommended level
OperationResponse operation = client.compress(List.of("file_key_1"), "recommended", null);

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"]
  }'
import { Dragdropdo } from "dragdropdo-sdk";

const client = new Dragdropdo({
  apiKey: "your-api-key",
  baseURL: "https://api.dragdropdo.com",
});

// Merge multiple PDFs
const operation = await client.merge(["file_key_1", "file_key_2"]);
from dragdropdo_sdk import Dragdropdo, D3ClientConfig

client = Dragdropdo(
    api_key="your-api-key",
    base_url="https://api.dragdropdo.com"
)

# Merge multiple PDFs
operation = client.merge(["file_key_1", "file_key_2"])
use DragdropdoSdk\Dragdropdo;

$client = new Dragdropdo([
    'api_key' => 'your-api-key',
    'base_url' => 'https://api.dragdropdo.com',
]);

// Merge multiple PDFs
$operation = $client->merge(['file_key_1', 'file_key_2']);
require 'dragdropdo_sdk'

client = DragdropdoSdk::Dragdropdo.new(
  api_key: 'your-api-key',
  base_url: 'https://api.dragdropdo.com'
)

# Merge multiple PDFs
operation = client.merge(file_keys: ['file_key_1', 'file_key_2'])
import "github.com/d3/dragdropdo-sdk-go"

client, _ := d3.NewDragdropdo(d3.Config{
    APIKey:  "your-api-key",
    BaseURL: "https://api.dragdropdo.com",
});

// Merge multiple PDFs
operation, _ := client.Merge([]string{"file_key_1", "file_key_2"}, nil)
import com.dragdropdo.sdk.Dragdropdo;
import com.dragdropdo.sdk.DragdropdoConfig;
import java.util.*;

Dragdropdo client = new Dragdropdo(
    new DragdropdoConfig("your-api-key")
        .setBaseUrl("https://api.dragdropdo.com")
);

// Merge multiple PDFs
OperationResponse operation = client.merge(List.of("file_key_1", "file_key_2"), null);

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"]
  }'
import { Dragdropdo } from "dragdropdo-sdk";

const client = new Dragdropdo({
  apiKey: "your-api-key",
  baseURL: "https://api.dragdropdo.com",
});

// Create zip archive
const operation = await client.zip(["file_key_1", "file_key_2"]);
from dragdropdo_sdk import Dragdropdo, D3ClientConfig

client = Dragdropdo(
    api_key="your-api-key",
    base_url="https://api.dragdropdo.com"
)

# Create zip archive
operation = client.zip(["file_key_1", "file_key_2"])
use DragdropdoSdk\Dragdropdo;

$client = new Dragdropdo([
    'api_key' => 'your-api-key',
    'base_url' => 'https://api.dragdropdo.com',
]);

// Create zip archive
$operation = $client->zip(['file_key_1', 'file_key_2']);
require 'dragdropdo_sdk'

client = DragdropdoSdk::Dragdropdo.new(
  api_key: 'your-api-key',
  base_url: 'https://api.dragdropdo.com'
)

# Create zip archive
operation = client.zip(file_keys: ['file_key_1', 'file_key_2'])
import "github.com/d3/dragdropdo-sdk-go"

client, _ := d3.NewDragdropdo(d3.Config{
    APIKey:  "your-api-key",
    BaseURL: "https://api.dragdropdo.com",
});

// Create zip archive
operation, _ := client.Zip([]string{"file_key_1", "file_key_2"}, nil)
import com.dragdropdo.sdk.Dragdropdo;
import com.dragdropdo.sdk.DragdropdoConfig;
import java.util.*;

Dragdropdo client = new Dragdropdo(
    new DragdropdoConfig("your-api-key")
        .setBaseUrl("https://api.dragdropdo.com")
);

// Create zip archive
OperationResponse operation = client.zip(List.of("file_key_1", "file_key_2"), null);

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"
    }
  }'
import { Dragdropdo } from "dragdropdo-sdk";

const client = new Dragdropdo({
  apiKey: "your-api-key",
  baseURL: "https://api.dragdropdo.com",
});

// Lock PDF with password
const operation = await client.lockPdf(["file_key_1"], "secure-password");
from dragdropdo_sdk import Dragdropdo, D3ClientConfig

client = Dragdropdo(
    api_key="your-api-key",
    base_url="https://api.dragdropdo.com"
)

# Lock PDF with password
operation = client.lock_pdf(["file_key_1"], "secure-password")
use DragdropdoSdk\Dragdropdo;

$client = new Dragdropdo([
    'api_key' => 'your-api-key',
    'base_url' => 'https://api.dragdropdo.com',
]);

// Lock PDF with password
$operation = $client->lockPdf(['file_key_1'], 'secure-password');
require 'dragdropdo_sdk'

client = DragdropdoSdk::Dragdropdo.new(
  api_key: 'your-api-key',
  base_url: 'https://api.dragdropdo.com'
)

# Lock PDF with password
operation = client.lock_pdf(file_keys: ['file_key_1'], password: 'secure-password')
import "github.com/d3/dragdropdo-sdk-go"

client, _ := d3.NewDragdropdo(d3.Config{
    APIKey:  "your-api-key",
    BaseURL: "https://api.dragdropdo.com",
});

// Lock PDF with password
operation, _ := client.LockPdf([]string{"file_key_1"}, "secure-password", nil)
import com.dragdropdo.sdk.Dragdropdo;
import com.dragdropdo.sdk.DragdropdoConfig;
import java.util.*;

Dragdropdo client = new Dragdropdo(
    new DragdropdoConfig("your-api-key")
        .setBaseUrl("https://api.dragdropdo.com")
);

// Lock PDF with password
OperationResponse operation = client.lockPdf(List.of("file_key_1"), "secure-password", null);

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"
    }
  }'
import { Dragdropdo } from "dragdropdo-sdk";

const client = new Dragdropdo({
  apiKey: "your-api-key",
  baseURL: "https://api.dragdropdo.com",
});

// Unlock PDF
const operation = await client.unlockPdf(["file_key_1"], "current-password");
from dragdropdo_sdk import Dragdropdo, D3ClientConfig

client = Dragdropdo(
    api_key="your-api-key",
    base_url="https://api.dragdropdo.com"
)

# Unlock PDF
operation = client.unlock_pdf(["file_key_1"], "current-password")
use DragdropdoSdk\Dragdropdo;

$client = new Dragdropdo([
    'api_key' => 'your-api-key',
    'base_url' => 'https://api.dragdropdo.com',
]);

// Unlock PDF
$operation = $client->unlockPdf(['file_key_1'], 'current-password');
require 'dragdropdo_sdk'

client = DragdropdoSdk::Dragdropdo.new(
  api_key: 'your-api-key',
  base_url: 'https://api.dragdropdo.com'
)

# Unlock PDF
operation = client.unlock_pdf(file_keys: ['file_key_1'], password: 'current-password')
import "github.com/d3/dragdropdo-sdk-go"

client, _ := d3.NewDragdropdo(d3.Config{
    APIKey:  "your-api-key",
    BaseURL: "https://api.dragdropdo.com",
});

// Unlock PDF
operation, _ := client.UnlockPdf([]string{"file_key_1"}, "current-password", nil)
import com.dragdropdo.sdk.Dragdropdo;
import com.dragdropdo.sdk.DragdropdoConfig;
import java.util.*;

Dragdropdo client = new Dragdropdo(
    new DragdropdoConfig("your-api-key")
        .setBaseUrl("https://api.dragdropdo.com")
);

// Unlock PDF
OperationResponse operation = client.unlockPdf(List.of("file_key_1"), "current-password", null);

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"
    }
  }'
import { Dragdropdo } from "dragdropdo-sdk";

const client = new Dragdropdo({
  apiKey: "your-api-key",
  baseURL: "https://api.dragdropdo.com",
});

// Reset PDF password
const operation = await client.resetPdfPassword(
  ["file_key_1"],
  "old-password",
  "new-password"
);
from dragdropdo_sdk import Dragdropdo, D3ClientConfig

client = Dragdropdo(
    api_key="your-api-key",
    base_url="https://api.dragdropdo.com"
)

# Reset PDF password
operation = client.reset_pdf_password(
    ["file_key_1"],
    "old-password",
    "new-password"
)
use DragdropdoSdk\Dragdropdo;

$client = new Dragdropdo([
    'api_key' => 'your-api-key',
    'base_url' => 'https://api.dragdropdo.com',
]);

// Reset PDF password
$operation = $client->resetPdfPassword(['file_key_1'], 'old-password', 'new-password');
require 'dragdropdo_sdk'

client = DragdropdoSdk::Dragdropdo.new(
  api_key: 'your-api-key',
  base_url: 'https://api.dragdropdo.com'
)

# Reset PDF password
operation = client.reset_pdf_password(
  file_keys: ['file_key_1'],
  old_password: 'old-password',
  new_password: 'new-password'
)
import "github.com/d3/dragdropdo-sdk-go"

client, _ := d3.NewDragdropdo(d3.Config{
    APIKey:  "your-api-key",
    BaseURL: "https://api.dragdropdo.com",
});

// Reset PDF password
operation, _ := client.ResetPdfPassword(
    []string{"file_key_1"},
    "old-password",
    "new-password",
    nil,
)
import com.dragdropdo.sdk.Dragdropdo;
import com.dragdropdo.sdk.DragdropdoConfig;
import java.util.*;

Dragdropdo client = new Dragdropdo(
    new DragdropdoConfig("your-api-key")
        .setBaseUrl("https://api.dragdropdo.com")
);

// Reset PDF password
OperationResponse operation = client.resetPdfPassword(
    List.of("file_key_1"),
    "old-password",
    "new-password",
    null
);