Skip to main content

AI Genie outreach

AI Genie plans and sends personalised, multi-step outreach to people you already have — or to people it generates for you. Unlike a campaign, which sends one template to everyone, Genie writes per-recipient messages and can run on a recurring cadence.

Genie sends are routed through leadx-ms-unified-chat, so replies land in the same inbox as everything else.

:::info Requires Gemini in your plan Every Genie entry point checks features.app.gemini and returns GeminiNotAvailableInPlan_400 without it. :::

Two ways to start a run

From an existing audience

The common case — reach out to contacts or leads you already hold.

curl -X POST https://api.leadx.in/api/key/protected/genie/from-contacts \
-H "apikey: $KEY" -H "Content-Type: application/json" \
-d '{
"segments": ["665a..."],
"tags": ["665b..."],
"prompt": "Introduce our analytics tier and ask for a 15-minute call",
"tone": "friendly",
"enrichmentEnabled": true,
"draft": true
}'
FieldTypeNotes
contactIds, leadIds, segments, tags, categoriesstring[]Any mix. They union into one run.
promptstringThe goal. Optional here — omitted, Genie plans from your company profile and catalogue.
tonestringFree text, e.g. friendly, formal.
aiTypestringDefault gemini.
enrichmentEnabledbooleanEnrich first, hold outreach until enrichment reports back.
draftbooleanCreate messages for approval instead of sending.
customChannelsobjectRestrict which connected apps this run may send from. Validated against apps you actually own.

Generating a new audience

curl -X POST https://api.leadx.in/api/key/protected/genie \
-H "apikey: $KEY" -H "Content-Type: application/json" \
-d '{
"prompt": "Series-B fintech companies in India needing lead analytics",
"count": 25,
"industry": "Financial Services",
"recurring": true,
"intervalMs": 604800000,
"draft": true
}'
FieldNotes
promptRequired herePromptRequired_400 without it.
countLeads to generate. Maximum 50 (MaximumLeadsExceeded_400). Default 25.
industry, additionalFiltersNarrow the search.
recurring + intervalMsRepeat the run. Minimum interval 60000 ms.
campaignTreat the run as a campaign-style send.
whitelistedCustom + customWhitelistedDomainsRestrict sourcing to specific domains.
outreachCadenceMulti-step follow-up timing.

intervalMs is a plain millisecond gap — one week is 604800000.

Size the audience first

curl -X POST https://api.leadx.in/api/key/protected/genie/audience-preview \
-H "apikey: $KEY" -H "Content-Type: application/json" \
-d '{ "segments": ["665a..."], "tags": ["665b..."] }'

Returns the resolved contact count for a selection before you commit to it.

Draft mode and approvals

With draft: true, Genie writes messages but sends nothing until approved. This is the safe way to introduce Genie to a live list.

Per message:

MethodEndpointPurpose
POST/genie/send-jobs/:sendJobId/approveApprove and send one message.
POST/genie/send-jobs/:sendJobId/draftRevert one back to draft.

Per lead:

MethodEndpointPurpose
GET/genie/leads/:leadId/pending-approvalsEverything awaiting approval for a lead.
GET/genie/leads/:leadId/send-countsCounts for the lead's bulk bar — accurate, unlike the paginated feed.
POST/genie/leads/:leadId/approve-allApprove everything for this lead.
POST/genie/leads/:leadId/draft-allRevert everything for this lead.

Per run:

MethodEndpointPurpose
POST/genie/:schedulerId/approve-allApprove the whole run.
POST/genie/:schedulerId/draft-allRevert the whole run.

:::warning Lead-scoped and run-scoped bulk actions are different /genie/leads/:leadId/approve-all covers one lead. /genie/:schedulerId/approve-all covers an entire campaign. The paths are similar; the blast radius is not. :::

Managing runs

MethodEndpointPurpose
GET/genieList runs.
GET/genie/:schedulerIdRun detail.
DELETE/genie/:schedulerIdDelete a run.
POST/genie/:schedulerId/cancelCancel an in-flight run.
POST/genie/:schedulerId/stop-recurringStop future repeats, leave the current run alone.
POST/genie/:schedulerId/resume-recurringResume repeats.
POST/genie/:schedulerId/retry-failedRetry failures.
GET/genie/templates/:templateIdPreview the content behind a step.

Company-wide settings

curl https://api.leadx.in/api/key/protected/genie/settings -H "apikey: $KEY"
curl -X PUT https://api.leadx.in/api/key/protected/genie/settings \
-H "apikey: $KEY" -H "Content-Type: application/json" \
-d '{ "...": "..." }'

These set the default channels and behaviour for runs that don't send a customChannels override.

Genie vs. campaigns

CampaignGenie
MessageOne template for everyoneWritten per recipient
AudienceSegments / tags / categories / contactsSame, plus AI-generated leads
CadenceSchedule + time windowMulti-step outreach, optionally recurring
ApprovalTest sendFull draft-and-approve workflow
Servicems-send-managerms-unified-chat
Plan gateCampaign allowanceRequires Gemini