GET /brands
List brands — discover your IDs
Returns every brand you own. Call this first to get the `id` you'll plug into the other endpoints. This is the only endpoint that doesn't take a brand id as a path parameter.
Request
curl https://ipxntaczzxemkezuofzl.supabase.co/functions/v1/api-v1/brands \
-H "Authorization: Bearer ik_…"
Response (200 OK)
{
"brands": [
{
"id": "0ae98f45-446c-4482-886f-9ce2fd6ba4ea",
"name": "Acme",
"industry": "B2B SaaS",
"aliases": ["Acme Corp", "ACME"],
"competitors": ["Beta", "Gamma"],
"country": "US",
"enabled_models": ["openai/gpt-5.2", "anthropic/claude-sonnet-4"],
"run_frequency": "daily",
"created_at": "2026-04-01T12:00:00Z"
}
]
}
GET /brands/{id}
Get a brand
Single brand by id. Same shape as the items in `/brands`.
Request
curl https://ipxntaczzxemkezuofzl.supabase.co/functions/v1/api-v1/brands/0ae98f45-446c-4482-886f-9ce2fd6ba4ea \
-H "Authorization: Bearer ik_…"
Response (200 OK)
{
"brand": {
"id": "0ae98f45-446c-4482-886f-9ce2fd6ba4ea",
"name": "Acme",
...
}
}
GET /brands/{id}/queries
List queries for a brand
Every prompt you've added against this brand. Sorted newest first.
Request
curl https://ipxntaczzxemkezuofzl.supabase.co/functions/v1/api-v1/brands/{id}/queries?limit=100 \
-H "Authorization: Bearer ik_…"
Response (200 OK)
{
"queries": [
{
"id": "…",
"text": "best CRM for small B2B teams",
"tags": ["evaluation"],
"country": "US",
"enabled": true,
"last_run_at": "2026-04-30T04:00:00Z",
"created_at": "2026-04-01T12:00:00Z"
}
]
}
GET /brands/{id}/runs
List runs for a brand
One row per (query × model) execution. Includes the raw `response` blob from the model.
Request
curl https://ipxntaczzxemkezuofzl.supabase.co/functions/v1/api-v1/brands/{id}/runs?limit=100 \
-H "Authorization: Bearer ik_…"
Response (200 OK)
{
"runs": [
{
"id": "…",
"query_id": "…",
"model": "openai/gpt-5.2",
"status": "completed",
"response": "Acme is one of the leading…",
"error": null,
"created_at": "2026-04-30T04:01:23Z"
}
]
}
GET /brands/{id}/mentions
List mentions for a brand
Per-run analysis: whether the brand was mentioned, where it ranked, sentiment, what competitors were named, and the source URLs the model cited.
Request
curl https://ipxntaczzxemkezuofzl.supabase.co/functions/v1/api-v1/brands/{id}/mentions?limit=100 \
-H "Authorization: Bearer ik_…"
Response (200 OK)
{
"mentions": [
{
"id": "…",
"run_id": "…",
"mentioned": true,
"position": 3,
"sentiment": "positive",
"sentiment_score": 78,
"context": "Acme stands out for its…",
"competitors_found": ["Beta"],
"sources": ["https://en.wikipedia.org/wiki/…"],
"confidence": 0.92,
"created_at": "2026-04-30T04:01:24Z"
}
]
}
GET /brands/{id}/visibility
Daily visibility scores
One row per day. `score` is a 0-100 percentage of mention rate across all queries × models that ran that day.
Request
curl https://ipxntaczzxemkezuofzl.supabase.co/functions/v1/api-v1/brands/{id}/visibility \
-H "Authorization: Bearer ik_…"
Response (200 OK)
{
"visibility": [
{
"day": "2026-04-30",
"score": 64,
"total_runs": 48,
"total_mentions": 31
}
]
}
GET /brands/{id}/recommendations
List recommendations for a brand
AI-generated next steps to improve visibility, with workflow status (pending → in_progress → done / dismissed).
Request
curl https://ipxntaczzxemkezuofzl.supabase.co/functions/v1/api-v1/brands/{id}/recommendations \
-H "Authorization: Bearer ik_…"
Response (200 OK)
{
"recommendations": [
{
"id": "…",
"category": "wikipedia",
"title": "Edit the 'CRM software' Wikipedia article",
"body": "Three of four models cited Wikipedia…",
"related_queries": ["…"],
"status": "pending",
"due_date": null,
"completed_at": null,
"created_at": "2026-04-30T04:05:00Z"
}
]
}
GET /brands/{id}/suggested-prompts
Suggested prompts
Prompts the system thinks you should track but haven't added yet. `added: true` means the user accepted the suggestion (and the prompt now lives in `/brands/{id}/queries`).
Request
curl https://ipxntaczzxemkezuofzl.supabase.co/functions/v1/api-v1/brands/{id}/suggested-prompts \
-H "Authorization: Bearer ik_…"
Response (200 OK)
{
"suggested_prompts": [
{
"id": "…",
"text": "best CRM for small SaaS teams",
"rationale": "competitor-comparison gap — competitors win 4/5 runs",
"added": false,
"created_at": "2026-05-01T04:00:00Z"
}
]
}
GET /brands/{id}/competitor-sov
Competitor share of voice
Daily mention counts per (competitor, model). The brand itself is reported under the `__brand__` sentinel so share-of-voice is `brand_count / SUM(count)` within (model, day). Filter the time range with `?since=YYYY-MM-DD` (default: last 90 days).
Request
curl "https://ipxntaczzxemkezuofzl.supabase.co/functions/v1/api-v1/brands/{id}/competitor-sov?since=2026-04-01" \
-H "Authorization: Bearer ik_…"
Response (200 OK)
{
"sov": [
{ "competitor": "__brand__", "model": "openai/gpt-5.2", "day": "2026-05-04", "mention_count": 4, "avg_position": 2.5 },
{ "competitor": "Beta", "model": "openai/gpt-5.2", "day": "2026-05-04", "mention_count": 7, "avg_position": null }
]
}
GET /brands/{id}/page-audits
Page audits — list
AI-readiness audits run on the brand's pages. Each row includes the score (0-100), the issues list, and the parsed signals (schema.org types, llms.txt presence, AI-bot robots rules, etc.).
Request
curl https://ipxntaczzxemkezuofzl.supabase.co/functions/v1/api-v1/brands/{id}/page-audits \
-H "Authorization: Bearer ik_…"
Response (200 OK)
{
"page_audits": [
{
"id": "…",
"url": "https://acme.com/pricing",
"fetched_at": "2026-05-04T10:12:00Z",
"status_code": 200,
"score": 72,
"issues": [
{ "id": "no-faq-schema", "severity": "warning", "title": "No FAQPage schema", "fix": "Add JSON-LD FAQPage with the top buyer questions.", "score_impact": 8 }
],
"signals": {
"word_count": 824,
"h1_count": 1,
"has_canonical": true,
"has_meta_description": true,
"has_faq_schema": false,
"schema_types": ["Organization", "WebSite"],
"llms_txt_present": false,
"robots_blocks_ai": [],
"ai_bots_allowed": ["GPTBot", "ClaudeBot"]
},
"error": null
}
]
}
GET /brands/{id}/page-audits/{auditId}
Page audit — single
Single audit by id. Same shape as the items in `/brands/{id}/page-audits`.
Request
curl https://ipxntaczzxemkezuofzl.supabase.co/functions/v1/api-v1/brands/{id}/page-audits/{auditId} \
-H "Authorization: Bearer ik_…"
Response (200 OK)
{
"page_audit": {
"id": "…",
"url": "https://acme.com/pricing",
"score": 72,
...
}
}