PDF editor

See what a recipe would do

Runs the recipe against the document without writing anything and reports, for each operation, the pages it resolves to and what it would do — or why it cannot. Free, and never recorded as a job. A bad recipe still returns 200 with ok: false; the failing operation is marked blocking and everything after it not_evaluated.

post/pdf/edit/preflight

Request

  • Base URL: https://api.podpdf.com
  • URL: https://api.podpdf.com/pdf/edit/preflight
  • Auth: API key in header X-API-Key

Request body

source_keystring

Key from /pdf/upload-url. Give this or input.

filenamestring

Name of the document, with source_key.

commit_tokenstring

Makes a save safe to retry — the same token returns the first result instead of charging again. Ignored by preflight.

Example request

{
  "source_key": "pdf-uploads/01HZ…/01J8…pdf",
  "recipe": [
    {
      "op": "pages.rotate",
      "pages": "1",
      "degrees": 90
    },
    {
      "op": "bates.stamp",
      "prefix": "ACME-",
      "start": 1,
      "digits": 6
    },
    {
      "op": "metadata.strip"
    }
  ],
  "commit_token": "01JB7QRSTUV",
  "options": {
    "output_filename": "contract-stamped"
  }
}

Response

What the recipe would do

okboolean

Whether the recipe would save.

costnumber

What saving would cost, in dollars.

Example response

{
  "operations": [
    {
      "op": "bates.stamp"
    }
  ],
  "document": {
    "max_pages": 200
  },
  "cost": 0.0025,
  "error": {
    "code": "PAGE_ID_UNKNOWN"
  }
}

Changes

No recorded changes to this operation across all 2 revisions of this API.