Skip to main content
This guide builds a two-sided business card template from your server, the way you would by hand in the Print.App dashboard. Every request uses a secret key.
Placing content on pages needs an account on the new editor (Settings → Designer in the dashboard). Accounts still on the classic editor can create designs and manage their pages, but POST /v2/designs/{id}/ops answers 409 editor_not_supported.

1. Create the design

POST /v2/designs makes blank pages at a trim size. Bleed sits outside the trim and the safe margin inside it.
The answer is the new design. Keep its id. POST /v2/files downloads an image from a public URL into your files. For a file that is only on your server, use a direct upload instead.
The file’s id is what you place on a page as asset. Vector graphics go in the same way: upload the .svg file, then place it with asset, and it stays vector in print. Don’t send SVG markup inline in an operation’s svg property: the firewall in front of the API refuses request bodies that carry markup, with an HTML 403. For an SVG your server generates, start a direct upload with "contentType": "image/svg+xml", post the file to the form it returns, then wait for GET /v2/files/{id} to answer 200 (a few seconds) before placing it.

3. Put content on the front

POST /v2/designs/{id}/ops runs a batch of operations. Boxes are [x, y, width, height] from the top-left of the trim, in units; text sizes are in points. Each item you add gets a ref, a name you choose, so later operations can target it.
  • Colours are hex values. Fonts are family names your account has: list them with GET /v2/fonts, or import one with POST /v2/fonts.
  • A field makes the item a field customers fill in the editor’s form. Items without one are locked as decoration by default; set lock to change that.
  • The batch is all or nothing. A malformed operation refuses the whole batch with 400 before anything runs; one that fails while running answers 422 ops_failed, and nothing is saved. Either way details gives every operation’s result.
  • Add "dryRun": true to see the results and the resulting content without saving.
The answer lists each operation’s result, with the id of every item added, plus the design and its content now. The full list of operations and their properties is in the OpsBatch schema on that endpoint’s page: text, shapes, graphics, photo frames, patterns, borders, QR codes, calendars, curved text, pages and design settings.

4. Read and change what is on the pages

GET /v2/designs/{id}/content describes every item on every page: its id, ref, type, box, text, font and colour. Change an item with item.update, targeting its ref or id, and send only what changes:
Items a person added in the editor have no ref; target them by id.

5. Sell it

Assign the design to a store product with PUT /v2/products/{productId}:
Without a store, POST /v2/links gives you a create.print.app link that opens the design for a customer to fill in.