Store Visibility Report
curl --request POST \
--url https://searchcompany-main.up.railway.app/api/cron/store-visibility-report \
--header 'Content-Type: application/json' \
--data '
{
"clerk_org_id": "<string>",
"results": [
{}
],
"report_date": "<string>"
}
'import requests
url = "https://searchcompany-main.up.railway.app/api/cron/store-visibility-report"
payload = {
"clerk_org_id": "<string>",
"results": [{}],
"report_date": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({clerk_org_id: '<string>', results: [{}], report_date: '<string>'})
};
fetch('https://searchcompany-main.up.railway.app/api/cron/store-visibility-report', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://searchcompany-main.up.railway.app/api/cron/store-visibility-report",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'clerk_org_id' => '<string>',
'results' => [
[
]
],
'report_date' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://searchcompany-main.up.railway.app/api/cron/store-visibility-report"
payload := strings.NewReader("{\n \"clerk_org_id\": \"<string>\",\n \"results\": [\n {}\n ],\n \"report_date\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://searchcompany-main.up.railway.app/api/cron/store-visibility-report")
.header("Content-Type", "application/json")
.body("{\n \"clerk_org_id\": \"<string>\",\n \"results\": [\n {}\n ],\n \"report_date\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://searchcompany-main.up.railway.app/api/cron/store-visibility-report")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"clerk_org_id\": \"<string>\",\n \"results\": [\n {}\n ],\n \"report_date\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"report_date": "<string>",
"prompts_updated": 123,
"summary": {}
}π΅ POST - Store Visibility Report
Store Visibility Report
Store daily visibility report with sampled prompts and pass/fail results.
POST
/
api
/
cron
/
store-visibility-report
Store Visibility Report
curl --request POST \
--url https://searchcompany-main.up.railway.app/api/cron/store-visibility-report \
--header 'Content-Type: application/json' \
--data '
{
"clerk_org_id": "<string>",
"results": [
{}
],
"report_date": "<string>"
}
'import requests
url = "https://searchcompany-main.up.railway.app/api/cron/store-visibility-report"
payload = {
"clerk_org_id": "<string>",
"results": [{}],
"report_date": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({clerk_org_id: '<string>', results: [{}], report_date: '<string>'})
};
fetch('https://searchcompany-main.up.railway.app/api/cron/store-visibility-report', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://searchcompany-main.up.railway.app/api/cron/store-visibility-report",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'clerk_org_id' => '<string>',
'results' => [
[
]
],
'report_date' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://searchcompany-main.up.railway.app/api/cron/store-visibility-report"
payload := strings.NewReader("{\n \"clerk_org_id\": \"<string>\",\n \"results\": [\n {}\n ],\n \"report_date\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://searchcompany-main.up.railway.app/api/cron/store-visibility-report")
.header("Content-Type", "application/json")
.body("{\n \"clerk_org_id\": \"<string>\",\n \"results\": [\n {}\n ],\n \"report_date\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://searchcompany-main.up.railway.app/api/cron/store-visibility-report")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"clerk_org_id\": \"<string>\",\n \"results\": [\n {}\n ],\n \"report_date\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"report_date": "<string>",
"prompts_updated": 123,
"summary": {}
}Overview
This endpoint stores the daily visibility report after the cron job analyzes sampled prompts. It updates the prompts with visibility results andlast_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 checkedplatforms_breakdown: Object with count per platform (e.g.,{"chatgpt": 7, "claude": 6, ...})
Example Request
{
"clerk_org_id": "acme-corp",
"results": [
{
"prompt_id": 42,
"prompt": "best project management software",
"entity_id": "550e8400-e29b-41d4-a716-446655440000",
"entity_name": "Acme Corp",
"entity_type": "business",
"platforms": {
"chatgpt": true,
"claude": true,
"gemini": false,
"perplexity": true,
"copilot": false,
"deepseek": true,
"grok": false,
"google_ai": true
}
}
]
}
Example Response
{
"status": "success",
"report_date": "2025-12-29",
"prompts_updated": 10,
"summary": {
"total_checked": 10,
"platforms_breakdown": {
"chatgpt": 7,
"claude": 6,
"gemini": 5,
"perplexity": 4,
"copilot": 6,
"deepseek": 3,
"grok": 2,
"google_ai": 5
}
}
}
Actions Performed
- Update entity_prompts_tracker with visibility results (pass/fail per platform)
- Set last_tested_at timestamp so tested prompts appear first in UI
- 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)