Skip to content

Developer API

Posthero API v1

Send printed letters and postcards from your code. Upload PDF designs, manage audiences, create and launch campaigns, and track every piece until it reaches the postal service.

Base URL https://api.posthero.app/v1

# 1. Upload your PDF design
curl -X POST https://api.posthero.app/v1/designs \
  -H "x-api-key: $POSTHERO_API_KEY" \
  -F name="Carta VIP" \
  -F productId=PRODUCT_ID \
  -F front=@carta.pdf

# 2. Create the campaign
curl -X POST https://api.posthero.app/v1/campaigns \
  -H "x-api-key: $POSTHERO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "VIP", "segmentId": "SEGMENT_ID",
        "designId": "DESIGN_ID" }'

# 3. Launch it: printed and mailed
curl -X POST https://api.posthero.app/v1/campaigns/{id}/launch \
  -H "x-api-key: $POSTHERO_API_KEY"
On this page

Introduction

The Posthero API lets you do from code everything you do in the dashboard for a PDF-based campaign: upload the design, manage audiences (segments, contacts and custom fields), create the campaign, get a quote, launch it (with the card on file or by invoice), add recipients to automated campaigns, pause and resume them, and track deliveries and print orders.

Everything is JSON (Content-Type: application/json) except design uploads, which use multipart/form-data. Dates are ISO 8601 UTC, money is in euros as decimal numbers, and ids are UUIDs except print orders (integers). DELETE endpoints answer 204 with no body.

Quickstart

  1. 1

    Open the dashboard at Settings → API keys. Create a key (account admins only).

  2. 2

    Store it in an environment variable:

    bash
    export POSTHERO_API_KEY="your_api_key"
  3. 3

    Make your first call. If you see your account name, you are all set:

    curl
    curl https://api.posthero.app/v1/account \
      -H "x-api-key: $POSTHERO_API_KEY"

Authentication

Send your API key with every request, in the x-api-key header or as Authorization: Bearer <key>. A key acts on its whole account, within its permissions; expired keys answer 401. These are the same keys the MCP server (POST /v1/mcp) uses.

Treat it like a password: keep it server-side and never ship it in a browser or mobile app.

curl https://api.posthero.app/v1/account \
  -H "x-api-key: $POSTHERO_API_KEY"

Permissions

When you create a key in Settings → API keys you choose what it can do, and you can change it later without rotating it. Give each integration only what it needs: if a key leaks, the damage is limited to those permissions.

scopes: null

Full access

Everything the account can do, including launching campaigns. The default, and what every key created before permissions existed keeps.

*:read

Read only

Every :read permission. Great for dashboards, BI or syncing delivery status: it never creates, changes or spends anything.

[…]

Custom

Pick individual permissions. For example, audience:write for an integration that only syncs contacts.

account:read
Account, print formats and prices.
designs:read
View designs.
designs:write
Upload, rename, replace and delete designs. Includes designs:read.
audience:read
View segments, contacts and custom fields.
audience:write
Create and edit segments, add and delete contacts, create fields. Includes audience:read.
campaigns:read
View campaigns and quotes.
campaigns:write
Create, edit and delete drafts; pause campaigns. Includes campaigns:read.
campaigns:launch
Everything that spends money: launching and resuming campaigns, POST /campaigns/{id}/recipients and adding contacts to a segment that feeds a LIVE or PAUSED automated campaign. Includes campaigns:read.
deliveries:read
View deliveries and print orders.

Write includes read of the same resource, and campaigns:launch includes campaigns:read. Nothing else: campaigns:write cannot launch and campaigns:launch cannot edit campaigns. GET /v1 (key check) works with any key. Every endpoint in the reference shows the permission it needs.

POST /segments/{id}/contacts needs audience:write and, in addition, campaigns:launch when the segment feeds a LIVE or PAUSED automated campaign, because every new contact is printed and billed.

The MCP server applies the same permissions: tools the key cannot use are not listed.

Without the permission the API answers 403 INSUFFICIENT_SCOPE before doing anything (no file is uploaded, nothing is charged), naming the missing permission in requiredScope:

403
{
  "statusCode": 403,
  "code": "INSUFFICIENT_SCOPE",
  "message": "This API key does not have the \"campaigns:launch\" permission. Edit the key's permissions in Posthero (Settings → API keys) or use a key that has it.",
  "requiredScope": "campaigns:launch"
}

Errors

Errors use standard HTTP status codes and a body with statusCode, a stable code (branch on this) and a human-readable message.

404
{
  "statusCode": 404,
  "code": "NOT_FOUND",
  "message": "Campaign … not found in this account."
}
400 VALIDATION_ERROR Invalid input. Includes details.
401 UNAUTHORIZED Missing, invalid or expired API key.
402 PAYMENT_METHOD_REQUIRED Card account with no card on file.
402 PAYMENT_FAILED Charge declined or needs 3-D Secure. Nothing is launched.
403 INSUFFICIENT_SCOPE The key is valid but lacks the permission the endpoint needs. Includes requiredScope. See Permissions.
404 NOT_FOUND The resource does not exist in this account.
409 CONFLICT The current state does not allow the action, or duplicate name.
409 DESIGN_RENDER_NOT_READY The design is not print-ready yet.
422 PRICE_UNAVAILABLE The price cannot be computed.
422 CAMPAIGN_NOT_READY Something is missing to launch. Includes blockers.
429 RATE_LIMITED Too many requests. Honour Retry-After.
500 INTERNAL_ERROR Our fault. Retry later.

Pagination

List endpoints take page (from 1) and limit (1–100, default 20) and answer with this envelope:

200
{
  "data": [ … ],
  "page": 1,
  "limit": 20,
  "total": 134,
  "pageCount": 7
}

Rate limits

120 requests per minute per API key. Every response carries X-RateLimit-Limit and X-RateLimit-Remaining. Over the limit you get a 429 RATE_LIMITED with a Retry-After header (seconds to wait).

To load many contacts, send batches of up to 500 per request to POST /segments/{id}/contacts instead of one by one.

Idempotency

POST /campaigns/{id}/launch accepts an Idempotency-Key header (any string up to 255 characters). If you retry with the same key, for example after a timeout, you are never charged twice. A successful launch is replayed with the same response for 24 hours. A failed payment is not cached: once the card issue is fixed, retry with a new key. A campaign can only be launched once anyway: launching moves it out of DRAFT.

Launch and payment

Before launching, GET /campaigns/{id}/quote tells you how many pieces will be sent, the total without and with VAT, how it will be paid (paymentMethod) and whether anything blocks it (canLaunch, blockers). On launch, payment depends on the account payment method (paymentType and cardOnFile in GET /account):

INVOICE_30_DAYS

Invoice account

The campaign launches right away and is billed on your monthly invoice.

STRIPE

