Agent-readable docs index: /llms.txt. Full docs in one file: /llms-full.txt. Download /docs.zip to grep all markdown files locally.

Estimate Adding Properties

See what adding a number of properties to a campaign will cost, including the charge due today. Call this before Add Properties to Campaign and show the charge due today to the person before you add.
The estimate assumes every property is added. Properties that are skipped when you add them, for example because they are already in the campaign, are not charged, so the actual charge can be lower.
Paused campaigns: A paused campaign sends nothing until it resumes, so pay_today_cents is 0 and charged_on_resume is true. Each piece is charged as it goes out after you resume the campaign; pay_later_cents covers all of them.
path idstringrequired
Campaign ID (UUID)
query countnumberrequired
Number of properties you plan to add, 1 to 5,000
Request example
curl "https://api.v2.dealmachine.com/v1/mail/campaigns/a1b2c3d4/properties/estimate?count=25" \ -H "Authorization: Bearer dm_sk_live_xxx"

Response

FieldDescription
campaign_idThe campaign
statusThe campaign's current status
property_countThe number of properties estimated
pay_today_centsCharged when the properties are added, for pieces that go out today. 0 for a paused campaign
pay_later_centsCharged later, as each later piece goes out
total_cost_centspay_today_cents plus pay_later_cents
pieces_per_propertyPieces each property receives across all steps
wallet_available_centsWallet funds available now
auto_reload_enabledWhether auto-reload is on
can_affordWhether the add can be paid for today
requires_auto_reloadtrue when auto-reload is off and the campaign has more than one step, a step that repeats, or any delay or repeat interval, so adding fails with auto_reload_required until auto-reload is turned on
charged_on_resumetrue when the campaign is paused: nothing is charged today, and each piece is charged as it goes out after the campaign resumes
stepsCost by step: step_order, design_name, design_size, delay_days, interval_days, repeat_count, price_per_piece_cents, total_pieces, total_cost_cents

Errors

StatusCodeWhen
400validation_errorcount is missing or not a whole number from 1 to 5,000
404campaign_not_foundNo campaign with this ID in your workspace
409campaign_not_accepting_propertiesThe campaign cannot take properties now
409campaign_has_no_stepsA step in the campaign has no design
409portrait_orientation_unavailableA step uses a portrait design, which is temporarily unavailable
Response example
{ "data": { "campaign_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "status": "active", "property_count": 25, "pay_today_cents": 2500, "pay_later_cents": 5000, "total_cost_cents": 7500, "pieces_per_property": 3, "wallet_available_cents": 10000, "auto_reload_enabled": true, "can_afford": true, "requires_auto_reload": false, "charged_on_resume": false, "steps": [ { "step_order": 1, "design_name": "Step 1", "design_size": "4x6", "delay_days": 0, "interval_days": 0, "repeat_count": 1, "price_per_piece_cents": 100, "total_pieces": 25, "total_cost_cents": 2500 }, { "step_order": 2, "design_name": "Step 2", "design_size": "4x6", "delay_days": 21, "interval_days": 21, "repeat_count": 2, "price_per_piece_cents": 100, "total_pieces": 50, "total_cost_cents": 5000 } ] } }