EN
Open PostPal app
Automation

API Flow

An API flow is PostPal's automated sending engine: you submit recipients programmatically through the API, PostPal collects them and forms a batch in a recurring weekly trigger window, then sends it as a postcard mailing. Billing is based on the batch size that is actually sent. Every flow needs a linked postcard design. Designs can define Markdown areas whose content is supplied individually per API request through content. QR codes must be created as API QRs in the Studio when their value should be supplied per request through qr_codes; these qr_codes values must be complete scan-ready HTTP(S) URLs. With Plus, API images can be supplied per recipient through images. Designs with Markdown areas or API images in shippable variants or variants still needed by pending entries are for API flows and are not offered in regular campaigns.

An API flow is PostPal's automated sending engine for recipients submitted programmatically. Instead of sending an existing audience, a flow continuously receives individual entries through the PostPal API and groups them into recurring mailings.

How a flow works:

  • You submit recipients through the API; they are collected as entries in the flow (states: pending, batched, skipped, failed).
  • Optionally, you submit recipient-specific Markdown content through content when the linked design defines Markdown areas.
  • Optionally, you submit recipient-specific QR values through qr_codes when the linked design defines QR codes with API field names.
  • With Plus, supply individual pictures through images when the design defines API images. Every image field name of the shippable variants is then required, starting with the first available default name image_url_1.
  • In a weekly trigger window, PostPal forms a batch from due entries and creates a postcard mailing.
  • Billing is based on the actual batch size.

A new flow is a draft: PostPal saves it automatically while you set it up, and requests to it are rejected with 422. “Flow erstellen” makes it active; from then on it is active or paused and needs a linked postcard design. If credit is not sufficient for a batch, the flow remains configured and open entries are retried during the next run. Designs with Markdown areas or API images in shippable variants or variants needed by pending entries are reserved for API flows and are not available in regular campaigns.

API images: PostPal downloads public HTTPS image URLs without redirects before creating an entry and checks the file and print resolution. The image is fitted whole inside its rectangular frame using Fit; the uploaded Studio example is never printed as a fallback. Even image-only API designs are rendered per recipient. See the REST API guide for formats, limits and errors.

The image contract is fixed from the first API entry, even after that entry has been processed. Added or removed API images, renamed fields and design switches with a different image contract are rejected. A 0% variant without pending entries is excluded and may still be edited.

Numbers at the start of a Markdown line are preserved as submitted, including dates such as 20. Mai 2026 and 30. Mai 2026. Numbered lists are not automatically renumbered.

Markdown content is bound to the API field names defined in the design. In v1, every Markdown area is required and unknown keys are rejected. PostPal only accepts the supported Markdown subset and checks that the text physically fits into the defined area before storing the entry.

The example content stored for a Markdown area in the Studio is only a design preview. It is not printed as fallback content for API flows. If the design has a Markdown area with the API field name personal_note, the API request must submit content.personal_note. Line breaks are written normally in the editor, but in the API JSON string they must be sent as \n.

QR values are also bound to the API field names defined in the design. A QR code is part of the API contract only when it is created as an API QR in the Studio. URL QRs store their target URL in the design and are not supplied through qr_codes. In v1, every API QR field is required and unknown keys are rejected. The value under qr_codes.<field_name> is the complete QR target URL. PostPal checks before storing the entry that this URL is a valid HTTP(S) URL and fits into a QR code. If the design has an API QR with the API field name voucher_url_1, the API request must submit qr_codes.voucher_url_1 as a complete scan-ready URL.

Emoji in content fields and in recipient data such as the first name are printed as colour Google Noto graphics, in the preview exactly as in the final print PDF. The emoji catalogue ships with PostPal and cannot yet contain very recent characters. When such a character arrives, the entry preview states that it contains an unsupported emoji — retrying does not help there. In print the same rule applies as for other single-recipient failures: only the affected recipient is skipped and reported, while every other recipient prints normally.

The technical API reference lives in the official API documentation, and in machine-readable form in the OpenAPI file.

The available design formats, materials, finishes and payment methods in the flow form follow the published price list, including their names and discounts. Formats must also be supported by the Postcard Studio editor. Without a published price list you can start a draft but cannot complete flow creation.

Open in PostPal

Frequently asked questions

How is an API flow different from a normal campaign?

A campaign targets an existing audience. A PostPal API flow receives individual recipients continuously through the API and automatically groups them into recurring mailings, which is useful for event-based postcards.

How is an API flow billed?

The actual batch size determines the calculation under the published price list. Any minimum order quantity in that list applies to production costs. The minimum quantity per shipment only controls when a weekly batch is formed.

What happens if my credit is not enough for a batch?

The flow remains configured. Open entries are retried in the next weekly run, and you are notified about the missing credit.

Do I need a design for an API flow?

Yes. Every API flow needs a linked postcard design before it can create mailings.

Can I start an API flow and finish setting it up later?

Yes. A new flow is a draft and is saved automatically while you set it up. You find it in the API Flows overview and continue where you left off. It only becomes active when you click “Flow erstellen”.

What happens if my app sends requests to a draft?

The API rejects them with status 422 and nothing is collected. Finish the flow with “Flow erstellen” first.

Can an API flow print longer individual text per recipient?

Yes, when the design contains Markdown areas. The API request must then send the matching content keys. PostPal checks syntax and physical fit synchronously before creating a flow entry.

Can an API flow print individual QR links per request?

Yes, when the design contains API QRs with API field names. The API request must then send the matching qr_codes keys as complete HTTP(S) URLs. URL QRs are configured in the design and are not part of the API contract. Unknown, missing, empty or non-fitting QR values are rejected with 422.

Can an API flow print individual images per recipient?

Yes. Enable an API image in the Studio with Plus and send an images object with exactly every image field name of the shippable variants in each request. Default names start at image_url_1; names already in use are skipped. Values are public HTTPS URLs without redirects; PostPal downloads and validates each image before acceptance. The image is fitted whole inside its rectangular frame. The Studio example is only a preview. Even a design containing only API images is personalized per recipient. The REST API guide describes formats and limits.

Can I change the API image fields of a design that has already been used?

After the first API entry, the API image fields of shippable variants or variants needed by pending entries stay fixed: no added or removed API images, renamed fields or changed contract through a design switch. Use a new design in a new flow for a different image contract. A variant with a 0% sending share and no pending entries remains an editable draft.

Can I send emoji through the API?

Yes. Common Unicode emoji in content fields and in recipient data such as the first name are printed as colour Google Noto graphics — in the preview exactly as in the final print PDF. They are never printed as a question mark.

What happens with an emoji PostPal does not know yet?

PostPal uses a fixed emoji catalogue that cannot yet contain very recent characters. The entry preview then states that it contains an unsupported emoji, and retrying does not help. In print only that one recipient is skipped and reported, while every other recipient prints normally.

Where can I find the technical API documentation?

The technical reference lives in the official API documentation. A machine-readable version is available as the OpenAPI file.