Card on file

The quoted total is charged to the card on file (Stripe invoice, tax computed by Stripe) and the campaign launches once the charge succeeds.

402

Payment not possible

PAYMENT_METHOD_REQUIRED: no card on file; pay one campaign from the dashboard or add a card in billing. PAYMENT_FAILED: declined or needs 3-D Secure; nothing is launched and the invoice is voided.

The launch response is { campaign, payment: { method, amount, currency, invoiceId? } }. ONE_OFF campaigns go to COMPLETED and their deliveries are created right away; AUTOMATED and RECURRENT go LIVE and every later delivery is billed the same way.

PDF print specs

  • Size and bleed

    Final size of the format + bleedMm of bleed on every side (both in GET /products).

  • Safe area

    Keep text and key elements more than safeMm away from the trim edge.

  • Fonts

    All fonts embedded in the PDF. CMYK recommended.

  • Weight

    PDF only (%PDF), max 50 MB per file.

  • Letters (DOC)

    One PDF in front with the whole letter, up to maxPages pages.

  • Postcards and flyers (FLYER)

    Two PDFs: front and back faces.

Typical flow

  1. 01. GET /products → pick a format.
  2. 02. POST /designs with the PDF.
  3. 03. POST /segments with the contacts (or POST /custom-fields first if you use variables).
  4. 04. POST /campaigns with segmentId and designId.
  5. 05. GET /campaigns/{id}/quote → check quantity, total and canLaunch.
  6. 06. POST /campaigns/{id}/launch.
  7. 07. Poll GET /orders?campaignId= or GET /campaigns/{id}/deliveries for status.

Contact imports are asynchronous: if you launch right after creating the segment it may still be empty. Check canLaunch in the quote (or the stats of GET /segments/{id}) before launching, as the JavaScript example does.

// Node.js 18+ (fetch, FormData and Blob are built in)
import { readFile } from 'node:fs/promises';
import { randomUUID } from 'node:crypto';

const API = 'https://api.posthero.app/v1';
const KEY = process.env.POSTHERO_API_KEY;

async function posthero(path, { json, ...init } = {}) {
  const res = await fetch(API + path, {
    ...init,
    headers: {
      'x-api-key': KEY,
      ...(json ? { 'Content-Type': 'application/json' } : {}),
      ...init.headers,
    },
    body: json ? JSON.stringify(json) : init.body,
  });
  const body = await res.json();
  if (!res.ok) throw new Error(`${body.code}: ${body.message}`);
  return body;
}

// 1. Format id, copied from GET /products
const PRODUCT_ID = 'PRODUCT_ID';

// 2. Upload the PDF design
const form = new FormData();
form.append('name', 'Carta VIP');
form.append('productId', PRODUCT_ID);
form.append('front', new Blob([await readFile('carta.pdf')], { type: 'application/pdf' }), 'carta.pdf');
const design = await posthero('/designs', { method: 'POST', body: form });

// 3. Create the segment (the import is asynchronous: 202)
const { segmentId } = await posthero('/segments', {
  method: 'POST',
  json: {
    name: 'Clientes VIP noviembre',
    contacts: [
      {
        firstName: 'Laura',
        lastName: 'García',
        address: { address1: 'Calle Mayor 12', zip: '28013', city: 'Madrid', countryCode: 'ES' },
      },
    ],
  },
});

// 4. Create the campaign as DRAFT
const campaign = await posthero('/campaigns', {
  method: 'POST',
  json: { name: 'VIP noviembre', type: 'ONE_OFF', segmentId, designId: design.id },
});

// 5. Wait for the import, then check the quote
let quote;
for (let i = 0; i < 10; i++) {
  quote = await posthero(`/campaigns/${campaign.id}/quote`);
  if (quote.canLaunch) break;
  await new Promise((r) => setTimeout(r, 3000));
}
if (!quote.canLaunch) throw new Error('Not ready: ' + quote.blockers.join(', '));
console.log(`${quote.quantity} pieces, ${quote.totalWithVat} EUR (VAT incl.)`);

// 6. Launch (the idempotency key makes retries safe)
const { payment } = await posthero(`/campaigns/${campaign.id}/launch`, {
  method: 'POST',
  headers: { 'Idempotency-Key': randomUUID() },
});
console.log('Paid by', payment.method, payment.amount, payment.currency);

// 7. Later: poll the print orders
const orders = await posthero(`/orders?campaignId=${campaign.id}`);

Triggered mail

To send a letter or postcard when something happens in your system (abandoned cart, first purchase, renewal…): create an AUTOMATED campaign once, launch it, and then for each event pick one of these two options:

  • A. Add the contact to the segment with POST /segments/{id}/contacts. Every new contact in a segment with a LIVE automated campaign is mailed and billed.
  • B. Send to one recipient with POST /campaigns/{id}/recipients, without touching segments. It returns the deliveryId for you to store.
# Once: automated campaign on a segment, then launch it
curl -X POST https://api.posthero.app/v1/campaigns \
  -H "x-api-key: $POSTHERO_API_KEY" -H "Content-Type: application/json" \
  -d '{ "name": "Carrito abandonado", "type": "AUTOMATED",
        "segmentId": "SEGMENT_ID", "designId": "DESIGN_ID" }'

curl -X POST https://api.posthero.app/v1/campaigns/CAMPAIGN_ID/launch \
  -H "x-api-key: $POSTHERO_API_KEY" -H "Idempotency-Key: carrito-launch"

# Per event, option A: add the contact to the segment
curl -X POST https://api.posthero.app/v1/segments/SEGMENT_ID/contacts \
  -H "x-api-key: $POSTHERO_API_KEY" -H "Content-Type: application/json" \
  -d '{ "contacts": [ { "firstName": "Pablo", "emailAddress": "pablo@example.com",
        "address": { "address1": "Av. Diagonal 400", "zip": "08037", "city": "Barcelona" },
        "customFields": { "coupon": "VUELVE10" } } ] }'

# Per event, option B: one recipient, no segment changes
curl -X POST https://api.posthero.app/v1/campaigns/CAMPAIGN_ID/recipients \
  -H "x-api-key: $POSTHERO_API_KEY" -H "Content-Type: application/json" \
  -d '{ "firstName": "Pablo", "emailAddress": "pablo@example.com",
        "address": { "address1": "Av. Diagonal 400", "zip": "08037", "city": "Barcelona" } }'

Reference

Account

Details of the account the API key belongs to. Use it to check that your key works and how your campaigns will be paid.

Retrieve the account

Returns id, name, subscriptionPlan, subscriptionActive, paymentType (INVOICE_30_DAYS or STRIPE), cardOnFile (null for invoice accounts), orderFrequency, addressEnrichment and counts.

curl
curl https://api.posthero.app/v1/account \
  -H "x-api-key: $POSTHERO_API_KEY"

