Patch campaign
PATCH /v2/campaigns/{id} Updates fields on a campaign. Send only the fields you want to change.
Path Parameters
id
string
Required
Campaign ID.
Form Data Parameters
Validation and basics
validation
string
Optional
Validation level:
-
template→ requiretemplate -
content→ requiretemplate+content -
targeting→ requiretemplate+content+targeting
name
string
Optional
Campaign name.
template_id
integer
Optional
The ID of the template to use. See here.
targeting_method
string
Optional
own_list or map. postage_class
string
Optional
first_class or standard. notification_email
string
Optional
Where to send campaign notifications (e.g. payment receipt and postal induction confirmation email).
discount_code
string
Optional
The discount code.
send_copy_to_sender
boolean
Optional
Defaults to
false Default false. If true, one extra mailpiece is sent to the sender.
Targeting (map)
map_targeting[postcard_quantity]
number
Optional
How many postcards to send in a radius around the targeting center.
map_targeting[center][address]
string
Optional
Center address to target around.
map_targeting[center][coordinates]
string
Optional
Coordinates for the center; takes precedence over address.
Targeting (own list)
You can either provide a properly structured CSV (publicly accessible URL or multipart) or an array of recipients JSON.
csv
file
Optional
CSV with columns in order: Name,Address,City,State,Zip.
If Name is empty it defaults to Current Resident
recipients[][name]
string
Optional
Recipient name.
recipients[][address]
string
Optional
Recipient street address.
recipients[][city]
string
Optional
Recipient city.
recipients[][state]
string
Optional
Recipient state.
recipients[][zip]
string
Optional
Recipient ZIP.
Template data
template_data[landing_page_url]
string
Optional
Landing page URL (rendered as text or QR depending on the template).
template_data[lot_size_type]
string
Optional
square_feet or acres. template_data[description]
string
Optional
Listing description (commonly on back).
template_data[back_title]
string
Optional
Back title.
template_data[address]
string
Optional
Listing address (commonly on front).
template_data[label]
string
Optional
Listing label, e.g.,
JUST LISTED or JUST SOLD. template_data[square_footage]
string
Optional
Square footage.
template_data[maintenance]
string
Optional
Annual maintenance cost (USD).
template_data[lot_size]
string
Optional
Lot size.
template_data[price]
string
Optional
Price (USD).
template_data[taxes]
string
Optional
Annual taxes (USD).
template_data[bathrooms]
string
Optional
Number of bathrooms (integer or half, e.g.,
1, 1.5). template_data[bedrooms]
string
Optional
Number of bedrooms (integer or half, e.g.,
1, 1.5). template_data[variables][][key]
string
Optional
Extra variable key for rendering.
template_data[variables][][value]
string
Optional
Extra variable value for rendering.
Template photos
template_data[photos][][file]
string
Optional
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.
template_data[photos][][crop]
object
Optional
Crop data (
height, width, x, y). Own design templates
designs[][file]
file
Optional
Artwork file or URL. Accepts images or a PDF sized to the mailpiece including bleed.
designs[][crop]
object
Optional
Crop data (
height, width, x, y). Metadata
meta_data[][key]
string
Optional
Custom metadata key.
meta_data[][value]
string
Optional
Custom metadata value.
Agent
agent[license_number]
string
Optional
License number.
agent[cell_phone]
string
Optional
Cell phone.
agent[first_name]
string
Optional
First name.
agent[last_name]
string
Optional
Last name.
agent[landline]
string
Optional
Landline.
agent[email]
string
Optional
Email.
agent[photo][file]
string
Optional
Photo file or URL.
agent[photo][crop]
object
Optional
Crop data (
height, width, x, y). Sender
sender[street_address]
string
Optional
Street address.
sender[suite]
string
Optional
Suite or unit.
sender[state]
string
Optional
State.
sender[name]
string
Optional
Name (usually the company name).
sender[city]
string
Optional
City.
sender[zip]
string
Optional
ZIP code.
sender[logo][file]
string
Optional
Logo file or URL.
sender[logo][crop]
object
Optional
Crop data (
height, width, x, y). curl -X PATCH https://www.realmailers.com/v2/campaigns/1 \
-H 'Authorization: Bearer YOUR_API_KEY USER_EMAIL' \
-F "postage_class"="standard" {
expected_delivery_date: Timestamp(ISO8601)
scheduled_at: Timestamp(ISO8601)
created_at: Timestamp(ISO8601)
updated_at: Timestamp(ISO8601)
sent_at: Timestamp(ISO8601)
send_copy_to_sender: Boolean
notification_email: String
targeting_method: String
recipient_count: Number
discount_code: String
postage_class: String
template_id: Number
status: String
price: Number
name: String
id: Number
thumbnails: Array(URL)
artworks: Array(URL)
proof: URL
targeting_center: {
coordinates: Array(Number)
postcard_count: Number
address: String
}
template_data: {
landing_page_url: String
square_footage: Number
lot_size_type: String
description: String
maintenance: Number
back_title: String
photos: Array(URL)
bathrooms: Number
bedrooms: Number
lot_size: Number
address: String
label: String
price: Number
taxes: Number
variables: {
key: String
}
}
company: {
street_address: String
state: String
name: String
city: String
zip: String
logo: URL
}
agent: {
license_number: String
cell_phone: String
first_name: String
last_name: String
landline: String
email: String
photo: URL
}
meta_data: {
key: String
}
}