Create campaign
POST /v2/campaigns
Creates a campaign. No parameters are strictly required – if none are provided, an empty campaign draft is created.
Some fields become required depending on your choices:
-
designs are required if the template is an own_design template. -
map_targeting is required if the targeting_method is map. -
recipients or recipients_csv is required if the targeting_method is recipients.
thumbnails and proof are rendered in the background. Poll the campaign resource until they appear.
Form Data Parameters
Validation and basics
Validation level:
-
template → require template -
content → require template + content -
targeting → require template + content + targeting
The ID or UID of the template to use. See
here.
Where to send campaign notifications (e.g. payment receipt and postal induction confirmation email).
Default false. If true, one extra mailpiece is sent to the sender.
Targeting (map)
How many postcards to send in a radius around the targeting center.
Center address to target around.
Coordinates for the center; takes precedence over address.
Filter addresses by type: all or single_family, multi_family.
Filter addresses by bathroom count.
Filter addresses by bedroom count.
Filter addresses by lot size.
Filter addresses by square footage.
Filter addresses by year built.
Filter addresses by last sold price (in dollars).
Filter addresses by last sold year.
Targeting (own list)
You can either provide a properly structured CSV (publicly accessible URL or multipart) or an array of recipients JSON.
CSV with columns in order: Name,Address,City,State,Zip.
If Name is empty it defaults to Current Resident
Recipient street address.
Template data
Landing page URL (rendered as text or QR depending on the template).
Listing description (commonly on back).
Listing address (commonly on front).
Listing label, e.g., JUST LISTED or JUST SOLD.
Annual maintenance cost (USD).
Number of bathrooms (integer or half, e.g., 1, 1.5).
Number of bedrooms (integer or half, e.g., 1, 1.5).
Extra variable key for rendering.
Extra variable value for rendering.
Template photos
Photo file or URL; count must match the template’s photo slots. Images are cropped to the template’s aspect ratio if no crop is provided.
Crop data ( height, width, x, y).
Own design templates
Artwork file or URL. Accepts images or a PDF sized to the mailpiece including bleed.
Crop data ( height, width, x, y).
QR codes
QR code overlays are grouped by side ( front, back). Each side holds an array of QR codes. Positions and sizes are fractions (0–1) of the page dimensions. A template_id is required when sending QR codes, and letter templates may only use the front side.
The URL encoded into the QR code. Scans are tracked through a redirect. A URL without a scheme is assumed to be https.
Position as a fraction (0–1) of the page width/height.
Size as a fraction (0–1) of the page width/height.
The URL encoded into the QR code. Scans are tracked through a redirect. A URL without a scheme is assumed to be https.
Position as a fraction (0–1) of the page width/height.
Size as a fraction (0–1) of the page width/height.
Metadata
Agent
Crop data ( height, width, x, y).
Sender
Name (usually the company name).
Crop data ( height, width, x, y).