Response

200
{
  "id": "0b6f2c1e-7d4a-4c1b-9a51-3f2e8d7c6b5a",
  "name": "Mueblería Sol",
  "subscriptionPlan": "GROWTH",
  "subscriptionActive": true,
  "paymentType": "STRIPE",
  "cardOnFile": true,
  "orderFrequency": "DAILY",
  "addressEnrichment": true,
  "counts": {
    "campaigns": {
      "total": 7,
      "byStatus": {
        "DRAFT": 2,
        "PAUSED": 0,
        "LIVE": 1,
        "COMPLETED": 4
      }
    },
    "segments": 5,
    "contacts": 4820,
    "designs": 6,
    "customFields": 2
  }
}

Check your API key

Minimal ping to https://api.posthero.app/v1: answers { "message": "Hello <account>" } if the key is valid.

curl
curl https://api.posthero.app/v1 \
  -H "x-api-key: $POSTHERO_API_KEY"

Response

{
  "message": "Hello Mueblería Sol",
  "tenant": {
    "id": "0b6f2c1e-7d4a-4c1b-9a51-3f2e8d7c6b5a",
    "name": "Mueblería Sol"
  },
  "docs": "https://docs.posthero.app/"
}

Reference

Products (print formats)

The print formats available to your account: the standard ones plus any custom formats you have. Every design is created for a product.

List formats

Returns { data: [...] } (not paginated). Each product has id, kind (standard / custom), type (DOC letter / FLYER postcard or flyer), label, size, widthMm, heightMm, bleedMm, safeMm, faces (front / back / both) and maxPages.

curl
curl https://api.posthero.app/v1/products \
  -H "x-api-key: $POSTHERO_API_KEY"

Response

200
{
  "data": [
    {
      "id": "8e2d4f6a-1b3c-4d5e-8f70-9a1b2c3d4e5f",
      "kind": "standard",
      "type": "FLYER",
      "label": "A4/3 Flyer",
      "description": null,
      "size": "A4/3",
      "sizeDetail": "210 × 99 mm",
      "envelopeSize": null,
      "widthMm": 210,
      "heightMm": 99,
      "bleedMm": 3,
      "safeMm": 5,
      "faces": "both",
      "maxPages": 1
    }
  ]
}
GET /products/{id}/pricing Permission: account:read

Price tiers

Price tiers of that format for your account: { productId, currency, vatIncluded, tiers: [{ minQuantity, unitPrice }] }, in euros, VAT excluded.

id
uuid · path · required

Product id.

curl
curl https://api.posthero.app/v1/products/{id}/pricing \
  -H "x-api-key: $POSTHERO_API_KEY"

Response

200
{
  "productId": "8e2d4f6a-1b3c-4d5e-8f70-9a1b2c3d4e5f",
  "currency": "EUR",
  "vatIncluded": false,
  "tiers": [
    {
      "minQuantity": 1,
      "unitPrice": 1.2
    },
    {
      "minQuantity": 500,
      "unitPrice": 0.95
    },
    {
      "minQuantity": 2000,
      "unitPrice": 0.82
    }
  ]
}

Reference

Designs (PDF)

The API only accepts PDF designs (the editor and templates live in the dashboard). The PDF you upload is the print file, so the design is print-ready immediately.

List designs

type
string · query

Filter by product type (DOC or FLYER).

page
integer · query

Page number, starting at 1.

limit
integer · query

Results per page (1–100, default 20).

curl
curl https://api.posthero.app/v1/designs?type=DOC \
  -H "x-api-key: $POSTHERO_API_KEY"

Response

200
{
  "data": [
    {
      "id": "a71d9c3e-5b2f-4e8a-9d10-6c4b3a2f1e0d",
      "name": "Postal VIP",
      "type": "FLYER",
      "orientation": "HORIZONTAL",
      "source": "pdf",
      "product": {
        "id": "8e2d4f6a-1b3c-4d5e-8f70-9a1b2c3d4e5f",
        "kind": "standard",
        "label": "A4/3 Flyer",
        "size": "A4/3"
      },
      "printReady": true,
      "files": [
        {
          "face": "front",
          "fileId": "4d6f8a0c-2e4b-4d6f-8a1c-3e5b7d9f1a2c"
        },
        {
          "face": "back",
          "fileId": "6f8a0c2e-4b6d-4f8a-9c3e-5b7d9f1a3c4e"
        }
      ],
      "createdAt": "2026-11-24T09:28:00.000Z",
      "updatedAt": "2026-11-24T09:28:00.000Z"
    }
  ],
  "page": 1,
  "limit": 20,
  "total": 1,
  "pageCount": 1
}
GET /designs/{id} Permission: designs:read

Retrieve a design

Includes files: [{ face, fileId, url }] (signed URL, valid for 1 hour) and printReady.

id
uuid · path · required

Design id.

curl
curl https://api.posthero.app/v1/designs/{id} \
  -H "x-api-key: $POSTHERO_API_KEY"

Response

200
{
  "id": "a71d9c3e-5b2f-4e8a-9d10-6c4b3a2f1e0d",
  "name": "Postal VIP",
  "type": "FLYER",
  "orientation": "HORIZONTAL",
  "source": "pdf",
  "product": {
    "id": "8e2d4f6a-1b3c-4d5e-8f70-9a1b2c3d4e5f",
    "kind": "standard",
    "label": "A4/3 Flyer",
    "size": "A4/3"
  },
  "printReady": true,
  "files": [
    {
      "face": "front",
      "fileId": "4d6f8a0c-2e4b-4d6f-8a1c-3e5b7d9f1a2c",
      "url": "https://files.posthero.app/…/api-…-front.pdf?X-Amz-Signature=…"
    },
    {
      "face": "back",
      "fileId": "6f8a0c2e-4b6d-4f8a-9c3e-5b7d9f1a3c4e",
      "url": "https://files.posthero.app/…/api-…-back.pdf?X-Amz-Signature=…"
    }
  ],
  "createdAt": "2026-11-24T09:28:00.000Z",
  "updatedAt": "2026-11-24T09:28:00.000Z"
}

Create a design from a PDF

multipart/form-data request. For letters (DOC), front is the whole letter: one PDF of up to maxPages pages. For postcards and flyers, front and back are the two faces. PDF only (the %PDF signature is checked), max 50 MB per file.

name
string · form-data · required

Design name.

productId
string · form-data · required

Format id, from GET /products.

orientation
string · form-data

VERTICAL (default) or HORIZONTAL.

front
file (PDF) · form-data · required

Whole letter or front face.

back
file (PDF) · form-data

Back face (postcards and flyers).

curl -X POST https://api.posthero.app/v1/designs \
  -H "x-api-key: $POSTHERO_API_KEY" \
  -F name="Carta bienvenida" \
  -F productId=PRODUCT_ID \
  -F front=@carta.pdf

