zinn-campaigns

POST /v1/leads/purchases

Buy targeted leads, paid from the Zinn® wallet in one all-or-nothing debit.

All zinn-campaigns endpoints

All developer docs →

Zinn®, our Viking, hammering at his anvil beside an API endpoint sending events to several listeners.

Authentication

Send an API key as a bearer token. The key must carry the email_marketing.manage permission; a key without it is refused with 403, not 404.

Where your organisation id goes

This endpoint takes org_id as a query parameter. Leave it out and the call covers your whole tenancy subtree; send it to narrow the call to one organisation.

Your organisation id is on the API keys screen in your dashboard, beside the key itself. It is the same id in every call you make.

Try it

Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.

curl -X POST https://api.zinndigital.com/v1/leads/purchases \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "quantity": <integer>, "expected_total_minor": <integer> }'

Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console

Details

Gated on email_marketing.manage and a verified owner email. Idempotency-Key is required: a retry with the same key returns the same purchase and never charges twice. expected_total_minor must equal the total (USD cents, the quantity times the price per lead, rounded up to a whole cent) the client showed; a different total answers 422 refusal.leads.totalChanged and charges nothing. The account must be in good standing for wallet spend (not suspended, no overdue invoice; no subscription is needed): otherwise 402 refusal.leads.notInGoodStanding. A wallet that cannot cover the whole total answers 402 refusal.leads.walletShort and nothing is written. Fewer matching leads than asked: 409 refusal.leads.notEnough. Bought leads are copied into this organisation, each with its source and when it was acquired. No lead is contacted. Live Find (kind: livefind, at most 500 leads, a country required, else 400 refusal.leads.liveQueryInvalid): the total is priced at the Live Find row and the wallet must cover all of it up front; the answer is 202 with a finding purchase. A licensed vendor is searched for this order; the purchase turns ready with only the leads delivered charged (never more than the total shown), or failed with an error_kind and nothing charged.

Parameters

NameTypeRequiredWhat it is
org_id (query)UuidNoThe organization this call acts on. Optional for a caller with exactly one direct membership; required for anyone with more than one — which is every reseller and every agency…
Idempotency-Key (header)stringYes—

Request body

NameTypeRequiredWhat it is
kindstring<stored, livefind>Nostored buys leads we already hold (filters); livefind starts a live vendor search for this order (live), answered 202 with a finding purchase.
filtersLeadsFiltersNoEvery list is optional; an empty filter matches every sellable lead.
liveLeadsLiveQueryNo—
quantityintegerYes—
expected_total_minorintegerYesThe total in USD cents the client showed the buyer.

Response

NameTypeRequiredWhat it is
idstringYes—
kindstringYes—
statusstringYes—
filtersobjectNo—
requestedintegerYes—
deliveredintegerYes—
unit_price_microsintegerYes—
total_minorintegerYes—
currencystringYes—
error_kindstringNo—
created_atstringYes—

Errors this endpoint can return

400 · 401 · 402 · 403 · 409 · 422 · 503