EN
Open PostPal app
API

REST endpoints v1

The PostPal REST API v1 provides production endpoints for programmatic campaigns and postcards. The most relevant endpoints are currently POST /api/v1/campaigns and POST /api/v1/postcards. Every request needs a valid account API token and is recorded in the API logs. Postcard requests for API flows can also include design-bound Markdown content and API QR values. Each account API token is limited to 600 postcard and 60 campaign requests per minute; exceeding the limit returns status 429. You can use the official API documentation, the OpenAPI file and the Postman collection.

The REST API v1 is the programmatic interface for technical integrations.

Important endpoints:

  • POST /api/v1/campaigns - create campaigns programmatically.
  • POST /api/v1/postcards - submit postcard requests.

Every request needs an account API token. Check payload structure and required fields precisely in these resources:

When the linked API flow design contains Markdown areas, POST /api/v1/postcards also expects a content object. Its keys must exactly match the Markdown API field names defined in the design. Supported syntax is limited to paragraphs, line breaks, bold, italic, bullet lists and numbered lists. Unsupported syntax, missing or unknown keys, and content that does not fit the area are rejected with 422; fit errors include additional details in meta.markdown_fit_errors.

Example text from the Studio is not an API fallback. API clients must always send Markdown content in the content object. Normal editor line breaks are sent as \n in the JSON payload, for example "Hallo **Max**,\n\n- Persönlicher Vorteil".

Emoji are allowed in content fields and in recipient data such as to.first_name, and are printed as colour Google Noto graphics. The emoji catalogue ships with PostPal and cannot yet contain very recent characters. Such a character does not cause a 422 on the request: it only surfaces at render time. The entry preview then points it out, and in print only the affected recipient is skipped and reported.

When the linked API flow design contains API QRs with API field names, POST /api/v1/postcards also expects a qr_codes object. Its keys must exactly match the QR API field names defined in the design. Each value must be a non-empty string with at most 2048 characters and must already be the complete scan-ready HTTP(S) URL. Missing, unknown, empty or non-fitting QR values are rejected with 422; fit errors include additional details in meta.qr_fit_errors. URL QRs store their target URL in the design and are not submitted in the qr_codes object.

A simple qr_codes fragment looks like this:

{
  "qr_codes": {
    "voucher_url_1": "https://example.com/voucher/1",
    "voucher_url_2": "https://example.com/voucher/2"
  }
}

Rate limit: Each account API token may call POST /api/v1/postcards up to 600 times per minute and POST /api/v1/campaigns up to 60 times per minute. Exceeding the limit returns status 429 with the X-RateLimit-Limit, X-RateLimit-Remaining and Retry-After headers, the latter indicating how many seconds to wait before retrying. Check the API logs for the history and exact error message.

Open in PostPal

Frequently asked questions

Which REST endpoints are available?

The v1 API provides endpoints for campaigns and postcards: POST /api/v1/campaigns and POST /api/v1/postcards.

How do I authenticate API requests?

Use an account API token from the PostPal API settings.

Is there machine-readable documentation?

Yes. The official API documentation, the OpenAPI file and the Postman collection are available.

Can POST /api/v1/postcards include longer individual text?

Yes, when the linked API flow design defines Markdown areas. The matching content keys must be submitted; mismatched, missing or overflowing content is rejected with 422.

Can POST /api/v1/postcards include individual QR targets?

Yes, when the linked API flow design defines API QRs with API field names. The matching qr_codes keys must be submitted as complete HTTP(S) URLs. URL QRs are configured in the design and are not submitted in the qr_codes object.

Can I send emoji in content fields and recipient data?

Yes. Common Unicode emoji are printed as colour Google Noto graphics and never as a question mark. The emoji catalogue ships with PostPal and cannot yet contain very recent characters; such a value is not rejected on the request, but the entry preview points it out, and in print only that one recipient is skipped and reported.

Is there a rate limit on the REST API?

Yes. POST /api/v1/postcards allows up to 600 requests per minute per account API token, POST /api/v1/campaigns allows up to 60 requests per minute. Exceeding the limit returns status 429 with the X-RateLimit-Limit, X-RateLimit-Remaining and Retry-After headers.