Skip to main content
POST
Create a optimize preset

Authorizations

Authorization
string
header
required

Your secret key as a bearer token, e.g. Authorization: Bearer sk_live_…. Secret keys are server-side only.

Query Parameters

draft
boolean
default:false

Save as a draft: hidden from the storefront, the dashboard lists and other records until published (POST …/{id}/publish), and deleted after 30 days if never published. Jobs can still run against it by id, so it can be tested with real files first.

dryRun
boolean
default:false

Validate and check references without saving: the response shows the record as it would be saved.

Body

application/json

A saved, named set of PDF optimizations (downsample or AI-upscale images, recompress, convert colors to CMYK/gray/RGB, outline text, flatten layers, thicken hairlines, strip junk, resize pages, set trim/crop boxes, add bleed, embed an output-intent ICC profile) that a job applies to the customer's PDF. Workflows point at it from an optimize step, workflow.streams[].steps[] { type: "optimize", config: { presetId } }, and rules from rule.accepts[].flow.optimize.presetId (when flow.optimize.enabled). The preset is read at run time, so edits apply to the next job. The proof sheet also takes its page size from pageResize and its ICC profile from outputIntent. Presets apply to PDFs only, including raster uploads after a Convert-to-PDF step; raster optimize ignores them. The stored shape is NOT the params shape of POST /jobs/optimize: here every group is an object with its own enabled switch and only groups with enabled true are applied (a group without enabled: true does nothing), scaleImages.targetRes is a single DPI number, and flattenLayers is { enabled }. Other keys in the optimize step's config, written in the POST /jobs/optimize params.pdf shape, replace the preset's group of the same name for that step. Groups run as: AI upscale and bleed fill first, then the DynaPDF pass (resize, boxes, conversion, compression, output intent).

title
string

Name shown in the dashboard's preset pickers, e.g. "Offset CMYK, 300 dpi, 3 mm bleed". The dashboard will not save a preset without one.

Maximum string length: 200
tags
string[]

Free-form labels for organising the Library. Not used at run time.

Maximum array length: 50
Required string length: 1 - 64
scaleImages
any
upscaleImages
any
compression
any
colorConversion
any
grayTo1Bit
any
textToOutlines
any
flattenLayers
any
hairlines
any
strip
any
pageResize
any
boundingBoxes
any
bleed
any
outputIntent
any

Response

OK

preset
Optimize preset · object

A saved, named set of PDF optimizations (downsample or AI-upscale images, recompress, convert colors to CMYK/gray/RGB, outline text, flatten layers, thicken hairlines, strip junk, resize pages, set trim/crop boxes, add bleed, embed an output-intent ICC profile) that a job applies to the customer's PDF. Workflows point at it from an optimize step, workflow.streams[].steps[] { type: "optimize", config: { presetId } }, and rules from rule.accepts[].flow.optimize.presetId (when flow.optimize.enabled). The preset is read at run time, so edits apply to the next job. The proof sheet also takes its page size from pageResize and its ICC profile from outputIntent. Presets apply to PDFs only, including raster uploads after a Convert-to-PDF step; raster optimize ignores them. The stored shape is NOT the params shape of POST /jobs/optimize: here every group is an object with its own enabled switch and only groups with enabled true are applied (a group without enabled: true does nothing), scaleImages.targetRes is a single DPI number, and flattenLayers is { enabled }. Other keys in the optimize step's config, written in the POST /jobs/optimize params.pdf shape, replace the preset's group of the same name for that step. Groups run as: AI upscale and bleed fill first, then the DynaPDF pass (resize, boxes, conversion, compression, output intent).

dryRun
boolean

Present and true when nothing was saved.