Response

{
  "id": "a71d9c3e-5b2f-4e8a-9d10-6c4b3a2f1e0d",
  "name": "Postal VIP",
  "type": "FLYER",
  "orientation": "HORIZONTAL",
  "source": "pdf",
  "product": {
    "id": "8e2d4f6a-1b3c-4d5e-8f70-9a1b2c3d4e5f",
    "kind": "standard",
    "label": "A4/3 Flyer",
    "size": "A4/3"
  },
  "printReady": true,
  "files": [
    {
      "face": "front",
      "fileId": "4d6f8a0c-2e4b-4d6f-8a1c-3e5b7d9f1a2c",
      "url": "https://files.posthero.app/…/api-…-front.pdf?X-Amz-Signature=…"
    },
    {
      "face": "back",
      "fileId": "6f8a0c2e-4b6d-4f8a-9c3e-5b7d9f1a3c4e",
      "url": "https://files.posthero.app/…/api-…-back.pdf?X-Amz-Signature=…"
    }
  ],
  "createdAt": "2026-11-24T09:28:00.000Z",
  "updatedAt": "2026-11-24T09:28:00.000Z"
}
PATCH /designs/{id} Permission: designs:write

Rename a design

id
uuid · path · required

Design id.

name
string · body · required

New name.

curl
curl -X PATCH https://api.posthero.app/v1/designs/{id} \
  -H "x-api-key: $POSTHERO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Carta bienvenida v2" }'

Response

200
{
  "id": "a71d9c3e-5b2f-4e8a-9d10-6c4b3a2f1e0d",
  "name": "Postal VIP (v2)",
  "type": "FLYER",
  "orientation": "HORIZONTAL",
  "source": "pdf",
  "product": {
    "id": "8e2d4f6a-1b3c-4d5e-8f70-9a1b2c3d4e5f",
    "kind": "standard",
    "label": "A4/3 Flyer",
    "size": "A4/3"
  },
  "printReady": true,
  "files": [
    {
      "face": "front",
      "fileId": "4d6f8a0c-2e4b-4d6f-8a1c-3e5b7d9f1a2c",
      "url": "https://files.posthero.app/…/api-…-front.pdf?X-Amz-Signature=…"
    },
    {
      "face": "back",
      "fileId": "6f8a0c2e-4b6d-4f8a-9c3e-5b7d9f1a3c4e",
      "url": "https://files.posthero.app/…/api-…-back.pdf?X-Amz-Signature=…"
    }
  ],
  "createdAt": "2026-11-24T09:28:00.000Z",
  "updatedAt": "2026-11-24T09:28:00.000Z"
}
PUT /designs/{id}/files Permission: designs:write

Replace the PDFs

Multipart with front and/or back. Returns 409 if a LIVE, PAUSED or COMPLETED campaign or a pending print order uses the design: create a new design instead.

id
uuid · path · required

Design id.

front
file (PDF) · form-data

New front PDF or letter.

back
file (PDF) · form-data

New back PDF.

curl
curl -X PUT https://api.posthero.app/v1/designs/{id}/files \
  -H "x-api-key: $POSTHERO_API_KEY" \
  -F front=@carta-v2.pdf

Response

{
  "id": "a71d9c3e-5b2f-4e8a-9d10-6c4b3a2f1e0d",
  "name": "Postal VIP",
  "type": "FLYER",
  "orientation": "HORIZONTAL",
  "source": "pdf",
  "product": {
    "id": "8e2d4f6a-1b3c-4d5e-8f70-9a1b2c3d4e5f",
    "kind": "standard",
    "label": "A4/3 Flyer",
    "size": "A4/3"
  },
  "printReady": true,
  "files": [
    {
      "face": "front",
      "fileId": "4d6f8a0c-2e4b-4d6f-8a1c-3e5b7d9f1a2c",
      "url": "https://files.posthero.app/…/api-…-front.pdf?X-Amz-Signature=…"
    },
    {
      "face": "back",
      "fileId": "6f8a0c2e-4b6d-4f8a-9c3e-5b7d9f1a3c4e",
      "url": "https://files.posthero.app/…/api-…-back.pdf?X-Amz-Signature=…"
    }
  ],
  "createdAt": "2026-11-24T09:28:00.000Z",
  "updatedAt": "2026-11-24T11:02:00.000Z"
}
DELETE /designs/{id} Permission: designs:write

Delete a design

Answers 204 with no body. Returns 409 if any campaign uses the design.

id
uuid · path · required

Design id.

curl
curl -X DELETE https://api.posthero.app/v1/designs/{id} \
  -H "x-api-key: $POSTHERO_API_KEY"

Response

204
HTTP/1.1 204 No Content

Reference

Custom fields

Your own contact variables (a coupon, the last product bought…). Create them before sending them in customFields.

GET /custom-fields Permission: audience:read

List custom fields

curl
curl https://api.posthero.app/v1/custom-fields \
  -H "x-api-key: $POSTHERO_API_KEY"

Response

200
{
  "data": [
    {
      "id": "c0f3a5b7-9d1e-4f2a-8b3c-5d7e9f1a3b5c",
      "name": "coupon",
      "label": "Cupón",
      "type": "text",
      "description": null,
      "createdAt": "2026-11-20T12:00:00.000Z"
    }
  ],
  "page": 1,
  "limit": 20,
  "total": 1,
  "pageCount": 1
}
POST /custom-fields Permission: audience:write

Create a custom field

name
string · body · required

Key you will use in customFields.

label
string · body · required

Display name.

type
string · body · required

text, boolean or image.

description
string · body

Optional description.

curl
curl -X POST https://api.posthero.app/v1/custom-fields \
  -H "x-api-key: $POSTHERO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "coupon", "label": "Cupón", "type": "text" }'

Response

201
{
  "id": "c0f3a5b7-9d1e-4f2a-8b3c-5d7e9f1a3b5c",
  "name": "coupon",
  "label": "Cupón",
  "type": "text",
  "description": null,
  "createdAt": "2026-11-20T12:00:00.000Z"
}

Reference

Segments (audiences)

A segment is the recipient list of a campaign. Contact imports are asynchronous: the API answers 202 and contacts show up within seconds.

List segments

page
integer · query

Page number, starting at 1.

limit
integer · query

Results per page (1–100, default 20).

curl
curl https://api.posthero.app/v1/segments \
  -H "x-api-key: $POSTHERO_API_KEY"

Response

200
{
  "data": [
    {
      "id": "5f0c8b7a-6e5d-4c3b-8a29-1f0e9d8c7b6a",
      "name": "Clientes VIP noviembre",
      "description": null,
      "createdAt": "2026-11-24T09:29:00.000Z",
      "updatedAt": "2026-11-24T09:29:00.000Z"
    }
  ],
  "page": 1,
  "limit": 20,
  "total": 5,
  "pageCount": 1
}

