Developer ยท API reference
Prompts
Manage the tracked prompts LunaLift runs against AI-search providers.
Prompts are the AI-search queries LunaLift runs on a schedule to measure your visibility and sentiment. These endpoints list your tracked prompts, create and generate new ones, run them on demand, and configure which providers each is tracked against.
/prompts/get-prompts/{company_id}Get Prompts
๐ Requires Authorization: Bearer ll_โฆ (or X-API-Key).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
company_id | string | Yes | โ |
Query parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
skip | integer | No | 0 | Number of prompts to skip |
limit | integer | No | 50 | Maximum number of prompts to return |
search | string | null | No | โ | Search in prompt text |
status | string | null | No | โ | Filter by status: pending (Topic Explorer), reviewed (Tracked Prompts), failed |
is_active | boolean | null | No | โ | Filter by active/paused status |
segment_ids | string | null | No | โ | Comma-separated segment IDs to filter by (includes special 'none' UUID) |
offering_ids | string | null | No | โ | Comma-separated offering IDs to filter by (includes special 'none' UUID) |
location_ids | string | null | No | โ | Comma-separated location IDs to filter by (includes special 'none' UUID) |
value_proposition_ids | string | null | No | โ | Comma-separated value proposition IDs to filter by (includes special 'none' UUID) |
buying_stage_ids | string | null | No | โ | Comma-separated buying stage IDs to filter by (includes special 'none' UUID) |
ideal_customer_ids | string | null | No | โ | Comma-separated ideal customer IDs to filter by (includes special 'none' UUID) |
topic_ids | string | null | No | โ | Comma-separated topic IDs to filter by (includes special 'none' UUID) |
visibility | boolean | null | No | โ | Filter by visibility tracking |
sentiment | boolean | null | No | โ | Filter by sentiment tracking |
source | PromptSource[] | null | No | โ | Filter by prompt provenance (e.g. google_search_console). Repeat or comma-separate for multiple. |
sort_by | string | No | created_at | Sort by: created_at, last_executed_at, visibility, visibility_change, sentiment, sentiment_change |
sort_order | string | No | desc | Sort order: asc or desc |
Example request
curl -X GET "https://api.lunalift.ai/prompts/get-prompts/COMPANY_ID" \
-H "Authorization: Bearer ll_your_api_key"Response ยท 200 OK
| Field | Type | Notes |
|---|---|---|
success | boolean | โ |
message | string | โ |
conversationId | string | null | โ |
data | PromptCollection[] | null | โ |
total | integer | null | โ |
metrics | object | null | โ |
hasTracked | boolean | null | โ |
/prompts/create-prompt/{company_id}Create Prompt
๐ Requires Authorization: Bearer ll_โฆ (or X-API-Key).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
company_id | string | Yes | โ |
Request bodyยท Body_create_prompt_prompts_create_prompt__company_id__post
| Field | Type | Required | Description |
|---|---|---|---|
prompt | Prompt | Yes | Generated prompts with cached text and metadata. |
prompt_references | PromptReference[] | Yes | โ |
Example request
curl -X POST "https://api.lunalift.ai/prompts/create-prompt/COMPANY_ID" \
-H "Authorization: Bearer ll_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"prompt": {},
"prompt_references": []
}'Response ยท 200 OK
| Field | Type | Notes |
|---|---|---|
success | boolean | โ |
message | string | โ |
conversationId | string | null | โ |
data | PromptCollection[] | null | โ |
total | integer | null | โ |
metrics | object | null | โ |
hasTracked | boolean | null | โ |
/prompts/generate-prompts/{company_id}Generate Prompts
Generate prompts for a company collection
๐ Requires Authorization: Bearer ll_โฆ (or X-API-Key).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
company_id | string | Yes | โ |
Example request
curl -X POST "https://api.lunalift.ai/prompts/generate-prompts/COMPANY_ID" \
-H "Authorization: Bearer ll_your_api_key"Response ยท 200 OK
Returns a JSON object on success.
/prompts/execute-prompts/{company_id}Execute Prompts
Execute specific prompts on-demand
๐ Requires Authorization: Bearer ll_โฆ (or X-API-Key).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
company_id | string | Yes | โ |
Example request
curl -X POST "https://api.lunalift.ai/prompts/execute-prompts/COMPANY_ID" \
-H "Authorization: Bearer ll_your_api_key"Response ยท 200 OK
Returns a JSON object on success.
/prompts/responses/{prompt_id}Get Prompt Responses
Get the last N successful responses for a prompt, optionally filtered by provider
๐ Requires Authorization: Bearer ll_โฆ (or X-API-Key).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
prompt_id | string | Yes | โ |
Query parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
provider | LlmProvider | null | No | โ | โ |
limit | integer | No | 5 | โ |
Example request
curl -X GET "https://api.lunalift.ai/prompts/responses/PROMPT_ID" \
-H "Authorization: Bearer ll_your_api_key"Response ยท 200 OK
| Field | Type | Notes |
|---|---|---|
success | boolean | โ |
message | string | โ |
conversationId | string | null | โ |
data | object | null | โ |
/prompts/update-setting/{prompt_id}Update Prompt Setting
Update a specific setting for a prompt
๐ Requires Authorization: Bearer ll_โฆ (or X-API-Key).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
prompt_id | string | Yes | โ |
Example request
curl -X POST "https://api.lunalift.ai/prompts/update-setting/PROMPT_ID" \
-H "Authorization: Bearer ll_your_api_key"Response ยท 200 OK
Returns a JSON object on success.
/prompts/toggle-provider/{prompt_id}Toggle Prompt Provider
Enable or disable a specific LLM provider for a prompt
๐ Requires Authorization: Bearer ll_โฆ (or X-API-Key).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
prompt_id | string | Yes | โ |
Query parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
provider | LlmProvider | Yes | โ | โ |
enable | boolean | Yes | โ | โ |
Example request
curl -X POST "https://api.lunalift.ai/prompts/toggle-provider/PROMPT_ID?provider=VALUE&enable=VALUE" \
-H "Authorization: Bearer ll_your_api_key"Response ยท 200 OK
Returns a JSON object on success.
/prompts/bulk-update/{company_id}Bulk Update Prompts
Bulk update multiple prompts at once
๐ Requires Authorization: Bearer ll_โฆ (or X-API-Key).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
company_id | string | Yes | โ |
Request bodyยท BulkPromptUpdate
| Field | Type | Required | Description |
|---|---|---|---|
prompt_ids | string[] | null | No | โ |
use_filters | boolean | null | No | โ |
search | string | null | No | โ |
is_active | boolean | null | No | โ |
segment_ids | string[] | null | No | โ |
offering_ids | string[] | null | No | โ |
location_ids | string[] | null | No | โ |
value_proposition_ids | string[] | null | No | โ |
buying_stage_ids | string[] | null | No | โ |
ideal_customer_ids | string[] | null | No | โ |
visibility | boolean | null | No | โ |
sentiment | boolean | null | No | โ |
action | string | Yes | โ |
value | integer | null | No | โ |
search_term | string | null | No | โ |
replace_term | string | null | No | โ |
case_sensitive | boolean | null | No | โ |
enable_providers | string[] | null | No | โ |
disable_providers | string[] | null | No | โ |
Example request
curl -X POST "https://api.lunalift.ai/prompts/bulk-update/COMPANY_ID" \
-H "Authorization: Bearer ll_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"action": "string"
}'Response ยท 200 OK
Returns a JSON object on success.
/prompts/providers/{company_id}Get Company Providers
Get standard LLM providers for a company based on their plan
๐ Requires Authorization: Bearer ll_โฆ (or X-API-Key).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
company_id | string | Yes | โ |
Example request
curl -X GET "https://api.lunalift.ai/prompts/providers/COMPANY_ID" \
-H "Authorization: Bearer ll_your_api_key"Response ยท 200 OK
| Field | Type | Notes |
|---|---|---|
success | boolean | โ |
message | string | โ |
providers | LlmProvider[] | โ |
/prompts/topics/{company_id}Get Topics
Get all active topics for a company.
๐ Requires Authorization: Bearer ll_โฆ (or X-API-Key).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
company_id | string | Yes | โ |
Example request
curl -X GET "https://api.lunalift.ai/prompts/topics/COMPANY_ID" \
-H "Authorization: Bearer ll_your_api_key"Response ยท 200 OK
Returns a JSON object on success.
/prompts/topics/{company_id}/{topic_id}/deactivateDeactivate Topic Endpoint
Soft-remove a tracked topic (``is_active = false``), freeing its slot. Because the tracked-topic cap is now enforced on a LIVE ``COUNT(is_active AND status='confirmed')`` (see ``topics_confirmation``), the cap would be a one-way ratchet without a remove path. This is that path: it reuses the shared ``topics_confirmation.deactivate_topic`` soft-remove (the same ``is_active`` flip ``propose_topics`` uses for stale suggestions) so there is ONE deactivation mechanism, not a parallel one. Tenant-scoped: the company is resolved from the path and authorized against the caller's memberships; the ``company_id`` predicate is also part of the UPDATE so a topic can never be flipped cross-tenant. Idempotent โ deactivating an already-inactive topic returns ``deactivated=false`` with the unchanged count.
๐ Requires Authorization: Bearer ll_โฆ (or X-API-Key).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
company_id | string | Yes | โ |
topic_id | integer | Yes | โ |
Example request
curl -X POST "https://api.lunalift.ai/prompts/topics/COMPANY_ID/TOPIC_ID/deactivate" \
-H "Authorization: Bearer ll_your_api_key"Response ยท 200 OK
| Field | Type | Notes |
|---|---|---|
success | boolean | โ |
deactivated | boolean | โ |
topics_used | integer | โ |
