Lead commands
lead list and lead create take a partner_id, because leads belong to a partner
and a new one has to be filed against one. Every other command takes only the
lead_id — a lead id is unique on its own.
jazzhq-cli lead list
List a partner’s leads, newest first. Archived leads are excluded unless you ask for them.
Sorting is always tie-broken by id, so paging through a large result set never skips or
repeats a lead. A --per-page above 100 exits 2 without calling the API.
jazzhq-cli lead get
Fetch a single lead.
A lead belonging to a different partner returns RESOURCE_NOT_FOUND, exactly as one that
does not exist — so a lead ID alone never reveals whether it exists.
jazzhq-cli lead create
Create a lead for a partner.
The lead is created against the partner in the path and the vendor your API key belongs
to; neither is read from your input. An email address already used by another of that
partner’s leads exits 1 with DUPLICATE_ENTRY.
jazzhq-cli lead update
Update a lead. Only the fields you pass change; everything else keeps its stored value.
Use lead replace when you want the fields you omit cleared instead.
Takes lead_id as its only positional, then the same optional field flags as
lead create. The lead id is unique on its own — no partner id needed.
Approval state and archiving cannot be set here — use lead approve, lead reject and
lead archive. Passing no fields at all exits 2 rather than sending an empty request.
jazzhq-cli lead replace
Replace a lead with a full object. Any field you leave off is cleared, so this expects
the whole record rather than just what changed. Prefer lead update unless you
specifically want that clearing behaviour.
Takes lead_id as its only positional. --first-name, --email-address and
--company-name are required, exactly as on lead create; every other field flag is
optional, and any you omit is sent as null.
After that call the lead holds only the four fields given — a previously stored --city
or --phone-number is cleared.
Approval state and archiving are never affected by a replace, the same as with
lead update — use lead approve, lead reject and lead archive.
jazzhq-cli lead archive
Archive a lead, hiding it from listings without deleting it.
Safe to run twice — archiving an already-archived lead succeeds and changes nothing.
jazzhq-cli lead approve
Approve a lead and convert it into a contact. Prints the lead and the contactId it
became.
Safe to retry: approving an already-approved lead returns the same contact rather than
creating another. Approving a rejected lead exits 1 with INVALID_STATE_TRANSITION.
jazzhq-cli lead reject
Reject a lead, optionally recording why.
Rejecting twice keeps the first comment. Rejecting an approved lead exits 1 with
INVALID_STATE_TRANSITION.