Create a segment

Creates the segment and optionally queues up to 500 contacts. Answers 202 with { segmentId, contactsQueued, importJobsEnqueued }.

name
string · body · required

Segment name.

description
string · body

Description.

contacts
Contact[] · body

Up to 500 contacts. See Contact object.

curl -X POST https://api.posthero.app/v1/segments \
  -H "x-api-key: $POSTHERO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Clientes VIP noviembre",
    "contacts": [
      {
        "firstName": "Laura",
        "lastName": "García",
        "address": {
          "address1": "Calle Mayor 12, 3º B",
          "zip": "28013",
          "city": "Madrid",
          "countryCode": "ES"
        }
      }
    ]
  }'

Response

202
{
  "segmentId": "5f0c8b7a-6e5d-4c3b-8a29-1f0e9d8c7b6a",
  "contactsQueued": 2,
  "importJobsEnqueued": 1
}
GET /segments/{id} Permission: audience:read

Retrieve a segment

Returns the segment with stats: contacts, withAddress and withZip.

id
uuid · path · required

Segment id.

curl
curl https://api.posthero.app/v1/segments/{id} \
  -H "x-api-key: $POSTHERO_API_KEY"

Response

200
{
  "id": "5f0c8b7a-6e5d-4c3b-8a29-1f0e9d8c7b6a",
  "name": "Clientes VIP noviembre",
  "description": null,
  "createdAt": "2026-11-24T09:29:00.000Z",
  "updatedAt": "2026-11-24T09:29:00.000Z",
  "stats": {
    "contacts": 1250,
    "withAddress": 1250,
    "withZip": 1248,
    "aiFormattedAddress": 1190
  }
}
PATCH /segments/{id} Permission: audience:write

Update a segment

id
uuid · path · required

Segment id.

name
string · body

New name.

description
string · body

New description.

curl
curl -X PATCH https://api.posthero.app/v1/segments/{id} \
  -H "x-api-key: $POSTHERO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "description": "Compras > 300 € en 2026" }'

Response

200
{
  "id": "5f0c8b7a-6e5d-4c3b-8a29-1f0e9d8c7b6a",
  "name": "Clientes VIP",
  "description": null,
  "createdAt": "2026-11-24T09:29:00.000Z",
  "updatedAt": "2026-11-24T12:00:00.000Z"
}
POST /segments/{id}/contacts Permission: audience:write

Add contacts

Queues 1 to 500 contacts and answers 202 with { segmentId, contactsQueued, importJobsEnqueued }. Contacts with an existing email are updated.

If a LIVE AUTOMATED campaign targets this segment, every new contact is printed, mailed and billed automatically. This is how triggered mail works.

id
uuid · path · required

Segment id.

contacts
Contact[] · body · required

1 to 500 contacts.

curl
curl -X POST https://api.posthero.app/v1/segments/{id}/contacts \
  -H "x-api-key: $POSTHERO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "contacts": [ { "firstName": "Pablo", "emailAddress": "pablo@example.com",
        "address": { "address1": "Av. Diagonal 400", "zip": "08037", "city": "Barcelona" } } ] }'

Response

{
  "segmentId": "5f0c8b7a-6e5d-4c3b-8a29-1f0e9d8c7b6a",
  "contactsQueued": 1,
  "importJobsEnqueued": 1
}
GET /segments/{id}/contacts Permission: audience:read

Segment contacts

id
uuid · path · required

Segment id.

page
integer · query

Page number, starting at 1.

limit
integer · query

Results per page (1–100, default 20).

curl
curl https://api.posthero.app/v1/segments/{id}/contacts?page=1&limit=100 \
  -H "x-api-key: $POSTHERO_API_KEY"

Response

200
{
  "data": [
    {
      "id": "e2b4d6f8-0a1c-4e3b-9d5f-7a9c1e3b5d7f",
      "firstName": "Laura",
      "lastName": "García",
      "companyName": null,
      "emailAddress": "laura@example.com",
      "phoneNumber": null,
      "address": {
        "address1": "Calle Mayor 12, 3º B",
        "address2": "",
        "city": "Madrid",
        "zip": "28013",
        "province": "Madrid",
        "country": "España",
        "countryCode": "ES"
      },
      "normalizedAddress": null,
      "customFields": {
        "coupon": "VUELVE10"
      },
      "createdAt": "2026-11-24T09:29:05.000Z"
    }
  ],
  "page": 1,
  "limit": 20,
  "total": 1250,
  "pageCount": 63
}

Reference

Contacts

Look up and delete contacts in the account. To create them, add them to a segment.

List contacts

segmentId
uuid · query

Only contacts in that segment.

email
string · query

Look up by email.

page
integer · query

Page number, starting at 1.

limit
integer · query

Results per page (1–100, default 20).

curl
curl https://api.posthero.app/v1/contacts?email=laura@example.com \
  -H "x-api-key: $POSTHERO_API_KEY"

Response

200
{
  "data": [
    {
      "id": "e2b4d6f8-0a1c-4e3b-9d5f-7a9c1e3b5d7f",
      "firstName": "Laura",
      "lastName": "García",
      "companyName": null,
      "emailAddress": "laura@example.com",
      "phoneNumber": null,
      "address": {
        "address1": "Calle Mayor 12, 3º B",
        "address2": "",
        "city": "Madrid",
        "zip": "28013",
        "province": "Madrid",
        "country": "España",
        "countryCode": "ES"
      },
      "normalizedAddress": null,
      "customFields": {
        "coupon": "VUELVE10"
      },
      "createdAt": "2026-11-24T09:29:05.000Z"
    }
  ],
  "page": 1,
  "limit": 20,
  "total": 1,
  "pageCount": 1
}
GET /contacts/{id} Permission: audience:read

Retrieve a contact

id
uuid · path · required

Contact id.

curl
curl https://api.posthero.app/v1/contacts/{id} \
  -H "x-api-key: $POSTHERO_API_KEY"

Response

200
{
  "id": "e2b4d6f8-0a1c-4e3b-9d5f-7a9c1e3b5d7f",
  "firstName": "Laura",
  "lastName": "García",
  "companyName": null,
  "emailAddress": "laura@example.com",
  "phoneNumber": null,
  "address": {
    "address1": "Calle Mayor 12, 3º B",
    "address2": "",
    "city": "Madrid",
    "zip": "28013",
    "province": "Madrid",
    "country": "España",
    "countryCode": "ES"
  },
  "normalizedAddress": null,
  "customFields": {
    "coupon": "VUELVE10"
  },
  "createdAt": "2026-11-24T09:29:05.000Z"
}
DELETE /contacts/{id} Permission: audience:write

