Skip to main content

AI Genie

AI Genie plans and sends personalised outreach. See the Genie guide.

Base URL https://api.leadx.in/api/key/protected. Every request needs an apikey header — see Authentication.

21 endpoints.

GET /genie

List Genie.

Auth apikey

:::note Used by the web app pages/AIGeniePage.jsx, pages/GenieCampaigns.jsx :::

Query parameters — the standard list contract: p, n, sortBy, sortOrder, searchBy, searchValue, filters, advancedFilters, ids, nids. See Pagination and Filtering.

Responsedata is an array of GenieScheduler objects, alongside the pagination fields described in Response format.

POST /genie

Start a Genie run that generates its own audience.

Auth apikey

:::note Used by the web app pages/AIGeniePage.jsx, pages/GenieCampaigns.jsx :::

Prerequisites

  1. Gemini configured and present in your plan — otherwise GeminiNotAvailableInPlan_400. POST /apps/gemini · GET /apps/gemini

Request body

FieldDefaultNotes
promptThe outreach goal, in plain language.
outreachPrompt""
tone""Free text, e.g. friendly or formal.
aiTypegeminiAI provider. Defaults to Gemini.
typeleadWhat to generate. Defaults to leads.
enrichmentEnabledfalseEnrich the audience first and hold outreach until it reports back.
count25Leads to generate. Maximum 50 — otherwise MaximumLeadsExceeded_400.
industry""Narrows the search.
additionalFilters{}Further narrowing for the generated audience.
userEnquiryEnabledtrue
campaignfalseTreat the run as a campaign-style send.
recurringfalseRepeat the run on a cadence.
intervalMsGap between runs, in milliseconds. Minimum 60000 when recurring.
whitelistedCustomfalseRestrict sourcing to customWhitelistedDomains.
customWhitelistedDomains[]
customChannelSelectionfalse
customChannels{}Restrict which connected apps may send. Validated against apps you own.
outreachCadence{}Timing of multi-step follow-ups.
draftCreate messages for approval instead of sending them.

Responsedata is one GenieScheduler object. (Resource deduced from the collections this handler reads, not read off an explicit return.)

Errors GeminiNotAvailableInPlan_400 · MaximumLeadsExceeded_400 · PromptRequired_400

GET /genie/:schedulerId

Get Genie detail.

Auth apikey

:::note Used by the web app components/GenieCampaignDrawer.jsx, components/GenieContactModal.jsx, pages/AIGeniePage.jsx and 2 more :::

Path parameters

Name
schedulerIdRequired

DELETE /genie/:schedulerId

Delete Genie.

Auth apikey

:::note Used by the web app components/GenieCampaignDrawer.jsx, components/GenieContactModal.jsx, pages/AIGeniePage.jsx and 2 more :::

Path parameters

Name
schedulerIdRequired

Responsedata is one GenieScheduler object. (Resource deduced from the collections this handler reads, not read off an explicit return.)

POST /genie/:schedulerId/approve-all

Approve all Genie send jobs.

Auth apikey

:::note Used by the web app components/GenieCampaignDrawer.jsx, components/GenieTemplateAccordion.jsx :::

Path parameters

Name
schedulerIdRequired

Responsedata is one SendJob object. (Resource deduced from the collections this handler reads, not read off an explicit return.)

POST /genie/:schedulerId/cancel

Cancel Genie.

Auth apikey

Path parameters

Name
schedulerIdRequired

POST /genie/:schedulerId/draft-all

Draft all Genie send jobs.

Auth apikey

:::note Used by the web app components/GenieCampaignDrawer.jsx :::

Path parameters

Name
schedulerIdRequired

Responsedata is one SendJob object.

POST /genie/:schedulerId/resume-recurring

Resume recurring Genie.

Auth apikey

Path parameters

Name
schedulerIdRequired

POST /genie/:schedulerId/retry-failed

Retry failed Genie.

Auth apikey

Path parameters

Name
schedulerIdRequired

POST /genie/:schedulerId/stop-recurring

Stop recurring Genie.

Auth apikey

Path parameters

Name
schedulerIdRequired

POST /genie/audience-preview

Resolve a Genie audience selection to a contact count.

Auth apikey

Request body

FieldDefaultNotes
contactIds[]
leadIds[]
segmentsnull
tagsnullTag ids.
categoriesnull

POST /genie/from-contacts

Start a Genie run against an existing audience.

Auth apikey

Prerequisites

  1. Gemini configured and present in your plan. POST /apps/gemini
  2. An audience — any mix of contacts, leads, segments, tags or categories. POST /contact · POST /segment · POST /tag

Request body

FieldDefaultNotes
contactIds[]Any mix of these five selectors — they union into one run.
leadIds[]Any mix of these five selectors — they union into one run.
segmentsnullAny mix of these five selectors — they union into one run.
tagsnullAny mix of these five selectors — they union into one run.
categoriesnullAny mix of these five selectors — they union into one run.
promptOptional here — omitted, Genie plans from your company profile and catalogue.
tone""Free text, e.g. friendly or formal.
aiTypegeminiAI provider. Defaults to Gemini.
enrichmentEnabledfalseEnrich the audience first and hold outreach until it reports back.
draftCreate messages for approval instead of sending them.

POST /genie/leads/:leadId/approve-all

Approve all lead Genie send jobs.

Auth apikey

:::note Used by the web app components/LeadTimeline/GenieBulkActions.jsx :::

Path parameters

Name
leadIdRequired

Responsedata is one SendJob object. (Resource deduced from the collections this handler reads, not read off an explicit return.)

POST /genie/leads/:leadId/draft-all

Draft all lead Genie send jobs.

Auth apikey

Path parameters

Name
leadIdRequired

Responsedata is one SendJob object.

GET /genie/leads/:leadId/pending-approvals

Get lead pending approvals.

Auth apikey

Path parameters

Name
leadIdRequired

Responsedata is one SendJob object. (Resource deduced from the collections this handler reads, not read off an explicit return.)

GET /genie/leads/:leadId/send-counts

Get lead Genie send counts.

Auth apikey

:::note Used by the web app components/LeadTimeline/GenieBulkActions.jsx :::

Path parameters

Name
leadIdRequired

Responsedata is one SendJob object. (Resource deduced from the collections this handler reads, not read off an explicit return.)

POST /genie/send-jobs/:sendJobId/approve

Approve Genie send job.

Auth apikey

:::note Used by the web app components/GenieCampaignDrawer.jsx, components/LeadTimeline/GenieOutreachActions.jsx :::

Path parameters

Name
sendJobIdRequired

Responsedata is one SendJob object. (Resource deduced from the collections this handler reads, not read off an explicit return.)

POST /genie/send-jobs/:sendJobId/draft

Draft Genie send job.

Auth apikey

:::note Used by the web app components/GenieCampaignDrawer.jsx :::

Path parameters

Name
sendJobIdRequired

Responsedata is one SendJob object. (Resource deduced from the collections this handler reads, not read off an explicit return.)

GET /genie/settings

Get Genie settings.

Auth apikey

PUT /genie/settings

Update Genie settings.

Auth apikey

GET /genie/templates/:templateId

Get Genie template preview.

Auth apikey

Path parameters

Name
templateIdRequired