GET /brands
Listează brandurile: descoperă ID-urile tale
Returnează fiecare brand pe care îl deții. Apelează acest endpoint primul, ca să obții `id`-ul pe care îl vei folosi în celelalte. Este singurul endpoint care nu primește un id de brand ca parametru de cale.
Cerere
curl https://ipxntaczzxemkezuofzl.supabase.co/functions/v1/api-v1/brands \
-H "Authorization: Bearer ik_…"
Răspuns (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}
Obține un brand
Un singur brand după id. Aceeași formă ca elementele din `/brands`.
Cerere
curl https://ipxntaczzxemkezuofzl.supabase.co/functions/v1/api-v1/brands/0ae98f45-446c-4482-886f-9ce2fd6ba4ea \
-H "Authorization: Bearer ik_…"
Răspuns (200 OK)
{
"brand": {
"id": "0ae98f45-446c-4482-886f-9ce2fd6ba4ea",
"name": "Acme",
...
}
}
GET /brands/{id}/queries
Listează întrebările pentru un brand
Fiecare prompt pe care l-ai adăugat pentru acest brand. Sortat de la cel mai nou.
Cerere
curl https://ipxntaczzxemkezuofzl.supabase.co/functions/v1/api-v1/brands/{id}/queries?limit=100 \
-H "Authorization: Bearer ik_…"
Răspuns (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
Listează rulările pentru un brand
Un rând pe execuție (întrebare × model). Include blob-ul brut `response` returnat de model.
Cerere
curl https://ipxntaczzxemkezuofzl.supabase.co/functions/v1/api-v1/brands/{id}/runs?limit=100 \
-H "Authorization: Bearer ik_…"
Răspuns (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
Listează menționările pentru un brand
Analiza per rulare: dacă brandul a fost menționat, pe ce poziție, sentimentul, ce competitori au fost numiți și URL-urile sursă citate de model.
Cerere
curl https://ipxntaczzxemkezuofzl.supabase.co/functions/v1/api-v1/brands/{id}/mentions?limit=100 \
-H "Authorization: Bearer ik_…"
Răspuns (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
Scoruri zilnice de vizibilitate
Un rând pe zi. `score` este un procent 0-100 al ratei de menționare pe toate întrebările × modelele care au rulat în acea zi.
Cerere
curl https://ipxntaczzxemkezuofzl.supabase.co/functions/v1/api-v1/brands/{id}/visibility \
-H "Authorization: Bearer ik_…"
Răspuns (200 OK)
{
"visibility": [
{
"day": "2026-04-30",
"score": 64,
"total_runs": 48,
"total_mentions": 31
}
]
}
GET /brands/{id}/recommendations
Listează recomandările pentru un brand
Pași următori generați de AI pentru a îmbunătăți vizibilitatea, cu status de flux (pending → in_progress → done / dismissed).
Cerere
curl https://ipxntaczzxemkezuofzl.supabase.co/functions/v1/api-v1/brands/{id}/recommendations \
-H "Authorization: Bearer ik_…"
Răspuns (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
Prompturi sugerate
Prompturi pe care sistemul crede că ar trebui să le monitorizezi, dar nu le-ai adăugat încă. `added: true` înseamnă că utilizatorul a acceptat sugestia (și că promptul se află acum în `/brands/{id}/queries`).
Cerere
curl https://ipxntaczzxemkezuofzl.supabase.co/functions/v1/api-v1/brands/{id}/suggested-prompts \
-H "Authorization: Bearer ik_…"
Răspuns (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
Share of voice pentru competitori
Numărul de menționări zilnic per (competitor, model). Brandul în sine este raportat sub santinela `__brand__`, astfel încât share of voice este `brand_count / SUM(count)` în (model, zi). Filtrează intervalul de timp cu `?since=YYYY-MM-DD` (implicit: ultimele 90 de zile).
Cerere
curl "https://ipxntaczzxemkezuofzl.supabase.co/functions/v1/api-v1/brands/{id}/competitor-sov?since=2026-04-01" \
-H "Authorization: Bearer ik_…"
Răspuns (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
Audituri de pagini: listă
Audituri de pregătire AI rulate pe paginile brandului. Fiecare rând include scorul (0-100), lista de probleme și semnalele parsate (tipuri schema.org, prezența llms.txt, regulile robots pentru boți AI etc.).
Cerere
curl https://ipxntaczzxemkezuofzl.supabase.co/functions/v1/api-v1/brands/{id}/page-audits \
-H "Authorization: Bearer ik_…"
Răspuns (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}
Audit de pagină: unic
Un singur audit după id. Aceeași formă ca elementele din `/brands/{id}/page-audits`.
Cerere
curl https://ipxntaczzxemkezuofzl.supabase.co/functions/v1/api-v1/brands/{id}/page-audits/{auditId} \
-H "Authorization: Bearer ik_…"
Răspuns (200 OK)
{
"page_audit": {
"id": "…",
"url": "https://acme.com/pricing",
"score": 72,
...
}
}