Delete a contact

Permanent deletion (GDPR erasure); answers 204. Deliveries already created keep their snapshot of the data.

id
uuid · path · required

Contact id.

curl
curl -X DELETE https://api.posthero.app/v1/contacts/{id} \
  -H "x-api-key: $POSTHERO_API_KEY"

Response

204
HTTP/1.1 204 No Content

Reference

Campaigns

A campaign joins a design and a segment. It is created as DRAFT, quoted and launched. Types: ONE_OFF (a single send), AUTOMATED (every new contact in the segment gets mailed) and RECURRENT (weekly, monthly or yearly).

List campaigns

status
string · query

DRAFT, LIVE, PAUSED or COMPLETED.

type
string · query

ONE_OFF, AUTOMATED or RECURRENT.

page
integer · query

Page number, starting at 1.

limit
integer · query

Results per page (1–100, default 20).

curl
curl https://api.posthero.app/v1/campaigns?status=LIVE \
  -H "x-api-key: $POSTHERO_API_KEY"

Response

200
{
  "data": [
    {
      "id": "3c9a1e2d-4b5f-4a6c-8d7e-0f1a2b3c4d5e",
      "name": "VIP noviembre",
      "status": "DRAFT",
      "recurrentType": null,
      "recurrenceDay": null,
      "segmentType": "INTERNAL",
      "segment": {
        "id": "5f0c8b7a-6e5d-4c3b-8a29-1f0e9d8c7b6a",
        "name": "Clientes VIP noviembre"
      },
      "design": {
        "id": "a71d9c3e-5b2f-4e8a-9d10-6c4b3a2f1e0d",
        "name": "Postal VIP"
      },
      "designTemplate": null,
      "estimateQuantity": 1250,
      "createdAt": "2026-11-24T09:30:00.000Z",
      "updatedAt": "2026-11-24T09:30:00.000Z",
      "type": "ONE_OFF"
    }
  ],
  "page": 1,
  "limit": 20,
  "total": 1,
  "pageCount": 1
}

Create a campaign

Creates the campaign as DRAFT.

name
string · body · required

Campaign name.

type
string · body

ONE_OFF (default), AUTOMATED or RECURRENT.

segmentId
uuid · body

Target segment.

designId
uuid · body

Design to print.

recurrentType
string · body

RECURRENT only: WEEKLY, MONTHLY or YEARLY.

recurrenceDay
integer · body

RECURRENT only: day of the recurrence.

curl
curl -X POST https://api.posthero.app/v1/campaigns \
  -H "x-api-key: $POSTHERO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "VIP noviembre", "type": "ONE_OFF",
       "segmentId": "SEGMENT_ID", "designId": "DESIGN_ID" }'

Response

{
  "id": "3c9a1e2d-4b5f-4a6c-8d7e-0f1a2b3c4d5e",
  "name": "VIP noviembre",
  "status": "DRAFT",
  "recurrentType": null,
  "recurrenceDay": null,
  "segmentType": "INTERNAL",
  "segment": {
    "id": "5f0c8b7a-6e5d-4c3b-8a29-1f0e9d8c7b6a",
    "name": "Clientes VIP noviembre"
  },
  "design": {
    "id": "a71d9c3e-5b2f-4e8a-9d10-6c4b3a2f1e0d",
    "name": "Postal VIP"
  },
  "designTemplate": null,
  "estimateQuantity": null,
  "createdAt": "2026-11-24T09:30:00.000Z",
  "updatedAt": "2026-11-24T09:30:00.000Z",
  "type": "ONE_OFF"
}
GET /campaigns/{id} Permission: campaigns:read

Retrieve a campaign

id
uuid · path · required

Campaign id.

curl
curl https://api.posthero.app/v1/campaigns/{id} \
  -H "x-api-key: $POSTHERO_API_KEY"

Response

{
  "id": "3c9a1e2d-4b5f-4a6c-8d7e-0f1a2b3c4d5e",
  "name": "VIP noviembre",
  "status": "DRAFT",
  "recurrentType": null,
  "recurrenceDay": null,
  "segmentType": "INTERNAL",
  "segment": {
    "id": "5f0c8b7a-6e5d-4c3b-8a29-1f0e9d8c7b6a",
    "name": "Clientes VIP noviembre"
  },
  "design": {
    "id": "a71d9c3e-5b2f-4e8a-9d10-6c4b3a2f1e0d",
    "name": "Postal VIP"
  },
  "designTemplate": null,
  "estimateQuantity": 1250,
  "createdAt": "2026-11-24T09:30:00.000Z",
  "updatedAt": "2026-11-24T09:30:00.000Z",
  "type": "ONE_OFF"
}
PATCH /campaigns/{id} Permission: campaigns:write

Update a campaign

DRAFT only. Takes the same fields as create; null unlinks the segment or the design.

id
uuid · path · required

Campaign id.

curl
curl -X PATCH https://api.posthero.app/v1/campaigns/{id} \
  -H "x-api-key: $POSTHERO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "designId": "OTHER_DESIGN_ID" }'

Response

200
{
  "id": "3c9a1e2d-4b5f-4a6c-8d7e-0f1a2b3c4d5e",
  "name": "VIP diciembre",
  "status": "DRAFT",
  "recurrentType": null,
  "recurrenceDay": null,
  "segmentType": "INTERNAL",
  "segment": {
    "id": "5f0c8b7a-6e5d-4c3b-8a29-1f0e9d8c7b6a",
    "name": "Clientes VIP noviembre"
  },
  "design": {
    "id": "a71d9c3e-5b2f-4e8a-9d10-6c4b3a2f1e0d",
    "name": "Postal VIP"
  },
  "designTemplate": null,
  "estimateQuantity": 1250,
  "createdAt": "2026-11-24T09:30:00.000Z",
  "updatedAt": "2026-11-24T09:45:00.000Z",
  "type": "ONE_OFF"
}
DELETE /campaigns/{id} Permission: campaigns:write

Delete a campaign

DRAFT only. Answers 204.

id
uuid · path · required

Campaign id.

curl
curl -X DELETE https://api.posthero.app/v1/campaigns/{id} \
  -H "x-api-key: $POSTHERO_API_KEY"

Response

204
HTTP/1.1 204 No Content
GET /campaigns/{id}/quote Permission: campaigns:read

Quote

How many pieces would be sent, the total without and with VAT, how it would be paid (paymentMethod: invoice, card or null) and whether the campaign can be launched. blockers lists what is missing: NOT_DRAFT, DESIGN_REQUIRED, DESIGN_FILE_MISSING, SEGMENT_REQUIRED, SEGMENT_EMPTY, DESIGN_RENDER_NOT_READY, PRICE_UNAVAILABLE or PAYMENT_METHOD_REQUIRED.

id
uuid · path · required

Campaign id.

