PDF Blocks
PricingSupport
Start Free
Go to Page

Actions overview

What an action is, the full catalog of 17 actions grouped by capability, the /v1/<action> convention, and how outputs feed back in as inputs.

An action is a single, pure PDF transformation exposed as one endpoint. You send a document, the action does exactly one thing to it — merge, watermark, encrypt, rotate, split — and you get the result back. Actions hold no state and share no context; each call stands alone. That uniformity is what lets you snap them together into pipelines.

What an action is

Every action is a POST to /v1/<action>, where <action> is the wire name in the tables below. They all follow the same request and response contract: a multipart/form-data body with the input PDF in a file field, authenticated with the X-API-Key header. Most return a single application/pdf; the split family returns several documents.

The catalog

Seventeen actions, grouped by capability. Each links to its full reference.

Merge & Split

Action Route What it does
Merge documents /v1/merge_documents Combine an ordered array of PDFs into one document.
Split by page count /v1/split_by_page_count Break a PDF into consecutive parts of a fixed page count.
Split at page /v1/split_at_page Split a PDF into two parts at a page boundary.
Split by file size /v1/split_by_size Break a PDF into parts each no larger than a byte limit.
Split into page groups /v1/split_by_groups Break a PDF into groups of pages that you define.

The four split actions each produce several documents; you choose the packaging with the Accept header — see Response formats.

Watermarks

Action Route What it does
Add text watermark /v1/add_text_watermark Stamp up to three lines of styled text across the pages.
Add image watermark /v1/add_image_watermark Stamp a PNG or JPEG image, such as a logo, across the pages.

Passwords and security

Action Route What it does
Add password /v1/add_password Encrypt a document with an open and/or permissions password.
Remove password /v1/remove_password Decrypt a document when you know its password.
Add restrictions /v1/add_restrictions Set permission flags for printing, copying, and editing.
Remove restrictions /v1/remove_restrictions Clear the permission flags from a document.
Remove signatures /v1/remove_signatures Strip digital signatures so the document can be edited.

Pages

Action Route What it does
Extract pages /v1/extract_pages Keep a chosen set of pages and drop the rest.
Remove pages /v1/remove_pages Drop a chosen set of pages and keep the rest.
Rotate pages /v1/rotate_pages Turn chosen pages by a multiple of 90 degrees.
Reverse pages /v1/reverse_pages Flip the page order end to end.
Reorder pages /v1/reorder_pages Rearrange pages into a caller-specified order.

How actions compose

Because every action takes a PDF and (for single-output actions) returns a PDF, one action’s output is a valid input to the next. Nothing is stored between calls, so you compose by piping bytes: hold the response of one request in memory and post it as the file of the next.

A typical pipeline reads left to right:

merge_documents  →  add_text_watermark  →  add_password
   (many PDFs)         (one watermarked)      (one encrypted)

The Chaining actions guide shows this end to end, in code, without touching disk.

Single-output vs. multi-output

Most actions return one application/pdf document. The four split actions return many, and let you pick how they are packaged — a ZIP archive, a JSON envelope, or a multipart/mixed body — through content negotiation. That mechanism has one home: Response formats.