Skip to main content
POST
Store Visibility Report

Overview

This endpoint stores the daily visibility report after the cron job analyzes sampled prompts. It updates the prompts with visibility results and last_tested_at timestamp.
This is an internal API used by the Cron service. Requires API key authentication.

Request Body

string
required
Organization identifier
array
required
Array of prompt results from visibility analysis:
  • prompt_id: Prompt ID (integer)
  • prompt: The prompt text (string)
  • entity_id: Entity UUID (string)
  • entity_name: Entity name (string)
  • entity_type: "business" or "product" (string)
  • platforms: Object with platform visibility results (boolean for each platform)
string
Optional date in YYYY-MM-DD format. Defaults to today.

Response

string
"success" or "error"
string
The date of the report (YYYY-MM-DD)
integer
Number of prompts processed
object
Summary of results:
  • total_checked: Number of prompts checked
  • platforms_breakdown: Object with count per platform (e.g., {"chatgpt": 7, "claude": 6, ...})

Example Request

Example Response

Actions Performed

  1. Update entity_prompts_tracker with visibility results (pass/fail per platform)
  2. Set last_tested_at timestamp so tested prompts appear first in UI
  3. Upsert visibility_reports row for the day with summary

Pass/Fail Paradigm

Each platform shows a simple pass/fail result:
  • true: The entity was mentioned/recommended by this AI platform
  • false: The entity was not found in the AI platform’s response
  • null: Not yet tested (shows as ”-” in the UI)