curl https://api.posthero.app/v1/campaigns/{id}/quote \
  -H "x-api-key: $POSTHERO_API_KEY"

Response

{
  "campaignId": "3c9a1e2d-4b5f-4a6c-8d7e-0f1a2b3c4d5e",
  "quantity": 1250,
  "totalWithoutVat": 1112.5,
  "totalWithVat": 1346.13,
  "currency": "EUR",
  "paymentMethod": "card",
  "canLaunch": true,
  "blockers": []
}
POST /campaigns/{id}/launch Permission: campaigns:launch

Launch a campaign

Launches a DRAFT campaign. Checks that design and segment are set, the segment is not empty and the design is print-ready, then charges according to the account payment method. ONE_OFF campaigns go to COMPLETED (their deliveries are created right away); AUTOMATED and RECURRENT go LIVE.

id
uuid · path · required

Campaign id.

Idempotency-Key
string ≤ 255 · header

Recommended. A retry with the same key never charges twice (a successful launch is replayed for 24 h).

curl -X POST https://api.posthero.app/v1/campaigns/{id}/launch \
  -H "x-api-key: $POSTHERO_API_KEY" \
  -H "Idempotency-Key: vip-noviembre-2026"

Response

{
  "campaign": {
    "id": "3c9a1e2d-4b5f-4a6c-8d7e-0f1a2b3c4d5e",
    "name": "VIP noviembre",
    "status": "COMPLETED",
    "recurrentType": null,
    "recurrenceDay": null,
    "segmentType": "INTERNAL",
    "segment": {
      "id": "5f0c8b7a-6e5d-4c3b-8a29-1f0e9d8c7b6a",
      "name": "Clientes VIP noviembre"
    },
    "design": {
      "id": "a71d9c3e-5b2f-4e8a-9d10-6c4b3a2f1e0d",
      "name": "Postal VIP"
    },
    "designTemplate": null,
    "estimateQuantity": 1250,
    "createdAt": "2026-11-24T09:30:00.000Z",
    "updatedAt": "2026-11-24T10:00:00.000Z",
    "type": "ONE_OFF"
  },
  "payment": {
    "method": "card",
    "amount": 1346.13,
    "currency": "EUR",
    "invoiceId": "in_1QxYz…"
  }
}
POST /campaigns/{id}/pause Permission: campaigns:write

Pause

LIVE AUTOMATED or RECURRENT campaign → PAUSED.

id
uuid · path · required

Campaign id.

curl
curl -X POST https://api.posthero.app/v1/campaigns/{id}/pause \
  -H "x-api-key: $POSTHERO_API_KEY"

Response

200
{
  "id": "3c9a1e2d-4b5f-4a6c-8d7e-0f1a2b3c4d5e",
  "name": "VIP noviembre",
  "status": "PAUSED",
  "recurrentType": null,
  "recurrenceDay": null,
  "segmentType": "INTERNAL",
  "segment": {
    "id": "5f0c8b7a-6e5d-4c3b-8a29-1f0e9d8c7b6a",
    "name": "Clientes VIP noviembre"
  },
  "design": {
    "id": "a71d9c3e-5b2f-4e8a-9d10-6c4b3a2f1e0d",
    "name": "Postal VIP"
  },
  "designTemplate": null,
  "estimateQuantity": null,
  "createdAt": "2026-11-24T09:30:00.000Z",
  "updatedAt": "2026-11-24T09:30:00.000Z",
  "type": "AUTOMATED"
}
POST /campaigns/{id}/resume Permission: campaigns:launch

Resume

PAUSED → LIVE.

id
uuid · path · required

Campaign id.

curl
curl -X POST https://api.posthero.app/v1/campaigns/{id}/resume \
  -H "x-api-key: $POSTHERO_API_KEY"

Response

200
{
  "id": "3c9a1e2d-4b5f-4a6c-8d7e-0f1a2b3c4d5e",
  "name": "VIP noviembre",
  "status": "LIVE",
  "recurrentType": null,
  "recurrenceDay": null,
  "segmentType": "INTERNAL",
  "segment": {
    "id": "5f0c8b7a-6e5d-4c3b-8a29-1f0e9d8c7b6a",
    "name": "Clientes VIP noviembre"
  },
  "design": {
    "id": "a71d9c3e-5b2f-4e8a-9d10-6c4b3a2f1e0d",
    "name": "Postal VIP"
  },
  "designTemplate": null,
  "estimateQuantity": null,
  "createdAt": "2026-11-24T09:30:00.000Z",
  "updatedAt": "2026-11-24T09:30:00.000Z",
  "type": "AUTOMATED"
}
POST /campaigns/{id}/recipients Permission: campaigns:launch

Send to one recipient

Mails one recipient through a LIVE AUTOMATED campaign without touching segments. The body is a Contact. Answers 201 with { deliveryId, campaignId, status: "ON_QUEUE" } and is billed like every automated delivery.

id
uuid · path · required

Campaign id.

curl -X POST https://api.posthero.app/v1/campaigns/{id}/recipients \
  -H "x-api-key: $POSTHERO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "firstName": "Laura", "emailAddress": "laura@example.com",
        "address": { "address1": "Calle Mayor 12", "zip": "28013", "city": "Madrid" },
        "customFields": { "coupon": "VUELVE10" } }'

Response

{
  "deliveryId": "9b1e3d5f-7a9c-4b2d-8e4f-6a8c0e2b4d6f",
  "campaignId": "3c9a1e2d-4b5f-4a6c-8d7e-0f1a2b3c4d5e",
  "status": "ON_QUEUE"
}
GET /campaigns/{id}/deliveries Permission: deliveries:read

Campaign deliveries

id
uuid · path · required

Campaign id.

status
string · query

Filter by status.

page
integer · query

Page number, starting at 1.

limit
integer · query

Results per page (1–100, default 20).

curl
curl https://api.posthero.app/v1/campaigns/{id}/deliveries?status=SENT \
  -H "x-api-key: $POSTHERO_API_KEY"

Response

200
{
  "data": [
    {
      "id": "9b1e3d5f-7a9c-4b2d-8e4f-6a8c0e2b4d6f",
      "campaignId": "3c9a1e2d-4b5f-4a6c-8d7e-0f1a2b3c4d5e",
      "contactId": "e2b4d6f8-0a1c-4e3b-9d5f-7a9c1e3b5d7f",
      "status": "ON_QUEUE",
      "recipient": {
        "firstName": "Laura",
        "lastName": "García",
        "companyName": null,
        "emailAddress": "laura@example.com",
        "address": {
          "address1": "Calle Mayor 12, 3º B",
          "address2": "",
          "city": "Madrid",
          "zip": "28013",
          "province": "Madrid",
          "country": "España",
          "countryCode": "ES"
        },
        "normalizedAddress": null
      },
      "customFields": {
        "coupon": "VUELVE10"
      },
      "isBounced": false,
      "createdAt": "2026-11-24T09:31:00.000Z",
      "updatedAt": "2026-11-24T09:31:00.000Z"
    }
  ],
  "page": 1,
  "limit": 20,
  "total": 1250,
  "pageCount": 63
}

