REST API
Read your brands' AI-visibility metrics, cited sources and actions over HTTP with a personal API key.
Base URL and authentication
https://www.sonable.ai/api/v1
Send your API key on every request (how to get one):
curl -H "Authorization: Bearer $SONABLE_KEY" https://www.sonable.ai/api/v1/brands
Responses and errors
Every response is JSON: { "data": … } on success, { "error": { "code", "message" } } otherwise.
| Status | When |
|---|---|
400 | A parameter or body is not valid |
401 | No key, or a key that is revoked or unknown |
404 | No such brand or action, or one your key cannot see (never 403, so ids are not confirmed) |
409 | The competitor is already tracked (already_tracked) |
422 | Past the plan's limit on tracked questions or wordings per question (plan_limit) |
429 | More than 120 requests a minute on this key; retry after the Retry-After header (60 seconds) |
Endpoints
| Method | Path | Returns |
|---|---|---|
| GET | /brands | Every brand you can see, across your workspaces |
| GET | /brands/{brandId} | Market, competitors and intents (with their ids), and your role |
| GET | /brands/{brandId}/metrics | The latest 28-day window, for the brand and each competitor |
| GET | /brands/{brandId}/trend | One metric over time |
| GET | /brands/{brandId}/sources | Cited domains, and those cited for competitors but not you |
| GET | /brands/{brandId}/actions | What to work on next, highest priority first |
| PATCH | /brands/{brandId}/actions/{actionId} | Mark an action done, dismissed or to do again |
| GET | /brands/{brandId}/answers | The latest answers, newest first, with a preview of each |
| GET | /brands/{brandId}/answers/{answerId} | One answer in full, with the businesses it names, its citations and searches |
| GET | /brands/{brandId}/perception | The tone of the answers naming the brand and each competitor |
| GET | /brands/{brandId}/head-to-head | Per question, answers naming a competitor and not you, and the reverse |
| GET | /brands/{brandId}/discovered-brands | Businesses named in your answers that you do not track |
| POST | /brands/{brandId}/discovered-brands/dismissals | Stop offering a discovered name |
| POST | /brands/{brandId}/intents | Add a question and track it |
| POST | /brands/{brandId}/intents/proposals | Propose questions for a person to approve |
| PATCH | /brands/{brandId}/intents/{intentId} | Track, pause or archive a question |
| POST | /brands/{brandId}/competitors | Track a competitor |
| POST | /brands/{brandId}/crawler-logs | Send access log lines to count AI crawler visits |
| POST | /brands/{brandId}/context | Add call transcripts, tickets and notes that content drafts draw on |
List brands
GET /brands. Each brand has id, name, website, workspaceId, workspaceName, marketCountry,
marketLanguage, collectionPaused and createdAt. Start here to get brand ids. marketCountry is an
ISO 3166-1 alpha-2 country code, or a UN M.49 area code for a regional or worldwide market (150 is
Europe, 419 Latin America, 001 the world); marketLanguage is a BCP 47 language tag.
Get a brand
GET /brands/{brandId}. The brand's market, ownedDomains, yourRole, and its competitors and
intents with their ids, which the filters below take.
Metrics
GET /brands/{brandId}/metrics?intent=&engine=
| Parameter | |
|---|---|
intent | Optional. One intent id; all intents together when left out |
engine | Optional. One engine id; all engines pooled when left out |
Returns windowEnd, windowDays (28), methodologyVersion, enginesWithData, and entities: the
brand (isBrand: true) and each competitor, each with all five metrics.
Every metric is a rate:
{
"value": 0.42,
"lower": 0.35,
"upper": 0.49,
"n": 180,
"insufficient": null,
"significantChange": 0.07
}
value,lower,upper: a fraction 0–1 and its 95% interval.n: how many answers it is based on.insufficient:null, or why there is no number (no_data,small_sample,wide_interval), in which casevalueisnull.significantChange: the change against the four weeks before, only when it is statistically significant; otherwisenull.
Trend
GET /brands/{brandId}/trend?metric=answer_share&days=90
| Parameter | |
|---|---|
metric | answer_share (default), pick_rate, citation_rate, top_three_rate or first_named_rate |
days | 7 to 365; 90 by default |
Returns one series per entity (the brand and each competitor) of rates over time.
Sources
GET /brands/{brandId}/sources?intent=&engine= takes the same filters as metrics. Returns the domains
the assistants cited in answers about your market, and forCompetitorsNotYou: third-party sites cited
when a competitor is recommended and you are not. That second list is your outreach list.
Actions
GET /brands/{brandId}/actions?status=todo lists actions, highest priorityScore first, each with its
key, status, evidenceStrength, the intentIds and engines it concerns, and updatedAt.
status is optional: todo, done or dismissed. evidenceStrength is strong, moderate or
measured. Page speed fixes have keys starting speed: and are measured; they have no intentIds and
rank last.
Each action also has locked. On the Free plan the detail of one AI action is open at a time, the
most important one still to do; the other open ones come back with locked: true and params: null,
keeping their key, rung, intentIds and engines. Marking the open action done or dismissed opens
the next. On paid plans locked is always false.
PATCH /brands/{brandId}/actions/{actionId} changes one action's status. It needs a role that can edit
the brand.
curl -X PATCH \
-H "Authorization: Bearer $SONABLE_KEY" \
-H "Content-Type: application/json" \
-d '{"status":"done"}' \
https://www.sonable.ai/api/v1/brands/BRAND_ID/actions/ACTION_ID
Answers
GET /brands/{brandId}/answers?intent=&engine=&days=28&limit=25 lists valid answers newest first, up to
limit (at most 100) from the last days (at most 90): engine, collectedAt, the intentId and
intentTitle, the prompt (the wording asked) and a preview of the text.
GET /brands/{brandId}/answers/{answerId} returns one answer in full: text, mentions (every business
it names, each with kind brand, competitor or other, isPick, sentiment and the evidence
sentence), citations (with each site's label) and searches, the queries the assistant ran.
Perception
GET /brands/{brandId}/perception?engine= returns, for the brand and each competitor over the latest
28 days, answersNaming and the share of those answers that are positive, neutral and negative,
each a rate with its interval, plus up to 20 recent quotes.
Head to head
GET /brands/{brandId}/head-to-head?competitor= returns, for each competitor (or the one given), the
answers that name them and not you (onlyThem), you and not them (onlyYou) and both, out of n,
overall and per question, questions with the highest onlyThem first.
Discovered brands
GET /brands/{brandId}/discovered-brands?limit=25 lists the businesses the assistants name in your
answers that you do not track as competitors, most often named first, from the latest 28 days. Each has
a key (the normalised name, so "Acme Ltd" and "acme.com" are one business), the name spelt as the
assistants spell it most, named and recommended (rates over the window's answers, with intervals),
the engines and intentIds it shows up in, and an example sentence with its answerId. A name
named in only one answer is left out.
POST /brands/{brandId}/discovered-brands/dismissals with { "name": "Example Marketplace" } stops
offering a name that is not a competitor. The Competitors page can show it again.
Questions
POST /brands/{brandId}/intents adds a question and tracks it straight away, within the plan's number
of tracked questions per brand:
curl -X POST \
-H "Authorization: Bearer $SONABLE_KEY" \
-H "Content-Type: application/json" \
-d '{"title":"Best CRM for small agencies","stage":"recommendation","phrasings":["What is the best CRM for a small agency?"]}' \
https://www.sonable.ai/api/v1/brands/BRAND_ID/intents
stage is problem, comparison, recommendation (default) or branded; phrasings holds one to
three wordings, within the plan's limit per question; topic is optional. The response carries flags:
a wording that names the brand in a question that is not branded, or one that nearly duplicates an
existing wording.
POST /brands/{brandId}/intents/proposals with { "prompts": [ … ] } (up to 50, same shape) saves them
as proposals. Nothing is collected until a person approves them in the brand's setup.
PATCH /brands/{brandId}/intents/{intentId} with { "status": "approved" | "paused" | "archived" }
tracks, pauses or archives a question. Archiving cannot be undone here; the question's answers stay in
past periods.
Competitors
POST /brands/{brandId}/competitors with { "name", "domain"?, "aliases"? } tracks a competitor. Its
figures count from answers parsed after this. Every change here needs a role that can edit the brand.
Crawler logs
POST /brands/{brandId}/crawler-logs takes raw access log lines as the request body (text/plain, at
most 5 MB a request): Apache or nginx combined log format, or JSON lines from Vercel, Cloudflare,
Netlify or Fastly. Only requests from known AI crawlers are kept, as counts per day, crawler and page
(no IP addresses or query strings), and they appear under AI crawler visits. Each line is counted every
time it is sent, so send each line once. It needs a role that can edit the brand, and returns lines,
crawlerRequests and rows.
curl -X POST \
-H "Authorization: Bearer $SONABLE_KEY" \
-H "Content-Type: text/plain" \
--data-binary @access.log \
https://www.sonable.ai/api/v1/brands/BRAND_ID/crawler-logs
Context
POST /brands/{brandId}/context adds context that content drafts are written from: call transcripts and
notes, support tickets, customer interviews and product research, as JSON (at most 5 MB and 50 items a
request). Each item has kind (sales_call, support_call, support_ticket, customer_interview,
product_research, helpdesk, documentation, api_docs or other), title (at most 200 characters) and body (at most 200,000), and
optionally occurredAt (a date), externalUrl (https, a link back to the item in its own tool),
pinned (used in every draft) and externalId. With an externalId, sending the same item again
updates it instead of adding a copy, so a Zapier, Make or n8n flow can resend safely. Items appear on
the Context page; it needs a role that can edit the brand and returns written. A brand holds at most
2,000 items.
curl -X POST \
-H "Authorization: Bearer $SONABLE_KEY" \
-H "Content-Type: application/json" \
-d '{"items":[{"kind":"support_ticket","externalId":"zendesk-48213","title":"Cannot export the weekly report","body":"Customer: ..."}]}' \
https://www.sonable.ai/api/v1/brands/BRAND_ID/context
Metrics feed for BI tools
Spreadsheets and BI tools that read a URL cannot send an API key, so each brand can have one feed URL
with its own secret (Export, Live feed for BI tools). GET /api/feeds/{token} (outside /api/v1, no
key) returns CSV: one row per 28-day window, metric, business, question and assistant, with
successes, n, status, and rate, lower and upper as proportions (95% Wilson interval).
status is insufficient when the sample is too small or the interval too wide; rate is then empty.
?days= sets how far back (default 90, at most 365). 120 reads an hour per brand.
Values
- Metrics:
answer_share,pick_rate,citation_rate,top_three_rate,first_named_rate(what each means). - Engines:
chatgpt,aio,ai_mode,gemini,perplexity,copilot,claude. - Action statuses:
todo,done,dismissed.