โ† API reference

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.

GET /prompts/get-prompts/{company_id}

Get Prompts

๐Ÿ”’ Requires Authorization: Bearer ll_โ€ฆ (or X-API-Key).

Path parameters

NameTypeRequiredDescription
company_idstringYesโ€”

Query parameters

NameTypeRequiredDefaultDescription
skipintegerNo0Number of prompts to skip
limitintegerNo50Maximum number of prompts to return
searchstring | nullNoโ€”Search in prompt text
statusstring | nullNoโ€”Filter by status: pending (Topic Explorer), reviewed (Tracked Prompts), failed
is_activeboolean | nullNoโ€”Filter by active/paused status
segment_idsstring | nullNoโ€”Comma-separated segment IDs to filter by (includes special 'none' UUID)
offering_idsstring | nullNoโ€”Comma-separated offering IDs to filter by (includes special 'none' UUID)
location_idsstring | nullNoโ€”Comma-separated location IDs to filter by (includes special 'none' UUID)
value_proposition_idsstring | nullNoโ€”Comma-separated value proposition IDs to filter by (includes special 'none' UUID)
buying_stage_idsstring | nullNoโ€”Comma-separated buying stage IDs to filter by (includes special 'none' UUID)
ideal_customer_idsstring | nullNoโ€”Comma-separated ideal customer IDs to filter by (includes special 'none' UUID)
topic_idsstring | nullNoโ€”Comma-separated topic IDs to filter by (includes special 'none' UUID)
visibilityboolean | nullNoโ€”Filter by visibility tracking
sentimentboolean | nullNoโ€”Filter by sentiment tracking
sourcePromptSource[] | nullNoโ€”Filter by prompt provenance (e.g. google_search_console). Repeat or comma-separate for multiple.
sort_bystringNocreated_atSort by: created_at, last_executed_at, visibility, visibility_change, sentiment, sentiment_change
sort_orderstringNodescSort 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

FieldTypeNotes
successbooleanโ€”
messagestringโ€”
conversationIdstring | nullโ€”
dataPromptCollection[] | nullโ€”
totalinteger | nullโ€”
metricsobject | nullโ€”
hasTrackedboolean | nullโ€”
POST /prompts/create-prompt/{company_id}

Create Prompt

๐Ÿ”’ Requires Authorization: Bearer ll_โ€ฆ (or X-API-Key).

Path parameters

NameTypeRequiredDescription
company_idstringYesโ€”

Request bodyยท Body_create_prompt_prompts_create_prompt__company_id__post

FieldTypeRequiredDescription
promptPromptYesGenerated prompts with cached text and metadata.
prompt_referencesPromptReference[]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

FieldTypeNotes
successbooleanโ€”
messagestringโ€”
conversationIdstring | nullโ€”
dataPromptCollection[] | nullโ€”
totalinteger | nullโ€”
metricsobject | nullโ€”
hasTrackedboolean | nullโ€”
POST /prompts/generate-prompts/{company_id}

Generate Prompts

Generate prompts for a company collection

๐Ÿ”’ Requires Authorization: Bearer ll_โ€ฆ (or X-API-Key).

Path parameters

NameTypeRequiredDescription
company_idstringYesโ€”

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.

POST /prompts/execute-prompts/{company_id}

Execute Prompts

Execute specific prompts on-demand

๐Ÿ”’ Requires Authorization: Bearer ll_โ€ฆ (or X-API-Key).

Path parameters

NameTypeRequiredDescription
company_idstringYesโ€”

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.

GET /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

NameTypeRequiredDescription
prompt_idstringYesโ€”

Query parameters

NameTypeRequiredDefaultDescription
providerLlmProvider | nullNoโ€”โ€”
limitintegerNo5โ€”

Example request

curl -X GET "https://api.lunalift.ai/prompts/responses/PROMPT_ID" \
  -H "Authorization: Bearer ll_your_api_key"

Response ยท 200 OK

FieldTypeNotes
successbooleanโ€”
messagestringโ€”
conversationIdstring | nullโ€”
dataobject | nullโ€”
POST /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

NameTypeRequiredDescription
prompt_idstringYesโ€”

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.

POST /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

NameTypeRequiredDescription
prompt_idstringYesโ€”

Query parameters

NameTypeRequiredDefaultDescription
providerLlmProviderYesโ€”โ€”
enablebooleanYesโ€”โ€”

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.

POST /prompts/bulk-update/{company_id}

Bulk Update Prompts

Bulk update multiple prompts at once

๐Ÿ”’ Requires Authorization: Bearer ll_โ€ฆ (or X-API-Key).

Path parameters

NameTypeRequiredDescription
company_idstringYesโ€”

Request bodyยท BulkPromptUpdate

FieldTypeRequiredDescription
prompt_idsstring[] | nullNoโ€”
use_filtersboolean | nullNoโ€”
searchstring | nullNoโ€”
is_activeboolean | nullNoโ€”
segment_idsstring[] | nullNoโ€”
offering_idsstring[] | nullNoโ€”
location_idsstring[] | nullNoโ€”
value_proposition_idsstring[] | nullNoโ€”
buying_stage_idsstring[] | nullNoโ€”
ideal_customer_idsstring[] | nullNoโ€”
visibilityboolean | nullNoโ€”
sentimentboolean | nullNoโ€”
actionstringYesโ€”
valueinteger | nullNoโ€”
search_termstring | nullNoโ€”
replace_termstring | nullNoโ€”
case_sensitiveboolean | nullNoโ€”
enable_providersstring[] | nullNoโ€”
disable_providersstring[] | nullNoโ€”

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.

GET /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

NameTypeRequiredDescription
company_idstringYesโ€”

Example request

curl -X GET "https://api.lunalift.ai/prompts/providers/COMPANY_ID" \
  -H "Authorization: Bearer ll_your_api_key"

Response ยท 200 OK

FieldTypeNotes
successbooleanโ€”
messagestringโ€”
providersLlmProvider[]โ€”
GET /prompts/topics/{company_id}

Get Topics

Get all active topics for a company.

๐Ÿ”’ Requires Authorization: Bearer ll_โ€ฆ (or X-API-Key).

Path parameters

NameTypeRequiredDescription
company_idstringYesโ€”

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.

POST /prompts/topics/{company_id}/{topic_id}/deactivate

Deactivate 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

NameTypeRequiredDescription
company_idstringYesโ€”
topic_idintegerYesโ€”

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

FieldTypeNotes
successbooleanโ€”
deactivatedbooleanโ€”
topics_usedintegerโ€”