Reference

Deliveries and print orders

A delivery is one letter or postcard to one recipient. Deliveries are grouped into print orders, whose ids are integers.

GET /deliveries/{id} Permission: deliveries:read

Retrieve a delivery

Recipient snapshot, status, normalised address and timestamps.

id
uuid · path · required

Delivery id.

curl
curl https://api.posthero.app/v1/deliveries/{id} \
  -H "x-api-key: $POSTHERO_API_KEY"

Response

200
{
  "id": "9b1e3d5f-7a9c-4b2d-8e4f-6a8c0e2b4d6f",
  "campaignId": "3c9a1e2d-4b5f-4a6c-8d7e-0f1a2b3c4d5e",
  "contactId": "e2b4d6f8-0a1c-4e3b-9d5f-7a9c1e3b5d7f",
  "status": "ON_QUEUE",
  "recipient": {
    "firstName": "Laura",
    "lastName": "García",
    "companyName": null,
    "emailAddress": "laura@example.com",
    "address": {
      "address1": "Calle Mayor 12, 3º B",
      "address2": "",
      "city": "Madrid",
      "zip": "28013",
      "province": "Madrid",
      "country": "España",
      "countryCode": "ES"
    },
    "normalizedAddress": null
  },
  "customFields": {
    "coupon": "VUELVE10"
  },
  "isBounced": false,
  "createdAt": "2026-11-24T09:31:00.000Z",
  "updatedAt": "2026-11-24T09:31:00.000Z"
}

List print orders

Each order: id, status, campaign ({ id, name }), designId, deliveriesCount, bouncedCount, totalCost (EUR, VAT excluded), currency, createdAt and updatedAt.

campaignId
uuid · query

Only orders of that campaign.

status
string · query

Filter by status.

page
integer · query

Page number, starting at 1.

limit
integer · query

Results per page (1–100, default 20).

curl
curl https://api.posthero.app/v1/orders?campaignId=CAMPAIGN_ID \
  -H "x-api-key: $POSTHERO_API_KEY"

Response

200
{
  "data": [
    {
      "id": 371,
      "status": "PREPARING",
      "campaign": {
        "id": "3c9a1e2d-4b5f-4a6c-8d7e-0f1a2b3c4d5e",
        "name": "VIP noviembre"
      },
      "designId": "a71d9c3e-5b2f-4e8a-9d10-6c4b3a2f1e0d",
      "deliveriesCount": 1250,
      "bouncedCount": 2,
      "totalCost": 1112.5,
      "currency": "EUR",
      "createdAt": "2026-11-24T10:00:00.000Z",
      "updatedAt": "2026-11-25T08:00:00.000Z"
    }
  ],
  "page": 1,
  "limit": 20,
  "total": 1,
  "pageCount": 1
}

Retrieve a print order

id
integer · path · required

Order id (integer).

curl
curl https://api.posthero.app/v1/orders/371 \
  -H "x-api-key: $POSTHERO_API_KEY"

Response

200
{
  "id": 371,
  "status": "PREPARING",
  "campaign": {
    "id": "3c9a1e2d-4b5f-4a6c-8d7e-0f1a2b3c4d5e",
    "name": "VIP noviembre"
  },
  "designId": "a71d9c3e-5b2f-4e8a-9d10-6c4b3a2f1e0d",
  "deliveriesCount": 1250,
  "bouncedCount": 2,
  "totalCost": 1112.5,
  "currency": "EUR",
  "createdAt": "2026-11-24T10:00:00.000Z",
  "updatedAt": "2026-11-25T08:00:00.000Z"
}

Reference

Contact object

Used by POST /segments, POST /segments/{id}/contacts and POST /campaigns/{id}/recipients. A contact needs address.address1 (and in practice zip and city) to be mailable.

firstName
string · required

First name.

lastName
string · optional

Last name.

companyName
string · optional

Company.

emailAddress
string · optional

Email. If a contact with that email already exists, it is updated.

phoneNumber
string · optional

Phone number.

address
object · optional

address1 (required to be mailable), address2, city, zip, province, provinceCode, country, countryCode (ISO-2). In practice you also need zip and city.

customFields
object · optional

Map { name: string | number | boolean }. Names must exist in /custom-fields; unknown names are rejected.

Contact
{
  "firstName": "Laura",
  "lastName": "García",
  "companyName": "Mueblería Sol",
  "emailAddress": "laura@example.com",
  "phoneNumber": "+34600000000",
  "address": {
    "address1": "Calle Mayor 12, 3º B",
    "address2": "",
    "city": "Madrid",
    "zip": "28013",
    "province": "Madrid",
    "country": "España",
    "countryCode": "ES"
  },
  "customFields": { "coupon": "VUELVE10" }
}

Reference

Response objects

Exact shape of every object the API returns (values are examples). Lists wrap them in data, inside the pagination envelope. GET /segments/{id} adds stats; in GET /designs/{id} every file carries its signed url.

{
  "id": "3c9a…",
  "name": "VIP noviembre",
  "type": "ONE_OFF",
  "status": "DRAFT",
  "recurrentType": null,
  "recurrenceDay": null,
  "segmentType": "…",
  "segment": { "id": "5f0c…", "name": "Clientes VIP noviembre" },
  "design": { "id": "a71d…", "name": "Carta VIP" },
  "designTemplate": null,
  "estimateQuantity": 1250,
  "createdAt": "2026-11-24T09:30:00.000Z",
  "updatedAt": "2026-11-24T09:30:00.000Z"
}

Reference

Delivery and order statuses

SCHEDULED ON_QUEUE PREPARING SENT
SCHEDULED

Scheduled.

ON_QUEUE

Waiting for the next print batch.

PREPARING

At the printer.

SENT

Handed to the postal service.

ERRORED

Error (for example, an invalid address).

CANCELLED

Cancelled.

PENDING_PAYMENT exists in the model but is not used by business accounts.

Limitations and roadmap

No sandbox (yet)

Launched campaigns are really printed and mailed. To test your integration, use a small segment (for example, with your own address).

Webhooks: coming soon

For now, poll orders and deliveries for status (GET /orders, GET /campaigns/{id}/deliveries).

Dashboard only: the design editor and templates (the API only accepts PDFs), integrations (Shopify, Klaviyo, Active Campaign, Zapier), subscription and invoices, team and users, brand kit, reports and ROAS, and address enrichment settings.

Questions about your integration?

Write to us and we will help you set up your first API send.

Contact us