Skip to main content
POST
/
api
/
v1
/
dev
/
tools
/
pdf
/
split
Split PDF
curl --request POST \
  --url https://api.autype.com/api/v1/dev/tools/pdf/split \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "fileId": "550e8400-e29b-41d4-a716-446655440000",
  "ranges": [
    "1-3",
    "4-6",
    "7-"
  ],
  "webhook": {
    "webhookUrl": "https://example.com/webhook",
    "webhookAuth": {
      "headerName": "X-API-Key",
      "headerValue": "my-secret-key",
      "basicAuthUsername": "user",
      "basicAuthPassword": "pass"
    }
  }
}
'
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "action": "pdf.merge",
  "status": "PENDING",
  "inputFileIds": [
    "file-id-1",
    "file-id-2"
  ],
  "outputFileId": null,
  "error": null,
  "createdAt": "2023-11-07T05:31:56Z",
  "startedAt": {},
  "completedAt": {},
  "metadata": {}
}

Authorizations

X-API-Key
string
header
required

API Key (starts with ak_...)

Body

application/json
fileId
string
required

File ID of the PDF to split

Example:

"550e8400-e29b-41d4-a716-446655440000"

ranges
string[]
required

Page ranges to split into separate PDFs

Example:
["1-3", "4-6", "7-"]
webhook
object

Optional webhook configuration

Response

201 - application/json

Split job created

id
string
required

Job ID

Example:

"550e8400-e29b-41d4-a716-446655440000"

action
string
required

Action that was performed

Example:

"pdf.merge"

status
enum<string>
required

Current job status

Available options:
PENDING,
PROCESSING,
COMPLETED,
FAILED
Example:

"PENDING"

inputFileIds
string[]
required

Input file IDs

Example:
["file-id-1", "file-id-2"]
outputFileId
object
required

Output file ID (available when COMPLETED)

Example:

null

error
object
required

Error message (available when FAILED)

Example:

null

createdAt
string<date-time>
required

Job creation timestamp

startedAt
object
required

Job start timestamp

completedAt
object
required

Job completion timestamp

metadata
object

Additional metadata (e.g. PDF metadata result)