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.
Response — data 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
- Gemini configured and present in your plan — otherwise
GeminiNotAvailableInPlan_400.POST /apps/gemini·GET /apps/gemini
Request body
| Field | Default | Notes |
|---|---|---|
prompt | — | The outreach goal, in plain language. |
outreachPrompt | "" | |
tone | "" | Free text, e.g. friendly or formal. |
aiType | gemini | AI provider. Defaults to Gemini. |
type | lead | What to generate. Defaults to leads. |
enrichmentEnabled | false | Enrich the audience first and hold outreach until it reports back. |
count | 25 | Leads to generate. Maximum 50 — otherwise MaximumLeadsExceeded_400. |
industry | "" | Narrows the search. |
additionalFilters | {} | Further narrowing for the generated audience. |
userEnquiryEnabled | true | |
campaign | false | Treat the run as a campaign-style send. |
recurring | false | Repeat the run on a cadence. |
intervalMs | — | Gap between runs, in milliseconds. Minimum 60000 when recurring. |
whitelistedCustom | false | Restrict sourcing to customWhitelistedDomains. |
customWhitelistedDomains | [] | |
customChannelSelection | false | |
customChannels | {} | Restrict which connected apps may send. Validated against apps you own. |
outreachCadence | {} | Timing of multi-step follow-ups. |
draft | — | Create messages for approval instead of sending them. |
Response — data 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 | |
|---|---|
schedulerId | Required |
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 | |
|---|---|
schedulerId | Required |
Response — data 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 | |
|---|---|
schedulerId | Required |
Response — data 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 | |
|---|---|
schedulerId | Required |
POST /genie/:schedulerId/draft-all
Draft all Genie send jobs.
Auth apikey
:::note Used by the web app
components/GenieCampaignDrawer.jsx
:::
Path parameters
| Name | |
|---|---|
schedulerId | Required |
Response — data is one SendJob object.
POST /genie/:schedulerId/resume-recurring
Resume recurring Genie.
Auth apikey
Path parameters
| Name | |
|---|---|
schedulerId | Required |
POST /genie/:schedulerId/retry-failed
Retry failed Genie.
Auth apikey
Path parameters
| Name | |
|---|---|
schedulerId | Required |
POST /genie/:schedulerId/stop-recurring
Stop recurring Genie.
Auth apikey
Path parameters
| Name | |
|---|---|
schedulerId | Required |
POST /genie/audience-preview
Resolve a Genie audience selection to a contact count.
Auth apikey
Request body
| Field | Default | Notes |
|---|---|---|
contactIds | [] | |
leadIds | [] | |
segments | null | |
tags | null | Tag ids. |
categories | null |
POST /genie/from-contacts
Start a Genie run against an existing audience.
Auth apikey
Prerequisites
- Gemini configured and present in your plan.
POST /apps/gemini - An audience — any mix of contacts, leads, segments, tags or categories.
POST /contact·POST /segment·POST /tag
Request body
| Field | Default | Notes |
|---|---|---|
contactIds | [] | Any mix of these five selectors — they union into one run. |
leadIds | [] | Any mix of these five selectors — they union into one run. |
segments | null | Any mix of these five selectors — they union into one run. |
tags | null | Any mix of these five selectors — they union into one run. |
categories | null | Any mix of these five selectors — they union into one run. |
prompt | — | Optional here — omitted, Genie plans from your company profile and catalogue. |
tone | "" | Free text, e.g. friendly or formal. |
aiType | gemini | AI provider. Defaults to Gemini. |
enrichmentEnabled | false | Enrich the audience first and hold outreach until it reports back. |
draft | — | Create 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 | |
|---|---|
leadId | Required |
Response — data 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 | |
|---|---|
leadId | Required |
Response — data is one SendJob object.
GET /genie/leads/:leadId/pending-approvals
Get lead pending approvals.
Auth apikey
Path parameters
| Name | |
|---|---|
leadId | Required |
Response — data 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 | |
|---|---|
leadId | Required |
Response — data 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 | |
|---|---|
sendJobId | Required |
Response — data 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 | |
|---|---|
sendJobId | Required |
Response — data 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 | |
|---|---|
templateId | Required |