Skip to navigation
Vendor commands

Lead commands

List, create, edit, and approve the leads your partners submit
View as MarkdownOpen in Claude

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.

Argument / FlagRequiredDefaultDescription
partner_id (positional)yesThe partner’s ID
--pageno0Page number
--per-pageno20Results per page, up to 100
--sort-bynocreatedAtOne of id, createdAt, updatedAt
--sort-directionnodescasc or desc
--approval-statusnoOne of PENDING, APPROVED, REJECTED
--statusnoId of a lead status dropdown value. Repeatable.
--sourcenoId of a lead source dropdown value. Repeatable.
--keywordnoPrefix match on first name or email address
--created-at-afternoYYYY-MM-DD
--created-at-beforenoYYYY-MM-DD
--archivednoList archived leads instead of active ones
--api-keynoOverrides JAZZHQ_API_KEY
--base-urlnoOverrides JAZZHQ_API_BASE_URL
jazzhq-cli lead list 1001 --approval-status PENDING --per-page 50
jazzhq-cli lead list 1001 \
--created-at-after 2026-08-01 \
--created-at-before 2026-08-31 \
--status 10 --status 11

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.

jazzhq-cli lead get 300

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.

Argument / FlagRequiredDescription
partner_id (positional)yesThe partner’s ID
--first-nameyesLead’s first name
--email-addressyesLead’s email address
--company-nameyesLead’s company name
--last-namenoLead’s last name
--phone-numbernoLead’s phone number
--linked-in-urlnoLead’s LinkedIn profile URL
--website-urlnoLead’s company website
--company-sizenoLead’s company size, e.g. 50-100
--industrynoLead’s industry
--job-titlenoLead’s job title
--city, --state, --countrynoLead’s location
--sourcenoId of a lead source dropdown value
--statusnoId of a lead status dropdown value
--lead-agenoAge of the lead in days
--products-interestednoProducts the lead is interested in
--business-impact-metricsnoExpected business impact
--external-idnoYour own identifier, echoed back unchanged
--api-keynoOverrides JAZZHQ_API_KEY
--base-urlnoOverrides JAZZHQ_API_BASE_URL
jazzhq-cli lead create 1001 \
--first-name "Jane" \
--email-address "jane@acme.com" \
--company-name "Acme Inc" \
--job-title "VP Sales" \
--external-id "crm-42"

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.

jazzhq-cli lead update 300 --job-title "Head of Sales"

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.

jazzhq-cli lead replace 300 \
--first-name Ada \
--email-address ada@example.com \
--company-name "X Ltd" \
--job-title "VP Sales"

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.

jazzhq-cli lead archive 300

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.

jazzhq-cli lead approve 300
{
"success": true,
"message": "LEAD_APPROVE_SUCCESSFUL",
"data": {
"lead": { "id": 300, "approvalStatus": "APPROVED" },
"contactId": 500
},
"timestamp": "2026-08-01T09:15:00"
}

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.

Argument / FlagRequiredDescription
lead_id (positional)yesThe lead’s ID
--commentnoReason for the rejection
--api-keynoOverrides JAZZHQ_API_KEY
--base-urlnoOverrides JAZZHQ_API_BASE_URL
jazzhq-cli lead reject 300 --comment "No budget this quarter"

Rejecting twice keeps the first comment. Rejecting an approved lead exits 1 with INVALID_STATE_TRANSITION.

A typical flow

# 1. See what a partner has submitted recently
jazzhq-cli lead list 1001 --approval-status PENDING
# 2. Look at one in full
jazzhq-cli lead get 300
# 3. Correct something before deciding
jazzhq-cli lead update 300 --job-title "Head of Sales"
# 4. Approve it, converting it into a contact
jazzhq-cli lead approve 300
# ...or turn it down, with a reason
jazzhq-cli lead reject 301 --comment "Outside our target market"
# 5. Tidy up something that is no longer relevant
jazzhq-cli lead archive 302