API reference
Insights
Insights endpoints.
| Method | Path | Summary |
|---|---|---|
GET | /v1/account/actions | Today: the task queue. Tasks from fixed rules (never the model), most severe and soonest first, for me, my groups, or the editors |
PATCH | /v1/account/actions/{actionId} | Work a task: snooze it, mark it done, dismiss it with a note, reopen it, or assign it to a team member. Nothing contacts the lead |
POST | /v1/account/analyses/{analysisId}/feedback | Correct one label of an analysis. The correction is kept, counted for the agreement rate and re-applied after every re-run; a caller type or judged objective re-runs the code pass |
POST | /v1/account/analyses/{analysisId}/rerun | Analyse one conversation again, model pass included (admins; counts against the daily budget) |
GET | /v1/account/bookings/{bookingId}/brief | The visit brief for a booking: who is coming, the timeline and interests, objections and how they were answered, open commitments, engagement, and talking points quoted from the playbook (logs call.view) |
GET | /v1/account/calls/{callId}/analysis | A conversation’s analysis: objective results with opportunity, attempts, miss reason and owner; craft and compliance checks; and, with Conversation Intelligence, labels with their evidence (reasons and the summary need transcript access) |
GET | /v1/account/commitments | Commitments made to leads: callbacks, answers to confirm, information to send. Descriptions need transcript access |
PATCH | /v1/account/commitments/{commitmentId} | Close a commitment (done or dismissed), reopen it, give it an owner or a new due time |
POST | /v1/account/insights/ask | Ask Stack a question about the account setup or, with Insights Ask, its conversations. The answer streams back as server-sent events: context, tool…, text…, block…, done (with the stored message and thread), or error |
POST | /v1/account/insights/ask/messages/{messageId}/feedback | Rate one of your Stack answers as helpful or not, with an optional note: staff read these to make Stack better (ADR 0173) |
POST | /v1/account/insights/ask/messages/{messageId}/opened | Count that you opened a link under one of your Stack answers (ADR 0173) |
GET | /v1/account/insights/ask/threads | Your Ask threads, most recently used first; saved=true for your saved questions |
GET | /v1/account/insights/ask/threads/{threadId} | One of your Ask threads with its questions and answers |
DELETE | /v1/account/insights/ask/threads/{threadId} | Delete one of your Ask threads and its answers |
POST | /v1/account/insights/ask/threads/{threadId}/rerun | Re-run a thread with edited context chips, without the model: the same tools, checks and blocks |
POST | /v1/account/insights/ask/threads/{threadId}/save | Save a thread as a saved question (or unsave it), rename it, or put it in your weekly digest |
GET | /v1/account/insights/chat | Chat: the site-chat funnel, where visitors stopped, answer pills, return visitors, anonymous against identified, and page-chat outcomes. Code facts, on every plan |
POST | /v1/account/insights/compare | Two to six entities side by side: every metric raw and adjusted for mix, with verdicts and the mix table |
GET | /v1/account/insights/competitors | Competitor mentions: how often each is named, in what context, and how those conversations ended |
GET | /v1/account/insights/drilldown | The conversations behind a number or a flow link, newest first |
GET | /v1/account/insights/entities | The communities, playbooks, versions or customized playbooks with conversations in the period, by name |
GET | /v1/account/insights/flows | A flow as a Sankey: step by step or first visits, thin links folded, unknowns drawn, optionally against a second scope |
GET | /v1/account/insights/gaps | Knowledge gaps in a scope: the knowledge-gap rate and the clusters asked most, with the communities affected |
GET | /v1/account/insights/journey | Journey and follow-up: conversation → target → page opened → held, by readiness tier and engagement cohort, with interests, family reach and calibration |
GET | /v1/account/insights/leaderboard | Entities at one level ranked on one metric (optionally for one objective type), each against the rest of its parent, with Benjamini–Hochberg verdicts |
GET | /v1/account/insights/matrix | Playbooks by communities on one metric: is it the playbook or the community? |
GET | /v1/account/insights/objections | Objections: how often each is raised, addressed and resolved, whether the agent came back to the target, attainment after it, and the best-handled conversations |
GET | /v1/account/insights/objectives | The opportunity, attempt and conversion funnel per objective, with fallbacks, misses by owner and held |
GET | /v1/account/insights/scorecard | Every metric at one level, with n, intervals and a verdict against its parent |
GET | /v1/account/insights/settings | Objective values, the minimum sample and named peers, with the defaults |
PUT | /v1/account/insights/settings | Change objective values (re-values every stored result), the minimum sample (30 or more), named peers, the taxonomy pack, the daily analysis budget, or Ask’s time zone, week start and daily budget |
GET | /v1/account/insights/taxonomy | The account’s taxonomy: what new analyses use, the draft with what stops it being published, the versions, and each community’s own topics |
PUT | /v1/account/insights/taxonomy | Save the account’s draft: topics, objections, intents and competitors. Start a fresh draft from a built-in pack with startFrom |
PUT | /v1/account/insights/taxonomy/communities/{groupId} | Save a community’s own topics as a draft (group managers for their communities) |
POST | /v1/account/insights/taxonomy/communities/{groupId}/promote | Promote a community’s topic into the account’s draft (and out of the community’s). Both apply when published |
POST | /v1/account/insights/taxonomy/communities/{groupId}/publish | Publish a community’s topics as its next version |
DELETE | /v1/account/insights/taxonomy/draft | Discard the account’s draft, or a community’s (groupId) |
POST | /v1/account/insights/taxonomy/publish | Publish the account’s draft as its next version. New analyses use it; old ones keep theirs |
POST | /v1/account/insights/taxonomy/reanalyze | Estimate, then queue, a re-analysis of up to 90 days with the current taxonomy: low priority, within half the daily budget, the old analyses kept as superseded |
GET | /v1/account/insights/topics | Topics and demand: topics by volume and change, attainment and sentiment by topic, timeline demand and the intent mix, with community topics folded above community level |
GET | /v1/account/insights/trend | One metric over time at one level, with publishes and value changes marked |
GET | /v1/account/knowledge-gaps | Knowledge gaps, most recently asked first, with how often and where. Questions need transcript access |
GET | /v1/account/knowledge-gaps/{gapId} | One knowledge gap: its questions, where they were asked, weekly counts, and occurrences before and after its fix |
PATCH | /v1/account/knowledge-gaps/{gapId} | Move a knowledge gap through the fix loop: link a fix (a knowledge document, a playbook version, or a note) and mark it fixed, dismiss it, or open it again |
GET | /v1/account/leads | Leads, sortable by readiness, momentum and last activity, with their last tier change (Conversation Intelligence) |
GET | /v1/account/leads/{leadId} | One lead: readiness with its reasons, tier history, interests, conversations, the timeline across channels, and linked profiles |
PATCH | /v1/account/leads/{leadId} | Close a lead with a reason (moved in, chose elsewhere, not a fit…) or reopen it. Readiness is recomputed |
POST | /v1/account/playbooks/{playbookId}/objectives/simulate | A draft's objectives run on this playbook's conversations of the last 30 days (up to 200), in code, beside the objectives they ran with |
Today: the task queue. Tasks from fixed rules (never the model), most severe and soonest first, for me, my groups, or the editors#
GET /v1/account/actions
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token). Bearer token: Authorization: Bearer <token> (An API token (ans_pat_ or ans_svc_). Only routes that list a scope here accept one, and only with that scope.).
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
scope | enum | No | One of: "mine", "team", "editors". Default: "team". |
state | enum | No | One of: "active", "open", "snoozed", "done", "dismissed", "all". Default: "active". |
groupId | string (grp_… ID) | No | ID (grp_…) |
leadId | string (lead_… ID) | No | ID (lead_…) |
callId | string (call_… ID) | No | ID (call_…) |
rule | enum | No | One of: "hot_target_open", "commitment_due", "urgent_timeline", "operations_miss", "cancelled_no_rebook", "unopened_before_visit", "negative_end", "agent_miss", "no_show_recovery", "anonymous_hot_chat", "recurring_gap", "performance_regression". |
severity | enum | No | One of: "high", "medium", "low". |
limit | integer | No | Between 1 and 200. Default: 50. |
offset | integer | No | Between 0 and 100000. Default: 0. |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
actions | array<InsightAction> | Yes | — |
actions[].assignee | object | Yes | — |
actions[].assignee.name | string | null | Yes | — |
actions[].assignee.source | enum | Yes | One of: "rep", "booking_assignee", "human_backup", "editors", "staff". |
actions[].assignee.userId | string (usr_… ID) | null | Yes | — |
actions[].autoClosed | boolean | Yes | — |
actions[].bookingId | string (bkg_… ID) | null | Yes | — |
actions[].callId | string (call_… ID) | null | Yes | — |
actions[].closedAt | string (date-time) | null | Yes | — |
actions[].commitmentId | string (cmt_… ID) | null | Yes | — |
actions[].crmTask | boolean | Yes | — |
actions[].dueAt | string (date-time) | Yes | — |
actions[].firedAt | string (date-time) | Yes | — |
actions[].groupId | string (grp_… ID) | null | Yes | — |
actions[].groupName | string | null | Yes | — |
actions[].id | string (iact_… ID) | Yes | ID (iact_…) |
actions[].lastSeenAt | string (date-time) | Yes | — |
actions[].lead | object | null | Yes | — |
actions[].lead.points | number | Yes | — |
actions[].lead.tier | enum | Yes | One of: "cold", "warm", "hot", "not_a_fit". |
actions[].leadId | string (lead_… ID) | null | Yes | — |
actions[].note | string | null | Yes | — |
actions[].reason | object | Yes | — |
actions[].reason.key | string | Yes | — |
actions[].reason.params | map | Yes | — |
actions[].reason.params.{key} | string | number | boolean | null | No | Any key. |
actions[].reasonWords | string | Yes | — |
actions[].rule | enum | Yes | One of: "hot_target_open", "commitment_due", "urgent_timeline", "operations_miss", "cancelled_no_rebook", "unopened_before_visit", "negative_end", "agent_miss", "no_show_recovery", "anonymous_hot_chat", "recurring_gap", "performance_regression". |
actions[].ruleLabel | string | Yes | — |
actions[].severity | enum | Yes | One of: "high", "medium", "low". |
actions[].snoozedUntil | string (date-time) | null | Yes | — |
actions[].state | enum | Yes | One of: "open", "snoozed", "done", "dismissed". |
open | object | Yes | — |
open.high | integer | Yes | — |
open.low | integer | Yes | — |
open.medium | integer | Yes | — |
total | integer | Yes | — |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X GET "$ANSWERSTACK_API_URL/v1/account/actions" \
-H "Authorization: Bearer $ACCESS_TOKEN"Work a task: snooze it, mark it done, dismiss it with a note, reopen it, or assign it to a team member. Nothing contacts the lead#
PATCH /v1/account/actions/{actionId}
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
actionId | string (iact_… ID) | Yes | ID (iact_…) |
Request body
application/json, required.
| Field | Type | Required | Description |
|---|---|---|---|
action | enum | Yes | One of: "snooze", "done", "dismiss", "reopen", "assign". |
assigneeUserId | string (usr_… ID) | null | No | — |
note | string | No | Up to 1000 characters. |
until | any | No | — |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
assignee | object | Yes | — |
assignee.name | string | null | Yes | — |
assignee.source | enum | Yes | One of: "rep", "booking_assignee", "human_backup", "editors", "staff". |
assignee.userId | string (usr_… ID) | null | Yes | — |
autoClosed | boolean | Yes | — |
bookingId | string (bkg_… ID) | null | Yes | — |
callId | string (call_… ID) | null | Yes | — |
closedAt | string (date-time) | null | Yes | — |
commitmentId | string (cmt_… ID) | null | Yes | — |
crmTask | boolean | Yes | — |
dueAt | string (date-time) | Yes | — |
firedAt | string (date-time) | Yes | — |
groupId | string (grp_… ID) | null | Yes | — |
groupName | string | null | Yes | — |
id | string (iact_… ID) | Yes | ID (iact_…) |
lastSeenAt | string (date-time) | Yes | — |
lead | object | null | Yes | — |
lead.points | number | Yes | — |
lead.tier | enum | Yes | One of: "cold", "warm", "hot", "not_a_fit". |
leadId | string (lead_… ID) | null | Yes | — |
note | string | null | Yes | — |
reason | object | Yes | — |
reason.key | string | Yes | — |
reason.params | map | Yes | — |
reason.params.{key} | string | number | boolean | null | No | Any key. |
reasonWords | string | Yes | — |
rule | enum | Yes | One of: "hot_target_open", "commitment_due", "urgent_timeline", "operations_miss", "cancelled_no_rebook", "unopened_before_visit", "negative_end", "agent_miss", "no_show_recovery", "anonymous_hot_chat", "recurring_gap", "performance_regression". |
ruleLabel | string | Yes | — |
severity | enum | Yes | One of: "high", "medium", "low". |
snoozedUntil | string (date-time) | null | Yes | — |
state | enum | Yes | One of: "open", "snoozed", "done", "dismissed". |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X PATCH "$ANSWERSTACK_API_URL/v1/account/actions/{actionId}" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"action": "snooze"
}'Correct one label of an analysis. The correction is kept, counted for the agreement rate and re-applied after every re-run; a caller type or judged objective re-runs the code pass#
POST /v1/account/analyses/{analysisId}/feedback
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
analysisId | string (cia_… ID) | Yes | ID (cia_…) |
Request body
application/json, required.
| Field | Type | Required | Description |
|---|---|---|---|
dimension | enum | Yes | One of: "caller_type", "intent", "topic", "sentiment_start", "sentiment_end", "sentiment_overall", "engagement", "timeline", "objection", "competitor", "buying_signal", "stakeholder", "knowledge_gap", "commitment", "risk_flag", "objection_handling", "judged_objective", "judged_miss". |
fromKey | string | null | No | Up to 80 characters. |
note | string | null | No | Up to 500 characters. |
objectiveId | string | null | No | Up to 64 characters. |
toKey | string | null | No | Up to 80 characters. |
Response 201
| Field | Type | Required | Description |
|---|---|---|---|
id | string (ifb_… ID) | Yes | ID (ifb_…) |
refreshing | boolean | Yes | — |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X POST "$ANSWERSTACK_API_URL/v1/account/analyses/{analysisId}/feedback" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"dimension": "caller_type"
}'Analyse one conversation again, model pass included (admins; counts against the daily budget)#
POST /v1/account/analyses/{analysisId}/rerun
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
analysisId | string (cia_… ID) | Yes | ID (cia_…) |
Response 202
| Field | Type | Required | Description |
|---|---|---|---|
status | enum | Yes | One of: "queued". |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X POST "$ANSWERSTACK_API_URL/v1/account/analyses/{analysisId}/rerun" \
-H "Authorization: Bearer $ACCESS_TOKEN"The visit brief for a booking: who is coming, the timeline and interests, objections and how they were answered, open commitments, engagement, and talking points quoted from the playbook (logs call.view)#
GET /v1/account/bookings/{bookingId}/brief
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token). Bearer token: Authorization: Bearer <token> (An API token (ans_pat_ or ans_svc_). Only routes that list a scope here accept one, and only with that scope.).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
bookingId | string (bkg_… ID) | Yes | ID (bkg_…) |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
bookingId | string (bkg_… ID) | Yes | ID (bkg_…) |
content | any | null | Yes | — |
crmLogged | boolean | Yes | — |
generatedAt | string (date-time) | null | Yes | — |
notifiedAt | string (date-time) | null | Yes | — |
recipient | object | null | Yes | — |
recipient.name | string | null | Yes | — |
recipient.source | enum | Yes | One of: "rep", "booking_assignee", "human_backup", "editors", "staff". |
recipient.userId | string (usr_… ID) | null | Yes | — |
stage | enum | null | Yes | One of: "booked", "day_before", "two_hours". |
state | enum | Yes | One of: "ready", "pending", "cleared". |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X GET "$ANSWERSTACK_API_URL/v1/account/bookings/{bookingId}/brief" \
-H "Authorization: Bearer $ACCESS_TOKEN"A conversation’s analysis: objective results with opportunity, attempts, miss reason and owner; craft and compliance checks; and, with Conversation Intelligence, labels with their evidence (reasons and the summary need transcript access)#
GET /v1/account/calls/{callId}/analysis
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token). Bearer token: Authorization: Bearer <token> (An API token (ans_pat_ or ans_svc_). Only routes that list a scope here accept one, and only with that scope.).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
callId | string (call_… ID) | Yes | ID (call_…) |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
analysis | object | null | Yes | — |
analysis.analyzedAt | string (date-time) | Yes | — |
analysis.analyzerVersion | string | Yes | — |
analysis.channelKind | enum | Yes | One of: "phone", "site_chat", "page_chat", "web_voice". |
analysis.craftScore | integer | null | Yes | — |
analysis.engaged | boolean | Yes | — |
analysis.id | string (cia_… ID) | Yes | ID (cia_…) |
analysis.missOwner | enum | null | Yes | One of: "agent", "content", "operations", "caller", "system". |
analysis.missReason | enum | null | Yes | One of: "not_attempted", "attempted_late", "objection_unhandled", "misheard_or_looped", "off_script", "knowledge_gap", "rules_blocked", "no_availability", "no_human_available", "booking_system_failure", "declined", "not_ready", "not_a_fit", "left_early", "error", "guardrail_end", "kill_switch". |
analysis.partialReason | string | null | Yes | — |
analysis.realizedValue | number | null | Yes | — |
analysis.status | string | Yes | — |
analysis.traceTruncated | boolean | Yes | — |
analysis.value | number | Yes | — |
checks | array<PerformanceCheck> | Yes | — |
checks[].check | string | Yes | — |
checks[].detail | map | Yes | — |
checks[].detail.{key} | number | null | No | Any key. |
checks[].kind | enum | Yes | One of: "craft", "compliance". |
checks[].label | string | Yes | — |
checks[].result | enum | Yes | One of: "pass", "fail", "n_a". |
checks[].verifiedBy | enum | Yes | One of: "code", "judged". |
intelligence | AnalysisIntelligence | Yes | — |
intelligence.contentWithheld | boolean | Yes | — |
intelligence.corrections | array<object> | Yes | — |
intelligence.corrections[].createdAt | string (date-time) | Yes | — |
intelligence.corrections[].dimension | enum | Yes | One of: "caller_type", "intent", "topic", "sentiment_start", "sentiment_end", "sentiment_overall", "engagement", "timeline", "objection", "competitor", "buying_signal", "stakeholder", "knowledge_gap", "commitment", "risk_flag", "objection_handling", "judged_objective", "judged_miss". |
intelligence.corrections[].fromKey | string | null | Yes | — |
intelligence.corrections[].id | string (ifb_… ID) | Yes | ID (ifb_…) |
intelligence.corrections[].objectiveId | string | null | Yes | — |
intelligence.corrections[].toKey | string | null | Yes | — |
intelligence.dimensions | any | null | Yes | — |
intelligence.droppedLabels | integer | Yes | — |
intelligence.labels | array<AnalysisLabel> | Yes | — |
intelligence.labels[].detail | map | Yes | — |
intelligence.labels[].detail.{key} | any | No | Any key. |
intelligence.labels[].dimension | enum | Yes | One of: "caller_type", "intent", "topic", "sentiment_start", "sentiment_end", "sentiment_overall", "engagement", "timeline", "objection", "competitor", "buying_signal", "stakeholder", "knowledge_gap", "commitment", "risk_flag", "objection_handling", "judged_objective", "judged_miss". |
intelligence.labels[].evidence | array<object> | Yes | — |
intelligence.labels[].evidence[].end | integer | Yes | — |
intelligence.labels[].evidence[].seq | integer | Yes | — |
intelligence.labels[].evidence[].start | integer | Yes | — |
intelligence.labels[].id | string (cil_… ID) | Yes | ID (cil_…) |
intelligence.labels[].key | string | Yes | — |
intelligence.labels[].label | string | Yes | — |
intelligence.labels[].reason | string | null | Yes | — |
intelligence.labels[].role | enum | null | Yes | One of: "primary", "secondary". |
intelligence.labels[].score | integer | null | Yes | — |
intelligence.labels[].sensitive | boolean | Yes | — |
intelligence.labels[].source | enum | Yes | One of: "model", "human". |
intelligence.labels[].state | string | null | Yes | — |
intelligence.model | string | null | Yes | — |
intelligence.moments | array<object> | Yes | — |
intelligence.moments[].key | string | null | Yes | — |
intelligence.moments[].kind | enum | Yes | One of: "price_question", "objection", "opportunity", "attempt", "conversion", "risk". |
intelligence.moments[].seq | integer | null | Yes | — |
intelligence.moments[].t | number | null | Yes | — |
intelligence.reason | string | null | Yes | — |
intelligence.state | enum | Yes | One of: "locked", "not_run", "failed", "ready". |
intelligence.summary | string | null | Yes | — |
intelligence.taxonomyVersion | string | null | Yes | — |
results | array<ObjectiveResult> | Yes | — |
results[].attempted | boolean | Yes | — |
results[].attempts | integer | Yes | — |
results[].convertedAt | number | null | Yes | — |
results[].eligible | boolean | Yes | — |
results[].fallbackId | string | null | Yes | — |
results[].fallbackType | enum | null | Yes | One of: "book_meeting", "live_transfer", "capture_callback", "capture_contact", "qualify", "text_follow_up", "manage_booking", "route_correctly", "nurture", "run_tool", "answer_questions", "custom_condition", "custom_judged". |
results[].firstAttemptAt | number | null | Yes | — |
results[].heldState | enum | null | Yes | One of: "held", "lost", "unknown". |
results[].label | string | Yes | — |
results[].missOwner | enum | null | Yes | One of: "agent", "content", "operations", "caller", "system". |
results[].missReason | enum | null | Yes | One of: "not_attempted", "attempted_late", "objection_unhandled", "misheard_or_looped", "off_script", "knowledge_gap", "rules_blocked", "no_availability", "no_human_available", "booking_system_failure", "declined", "not_ready", "not_a_fit", "left_early", "error", "guardrail_end", "kill_switch". |
results[].objectiveId | string | Yes | — |
results[].opportunityAt | number | null | Yes | — |
results[].reason | enum | null | Yes | One of: "not_engaged", "out_of_scope", "channel", "applies_when", "no_consent", "needs_analysis". |
results[].role | enum | Yes | One of: "target", "primary", "secondary". |
results[].share | number | null | Yes | — |
results[].state | enum | Yes | One of: "achieved", "fallback", "partial", "missed", "not_applicable", "unknown". |
results[].targetSource | enum | null | Yes | One of: "rule", "playbook". |
results[].type | enum | Yes | One of: "book_meeting", "live_transfer", "capture_callback", "capture_contact", "qualify", "text_follow_up", "manage_booking", "route_correctly", "nurture", "run_tool", "answer_questions", "custom_condition", "custom_judged". |
results[].value | number | Yes | — |
results[].verifiedBy | enum | Yes | One of: "code", "judged". |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X GET "$ANSWERSTACK_API_URL/v1/account/calls/{callId}/analysis" \
-H "Authorization: Bearer $ACCESS_TOKEN"Commitments made to leads: callbacks, answers to confirm, information to send. Descriptions need transcript access#
GET /v1/account/commitments
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token). Bearer token: Authorization: Bearer <token> (An API token (ans_pat_ or ans_svc_). Only routes that list a scope here accept one, and only with that scope.).
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
status | enum | No | One of: "open", "done", "dismissed", "all". Default: "open". |
mine | enum | No | One of: "true", "false". |
groupId | string (grp_… ID) | No | ID (grp_…) |
leadId | string (lead_… ID) | No | ID (lead_…) |
callId | string (call_… ID) | No | ID (call_…) |
limit | integer | No | Between 1 and 200. Default: 50. |
offset | integer | No | Between 0 and 100000. Default: 0. |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
commitments | array<Commitment> | Yes | — |
commitments[].callId | string (call_… ID) | Yes | ID (call_…) |
commitments[].closedAt | string (date-time) | null | Yes | — |
commitments[].closedBy | enum | null | Yes | One of: "staff", "callback", "crm_task", "later_conversation", "message_sent". |
commitments[].createdAt | string (date-time) | Yes | — |
commitments[].crmTask | boolean | Yes | — |
commitments[].description | string | null | Yes | — |
commitments[].dueAt | string (date-time) | Yes | — |
commitments[].evidence | array<object> | Yes | — |
commitments[].evidence[].end | integer | Yes | — |
commitments[].evidence[].seq | integer | Yes | — |
commitments[].evidence[].start | integer | Yes | — |
commitments[].groupId | string (grp_… ID) | Yes | ID (grp_…) |
commitments[].id | string (cmt_… ID) | Yes | ID (cmt_…) |
commitments[].kind | enum | Yes | One of: "callback", "specialist_confirm", "send_information", "other". |
commitments[].leadId | string (lead_… ID) | null | Yes | — |
commitments[].owner | object | Yes | — |
commitments[].owner.name | string | null | Yes | — |
commitments[].owner.source | enum | Yes | One of: "rep", "booking_assignee", "human_backup", "editors", "staff". |
commitments[].owner.userId | string (usr_… ID) | null | Yes | — |
commitments[].source | enum | Yes | One of: "code", "model". |
commitments[].status | enum | Yes | One of: "open", "done", "dismissed". |
total | integer | Yes | — |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X GET "$ANSWERSTACK_API_URL/v1/account/commitments" \
-H "Authorization: Bearer $ACCESS_TOKEN"Close a commitment (done or dismissed), reopen it, give it an owner or a new due time#
PATCH /v1/account/commitments/{commitmentId}
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
commitmentId | string (cmt_… ID) | Yes | ID (cmt_…) |
Request body
application/json, required.
| Field | Type | Required | Description |
|---|---|---|---|
action | enum | Yes | One of: "done", "dismiss", "reopen", "assign", "reschedule". |
dueAt | any | No | — |
ownerUserId | string (usr_… ID) | null | No | — |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
callId | string (call_… ID) | Yes | ID (call_…) |
closedAt | string (date-time) | null | Yes | — |
closedBy | enum | null | Yes | One of: "staff", "callback", "crm_task", "later_conversation", "message_sent". |
createdAt | string (date-time) | Yes | — |
crmTask | boolean | Yes | — |
description | string | null | Yes | — |
dueAt | string (date-time) | Yes | — |
evidence | array<object> | Yes | — |
evidence[].end | integer | Yes | — |
evidence[].seq | integer | Yes | — |
evidence[].start | integer | Yes | — |
groupId | string (grp_… ID) | Yes | ID (grp_…) |
id | string (cmt_… ID) | Yes | ID (cmt_…) |
kind | enum | Yes | One of: "callback", "specialist_confirm", "send_information", "other". |
leadId | string (lead_… ID) | null | Yes | — |
owner | object | Yes | — |
owner.name | string | null | Yes | — |
owner.source | enum | Yes | One of: "rep", "booking_assignee", "human_backup", "editors", "staff". |
owner.userId | string (usr_… ID) | null | Yes | — |
source | enum | Yes | One of: "code", "model". |
status | enum | Yes | One of: "open", "done", "dismissed". |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X PATCH "$ANSWERSTACK_API_URL/v1/account/commitments/{commitmentId}" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"action": "done"
}'Ask Stack a question about the account setup or, with Insights Ask, its conversations. The answer streams back as server-sent events: context, tool…, text…, block…, done (with the stored message and thread), or error#
POST /v1/account/insights/ask
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).
Request body
application/json, required.
| Field | Type | Required | Description |
|---|---|---|---|
context | object | No | — |
context.callId | string | null | No | Up to 64 characters. |
context.callerType | string | null | No | Up to 40 characters. |
context.channel | enum | null | No | One of: "phone", "site_chat", "page_chat", "web_voice". |
context.comparePeriod | enum | null | No | One of: "previous", "week_before". |
context.competitor | string | null | No | Up to 64 characters. |
context.flow | enum | No | One of: "stages", "questions", "objective". Default: "objective". |
context.ids | array<string> | No | Up to 6 items. Default: []. |
context.level | enum | No | One of: "account", "group", "playbook", "version", "effective". Default: "account". |
context.measure | enum | No | One of: "rate", "count". Default: "rate". |
context.metric | enum | null | No | One of: "target_attainment", "primary_attainment", "reached_rate", "fallback_rate", "opportunity_rate", "attempt_rate", "conversion_after_attempt", "ai_miss_rate", "content_miss_rate", "operations_miss_rate", "caller_miss_rate", "value_per_eligible", "held_rate", "time_to_attempt". |
context.objective | enum | null | No | One of: "book_meeting", "live_transfer", "capture_callback", "capture_contact", "qualify", "text_follow_up", "manage_booking", "route_correctly", "nurture", "run_tool", "answer_questions", "custom_condition", "custom_judged". |
context.period | object | object | object | object | object | object | object | object | object | object | object | object | object | No | Default: \{"kind":"last_days","n":30\}. |
context.period.kind | enum | Yes | (variant 1) One of: "last_days". |
context.period.n | integer | Yes | (variant 1) Between 1 and 730. |
context.period.kind | enum | Yes | (variant 2) One of: "last_units". |
context.period.n | integer | Yes | (variant 2) Between 1 and 24. |
context.period.unit | enum | Yes | (variant 2) One of: "week", "month". |
context.period.kind | enum | Yes | (variant 3) One of: "today". |
context.period.kind | enum | Yes | (variant 4) One of: "yesterday". |
context.period.kind | enum | Yes | (variant 5) One of: "this_week". |
context.period.kind | enum | Yes | (variant 6) One of: "last_calendar_week". |
context.period.kind | enum | Yes | (variant 7) One of: "this_month". |
context.period.kind | enum | Yes | (variant 8) One of: "last_month". |
context.period.kind | enum | Yes | (variant 9) One of: "this_quarter". |
context.period.kind | enum | Yes | (variant 10) One of: "last_quarter". |
context.period.kind | enum | Yes | (variant 11) One of: "month". |
context.period.month | integer | Yes | (variant 11) Between 1 and 12. |
context.period.year | integer | No | (variant 11) Between 2020 and 2100. |
context.period.from | string | Yes | (variant 12) Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
context.period.kind | enum | Yes | (variant 12) One of: "range". |
context.period.to | string | Yes | (variant 12) Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
context.period.kind | enum | Yes | (variant 13) One of: "since_version". |
context.period.playbookId | string | null | No | (variant 13) Up to 64 characters. |
context.period.version | integer | null | Yes | (variant 13) Minimum 1. |
context.rank | enum | No | One of: "group", "playbook", "version", "effective". Default: "group". |
context.source | enum | null | No | One of: "number", "widget", "page". |
context.topic | string | null | No | Up to 64 characters. |
context.view | enum | No | One of: "scorecard", "leaderboard", "compare", "trend", "explain", "flow", "matrix", "objectives", "drilldown", "analysis", "experiments", "calls", "setup_numbers", "setup_playbooks", "setup_groups", "setup_connections", "setup_team". Default: "scorecard". |
question | string | Yes | 1–1000 characters. |
threadId | string (askt_… ID) | No | ID (askt_…) |
Response 200
No content.
Errors: 400, 401, 402, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X POST "$ANSWERSTACK_API_URL/v1/account/insights/ask" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"question": "string"
}'Rate one of your Stack answers as helpful or not, with an optional note: staff read these to make Stack better (ADR 0173)#
POST /v1/account/insights/ask/messages/{messageId}/feedback
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
messageId | string (askm_… ID) | Yes | ID (askm_…) |
Request body
application/json, required.
| Field | Type | Required | Description |
|---|---|---|---|
note | string | No | Up to 1000 characters. |
rating | enum | Yes | One of: "up", "down". |
Response 204
No content.
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X POST "$ANSWERSTACK_API_URL/v1/account/insights/ask/messages/{messageId}/feedback" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"rating": "up"
}'Count that you opened a link under one of your Stack answers (ADR 0173)#
POST /v1/account/insights/ask/messages/{messageId}/opened
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
messageId | string (askm_… ID) | Yes | ID (askm_…) |
Response 204
No content.
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X POST "$ANSWERSTACK_API_URL/v1/account/insights/ask/messages/{messageId}/opened" \
-H "Authorization: Bearer $ACCESS_TOKEN"Your Ask threads, most recently used first; saved=true for your saved questions#
GET /v1/account/insights/ask/threads
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
saved | enum | No | One of: "true", "false". |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
threads | array<AskThread> | Yes | — |
threads[].context | object | Yes | — |
threads[].context.callId | string | null | Yes | Up to 64 characters. |
threads[].context.callerType | string | null | Yes | Up to 40 characters. |
threads[].context.channel | enum | null | Yes | One of: "phone", "site_chat", "page_chat", "web_voice". |
threads[].context.comparePeriod | enum | null | Yes | One of: "previous", "week_before". |
threads[].context.competitor | string | null | Yes | Up to 64 characters. |
threads[].context.flow | enum | Yes | One of: "stages", "questions", "objective". Default: "objective". |
threads[].context.ids | array<string> | Yes | Up to 6 items. Default: []. |
threads[].context.level | enum | Yes | One of: "account", "group", "playbook", "version", "effective". Default: "account". |
threads[].context.measure | enum | Yes | One of: "rate", "count". Default: "rate". |
threads[].context.metric | enum | null | Yes | One of: "target_attainment", "primary_attainment", "reached_rate", "fallback_rate", "opportunity_rate", "attempt_rate", "conversion_after_attempt", "ai_miss_rate", "content_miss_rate", "operations_miss_rate", "caller_miss_rate", "value_per_eligible", "held_rate", "time_to_attempt". |
threads[].context.objective | enum | null | Yes | One of: "book_meeting", "live_transfer", "capture_callback", "capture_contact", "qualify", "text_follow_up", "manage_booking", "route_correctly", "nurture", "run_tool", "answer_questions", "custom_condition", "custom_judged". |
threads[].context.period | object | object | object | object | object | object | object | object | object | object | object | object | object | Yes | Default: \{"kind":"last_days","n":30\}. |
threads[].context.period.kind | constant | Yes | (variant 1) Always "last_days". |
threads[].context.period.n | integer | Yes | (variant 1) Between 1 and 730. |
threads[].context.period.kind | constant | Yes | (variant 2) Always "last_units". |
threads[].context.period.n | integer | Yes | (variant 2) Between 1 and 24. |
threads[].context.period.unit | enum | Yes | (variant 2) One of: "week", "month". |
threads[].context.period.kind | constant | Yes | (variant 3) Always "today". |
threads[].context.period.kind | constant | Yes | (variant 4) Always "yesterday". |
threads[].context.period.kind | constant | Yes | (variant 5) Always "this_week". |
threads[].context.period.kind | constant | Yes | (variant 6) Always "last_calendar_week". |
threads[].context.period.kind | constant | Yes | (variant 7) Always "this_month". |
threads[].context.period.kind | constant | Yes | (variant 8) Always "last_month". |
threads[].context.period.kind | constant | Yes | (variant 9) Always "this_quarter". |
threads[].context.period.kind | constant | Yes | (variant 10) Always "last_quarter". |
threads[].context.period.kind | constant | Yes | (variant 11) Always "month". |
threads[].context.period.month | integer | Yes | (variant 11) Between 1 and 12. |
threads[].context.period.year | integer | No | (variant 11) Between 2020 and 2100. |
threads[].context.period.from | string | Yes | (variant 12) Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
threads[].context.period.kind | constant | Yes | (variant 12) Always "range". |
threads[].context.period.to | string | Yes | (variant 12) Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
threads[].context.period.kind | constant | Yes | (variant 13) Always "since_version". |
threads[].context.period.playbookId | string | null | Yes | (variant 13) Up to 64 characters. |
threads[].context.period.version | integer | null | Yes | (variant 13) Minimum 1. |
threads[].context.rank | enum | Yes | One of: "group", "playbook", "version", "effective". Default: "group". |
threads[].context.source | enum | null | Yes | One of: "number", "widget", "page". |
threads[].context.topic | string | null | Yes | Up to 64 characters. |
threads[].context.view | enum | Yes | One of: "scorecard", "leaderboard", "compare", "trend", "explain", "flow", "matrix", "objectives", "drilldown", "analysis", "experiments", "calls", "setup_numbers", "setup_playbooks", "setup_groups", "setup_connections", "setup_team". Default: "scorecard". |
threads[].createdAt | string (date-time) | Yes | — |
threads[].id | string (askt_… ID) | Yes | ID (askt_…) |
threads[].inDigest | boolean | Yes | — |
threads[].lastUsedAt | string (date-time) | Yes | — |
threads[].saved | boolean | Yes | — |
threads[].savedAt | string (date-time) | null | Yes | — |
threads[].title | string | Yes | — |
Errors: 400, 401, 402, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X GET "$ANSWERSTACK_API_URL/v1/account/insights/ask/threads" \
-H "Authorization: Bearer $ACCESS_TOKEN"One of your Ask threads with its questions and answers#
GET /v1/account/insights/ask/threads/{threadId}
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
threadId | string (askt_… ID) | Yes | ID (askt_…) |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
messages | array<AskMessage> | Yes | — |
messages[].answer | string | Yes | — |
messages[].blocks | array<object | object | object | object> | Yes | — |
messages[].blocks[].columns | array<object> | Yes | (variant 1) |
messages[].blocks[].columns[].key | string | Yes | (variant 1) |
messages[].blocks[].columns[].label | string | Yes | (variant 1) |
messages[].blocks[].columns[].numeric | boolean | Yes | (variant 1) |
messages[].blocks[].kind | constant | Yes | (variant 1) Always "table". |
messages[].blocks[].note | string | null | Yes | (variant 1) |
messages[].blocks[].rows | array<array<string | number | null>> | Yes | (variant 1) |
messages[].blocks[].source | string | Yes | (variant 1) |
messages[].blocks[].title | string | Yes | (variant 1) |
messages[].blocks[].categories | array<string> | Yes | (variant 2) |
messages[].blocks[].cells | array<object> | Yes | (variant 2) |
messages[].blocks[].cells[].col | integer | Yes | (variant 2) |
messages[].blocks[].cells[].row | integer | Yes | (variant 2) |
messages[].blocks[].cells[].value | number | null | Yes | (variant 2) |
messages[].blocks[].chart | enum | Yes | (variant 2) One of: "bar", "ranked_bar", "line", "sankey", "matrix". |
messages[].blocks[].kind | constant | Yes | (variant 2) Always "chart". |
messages[].blocks[].links | array<object> | Yes | (variant 2) |
messages[].blocks[].links[].source | string | Yes | (variant 2) |
messages[].blocks[].links[].target | string | Yes | (variant 2) |
messages[].blocks[].links[].value | number | Yes | (variant 2) |
messages[].blocks[].markers | array<object> | Yes | (variant 2) |
messages[].blocks[].markers[].at | string | Yes | (variant 2) |
messages[].blocks[].markers[].label | string | Yes | (variant 2) |
messages[].blocks[].nodes | array<object> | Yes | (variant 2) |
messages[].blocks[].nodes[].id | string | Yes | (variant 2) |
messages[].blocks[].nodes[].kind | string | Yes | (variant 2) |
messages[].blocks[].nodes[].name | string | Yes | (variant 2) |
messages[].blocks[].rowLabels | array<string> | Yes | (variant 2) |
messages[].blocks[].series | array<object> | Yes | (variant 2) |
messages[].blocks[].series[].intervals | array<object | null> | Yes | (variant 2) |
messages[].blocks[].series[].name | string | Yes | (variant 2) |
messages[].blocks[].series[].values | array<number | null> | Yes | (variant 2) |
messages[].blocks[].source | string | Yes | (variant 2) |
messages[].blocks[].title | string | Yes | (variant 2) |
messages[].blocks[].unit | enum | Yes | (variant 2) One of: "rate", "count", "mean", "seconds". |
messages[].blocks[].kind | constant | Yes | (variant 3) Always "view_link". |
messages[].blocks[].label | string | Yes | (variant 3) |
messages[].blocks[].query | map | Yes | (variant 3) |
messages[].blocks[].query.{key} | string | No | (variant 3) Any key. |
messages[].blocks[].view | enum | Yes | (variant 3) One of: "", "objectives", "compare", "matrix", "leaderboard", "trends", "flows", "experiments". |
messages[].blocks[].id | string | null | Yes | (variant 4) Up to 120 characters. |
messages[].blocks[].kind | constant | Yes | (variant 4) Always "page_link". |
messages[].blocks[].label | string | Yes | (variant 4) |
messages[].blocks[].page | enum | Yes | (variant 4) One of: "numbers", "playbooks", "playbook", "groups", "group", "connections", "team", "calls", "knowledge", "usage", "insights", "pricing", "bookingPages", "leads", "today", "myMeetings", "help". |
messages[].chips | array<object> | Yes | — |
messages[].chips[].key | enum | Yes | One of: "period", "scope", "rank", "metric", "objective", "channel", "comparePeriod", "topic", "competitor", "callerType", "source". |
messages[].chips[].label | string | Yes | — |
messages[].compare | object | null | Yes | — |
messages[].compare.days | integer | Yes | — |
messages[].compare.from | string | Yes | — |
messages[].compare.label | string | Yes | — |
messages[].compare.partial | boolean | Yes | — |
messages[].compare.timeZone | string | Yes | — |
messages[].compare.to | string | Yes | — |
messages[].context | object | Yes | — |
messages[].context.callId | string | null | Yes | Up to 64 characters. |
messages[].context.callerType | string | null | Yes | Up to 40 characters. |
messages[].context.channel | enum | null | Yes | One of: "phone", "site_chat", "page_chat", "web_voice". |
messages[].context.comparePeriod | enum | null | Yes | One of: "previous", "week_before". |
messages[].context.competitor | string | null | Yes | Up to 64 characters. |
messages[].context.flow | enum | Yes | One of: "stages", "questions", "objective". Default: "objective". |
messages[].context.ids | array<string> | Yes | Up to 6 items. Default: []. |
messages[].context.level | enum | Yes | One of: "account", "group", "playbook", "version", "effective". Default: "account". |
messages[].context.measure | enum | Yes | One of: "rate", "count". Default: "rate". |
messages[].context.metric | enum | null | Yes | One of: "target_attainment", "primary_attainment", "reached_rate", "fallback_rate", "opportunity_rate", "attempt_rate", "conversion_after_attempt", "ai_miss_rate", "content_miss_rate", "operations_miss_rate", "caller_miss_rate", "value_per_eligible", "held_rate", "time_to_attempt". |
messages[].context.objective | enum | null | Yes | One of: "book_meeting", "live_transfer", "capture_callback", "capture_contact", "qualify", "text_follow_up", "manage_booking", "route_correctly", "nurture", "run_tool", "answer_questions", "custom_condition", "custom_judged". |
messages[].context.period | object | object | object | object | object | object | object | object | object | object | object | object | object | Yes | Default: \{"kind":"last_days","n":30\}. |
messages[].context.period.kind | constant | Yes | (variant 1) Always "last_days". |
messages[].context.period.n | integer | Yes | (variant 1) Between 1 and 730. |
messages[].context.period.kind | constant | Yes | (variant 2) Always "last_units". |
messages[].context.period.n | integer | Yes | (variant 2) Between 1 and 24. |
messages[].context.period.unit | enum | Yes | (variant 2) One of: "week", "month". |
messages[].context.period.kind | constant | Yes | (variant 3) Always "today". |
messages[].context.period.kind | constant | Yes | (variant 4) Always "yesterday". |
messages[].context.period.kind | constant | Yes | (variant 5) Always "this_week". |
messages[].context.period.kind | constant | Yes | (variant 6) Always "last_calendar_week". |
messages[].context.period.kind | constant | Yes | (variant 7) Always "this_month". |
messages[].context.period.kind | constant | Yes | (variant 8) Always "last_month". |
messages[].context.period.kind | constant | Yes | (variant 9) Always "this_quarter". |
messages[].context.period.kind | constant | Yes | (variant 10) Always "last_quarter". |
messages[].context.period.kind | constant | Yes | (variant 11) Always "month". |
messages[].context.period.month | integer | Yes | (variant 11) Between 1 and 12. |
messages[].context.period.year | integer | No | (variant 11) Between 2020 and 2100. |
messages[].context.period.from | string | Yes | (variant 12) Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
messages[].context.period.kind | constant | Yes | (variant 12) Always "range". |
messages[].context.period.to | string | Yes | (variant 12) Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
messages[].context.period.kind | constant | Yes | (variant 13) Always "since_version". |
messages[].context.period.playbookId | string | null | Yes | (variant 13) Up to 64 characters. |
messages[].context.period.version | integer | null | Yes | (variant 13) Minimum 1. |
messages[].context.rank | enum | Yes | One of: "group", "playbook", "version", "effective". Default: "group". |
messages[].context.source | enum | null | Yes | One of: "number", "widget", "page". |
messages[].context.topic | string | null | Yes | Up to 64 characters. |
messages[].context.view | enum | Yes | One of: "scorecard", "leaderboard", "compare", "trend", "explain", "flow", "matrix", "objectives", "drilldown", "analysis", "experiments", "calls", "setup_numbers", "setup_playbooks", "setup_groups", "setup_connections", "setup_team". Default: "scorecard". |
messages[].createdAt | string (date-time) | Yes | — |
messages[].dropped | integer | Yes | — |
messages[].id | string (askm_… ID) | Yes | ID (askm_…) |
messages[].kind | enum | Yes | One of: "answer", "clarify", "unavailable", "failed". |
messages[].options | array<object> | Yes | — |
messages[].options[].context | object | Yes | — |
messages[].options[].context.callId | string | null | Yes | Up to 64 characters. |
messages[].options[].context.callerType | string | null | Yes | Up to 40 characters. |
messages[].options[].context.channel | enum | null | Yes | One of: "phone", "site_chat", "page_chat", "web_voice". |
messages[].options[].context.comparePeriod | enum | null | Yes | One of: "previous", "week_before". |
messages[].options[].context.competitor | string | null | Yes | Up to 64 characters. |
messages[].options[].context.flow | enum | Yes | One of: "stages", "questions", "objective". Default: "objective". |
messages[].options[].context.ids | array<string> | Yes | Up to 6 items. Default: []. |
messages[].options[].context.level | enum | Yes | One of: "account", "group", "playbook", "version", "effective". Default: "account". |
messages[].options[].context.measure | enum | Yes | One of: "rate", "count". Default: "rate". |
messages[].options[].context.metric | enum | null | Yes | One of: "target_attainment", "primary_attainment", "reached_rate", "fallback_rate", "opportunity_rate", "attempt_rate", "conversion_after_attempt", "ai_miss_rate", "content_miss_rate", "operations_miss_rate", "caller_miss_rate", "value_per_eligible", "held_rate", "time_to_attempt". |
messages[].options[].context.objective | enum | null | Yes | One of: "book_meeting", "live_transfer", "capture_callback", "capture_contact", "qualify", "text_follow_up", "manage_booking", "route_correctly", "nurture", "run_tool", "answer_questions", "custom_condition", "custom_judged". |
messages[].options[].context.period | object | object | object | object | object | object | object | object | object | object | object | object | object | Yes | Default: \{"kind":"last_days","n":30\}. |
messages[].options[].context.rank | enum | Yes | One of: "group", "playbook", "version", "effective". Default: "group". |
messages[].options[].context.source | enum | null | Yes | One of: "number", "widget", "page". |
messages[].options[].context.topic | string | null | Yes | Up to 64 characters. |
messages[].options[].context.view | enum | Yes | One of: "scorecard", "leaderboard", "compare", "trend", "explain", "flow", "matrix", "objectives", "drilldown", "analysis", "experiments", "calls", "setup_numbers", "setup_playbooks", "setup_groups", "setup_connections", "setup_team". Default: "scorecard". |
messages[].options[].label | string | Yes | — |
messages[].period | object | null | Yes | — |
messages[].period.days | integer | Yes | — |
messages[].period.from | string | Yes | — |
messages[].period.label | string | Yes | — |
messages[].period.partial | boolean | Yes | — |
messages[].period.timeZone | string | Yes | — |
messages[].period.to | string | Yes | — |
messages[].planner | string | Yes | — |
messages[].question | string | Yes | — |
messages[].seq | integer | Yes | — |
messages[].toolCalls | array<object> | Yes | — |
messages[].toolCalls[].id | string | Yes | — |
messages[].toolCalls[].ms | number | Yes | — |
messages[].toolCalls[].ok | boolean | Yes | — |
messages[].toolCalls[].status | integer | Yes | — |
messages[].toolCalls[].tool | string | Yes | — |
thread | AskThread | Yes | — |
thread.context | object | Yes | — |
thread.context.callId | string | null | Yes | Up to 64 characters. |
thread.context.callerType | string | null | Yes | Up to 40 characters. |
thread.context.channel | enum | null | Yes | One of: "phone", "site_chat", "page_chat", "web_voice". |
thread.context.comparePeriod | enum | null | Yes | One of: "previous", "week_before". |
thread.context.competitor | string | null | Yes | Up to 64 characters. |
thread.context.flow | enum | Yes | One of: "stages", "questions", "objective". Default: "objective". |
thread.context.ids | array<string> | Yes | Up to 6 items. Default: []. |
thread.context.level | enum | Yes | One of: "account", "group", "playbook", "version", "effective". Default: "account". |
thread.context.measure | enum | Yes | One of: "rate", "count". Default: "rate". |
thread.context.metric | enum | null | Yes | One of: "target_attainment", "primary_attainment", "reached_rate", "fallback_rate", "opportunity_rate", "attempt_rate", "conversion_after_attempt", "ai_miss_rate", "content_miss_rate", "operations_miss_rate", "caller_miss_rate", "value_per_eligible", "held_rate", "time_to_attempt". |
thread.context.objective | enum | null | Yes | One of: "book_meeting", "live_transfer", "capture_callback", "capture_contact", "qualify", "text_follow_up", "manage_booking", "route_correctly", "nurture", "run_tool", "answer_questions", "custom_condition", "custom_judged". |
thread.context.period | object | object | object | object | object | object | object | object | object | object | object | object | object | Yes | Default: \{"kind":"last_days","n":30\}. |
thread.context.period.kind | constant | Yes | (variant 1) Always "last_days". |
thread.context.period.n | integer | Yes | (variant 1) Between 1 and 730. |
thread.context.period.kind | constant | Yes | (variant 2) Always "last_units". |
thread.context.period.n | integer | Yes | (variant 2) Between 1 and 24. |
thread.context.period.unit | enum | Yes | (variant 2) One of: "week", "month". |
thread.context.period.kind | constant | Yes | (variant 3) Always "today". |
thread.context.period.kind | constant | Yes | (variant 4) Always "yesterday". |
thread.context.period.kind | constant | Yes | (variant 5) Always "this_week". |
thread.context.period.kind | constant | Yes | (variant 6) Always "last_calendar_week". |
thread.context.period.kind | constant | Yes | (variant 7) Always "this_month". |
thread.context.period.kind | constant | Yes | (variant 8) Always "last_month". |
thread.context.period.kind | constant | Yes | (variant 9) Always "this_quarter". |
thread.context.period.kind | constant | Yes | (variant 10) Always "last_quarter". |
thread.context.period.kind | constant | Yes | (variant 11) Always "month". |
thread.context.period.month | integer | Yes | (variant 11) Between 1 and 12. |
thread.context.period.year | integer | No | (variant 11) Between 2020 and 2100. |
thread.context.period.from | string | Yes | (variant 12) Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
thread.context.period.kind | constant | Yes | (variant 12) Always "range". |
thread.context.period.to | string | Yes | (variant 12) Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
thread.context.period.kind | constant | Yes | (variant 13) Always "since_version". |
thread.context.period.playbookId | string | null | Yes | (variant 13) Up to 64 characters. |
thread.context.period.version | integer | null | Yes | (variant 13) Minimum 1. |
thread.context.rank | enum | Yes | One of: "group", "playbook", "version", "effective". Default: "group". |
thread.context.source | enum | null | Yes | One of: "number", "widget", "page". |
thread.context.topic | string | null | Yes | Up to 64 characters. |
thread.context.view | enum | Yes | One of: "scorecard", "leaderboard", "compare", "trend", "explain", "flow", "matrix", "objectives", "drilldown", "analysis", "experiments", "calls", "setup_numbers", "setup_playbooks", "setup_groups", "setup_connections", "setup_team". Default: "scorecard". |
thread.createdAt | string (date-time) | Yes | — |
thread.id | string (askt_… ID) | Yes | ID (askt_…) |
thread.inDigest | boolean | Yes | — |
thread.lastUsedAt | string (date-time) | Yes | — |
thread.saved | boolean | Yes | — |
thread.savedAt | string (date-time) | null | Yes | — |
thread.title | string | Yes | — |
Errors: 400, 401, 402, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X GET "$ANSWERSTACK_API_URL/v1/account/insights/ask/threads/{threadId}" \
-H "Authorization: Bearer $ACCESS_TOKEN"Delete one of your Ask threads and its answers#
DELETE /v1/account/insights/ask/threads/{threadId}
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
threadId | string (askt_… ID) | Yes | ID (askt_…) |
Response 204
No content.
Errors: 400, 401, 402, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X DELETE "$ANSWERSTACK_API_URL/v1/account/insights/ask/threads/{threadId}" \
-H "Authorization: Bearer $ACCESS_TOKEN"Re-run a thread with edited context chips, without the model: the same tools, checks and blocks#
POST /v1/account/insights/ask/threads/{threadId}/rerun
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
threadId | string (askt_… ID) | Yes | ID (askt_…) |
Request body
application/json, required.
| Field | Type | Required | Description |
|---|---|---|---|
context | object | Yes | — |
context.callId | string | null | No | Up to 64 characters. |
context.callerType | string | null | No | Up to 40 characters. |
context.channel | enum | null | No | One of: "phone", "site_chat", "page_chat", "web_voice". |
context.comparePeriod | enum | null | No | One of: "previous", "week_before". |
context.competitor | string | null | No | Up to 64 characters. |
context.flow | enum | No | One of: "stages", "questions", "objective". Default: "objective". |
context.ids | array<string> | No | Up to 6 items. Default: []. |
context.level | enum | No | One of: "account", "group", "playbook", "version", "effective". Default: "account". |
context.measure | enum | No | One of: "rate", "count". Default: "rate". |
context.metric | enum | null | No | One of: "target_attainment", "primary_attainment", "reached_rate", "fallback_rate", "opportunity_rate", "attempt_rate", "conversion_after_attempt", "ai_miss_rate", "content_miss_rate", "operations_miss_rate", "caller_miss_rate", "value_per_eligible", "held_rate", "time_to_attempt". |
context.objective | enum | null | No | One of: "book_meeting", "live_transfer", "capture_callback", "capture_contact", "qualify", "text_follow_up", "manage_booking", "route_correctly", "nurture", "run_tool", "answer_questions", "custom_condition", "custom_judged". |
context.period | object | object | object | object | object | object | object | object | object | object | object | object | object | No | Default: \{"kind":"last_days","n":30\}. |
context.period.kind | enum | Yes | (variant 1) One of: "last_days". |
context.period.n | integer | Yes | (variant 1) Between 1 and 730. |
context.period.kind | enum | Yes | (variant 2) One of: "last_units". |
context.period.n | integer | Yes | (variant 2) Between 1 and 24. |
context.period.unit | enum | Yes | (variant 2) One of: "week", "month". |
context.period.kind | enum | Yes | (variant 3) One of: "today". |
context.period.kind | enum | Yes | (variant 4) One of: "yesterday". |
context.period.kind | enum | Yes | (variant 5) One of: "this_week". |
context.period.kind | enum | Yes | (variant 6) One of: "last_calendar_week". |
context.period.kind | enum | Yes | (variant 7) One of: "this_month". |
context.period.kind | enum | Yes | (variant 8) One of: "last_month". |
context.period.kind | enum | Yes | (variant 9) One of: "this_quarter". |
context.period.kind | enum | Yes | (variant 10) One of: "last_quarter". |
context.period.kind | enum | Yes | (variant 11) One of: "month". |
context.period.month | integer | Yes | (variant 11) Between 1 and 12. |
context.period.year | integer | No | (variant 11) Between 2020 and 2100. |
context.period.from | string | Yes | (variant 12) Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
context.period.kind | enum | Yes | (variant 12) One of: "range". |
context.period.to | string | Yes | (variant 12) Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
context.period.kind | enum | Yes | (variant 13) One of: "since_version". |
context.period.playbookId | string | null | No | (variant 13) Up to 64 characters. |
context.period.version | integer | null | Yes | (variant 13) Minimum 1. |
context.rank | enum | No | One of: "group", "playbook", "version", "effective". Default: "group". |
context.source | enum | null | No | One of: "number", "widget", "page". |
context.topic | string | null | No | Up to 64 characters. |
context.view | enum | No | One of: "scorecard", "leaderboard", "compare", "trend", "explain", "flow", "matrix", "objectives", "drilldown", "analysis", "experiments", "calls", "setup_numbers", "setup_playbooks", "setup_groups", "setup_connections", "setup_team". Default: "scorecard". |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
message | AskMessage | Yes | — |
message.answer | string | Yes | — |
message.blocks | array<object | object | object | object> | Yes | — |
message.blocks[].columns | array<object> | Yes | (variant 1) |
message.blocks[].columns[].key | string | Yes | (variant 1) |
message.blocks[].columns[].label | string | Yes | (variant 1) |
message.blocks[].columns[].numeric | boolean | Yes | (variant 1) |
message.blocks[].kind | constant | Yes | (variant 1) Always "table". |
message.blocks[].note | string | null | Yes | (variant 1) |
message.blocks[].rows | array<array<string | number | null>> | Yes | (variant 1) |
message.blocks[].source | string | Yes | (variant 1) |
message.blocks[].title | string | Yes | (variant 1) |
message.blocks[].categories | array<string> | Yes | (variant 2) |
message.blocks[].cells | array<object> | Yes | (variant 2) |
message.blocks[].cells[].col | integer | Yes | (variant 2) |
message.blocks[].cells[].row | integer | Yes | (variant 2) |
message.blocks[].cells[].value | number | null | Yes | (variant 2) |
message.blocks[].chart | enum | Yes | (variant 2) One of: "bar", "ranked_bar", "line", "sankey", "matrix". |
message.blocks[].kind | constant | Yes | (variant 2) Always "chart". |
message.blocks[].links | array<object> | Yes | (variant 2) |
message.blocks[].links[].source | string | Yes | (variant 2) |
message.blocks[].links[].target | string | Yes | (variant 2) |
message.blocks[].links[].value | number | Yes | (variant 2) |
message.blocks[].markers | array<object> | Yes | (variant 2) |
message.blocks[].markers[].at | string | Yes | (variant 2) |
message.blocks[].markers[].label | string | Yes | (variant 2) |
message.blocks[].nodes | array<object> | Yes | (variant 2) |
message.blocks[].nodes[].id | string | Yes | (variant 2) |
message.blocks[].nodes[].kind | string | Yes | (variant 2) |
message.blocks[].nodes[].name | string | Yes | (variant 2) |
message.blocks[].rowLabels | array<string> | Yes | (variant 2) |
message.blocks[].series | array<object> | Yes | (variant 2) |
message.blocks[].series[].intervals | array<object | null> | Yes | (variant 2) |
message.blocks[].series[].name | string | Yes | (variant 2) |
message.blocks[].series[].values | array<number | null> | Yes | (variant 2) |
message.blocks[].source | string | Yes | (variant 2) |
message.blocks[].title | string | Yes | (variant 2) |
message.blocks[].unit | enum | Yes | (variant 2) One of: "rate", "count", "mean", "seconds". |
message.blocks[].kind | constant | Yes | (variant 3) Always "view_link". |
message.blocks[].label | string | Yes | (variant 3) |
message.blocks[].query | map | Yes | (variant 3) |
message.blocks[].query.{key} | string | No | (variant 3) Any key. |
message.blocks[].view | enum | Yes | (variant 3) One of: "", "objectives", "compare", "matrix", "leaderboard", "trends", "flows", "experiments". |
message.blocks[].id | string | null | Yes | (variant 4) Up to 120 characters. |
message.blocks[].kind | constant | Yes | (variant 4) Always "page_link". |
message.blocks[].label | string | Yes | (variant 4) |
message.blocks[].page | enum | Yes | (variant 4) One of: "numbers", "playbooks", "playbook", "groups", "group", "connections", "team", "calls", "knowledge", "usage", "insights", "pricing", "bookingPages", "leads", "today", "myMeetings", "help". |
message.chips | array<object> | Yes | — |
message.chips[].key | enum | Yes | One of: "period", "scope", "rank", "metric", "objective", "channel", "comparePeriod", "topic", "competitor", "callerType", "source". |
message.chips[].label | string | Yes | — |
message.compare | object | null | Yes | — |
message.compare.days | integer | Yes | — |
message.compare.from | string | Yes | — |
message.compare.label | string | Yes | — |
message.compare.partial | boolean | Yes | — |
message.compare.timeZone | string | Yes | — |
message.compare.to | string | Yes | — |
message.context | object | Yes | — |
message.context.callId | string | null | Yes | Up to 64 characters. |
message.context.callerType | string | null | Yes | Up to 40 characters. |
message.context.channel | enum | null | Yes | One of: "phone", "site_chat", "page_chat", "web_voice". |
message.context.comparePeriod | enum | null | Yes | One of: "previous", "week_before". |
message.context.competitor | string | null | Yes | Up to 64 characters. |
message.context.flow | enum | Yes | One of: "stages", "questions", "objective". Default: "objective". |
message.context.ids | array<string> | Yes | Up to 6 items. Default: []. |
message.context.level | enum | Yes | One of: "account", "group", "playbook", "version", "effective". Default: "account". |
message.context.measure | enum | Yes | One of: "rate", "count". Default: "rate". |
message.context.metric | enum | null | Yes | One of: "target_attainment", "primary_attainment", "reached_rate", "fallback_rate", "opportunity_rate", "attempt_rate", "conversion_after_attempt", "ai_miss_rate", "content_miss_rate", "operations_miss_rate", "caller_miss_rate", "value_per_eligible", "held_rate", "time_to_attempt". |
message.context.objective | enum | null | Yes | One of: "book_meeting", "live_transfer", "capture_callback", "capture_contact", "qualify", "text_follow_up", "manage_booking", "route_correctly", "nurture", "run_tool", "answer_questions", "custom_condition", "custom_judged". |
message.context.period | object | object | object | object | object | object | object | object | object | object | object | object | object | Yes | Default: \{"kind":"last_days","n":30\}. |
message.context.period.kind | constant | Yes | (variant 1) Always "last_days". |
message.context.period.n | integer | Yes | (variant 1) Between 1 and 730. |
message.context.period.kind | constant | Yes | (variant 2) Always "last_units". |
message.context.period.n | integer | Yes | (variant 2) Between 1 and 24. |
message.context.period.unit | enum | Yes | (variant 2) One of: "week", "month". |
message.context.period.kind | constant | Yes | (variant 3) Always "today". |
message.context.period.kind | constant | Yes | (variant 4) Always "yesterday". |
message.context.period.kind | constant | Yes | (variant 5) Always "this_week". |
message.context.period.kind | constant | Yes | (variant 6) Always "last_calendar_week". |
message.context.period.kind | constant | Yes | (variant 7) Always "this_month". |
message.context.period.kind | constant | Yes | (variant 8) Always "last_month". |
message.context.period.kind | constant | Yes | (variant 9) Always "this_quarter". |
message.context.period.kind | constant | Yes | (variant 10) Always "last_quarter". |
message.context.period.kind | constant | Yes | (variant 11) Always "month". |
message.context.period.month | integer | Yes | (variant 11) Between 1 and 12. |
message.context.period.year | integer | No | (variant 11) Between 2020 and 2100. |
message.context.period.from | string | Yes | (variant 12) Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
message.context.period.kind | constant | Yes | (variant 12) Always "range". |
message.context.period.to | string | Yes | (variant 12) Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
message.context.period.kind | constant | Yes | (variant 13) Always "since_version". |
message.context.period.playbookId | string | null | Yes | (variant 13) Up to 64 characters. |
message.context.period.version | integer | null | Yes | (variant 13) Minimum 1. |
message.context.rank | enum | Yes | One of: "group", "playbook", "version", "effective". Default: "group". |
message.context.source | enum | null | Yes | One of: "number", "widget", "page". |
message.context.topic | string | null | Yes | Up to 64 characters. |
message.context.view | enum | Yes | One of: "scorecard", "leaderboard", "compare", "trend", "explain", "flow", "matrix", "objectives", "drilldown", "analysis", "experiments", "calls", "setup_numbers", "setup_playbooks", "setup_groups", "setup_connections", "setup_team". Default: "scorecard". |
message.createdAt | string (date-time) | Yes | — |
message.dropped | integer | Yes | — |
message.id | string (askm_… ID) | Yes | ID (askm_…) |
message.kind | enum | Yes | One of: "answer", "clarify", "unavailable", "failed". |
message.options | array<object> | Yes | — |
message.options[].context | object | Yes | — |
message.options[].context.callId | string | null | Yes | Up to 64 characters. |
message.options[].context.callerType | string | null | Yes | Up to 40 characters. |
message.options[].context.channel | enum | null | Yes | One of: "phone", "site_chat", "page_chat", "web_voice". |
message.options[].context.comparePeriod | enum | null | Yes | One of: "previous", "week_before". |
message.options[].context.competitor | string | null | Yes | Up to 64 characters. |
message.options[].context.flow | enum | Yes | One of: "stages", "questions", "objective". Default: "objective". |
message.options[].context.ids | array<string> | Yes | Up to 6 items. Default: []. |
message.options[].context.level | enum | Yes | One of: "account", "group", "playbook", "version", "effective". Default: "account". |
message.options[].context.measure | enum | Yes | One of: "rate", "count". Default: "rate". |
message.options[].context.metric | enum | null | Yes | One of: "target_attainment", "primary_attainment", "reached_rate", "fallback_rate", "opportunity_rate", "attempt_rate", "conversion_after_attempt", "ai_miss_rate", "content_miss_rate", "operations_miss_rate", "caller_miss_rate", "value_per_eligible", "held_rate", "time_to_attempt". |
message.options[].context.objective | enum | null | Yes | One of: "book_meeting", "live_transfer", "capture_callback", "capture_contact", "qualify", "text_follow_up", "manage_booking", "route_correctly", "nurture", "run_tool", "answer_questions", "custom_condition", "custom_judged". |
message.options[].context.period | object | object | object | object | object | object | object | object | object | object | object | object | object | Yes | Default: \{"kind":"last_days","n":30\}. |
message.options[].context.rank | enum | Yes | One of: "group", "playbook", "version", "effective". Default: "group". |
message.options[].context.source | enum | null | Yes | One of: "number", "widget", "page". |
message.options[].context.topic | string | null | Yes | Up to 64 characters. |
message.options[].context.view | enum | Yes | One of: "scorecard", "leaderboard", "compare", "trend", "explain", "flow", "matrix", "objectives", "drilldown", "analysis", "experiments", "calls", "setup_numbers", "setup_playbooks", "setup_groups", "setup_connections", "setup_team". Default: "scorecard". |
message.options[].label | string | Yes | — |
message.period | object | null | Yes | — |
message.period.days | integer | Yes | — |
message.period.from | string | Yes | — |
message.period.label | string | Yes | — |
message.period.partial | boolean | Yes | — |
message.period.timeZone | string | Yes | — |
message.period.to | string | Yes | — |
message.planner | string | Yes | — |
message.question | string | Yes | — |
message.seq | integer | Yes | — |
message.toolCalls | array<object> | Yes | — |
message.toolCalls[].id | string | Yes | — |
message.toolCalls[].ms | number | Yes | — |
message.toolCalls[].ok | boolean | Yes | — |
message.toolCalls[].status | integer | Yes | — |
message.toolCalls[].tool | string | Yes | — |
thread | AskThread | Yes | — |
thread.context | object | Yes | — |
thread.context.callId | string | null | Yes | Up to 64 characters. |
thread.context.callerType | string | null | Yes | Up to 40 characters. |
thread.context.channel | enum | null | Yes | One of: "phone", "site_chat", "page_chat", "web_voice". |
thread.context.comparePeriod | enum | null | Yes | One of: "previous", "week_before". |
thread.context.competitor | string | null | Yes | Up to 64 characters. |
thread.context.flow | enum | Yes | One of: "stages", "questions", "objective". Default: "objective". |
thread.context.ids | array<string> | Yes | Up to 6 items. Default: []. |
thread.context.level | enum | Yes | One of: "account", "group", "playbook", "version", "effective". Default: "account". |
thread.context.measure | enum | Yes | One of: "rate", "count". Default: "rate". |
thread.context.metric | enum | null | Yes | One of: "target_attainment", "primary_attainment", "reached_rate", "fallback_rate", "opportunity_rate", "attempt_rate", "conversion_after_attempt", "ai_miss_rate", "content_miss_rate", "operations_miss_rate", "caller_miss_rate", "value_per_eligible", "held_rate", "time_to_attempt". |
thread.context.objective | enum | null | Yes | One of: "book_meeting", "live_transfer", "capture_callback", "capture_contact", "qualify", "text_follow_up", "manage_booking", "route_correctly", "nurture", "run_tool", "answer_questions", "custom_condition", "custom_judged". |
thread.context.period | object | object | object | object | object | object | object | object | object | object | object | object | object | Yes | Default: \{"kind":"last_days","n":30\}. |
thread.context.period.kind | constant | Yes | (variant 1) Always "last_days". |
thread.context.period.n | integer | Yes | (variant 1) Between 1 and 730. |
thread.context.period.kind | constant | Yes | (variant 2) Always "last_units". |
thread.context.period.n | integer | Yes | (variant 2) Between 1 and 24. |
thread.context.period.unit | enum | Yes | (variant 2) One of: "week", "month". |
thread.context.period.kind | constant | Yes | (variant 3) Always "today". |
thread.context.period.kind | constant | Yes | (variant 4) Always "yesterday". |
thread.context.period.kind | constant | Yes | (variant 5) Always "this_week". |
thread.context.period.kind | constant | Yes | (variant 6) Always "last_calendar_week". |
thread.context.period.kind | constant | Yes | (variant 7) Always "this_month". |
thread.context.period.kind | constant | Yes | (variant 8) Always "last_month". |
thread.context.period.kind | constant | Yes | (variant 9) Always "this_quarter". |
thread.context.period.kind | constant | Yes | (variant 10) Always "last_quarter". |
thread.context.period.kind | constant | Yes | (variant 11) Always "month". |
thread.context.period.month | integer | Yes | (variant 11) Between 1 and 12. |
thread.context.period.year | integer | No | (variant 11) Between 2020 and 2100. |
thread.context.period.from | string | Yes | (variant 12) Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
thread.context.period.kind | constant | Yes | (variant 12) Always "range". |
thread.context.period.to | string | Yes | (variant 12) Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
thread.context.period.kind | constant | Yes | (variant 13) Always "since_version". |
thread.context.period.playbookId | string | null | Yes | (variant 13) Up to 64 characters. |
thread.context.period.version | integer | null | Yes | (variant 13) Minimum 1. |
thread.context.rank | enum | Yes | One of: "group", "playbook", "version", "effective". Default: "group". |
thread.context.source | enum | null | Yes | One of: "number", "widget", "page". |
thread.context.topic | string | null | Yes | Up to 64 characters. |
thread.context.view | enum | Yes | One of: "scorecard", "leaderboard", "compare", "trend", "explain", "flow", "matrix", "objectives", "drilldown", "analysis", "experiments", "calls", "setup_numbers", "setup_playbooks", "setup_groups", "setup_connections", "setup_team". Default: "scorecard". |
thread.createdAt | string (date-time) | Yes | — |
thread.id | string (askt_… ID) | Yes | ID (askt_…) |
thread.inDigest | boolean | Yes | — |
thread.lastUsedAt | string (date-time) | Yes | — |
thread.saved | boolean | Yes | — |
thread.savedAt | string (date-time) | null | Yes | — |
thread.title | string | Yes | — |
Errors: 400, 401, 402, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X POST "$ANSWERSTACK_API_URL/v1/account/insights/ask/threads/{threadId}/rerun" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"context": {
"callId": "string",
"callerType": "string",
"channel": "phone",
"comparePeriod": "previous",
"competitor": "string",
"flow": "objective",
"ids": [],
"level": "account",
"measure": "rate",
"metric": "target_attainment",
"objective": "book_meeting",
"period": {
"kind": "last_days",
"n": 30
},
"rank": "group",
"source": "number",
"topic": "string",
"view": "scorecard"
}
}'Save a thread as a saved question (or unsave it), rename it, or put it in your weekly digest#
POST /v1/account/insights/ask/threads/{threadId}/save
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
threadId | string (askt_… ID) | Yes | ID (askt_…) |
Request body
application/json, required.
| Field | Type | Required | Description |
|---|---|---|---|
inDigest | boolean | No | — |
saved | boolean | Yes | — |
title | string | No | 1–200 characters. |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
context | object | Yes | — |
context.callId | string | null | Yes | Up to 64 characters. |
context.callerType | string | null | Yes | Up to 40 characters. |
context.channel | enum | null | Yes | One of: "phone", "site_chat", "page_chat", "web_voice". |
context.comparePeriod | enum | null | Yes | One of: "previous", "week_before". |
context.competitor | string | null | Yes | Up to 64 characters. |
context.flow | enum | Yes | One of: "stages", "questions", "objective". Default: "objective". |
context.ids | array<string> | Yes | Up to 6 items. Default: []. |
context.level | enum | Yes | One of: "account", "group", "playbook", "version", "effective". Default: "account". |
context.measure | enum | Yes | One of: "rate", "count". Default: "rate". |
context.metric | enum | null | Yes | One of: "target_attainment", "primary_attainment", "reached_rate", "fallback_rate", "opportunity_rate", "attempt_rate", "conversion_after_attempt", "ai_miss_rate", "content_miss_rate", "operations_miss_rate", "caller_miss_rate", "value_per_eligible", "held_rate", "time_to_attempt". |
context.objective | enum | null | Yes | One of: "book_meeting", "live_transfer", "capture_callback", "capture_contact", "qualify", "text_follow_up", "manage_booking", "route_correctly", "nurture", "run_tool", "answer_questions", "custom_condition", "custom_judged". |
context.period | object | object | object | object | object | object | object | object | object | object | object | object | object | Yes | Default: \{"kind":"last_days","n":30\}. |
context.period.kind | constant | Yes | (variant 1) Always "last_days". |
context.period.n | integer | Yes | (variant 1) Between 1 and 730. |
context.period.kind | constant | Yes | (variant 2) Always "last_units". |
context.period.n | integer | Yes | (variant 2) Between 1 and 24. |
context.period.unit | enum | Yes | (variant 2) One of: "week", "month". |
context.period.kind | constant | Yes | (variant 3) Always "today". |
context.period.kind | constant | Yes | (variant 4) Always "yesterday". |
context.period.kind | constant | Yes | (variant 5) Always "this_week". |
context.period.kind | constant | Yes | (variant 6) Always "last_calendar_week". |
context.period.kind | constant | Yes | (variant 7) Always "this_month". |
context.period.kind | constant | Yes | (variant 8) Always "last_month". |
context.period.kind | constant | Yes | (variant 9) Always "this_quarter". |
context.period.kind | constant | Yes | (variant 10) Always "last_quarter". |
context.period.kind | constant | Yes | (variant 11) Always "month". |
context.period.month | integer | Yes | (variant 11) Between 1 and 12. |
context.period.year | integer | No | (variant 11) Between 2020 and 2100. |
context.period.from | string | Yes | (variant 12) Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
context.period.kind | constant | Yes | (variant 12) Always "range". |
context.period.to | string | Yes | (variant 12) Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
context.period.kind | constant | Yes | (variant 13) Always "since_version". |
context.period.playbookId | string | null | Yes | (variant 13) Up to 64 characters. |
context.period.version | integer | null | Yes | (variant 13) Minimum 1. |
context.rank | enum | Yes | One of: "group", "playbook", "version", "effective". Default: "group". |
context.source | enum | null | Yes | One of: "number", "widget", "page". |
context.topic | string | null | Yes | Up to 64 characters. |
context.view | enum | Yes | One of: "scorecard", "leaderboard", "compare", "trend", "explain", "flow", "matrix", "objectives", "drilldown", "analysis", "experiments", "calls", "setup_numbers", "setup_playbooks", "setup_groups", "setup_connections", "setup_team". Default: "scorecard". |
createdAt | string (date-time) | Yes | — |
id | string (askt_… ID) | Yes | ID (askt_…) |
inDigest | boolean | Yes | — |
lastUsedAt | string (date-time) | Yes | — |
saved | boolean | Yes | — |
savedAt | string (date-time) | null | Yes | — |
title | string | Yes | — |
Errors: 400, 401, 402, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X POST "$ANSWERSTACK_API_URL/v1/account/insights/ask/threads/{threadId}/save" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"saved": true
}'Chat: the site-chat funnel, where visitors stopped, answer pills, return visitors, anonymous against identified, and page-chat outcomes. Code facts, on every plan#
GET /v1/account/insights/chat
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token). Bearer token: Authorization: Bearer <token> (An API token (ans_pat_ or ans_svc_). Only routes that list a scope here accept one, and only with that scope.).
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
level | enum | No | One of: "account", "group", "playbook", "version", "effective". Default: "account". |
id | string | No | Up to 64 characters. |
from | string | No | Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
to | string | No | Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
source | enum | No | One of: "number", "widget", "page". |
caller | enum | No | One of: "prospect", "other". |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
abandonment | array<object> | Yes | — |
abandonment[].conversations | number | Yes | — |
abandonment[].lastQuestion | string | null | Yes | — |
abandonment[].stage | string | Yes | — |
attainment | object | Yes | — |
attainment.interval | object | null | Yes | — |
attainment.interval.hi | number | Yes | — |
attainment.interval.lo | number | Yes | — |
attainment.k | number | Yes | — |
attainment.label | string | Yes | — |
attainment.metric | string | Yes | — |
attainment.n | number | Yes | — |
attainment.notEnough | boolean | Yes | — |
attainment.value | number | null | Yes | — |
eventsCounted | boolean | Yes | — |
funnel | object | Yes | — |
funnel.chats | number | Yes | — |
funnel.engaged | number | Yes | — |
funnel.firstMessage | number | Yes | — |
funnel.launcherShown | number | Yes | — |
funnel.opened | number | Yes | — |
funnel.targetReached | number | Yes | — |
identity | object | Yes | — |
identity.anonymous | number | Yes | — |
identity.identified | number | Yes | — |
minSample | integer | Yes | — |
pageChats | object | Yes | — |
pageChats.attainment | object | Yes | — |
pageChats.attainment.interval | object | null | Yes | — |
pageChats.attainment.interval.hi | number | Yes | — |
pageChats.attainment.interval.lo | number | Yes | — |
pageChats.attainment.k | number | Yes | — |
pageChats.attainment.label | string | Yes | — |
pageChats.attainment.metric | string | Yes | — |
pageChats.attainment.n | number | Yes | — |
pageChats.attainment.notEnough | boolean | Yes | — |
pageChats.attainment.value | number | null | Yes | — |
pageChats.conversations | number | Yes | — |
pageChats.states | map | Yes | — |
pageChats.states.{key} | number | No | Any key. |
pills | object | Yes | — |
pills.offered | number | Yes | — |
pills.tapped | number | Yes | — |
pills.typed | number | Yes | — |
visitors | object | Yes | — |
visitors.chatsFromReturning | number | Yes | — |
visitors.returning | number | Yes | — |
visitors.visitors | number | Yes | — |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X GET "$ANSWERSTACK_API_URL/v1/account/insights/chat" \
-H "Authorization: Bearer $ACCESS_TOKEN"Two to six entities side by side: every metric raw and adjusted for mix, with verdicts and the mix table#
POST /v1/account/insights/compare
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token). Bearer token: Authorization: Bearer <token> (An API token (ans_pat_ or ans_svc_). Only routes that list a scope here accept one, and only with that scope.).
Request body
application/json, required.
| Field | Type | Required | Description |
|---|---|---|---|
caller | enum | No | One of: "prospect", "other". |
channel | enum | No | One of: "phone", "site_chat", "page_chat", "web_voice". |
from | string | No | Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
ids | array<string> | Yes | Up to 6 items. |
level | enum | Yes | One of: "group", "playbook", "version", "effective". |
source | enum | No | One of: "number", "widget", "page". |
to | string | No | Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
differentObjectives | boolean | Yes | — |
entities | array<object> | Yes | — |
entities[].entity | string | Yes | — |
entities[].id | string | Yes | — |
entities[].metrics | array<object> | Yes | — |
entities[].metrics[].adjusted | number | null | Yes | — |
entities[].metrics[].higherIsBetter | boolean | Yes | — |
entities[].metrics[].interval | object | null | Yes | — |
entities[].metrics[].interval.hi | number | Yes | — |
entities[].metrics[].interval.lo | number | Yes | — |
entities[].metrics[].k | number | Yes | — |
entities[].metrics[].label | string | Yes | — |
entities[].metrics[].metric | enum | Yes | One of: "target_attainment", "primary_attainment", "reached_rate", "fallback_rate", "opportunity_rate", "attempt_rate", "conversion_after_attempt", "ai_miss_rate", "content_miss_rate", "operations_miss_rate", "caller_miss_rate", "value_per_eligible", "held_rate", "time_to_attempt". |
entities[].metrics[].mixDiffers | boolean | Yes | — |
entities[].metrics[].n | number | Yes | — |
entities[].metrics[].notEnough | boolean | Yes | — |
entities[].metrics[].unit | enum | Yes | One of: "rate", "mean", "seconds". |
entities[].metrics[].unknown | number | Yes | — |
entities[].metrics[].value | number | null | Yes | — |
entities[].metrics[].verdict | enum | Yes | One of: "better", "worse", "no_clear_difference", "not_enough". |
entities[].primaryObjectives | array<enum> | Yes | Items: "book_meeting", "live_transfer", "capture_callback", "capture_contact", "qualify", "text_follow_up", "manage_booking", "route_correctly", "nurture", "run_tool", "answer_questions", "custom_condition", "custom_judged". |
from | string | Yes | — |
level | enum | Yes | One of: "account", "group", "playbook", "version", "effective". |
minSample | integer | Yes | — |
mix | array<object> | Yes | — |
mix[].shares | array<number> | Yes | — |
mix[].stratum | string | Yes | — |
to | string | Yes | — |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X POST "$ANSWERSTACK_API_URL/v1/account/insights/compare" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"level": "group",
"ids": [
"string"
]
}'Competitor mentions: how often each is named, in what context, and how those conversations ended#
GET /v1/account/insights/competitors
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token). Bearer token: Authorization: Bearer <token> (An API token (ans_pat_ or ans_svc_). Only routes that list a scope here accept one, and only with that scope.).
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
level | enum | No | One of: "account", "group", "playbook", "version", "effective". Default: "account". |
id | string | No | Up to 64 characters. |
from | string | No | Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
to | string | No | Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
channel | enum | No | One of: "phone", "site_chat", "page_chat", "web_voice". |
source | enum | No | One of: "number", "widget", "page". |
caller | enum | No | One of: "prospect", "other". |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
analysed | integer | Yes | — |
competitors | array<object> | Yes | — |
competitors[].change | object | null | Yes | — |
competitors[].change.previousConversations | number | Yes | — |
competitors[].change.previousShare | number | null | Yes | — |
competitors[].change.verdict | enum | Yes | One of: "better", "worse", "no_clear_difference", "not_enough". |
competitors[].community | boolean | Yes | — |
competitors[].contexts | object | Yes | — |
competitors[].contexts.comparing | number | Yes | — |
competitors[].contexts.current_provider | number | Yes | — |
competitors[].contexts.mentioned | number | Yes | — |
competitors[].contexts.toured | number | Yes | — |
competitors[].conversations | number | Yes | — |
competitors[].key | string | Yes | — |
competitors[].label | string | Yes | — |
competitors[].metrics | map | Yes | — |
competitors[].metrics.{key} | InsightsLabelMetric | No | Any key. |
competitors[].metrics.{key}.interval | object | null | Yes | — |
competitors[].metrics.{key}.k | number | Yes | — |
competitors[].metrics.{key}.label | string | Yes | — |
competitors[].metrics.{key}.metric | enum | Yes | One of: "topic_share", "attainment_with_label", "sentiment_end", "knowledge_gap_rate", "objection_addressed", "objection_resolved", "objection_recovery". |
competitors[].metrics.{key}.n | number | Yes | — |
competitors[].metrics.{key}.notEnough | boolean | Yes | — |
competitors[].metrics.{key}.value | number | null | Yes | — |
competitors[].sensitive | boolean | Yes | — |
minSample | integer | Yes | — |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X GET "$ANSWERSTACK_API_URL/v1/account/insights/competitors" \
-H "Authorization: Bearer $ACCESS_TOKEN"The conversations behind a number or a flow link, newest first#
GET /v1/account/insights/drilldown
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token). Bearer token: Authorization: Bearer <token> (An API token (ans_pat_ or ans_svc_). Only routes that list a scope here accept one, and only with that scope.).
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
level | enum | No | One of: "account", "group", "playbook", "version", "effective". Default: "account". |
id | string | No | Up to 64 characters. |
from | string | No | Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
to | string | No | Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
channel | enum | No | One of: "phone", "site_chat", "page_chat", "web_voice". |
source | enum | No | One of: "number", "widget", "page". |
caller | enum | No | One of: "prospect", "other". |
role | enum | No | One of: "target", "primary". Default: "target". |
state | enum | No | One of: "achieved", "fallback", "partial", "missed", "not_applicable", "unknown". |
objective | enum | No | One of: "book_meeting", "live_transfer", "capture_callback", "capture_contact", "qualify", "text_follow_up", "manage_booking", "route_correctly", "nurture", "run_tool", "answer_questions", "custom_condition", "custom_judged". |
link | string | No | Up to 400 characters. |
limit | integer | No | Between 1 and 200. Default: 50. |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
conversations | array<object> | Yes | — |
conversations[].callId | string | Yes | — |
conversations[].channelKind | enum | Yes | One of: "phone", "site_chat", "page_chat", "web_voice". |
conversations[].groupId | string | Yes | — |
conversations[].missReason | string | null | Yes | — |
conversations[].startedAt | string (date-time) | Yes | — |
conversations[].targetState | enum | null | Yes | One of: "achieved", "fallback", "partial", "missed", "not_applicable", "unknown". |
conversations[].targetType | enum | null | Yes | One of: "book_meeting", "live_transfer", "capture_callback", "capture_contact", "qualify", "text_follow_up", "manage_booking", "route_correctly", "nurture", "run_tool", "answer_questions", "custom_condition", "custom_judged". |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X GET "$ANSWERSTACK_API_URL/v1/account/insights/drilldown" \
-H "Authorization: Bearer $ACCESS_TOKEN"The communities, playbooks, versions or customized playbooks with conversations in the period, by name#
GET /v1/account/insights/entities
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token). Bearer token: Authorization: Bearer <token> (An API token (ans_pat_ or ans_svc_). Only routes that list a scope here accept one, and only with that scope.).
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
from | string | No | Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
to | string | No | Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
channel | enum | No | One of: "phone", "site_chat", "page_chat", "web_voice". |
source | enum | No | One of: "number", "widget", "page". |
caller | enum | No | One of: "prospect", "other". |
level | enum | Yes | One of: "group", "playbook", "version", "effective". |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
entities | array<object> | Yes | — |
entities[].conversations | integer | Yes | — |
entities[].id | string | Yes | — |
entities[].label | string | Yes | — |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X GET "$ANSWERSTACK_API_URL/v1/account/insights/entities?level=group" \
-H "Authorization: Bearer $ACCESS_TOKEN"A flow as a Sankey: step by step or first visits, thin links folded, unknowns drawn, optionally against a second scope#
GET /v1/account/insights/flows
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token). Bearer token: Authorization: Bearer <token> (An API token (ans_pat_ or ans_svc_). Only routes that list a scope here accept one, and only with that scope.).
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
level | enum | No | One of: "account", "group", "playbook", "version", "effective". Default: "account". |
id | string | No | Up to 64 characters. |
from | string | No | Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
to | string | No | Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
channel | enum | No | One of: "phone", "site_chat", "page_chat", "web_voice". |
source | enum | No | One of: "number", "widget", "page". |
caller | enum | No | One of: "prospect", "other". |
type | enum | No | One of: "stages", "questions", "objective", "objection", "site_chat", "journey". Default: "stages". |
mode | enum | No | One of: "step", "first". Default: "step". |
compareId | string | No | Up to 64 characters. |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
compare | object | null | Yes | — |
compare.links | array<object> | Yes | — |
compare.links[].folded | number | Yes | — |
compare.links[].share | number | Yes | — |
compare.links[].source | string | Yes | — |
compare.links[].target | string | Yes | — |
compare.links[].value | number | Yes | — |
compare.nodes | array<object> | Yes | — |
compare.nodes[].count | number | Yes | — |
compare.nodes[].depth | number | Yes | — |
compare.nodes[].id | string | Yes | — |
compare.nodes[].kind | enum | Yes | One of: "normal", "other", "unknown". |
compare.nodes[].node | string | Yes | — |
compare.total | number | Yes | — |
differences | array<object> | Yes | — |
differences[].source | string | Yes | — |
differences[].target | string | Yes | — |
differences[].verdict | enum | Yes | One of: "better", "worse", "no_clear_difference", "not_enough". |
mode | enum | Yes | One of: "step", "first". |
sankey | object | Yes | — |
sankey.links | array<object> | Yes | — |
sankey.links[].folded | number | Yes | — |
sankey.links[].share | number | Yes | — |
sankey.links[].source | string | Yes | — |
sankey.links[].target | string | Yes | — |
sankey.links[].value | number | Yes | — |
sankey.nodes | array<object> | Yes | — |
sankey.nodes[].count | number | Yes | — |
sankey.nodes[].depth | number | Yes | — |
sankey.nodes[].id | string | Yes | — |
sankey.nodes[].kind | enum | Yes | One of: "normal", "other", "unknown". |
sankey.nodes[].node | string | Yes | — |
sankey.total | number | Yes | — |
type | enum | Yes | One of: "stages", "questions", "objective", "objection", "site_chat", "journey". |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X GET "$ANSWERSTACK_API_URL/v1/account/insights/flows" \
-H "Authorization: Bearer $ACCESS_TOKEN"Knowledge gaps in a scope: the knowledge-gap rate and the clusters asked most, with the communities affected#
GET /v1/account/insights/gaps
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token). Bearer token: Authorization: Bearer <token> (An API token (ans_pat_ or ans_svc_). Only routes that list a scope here accept one, and only with that scope.).
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
level | enum | No | One of: "account", "group", "playbook", "version", "effective". Default: "account". |
id | string | No | Up to 64 characters. |
from | string | No | Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
to | string | No | Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
channel | enum | No | One of: "phone", "site_chat", "page_chat", "web_voice". |
source | enum | No | One of: "number", "widget", "page". |
caller | enum | No | One of: "prospect", "other". |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
analysed | integer | Yes | — |
gaps | array<KnowledgeGapSummary> | Yes | — |
gaps[].communities | number | Yes | — |
gaps[].firstSeenAt | string (date-time) | Yes | — |
gaps[].fixedAt | string (date-time) | null | Yes | — |
gaps[].id | string (kgap_… ID) | Yes | ID (kgap_…) |
gaps[].label | string | null | Yes | — |
gaps[].lastSeenAt | string (date-time) | Yes | — |
gaps[].occurrences | number | Yes | — |
gaps[].question | string | null | Yes | — |
gaps[].sinceFix | number | Yes | — |
gaps[].status | enum | Yes | One of: "open", "fixed", "dismissed". |
minSample | integer | Yes | — |
rate | object | Yes | — |
rate.interval | object | null | Yes | — |
rate.interval.hi | number | Yes | — |
rate.interval.lo | number | Yes | — |
rate.k | number | Yes | — |
rate.label | string | Yes | — |
rate.metric | string | Yes | — |
rate.n | number | Yes | — |
rate.notEnough | boolean | Yes | — |
rate.value | number | null | Yes | — |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X GET "$ANSWERSTACK_API_URL/v1/account/insights/gaps" \
-H "Authorization: Bearer $ACCESS_TOKEN"Journey and follow-up: conversation → target → page opened → held, by readiness tier and engagement cohort, with interests, family reach and calibration#
GET /v1/account/insights/journey
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token). Bearer token: Authorization: Bearer <token> (An API token (ans_pat_ or ans_svc_). Only routes that list a scope here accept one, and only with that scope.).
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
level | enum | No | One of: "account", "group", "playbook", "version", "effective". Default: "account". |
id | string | No | Up to 64 characters. |
from | string | No | Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
to | string | No | Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
channel | enum | No | One of: "phone", "site_chat", "page_chat", "web_voice". |
source | enum | No | One of: "number", "widget", "page". |
caller | enum | No | One of: "prospect", "other". |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
calibration | object | Yes | — |
calibration.compared | enum | null | Yes | One of: "hot", "warm_and_hot". |
calibration.minSample | integer | Yes | — |
calibration.noTier | integer | Yes | — |
calibration.p | number | null | Yes | — |
calibration.tiers | array<object> | Yes | — |
calibration.tiers[].attended | integer | Yes | — |
calibration.tiers[].bookings | integer | Yes | — |
calibration.tiers[].interval | object | null | Yes | — |
calibration.tiers[].interval.hi | number | Yes | — |
calibration.tiers[].interval.lo | number | Yes | — |
calibration.tiers[].noShow | integer | Yes | — |
calibration.tiers[].rate | number | null | Yes | — |
calibration.tiers[].tier | enum | Yes | One of: "cold", "warm", "hot", "not_a_fit". |
calibration.tiers[].unknown | integer | Yes | — |
calibration.verdict | enum | Yes | One of: "separates", "does_not_separate", "not_enough". |
family | object | Yes | — |
family.familyOpened | integer | Yes | — |
family.pagesShared | integer | Yes | — |
family.reach | number | null | Yes | — |
funnel | array<object> | Yes | — |
funnel[].group | enum | Yes | One of: "all", "tier", "cohort". |
funnel[].held | object | Yes | — |
funnel[].held.attended | integer | Yes | — |
funnel[].held.cancelled | integer | Yes | — |
funnel[].held.noShow | integer | Yes | — |
funnel[].held.unknown | integer | Yes | — |
funnel[].key | string | Yes | — |
funnel[].leads | integer | Yes | — |
funnel[].pageOpened | integer | Yes | — |
funnel[].targetAchieved | integer | Yes | — |
interests | array<object> | Yes | — |
interests[].key | string | Yes | — |
interests[].label | string | Yes | — |
interests[].leads | integer | Yes | — |
leads | integer | Yes | — |
scope | object | Yes | — |
scope.channel | enum | null | Yes | One of: "phone", "site_chat", "page_chat", "web_voice". |
scope.from | string | Yes | — |
scope.id | string | null | Yes | — |
scope.level | enum | Yes | One of: "account", "group", "playbook", "version", "effective". |
scope.to | string | Yes | — |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X GET "$ANSWERSTACK_API_URL/v1/account/insights/journey" \
-H "Authorization: Bearer $ACCESS_TOKEN"Entities at one level ranked on one metric (optionally for one objective type), each against the rest of its parent, with Benjamini–Hochberg verdicts#
GET /v1/account/insights/leaderboard
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token). Bearer token: Authorization: Bearer <token> (An API token (ans_pat_ or ans_svc_). Only routes that list a scope here accept one, and only with that scope.).
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
from | string | No | Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
to | string | No | Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
channel | enum | No | One of: "phone", "site_chat", "page_chat", "web_voice". |
source | enum | No | One of: "number", "widget", "page". |
caller | enum | No | One of: "prospect", "other". |
level | enum | No | One of: "group", "playbook", "version", "effective". Default: "group". |
metric | enum | No | One of: "target_attainment", "primary_attainment", "reached_rate", "fallback_rate", "opportunity_rate", "attempt_rate", "conversion_after_attempt", "ai_miss_rate", "content_miss_rate", "operations_miss_rate", "caller_miss_rate", "value_per_eligible", "held_rate", "time_to_attempt". Default: "target_attainment". |
objective | enum | No | One of: "book_meeting", "live_transfer", "capture_callback", "capture_contact", "qualify", "text_follow_up", "manage_booking", "route_correctly", "nurture", "run_tool", "answer_questions", "custom_condition", "custom_judged". |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
from | string | Yes | — |
level | enum | Yes | One of: "account", "group", "playbook", "version", "effective". |
metric | enum | Yes | One of: "target_attainment", "primary_attainment", "reached_rate", "fallback_rate", "opportunity_rate", "attempt_rate", "conversion_after_attempt", "ai_miss_rate", "content_miss_rate", "operations_miss_rate", "caller_miss_rate", "value_per_eligible", "held_rate", "time_to_attempt". |
minSample | integer | Yes | — |
parent | InsightsMetric | Yes | — |
parent.higherIsBetter | boolean | Yes | — |
parent.interval | object | null | Yes | — |
parent.interval.hi | number | Yes | — |
parent.interval.lo | number | Yes | — |
parent.k | number | Yes | — |
parent.label | string | Yes | — |
parent.metric | enum | Yes | One of: "target_attainment", "primary_attainment", "reached_rate", "fallback_rate", "opportunity_rate", "attempt_rate", "conversion_after_attempt", "ai_miss_rate", "content_miss_rate", "operations_miss_rate", "caller_miss_rate", "value_per_eligible", "held_rate", "time_to_attempt". |
parent.n | number | Yes | — |
parent.notEnough | boolean | Yes | — |
parent.unit | enum | Yes | One of: "rate", "mean", "seconds". |
parent.unknown | number | Yes | — |
parent.value | number | null | Yes | — |
rows | array<object> | Yes | — |
rows[].entity | string | Yes | — |
rows[].higherIsBetter | boolean | Yes | — |
rows[].id | string | Yes | — |
rows[].interval | object | null | Yes | — |
rows[].interval.hi | number | Yes | — |
rows[].interval.lo | number | Yes | — |
rows[].k | number | Yes | — |
rows[].label | string | Yes | — |
rows[].metric | enum | Yes | One of: "target_attainment", "primary_attainment", "reached_rate", "fallback_rate", "opportunity_rate", "attempt_rate", "conversion_after_attempt", "ai_miss_rate", "content_miss_rate", "operations_miss_rate", "caller_miss_rate", "value_per_eligible", "held_rate", "time_to_attempt". |
rows[].n | number | Yes | — |
rows[].notEnough | boolean | Yes | — |
rows[].unit | enum | Yes | One of: "rate", "mean", "seconds". |
rows[].unknown | number | Yes | — |
rows[].value | number | null | Yes | — |
rows[].verdict | enum | Yes | One of: "better", "worse", "no_clear_difference", "not_enough". |
rows[].visible | boolean | Yes | — |
to | string | Yes | — |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X GET "$ANSWERSTACK_API_URL/v1/account/insights/leaderboard" \
-H "Authorization: Bearer $ACCESS_TOKEN"Playbooks by communities on one metric: is it the playbook or the community?#
GET /v1/account/insights/matrix
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token). Bearer token: Authorization: Bearer <token> (An API token (ans_pat_ or ans_svc_). Only routes that list a scope here accept one, and only with that scope.).
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
from | string | No | Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
to | string | No | Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
channel | enum | No | One of: "phone", "site_chat", "page_chat", "web_voice". |
source | enum | No | One of: "number", "widget", "page". |
caller | enum | No | One of: "prospect", "other". |
metric | enum | No | One of: "target_attainment", "primary_attainment", "reached_rate", "fallback_rate", "opportunity_rate", "attempt_rate", "conversion_after_attempt", "ai_miss_rate", "content_miss_rate", "operations_miss_rate", "caller_miss_rate", "value_per_eligible", "held_rate", "time_to_attempt". Default: "target_attainment". |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
cells | array<object> | Yes | — |
cells[].col | string | Yes | — |
cells[].n | number | Yes | — |
cells[].notEnough | boolean | Yes | — |
cells[].row | string | Yes | — |
cells[].value | number | null | Yes | — |
cols | array<object> | Yes | — |
cols[].id | string | Yes | — |
cols[].label | string | Yes | — |
metric | enum | Yes | One of: "target_attainment", "primary_attainment", "reached_rate", "fallback_rate", "opportunity_rate", "attempt_rate", "conversion_after_attempt", "ai_miss_rate", "content_miss_rate", "operations_miss_rate", "caller_miss_rate", "value_per_eligible", "held_rate", "time_to_attempt". |
minSample | integer | Yes | — |
rows | array<object> | Yes | — |
rows[].id | string | Yes | — |
rows[].label | string | Yes | — |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X GET "$ANSWERSTACK_API_URL/v1/account/insights/matrix" \
-H "Authorization: Bearer $ACCESS_TOKEN"Objections: how often each is raised, addressed and resolved, whether the agent came back to the target, attainment after it, and the best-handled conversations#
GET /v1/account/insights/objections
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token). Bearer token: Authorization: Bearer <token> (An API token (ans_pat_ or ans_svc_). Only routes that list a scope here accept one, and only with that scope.).
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
level | enum | No | One of: "account", "group", "playbook", "version", "effective". Default: "account". |
id | string | No | Up to 64 characters. |
from | string | No | Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
to | string | No | Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
channel | enum | No | One of: "phone", "site_chat", "page_chat", "web_voice". |
source | enum | No | One of: "number", "widget", "page". |
caller | enum | No | One of: "prospect", "other". |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
analysed | integer | Yes | — |
minSample | integer | Yes | — |
objections | array<object> | Yes | — |
objections[].change | object | null | Yes | — |
objections[].change.previousConversations | number | Yes | — |
objections[].change.previousShare | number | null | Yes | — |
objections[].change.verdict | enum | Yes | One of: "better", "worse", "no_clear_difference", "not_enough". |
objections[].community | boolean | Yes | — |
objections[].conversations | number | Yes | — |
objections[].examples | array<object> | Yes | — |
objections[].examples[].callId | string (call_… ID) | Yes | ID (call_…) |
objections[].examples[].startedAt | string (date-time) | Yes | — |
objections[].key | string | Yes | — |
objections[].label | string | Yes | — |
objections[].metrics | map | Yes | — |
objections[].metrics.{key} | InsightsLabelMetric | No | Any key. |
objections[].metrics.{key}.interval | object | null | Yes | — |
objections[].metrics.{key}.k | number | Yes | — |
objections[].metrics.{key}.label | string | Yes | — |
objections[].metrics.{key}.metric | enum | Yes | One of: "topic_share", "attainment_with_label", "sentiment_end", "knowledge_gap_rate", "objection_addressed", "objection_resolved", "objection_recovery". |
objections[].metrics.{key}.n | number | Yes | — |
objections[].metrics.{key}.notEnough | boolean | Yes | — |
objections[].metrics.{key}.value | number | null | Yes | — |
objections[].sensitive | boolean | Yes | — |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X GET "$ANSWERSTACK_API_URL/v1/account/insights/objections" \
-H "Authorization: Bearer $ACCESS_TOKEN"The opportunity, attempt and conversion funnel per objective, with fallbacks, misses by owner and held#
GET /v1/account/insights/objectives
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token). Bearer token: Authorization: Bearer <token> (An API token (ans_pat_ or ans_svc_). Only routes that list a scope here accept one, and only with that scope.).
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
level | enum | No | One of: "account", "group", "playbook", "version", "effective". Default: "account". |
id | string | No | Up to 64 characters. |
from | string | No | Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
to | string | No | Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
channel | enum | No | One of: "phone", "site_chat", "page_chat", "web_voice". |
source | enum | No | One of: "number", "widget", "page". |
caller | enum | No | One of: "prospect", "other". |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
minSample | integer | Yes | — |
objectives | array<object> | Yes | — |
objectives[].achieved | number | Yes | — |
objectives[].attainment | InsightsMetric | Yes | — |
objectives[].attainment.higherIsBetter | boolean | Yes | — |
objectives[].attainment.interval | object | null | Yes | — |
objectives[].attainment.interval.hi | number | Yes | — |
objectives[].attainment.interval.lo | number | Yes | — |
objectives[].attainment.k | number | Yes | — |
objectives[].attainment.label | string | Yes | — |
objectives[].attainment.metric | enum | Yes | One of: "target_attainment", "primary_attainment", "reached_rate", "fallback_rate", "opportunity_rate", "attempt_rate", "conversion_after_attempt", "ai_miss_rate", "content_miss_rate", "operations_miss_rate", "caller_miss_rate", "value_per_eligible", "held_rate", "time_to_attempt". |
objectives[].attainment.n | number | Yes | — |
objectives[].attainment.notEnough | boolean | Yes | — |
objectives[].attainment.unit | enum | Yes | One of: "rate", "mean", "seconds". |
objectives[].attainment.unknown | number | Yes | — |
objectives[].attainment.value | number | null | Yes | — |
objectives[].attempted | number | Yes | — |
objectives[].eligible | number | Yes | — |
objectives[].fallback | number | Yes | — |
objectives[].held | number | Yes | — |
objectives[].heldUnknown | number | Yes | — |
objectives[].lost | number | Yes | — |
objectives[].missByOwner | object | Yes | — |
objectives[].missByOwner.agent | number | Yes | — |
objectives[].missByOwner.caller | number | Yes | — |
objectives[].missByOwner.content | number | Yes | — |
objectives[].missByOwner.operations | number | Yes | — |
objectives[].missByOwner.system | number | Yes | — |
objectives[].missed | number | Yes | — |
objectives[].notApplicable | number | Yes | — |
objectives[].objectiveType | enum | Yes | One of: "book_meeting", "live_transfer", "capture_callback", "capture_contact", "qualify", "text_follow_up", "manage_booking", "route_correctly", "nurture", "run_tool", "answer_questions", "custom_condition", "custom_judged". |
objectives[].opportunity | number | Yes | — |
objectives[].partial | number | Yes | — |
objectives[].role | enum | Yes | One of: "target", "primary", "secondary". |
objectives[].timeToAttempt | InsightsMetric | Yes | — |
objectives[].timeToAttempt.higherIsBetter | boolean | Yes | — |
objectives[].timeToAttempt.interval | object | null | Yes | — |
objectives[].timeToAttempt.interval.hi | number | Yes | — |
objectives[].timeToAttempt.interval.lo | number | Yes | — |
objectives[].timeToAttempt.k | number | Yes | — |
objectives[].timeToAttempt.label | string | Yes | — |
objectives[].timeToAttempt.metric | enum | Yes | One of: "target_attainment", "primary_attainment", "reached_rate", "fallback_rate", "opportunity_rate", "attempt_rate", "conversion_after_attempt", "ai_miss_rate", "content_miss_rate", "operations_miss_rate", "caller_miss_rate", "value_per_eligible", "held_rate", "time_to_attempt". |
objectives[].timeToAttempt.n | number | Yes | — |
objectives[].timeToAttempt.notEnough | boolean | Yes | — |
objectives[].timeToAttempt.unit | enum | Yes | One of: "rate", "mean", "seconds". |
objectives[].timeToAttempt.unknown | number | Yes | — |
objectives[].timeToAttempt.value | number | null | Yes | — |
objectives[].unknown | number | Yes | — |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X GET "$ANSWERSTACK_API_URL/v1/account/insights/objectives" \
-H "Authorization: Bearer $ACCESS_TOKEN"Every metric at one level, with n, intervals and a verdict against its parent#
GET /v1/account/insights/scorecard
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token). Bearer token: Authorization: Bearer <token> (An API token (ans_pat_ or ans_svc_). Only routes that list a scope here accept one, and only with that scope.).
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
level | enum | No | One of: "account", "group", "playbook", "version", "effective". Default: "account". |
id | string | No | Up to 64 characters. |
from | string | No | Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
to | string | No | Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
channel | enum | No | One of: "phone", "site_chat", "page_chat", "web_voice". |
source | enum | No | One of: "number", "widget", "page". |
caller | enum | No | One of: "prospect", "other". |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
channels | array<object> | Yes | — |
channels[].conversations | integer | Yes | — |
channels[].kind | enum | Yes | One of: "phone", "site_chat", "page_chat", "web_voice". |
compliance | array<object> | Yes | — |
compliance[].count | integer | Yes | — |
compliance[].rule | string | Yes | — |
conversations | integer | Yes | — |
craft | InsightsCraft | Yes | — |
craft.checks | array<object> | Yes | — |
craft.checks[].check | string | Yes | — |
craft.checks[].fail | integer | Yes | — |
craft.checks[].label | string | Yes | — |
craft.checks[].notApplicable | integer | Yes | — |
craft.checks[].pass | integer | Yes | — |
craft.checks[].rate | number | null | Yes | — |
craft.compliance | array<object> | Yes | — |
craft.compliance[].check | string | Yes | — |
craft.compliance[].count | integer | Yes | — |
craft.compliance[].label | string | Yes | — |
craft.score | object | Yes | — |
craft.score.conversations | integer | Yes | — |
craft.score.interval | object | null | Yes | — |
craft.score.interval.hi | number | Yes | — |
craft.score.interval.lo | number | Yes | — |
craft.score.k | integer | Yes | — |
craft.score.n | integer | Yes | — |
craft.score.notEnough | boolean | Yes | — |
craft.score.value | number | null | Yes | — |
metrics | array<object> | Yes | — |
metrics[].higherIsBetter | boolean | Yes | — |
metrics[].interval | object | null | Yes | — |
metrics[].interval.hi | number | Yes | — |
metrics[].interval.lo | number | Yes | — |
metrics[].k | number | Yes | — |
metrics[].label | string | Yes | — |
metrics[].metric | enum | Yes | One of: "target_attainment", "primary_attainment", "reached_rate", "fallback_rate", "opportunity_rate", "attempt_rate", "conversion_after_attempt", "ai_miss_rate", "content_miss_rate", "operations_miss_rate", "caller_miss_rate", "value_per_eligible", "held_rate", "time_to_attempt". |
metrics[].n | number | Yes | — |
metrics[].notEnough | boolean | Yes | — |
metrics[].parentN | number | Yes | — |
metrics[].parentValue | number | null | Yes | — |
metrics[].unit | enum | Yes | One of: "rate", "mean", "seconds". |
metrics[].unknown | number | Yes | — |
metrics[].value | number | null | Yes | — |
metrics[].verdict | enum | Yes | One of: "better", "worse", "no_clear_difference", "not_enough". |
minSample | integer | Yes | — |
parent | object | null | Yes | — |
parent.id | string | null | Yes | — |
parent.label | string | Yes | — |
parent.level | enum | Yes | One of: "account", "group", "playbook", "version", "effective". |
scope | object | Yes | — |
scope.channel | enum | null | Yes | One of: "phone", "site_chat", "page_chat", "web_voice". |
scope.from | string | Yes | — |
scope.id | string | null | Yes | — |
scope.label | string | Yes | — |
scope.level | enum | Yes | One of: "account", "group", "playbook", "version", "effective". |
scope.to | string | Yes | — |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X GET "$ANSWERSTACK_API_URL/v1/account/insights/scorecard" \
-H "Authorization: Bearer $ACCESS_TOKEN"Objective values, the minimum sample and named peers, with the defaults#
GET /v1/account/insights/settings
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token). Bearer token: Authorization: Bearer <token> (An API token (ans_pat_ or ans_svc_). Only routes that list a scope here accept one, and only with that scope.).
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
actionRules | ActionRuleSettings | Yes | — |
actionRules.crmTask | array<enum> | Yes | Items: "hot_target_open", "commitment_due", "urgent_timeline", "operations_miss", "cancelled_no_rebook", "unopened_before_visit", "negative_end", "agent_miss", "no_show_recovery", "anonymous_hot_chat", "recurring_gap", "performance_regression". |
actionRules.disabled | array<enum> | Yes | Items: "hot_target_open", "commitment_due", "urgent_timeline", "operations_miss", "cancelled_no_rebook", "unopened_before_visit", "negative_end", "agent_miss", "no_show_recovery", "anonymous_hot_chat", "recurring_gap", "performance_regression". |
actionRules.groups | map | Yes | — |
actionRules.groups.{key} | array<enum> | No | Any key. Items: "hot_target_open", "commitment_due", "urgent_timeline", "operations_miss", "cancelled_no_rebook", "unopened_before_visit", "negative_end", "agent_miss", "no_show_recovery", "anonymous_hot_chat", "recurring_gap", "performance_regression". |
analysesToday | integer | Yes | — |
askDailyBudget | integer | Yes | — |
conversationIntelligence | boolean | Yes | — |
dailyAnalysisBudget | integer | Yes | — |
defaults | map | Yes | — |
defaults.{key} | number | No | Any key. |
effectiveValues | map | Yes | — |
effectiveValues.{key} | number | No | Any key. |
minSample | integer | Yes | — |
namedPeers | boolean | Yes | — |
objectiveValues | map | Yes | — |
objectiveValues.{key} | integer | No | Any key. Between 0 and 100. |
reportingTimeZone | string | null | Yes | — |
taxonomyPack | enum | Yes | One of: "senior_living", "general". |
valueChanges | array<object> | Yes | — |
valueChanges[].at | string | Yes | — |
valueChanges[].by | string | Yes | — |
weekStart | enum | Yes | One of: "monday", "sunday". |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X GET "$ANSWERSTACK_API_URL/v1/account/insights/settings" \
-H "Authorization: Bearer $ACCESS_TOKEN"Change objective values (re-values every stored result), the minimum sample (30 or more), named peers, the taxonomy pack, the daily analysis budget, or Ask’s time zone, week start and daily budget#
PUT /v1/account/insights/settings
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).
Request body
application/json, required.
| Field | Type | Required | Description |
|---|---|---|---|
actionRules | object | No | — |
actionRules.crmTask | array<enum> | Yes | Items: "hot_target_open", "commitment_due", "urgent_timeline", "operations_miss", "cancelled_no_rebook", "unopened_before_visit", "negative_end", "agent_miss", "no_show_recovery", "anonymous_hot_chat", "recurring_gap", "performance_regression". |
actionRules.disabled | array<enum> | Yes | Items: "hot_target_open", "commitment_due", "urgent_timeline", "operations_miss", "cancelled_no_rebook", "unopened_before_visit", "negative_end", "agent_miss", "no_show_recovery", "anonymous_hot_chat", "recurring_gap", "performance_regression". |
actionRules.groups | map | Yes | — |
actionRules.groups.{key} | array<enum> | No | Any key. Items: "hot_target_open", "commitment_due", "urgent_timeline", "operations_miss", "cancelled_no_rebook", "unopened_before_visit", "negative_end", "agent_miss", "no_show_recovery", "anonymous_hot_chat", "recurring_gap", "performance_regression". |
askDailyBudget | integer | No | Between 0 and 100000. |
dailyAnalysisBudget | integer | No | Between 0 and 100000. |
minSample | integer | No | Between 30 and 10000. |
namedPeers | boolean | No | — |
objectiveValues | map | No | — |
objectiveValues.{key} | integer | No | Any key. Between 0 and 100. |
reportingTimeZone | string | null | No | 1–64 characters. |
taxonomyPack | enum | No | One of: "senior_living", "general". |
weekStart | enum | No | One of: "monday", "sunday". |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
actionRules | ActionRuleSettings | Yes | — |
actionRules.crmTask | array<enum> | Yes | Items: "hot_target_open", "commitment_due", "urgent_timeline", "operations_miss", "cancelled_no_rebook", "unopened_before_visit", "negative_end", "agent_miss", "no_show_recovery", "anonymous_hot_chat", "recurring_gap", "performance_regression". |
actionRules.disabled | array<enum> | Yes | Items: "hot_target_open", "commitment_due", "urgent_timeline", "operations_miss", "cancelled_no_rebook", "unopened_before_visit", "negative_end", "agent_miss", "no_show_recovery", "anonymous_hot_chat", "recurring_gap", "performance_regression". |
actionRules.groups | map | Yes | — |
actionRules.groups.{key} | array<enum> | No | Any key. Items: "hot_target_open", "commitment_due", "urgent_timeline", "operations_miss", "cancelled_no_rebook", "unopened_before_visit", "negative_end", "agent_miss", "no_show_recovery", "anonymous_hot_chat", "recurring_gap", "performance_regression". |
analysesToday | integer | Yes | — |
askDailyBudget | integer | Yes | — |
conversationIntelligence | boolean | Yes | — |
dailyAnalysisBudget | integer | Yes | — |
defaults | map | Yes | — |
defaults.{key} | number | No | Any key. |
effectiveValues | map | Yes | — |
effectiveValues.{key} | number | No | Any key. |
minSample | integer | Yes | — |
namedPeers | boolean | Yes | — |
objectiveValues | map | Yes | — |
objectiveValues.{key} | integer | No | Any key. Between 0 and 100. |
reportingTimeZone | string | null | Yes | — |
taxonomyPack | enum | Yes | One of: "senior_living", "general". |
valueChanges | array<object> | Yes | — |
valueChanges[].at | string | Yes | — |
valueChanges[].by | string | Yes | — |
weekStart | enum | Yes | One of: "monday", "sunday". |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X PUT "$ANSWERSTACK_API_URL/v1/account/insights/settings" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"actionRules": {
"disabled": [
"hot_target_open"
],
"groups": {},
"crmTask": [
"hot_target_open"
]
},
"askDailyBudget": 0,
"dailyAnalysisBudget": 0,
"minSample": 30,
"namedPeers": true,
"objectiveValues": {},
"reportingTimeZone": "string",
"taxonomyPack": "senior_living",
"weekStart": "monday"
}'The account’s taxonomy: what new analyses use, the draft with what stops it being published, the versions, and each community’s own topics#
GET /v1/account/insights/taxonomy
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token). Bearer token: Authorization: Bearer <token> (An API token (ans_pat_ or ans_svc_). Only routes that list a scope here accept one, and only with that scope.).
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
canEdit | boolean | Yes | — |
communities | array<object> | Yes | — |
communities[].draft | object | null | Yes | — |
communities[].draft.problems | array<object> | Yes | — |
communities[].draft.problems[].message | string | Yes | — |
communities[].draft.problems[].path | string | Yes | — |
communities[].draft.topics | array<object> | Yes | — |
communities[].draft.topics[].active | boolean | Yes | Default: true. |
communities[].draft.topics[].description | string | Yes | Up to 300 characters. Default: "". |
communities[].draft.topics[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
communities[].draft.topics[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
communities[].draft.topics[].label | string | Yes | 1–80 characters. |
communities[].draft.topics[].sensitive | boolean | Yes | Default: false. |
communities[].draft.updatedAt | string (date-time) | Yes | — |
communities[].groupId | string (grp_… ID) | Yes | ID (grp_…) |
communities[].groupName | string | Yes | — |
communities[].published | object | null | Yes | — |
communities[].published.name | string | Yes | — |
communities[].published.topics | array<object> | Yes | — |
communities[].published.topics[].active | boolean | Yes | Default: true. |
communities[].published.topics[].description | string | Yes | Up to 300 characters. Default: "". |
communities[].published.topics[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
communities[].published.topics[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
communities[].published.topics[].label | string | Yes | 1–80 characters. |
communities[].published.topics[].sensitive | boolean | Yes | Default: false. |
communities[].published.version | integer | Yes | — |
current | object | Yes | — |
current.lists | InsightsTaxonomyLists | Yes | — |
current.lists.competitors | array<object> | Yes | Up to 50 items. |
current.lists.competitors[].active | boolean | Yes | Default: true. |
current.lists.competitors[].description | string | Yes | Up to 300 characters. Default: "". |
current.lists.competitors[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
current.lists.competitors[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
current.lists.competitors[].label | string | Yes | 1–80 characters. |
current.lists.competitors[].sensitive | boolean | Yes | Default: false. |
current.lists.intents | array<object> | Yes | Up to 20 items. |
current.lists.intents[].active | boolean | Yes | Default: true. |
current.lists.intents[].description | string | Yes | Up to 300 characters. Default: "". |
current.lists.intents[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
current.lists.intents[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
current.lists.intents[].label | string | Yes | 1–80 characters. |
current.lists.intents[].sensitive | boolean | Yes | Default: false. |
current.lists.objections | array<object> | Yes | Up to 30 items. |
current.lists.objections[].active | boolean | Yes | Default: true. |
current.lists.objections[].description | string | Yes | Up to 300 characters. Default: "". |
current.lists.objections[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
current.lists.objections[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
current.lists.objections[].label | string | Yes | 1–80 characters. |
current.lists.objections[].sensitive | boolean | Yes | Default: false. |
current.lists.topics | array<object> | Yes | Up to 60 items. |
current.lists.topics[].active | boolean | Yes | Default: true. |
current.lists.topics[].description | string | Yes | Up to 300 characters. Default: "". |
current.lists.topics[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
current.lists.topics[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
current.lists.topics[].label | string | Yes | 1–80 characters. |
current.lists.topics[].sensitive | boolean | Yes | Default: false. |
current.name | string | Yes | — |
current.version | integer | Yes | — |
draft | object | null | Yes | — |
draft.id | string (itx_… ID) | Yes | ID (itx_…) |
draft.lists | InsightsTaxonomyLists | Yes | — |
draft.lists.competitors | array<object> | Yes | Up to 50 items. |
draft.lists.competitors[].active | boolean | Yes | Default: true. |
draft.lists.competitors[].description | string | Yes | Up to 300 characters. Default: "". |
draft.lists.competitors[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
draft.lists.competitors[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
draft.lists.competitors[].label | string | Yes | 1–80 characters. |
draft.lists.competitors[].sensitive | boolean | Yes | Default: false. |
draft.lists.intents | array<object> | Yes | Up to 20 items. |
draft.lists.intents[].active | boolean | Yes | Default: true. |
draft.lists.intents[].description | string | Yes | Up to 300 characters. Default: "". |
draft.lists.intents[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
draft.lists.intents[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
draft.lists.intents[].label | string | Yes | 1–80 characters. |
draft.lists.intents[].sensitive | boolean | Yes | Default: false. |
draft.lists.objections | array<object> | Yes | Up to 30 items. |
draft.lists.objections[].active | boolean | Yes | Default: true. |
draft.lists.objections[].description | string | Yes | Up to 300 characters. Default: "". |
draft.lists.objections[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
draft.lists.objections[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
draft.lists.objections[].label | string | Yes | 1–80 characters. |
draft.lists.objections[].sensitive | boolean | Yes | Default: false. |
draft.lists.topics | array<object> | Yes | Up to 60 items. |
draft.lists.topics[].active | boolean | Yes | Default: true. |
draft.lists.topics[].description | string | Yes | Up to 300 characters. Default: "". |
draft.lists.topics[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
draft.lists.topics[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
draft.lists.topics[].label | string | Yes | 1–80 characters. |
draft.lists.topics[].sensitive | boolean | Yes | Default: false. |
draft.pack | enum | Yes | One of: "senior_living", "general". |
draft.problems | array<object> | Yes | — |
draft.problems[].message | string | Yes | — |
draft.problems[].path | string | Yes | — |
draft.updatedAt | string (date-time) | Yes | — |
pack | enum | Yes | One of: "senior_living", "general". |
versions | array<object> | Yes | — |
versions[].id | string (itx_… ID) | Yes | ID (itx_…) |
versions[].name | string | Yes | — |
versions[].publishedAt | string (date-time) | null | Yes | — |
versions[].status | enum | Yes | One of: "draft", "published", "retired". |
versions[].version | integer | Yes | — |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X GET "$ANSWERSTACK_API_URL/v1/account/insights/taxonomy" \
-H "Authorization: Bearer $ACCESS_TOKEN"Save the account’s draft: topics, objections, intents and competitors. Start a fresh draft from a built-in pack with startFrom#
PUT /v1/account/insights/taxonomy
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).
Request body
application/json, required.
| Field | Type | Required | Description |
|---|---|---|---|
lists | InsightsTaxonomyListsInput | No | — |
lists.competitors | array<object> | Yes | Up to 50 items. |
lists.competitors[].active | boolean | No | Default: true. |
lists.competitors[].description | string | No | Up to 300 characters. Default: "". |
lists.competitors[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
lists.competitors[].keywords | array<string> | No | Up to 40 items. Default: []. |
lists.competitors[].label | string | Yes | 1–80 characters. |
lists.competitors[].sensitive | boolean | No | Default: false. |
lists.intents | array<object> | Yes | Up to 20 items. |
lists.intents[].active | boolean | No | Default: true. |
lists.intents[].description | string | No | Up to 300 characters. Default: "". |
lists.intents[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
lists.intents[].keywords | array<string> | No | Up to 40 items. Default: []. |
lists.intents[].label | string | Yes | 1–80 characters. |
lists.intents[].sensitive | boolean | No | Default: false. |
lists.objections | array<object> | Yes | Up to 30 items. |
lists.objections[].active | boolean | No | Default: true. |
lists.objections[].description | string | No | Up to 300 characters. Default: "". |
lists.objections[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
lists.objections[].keywords | array<string> | No | Up to 40 items. Default: []. |
lists.objections[].label | string | Yes | 1–80 characters. |
lists.objections[].sensitive | boolean | No | Default: false. |
lists.topics | array<object> | Yes | Up to 60 items. |
lists.topics[].active | boolean | No | Default: true. |
lists.topics[].description | string | No | Up to 300 characters. Default: "". |
lists.topics[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
lists.topics[].keywords | array<string> | No | Up to 40 items. Default: []. |
lists.topics[].label | string | Yes | 1–80 characters. |
lists.topics[].sensitive | boolean | No | Default: false. |
startFrom | enum | No | One of: "senior_living", "general". |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
canEdit | boolean | Yes | — |
communities | array<object> | Yes | — |
communities[].draft | object | null | Yes | — |
communities[].draft.problems | array<object> | Yes | — |
communities[].draft.problems[].message | string | Yes | — |
communities[].draft.problems[].path | string | Yes | — |
communities[].draft.topics | array<object> | Yes | — |
communities[].draft.topics[].active | boolean | Yes | Default: true. |
communities[].draft.topics[].description | string | Yes | Up to 300 characters. Default: "". |
communities[].draft.topics[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
communities[].draft.topics[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
communities[].draft.topics[].label | string | Yes | 1–80 characters. |
communities[].draft.topics[].sensitive | boolean | Yes | Default: false. |
communities[].draft.updatedAt | string (date-time) | Yes | — |
communities[].groupId | string (grp_… ID) | Yes | ID (grp_…) |
communities[].groupName | string | Yes | — |
communities[].published | object | null | Yes | — |
communities[].published.name | string | Yes | — |
communities[].published.topics | array<object> | Yes | — |
communities[].published.topics[].active | boolean | Yes | Default: true. |
communities[].published.topics[].description | string | Yes | Up to 300 characters. Default: "". |
communities[].published.topics[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
communities[].published.topics[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
communities[].published.topics[].label | string | Yes | 1–80 characters. |
communities[].published.topics[].sensitive | boolean | Yes | Default: false. |
communities[].published.version | integer | Yes | — |
current | object | Yes | — |
current.lists | InsightsTaxonomyLists | Yes | — |
current.lists.competitors | array<object> | Yes | Up to 50 items. |
current.lists.competitors[].active | boolean | Yes | Default: true. |
current.lists.competitors[].description | string | Yes | Up to 300 characters. Default: "". |
current.lists.competitors[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
current.lists.competitors[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
current.lists.competitors[].label | string | Yes | 1–80 characters. |
current.lists.competitors[].sensitive | boolean | Yes | Default: false. |
current.lists.intents | array<object> | Yes | Up to 20 items. |
current.lists.intents[].active | boolean | Yes | Default: true. |
current.lists.intents[].description | string | Yes | Up to 300 characters. Default: "". |
current.lists.intents[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
current.lists.intents[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
current.lists.intents[].label | string | Yes | 1–80 characters. |
current.lists.intents[].sensitive | boolean | Yes | Default: false. |
current.lists.objections | array<object> | Yes | Up to 30 items. |
current.lists.objections[].active | boolean | Yes | Default: true. |
current.lists.objections[].description | string | Yes | Up to 300 characters. Default: "". |
current.lists.objections[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
current.lists.objections[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
current.lists.objections[].label | string | Yes | 1–80 characters. |
current.lists.objections[].sensitive | boolean | Yes | Default: false. |
current.lists.topics | array<object> | Yes | Up to 60 items. |
current.lists.topics[].active | boolean | Yes | Default: true. |
current.lists.topics[].description | string | Yes | Up to 300 characters. Default: "". |
current.lists.topics[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
current.lists.topics[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
current.lists.topics[].label | string | Yes | 1–80 characters. |
current.lists.topics[].sensitive | boolean | Yes | Default: false. |
current.name | string | Yes | — |
current.version | integer | Yes | — |
draft | object | null | Yes | — |
draft.id | string (itx_… ID) | Yes | ID (itx_…) |
draft.lists | InsightsTaxonomyLists | Yes | — |
draft.lists.competitors | array<object> | Yes | Up to 50 items. |
draft.lists.competitors[].active | boolean | Yes | Default: true. |
draft.lists.competitors[].description | string | Yes | Up to 300 characters. Default: "". |
draft.lists.competitors[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
draft.lists.competitors[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
draft.lists.competitors[].label | string | Yes | 1–80 characters. |
draft.lists.competitors[].sensitive | boolean | Yes | Default: false. |
draft.lists.intents | array<object> | Yes | Up to 20 items. |
draft.lists.intents[].active | boolean | Yes | Default: true. |
draft.lists.intents[].description | string | Yes | Up to 300 characters. Default: "". |
draft.lists.intents[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
draft.lists.intents[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
draft.lists.intents[].label | string | Yes | 1–80 characters. |
draft.lists.intents[].sensitive | boolean | Yes | Default: false. |
draft.lists.objections | array<object> | Yes | Up to 30 items. |
draft.lists.objections[].active | boolean | Yes | Default: true. |
draft.lists.objections[].description | string | Yes | Up to 300 characters. Default: "". |
draft.lists.objections[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
draft.lists.objections[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
draft.lists.objections[].label | string | Yes | 1–80 characters. |
draft.lists.objections[].sensitive | boolean | Yes | Default: false. |
draft.lists.topics | array<object> | Yes | Up to 60 items. |
draft.lists.topics[].active | boolean | Yes | Default: true. |
draft.lists.topics[].description | string | Yes | Up to 300 characters. Default: "". |
draft.lists.topics[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
draft.lists.topics[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
draft.lists.topics[].label | string | Yes | 1–80 characters. |
draft.lists.topics[].sensitive | boolean | Yes | Default: false. |
draft.pack | enum | Yes | One of: "senior_living", "general". |
draft.problems | array<object> | Yes | — |
draft.problems[].message | string | Yes | — |
draft.problems[].path | string | Yes | — |
draft.updatedAt | string (date-time) | Yes | — |
pack | enum | Yes | One of: "senior_living", "general". |
versions | array<object> | Yes | — |
versions[].id | string (itx_… ID) | Yes | ID (itx_…) |
versions[].name | string | Yes | — |
versions[].publishedAt | string (date-time) | null | Yes | — |
versions[].status | enum | Yes | One of: "draft", "published", "retired". |
versions[].version | integer | Yes | — |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X PUT "$ANSWERSTACK_API_URL/v1/account/insights/taxonomy" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"lists": {
"topics": [
{
"key": "string",
"label": "string"
}
],
"objections": [
{
"key": "string",
"label": "string"
}
],
"intents": [
{
"key": "string",
"label": "string"
}
],
"competitors": [
{
"key": "string",
"label": "string"
}
]
},
"startFrom": "senior_living"
}'Save a community’s own topics as a draft (group managers for their communities)#
PUT /v1/account/insights/taxonomy/communities/{groupId}
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
groupId | string (grp_… ID) | Yes | ID (grp_…) |
Request body
application/json, required.
| Field | Type | Required | Description |
|---|---|---|---|
topics | array<object> | Yes | Up to 20 items. |
topics[].active | boolean | No | Default: true. |
topics[].description | string | No | Up to 300 characters. Default: "". |
topics[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
topics[].keywords | array<string> | No | Up to 40 items. Default: []. |
topics[].label | string | Yes | 1–80 characters. |
topics[].sensitive | boolean | No | Default: false. |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
canEdit | boolean | Yes | — |
communities | array<object> | Yes | — |
communities[].draft | object | null | Yes | — |
communities[].draft.problems | array<object> | Yes | — |
communities[].draft.problems[].message | string | Yes | — |
communities[].draft.problems[].path | string | Yes | — |
communities[].draft.topics | array<object> | Yes | — |
communities[].draft.topics[].active | boolean | Yes | Default: true. |
communities[].draft.topics[].description | string | Yes | Up to 300 characters. Default: "". |
communities[].draft.topics[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
communities[].draft.topics[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
communities[].draft.topics[].label | string | Yes | 1–80 characters. |
communities[].draft.topics[].sensitive | boolean | Yes | Default: false. |
communities[].draft.updatedAt | string (date-time) | Yes | — |
communities[].groupId | string (grp_… ID) | Yes | ID (grp_…) |
communities[].groupName | string | Yes | — |
communities[].published | object | null | Yes | — |
communities[].published.name | string | Yes | — |
communities[].published.topics | array<object> | Yes | — |
communities[].published.topics[].active | boolean | Yes | Default: true. |
communities[].published.topics[].description | string | Yes | Up to 300 characters. Default: "". |
communities[].published.topics[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
communities[].published.topics[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
communities[].published.topics[].label | string | Yes | 1–80 characters. |
communities[].published.topics[].sensitive | boolean | Yes | Default: false. |
communities[].published.version | integer | Yes | — |
current | object | Yes | — |
current.lists | InsightsTaxonomyLists | Yes | — |
current.lists.competitors | array<object> | Yes | Up to 50 items. |
current.lists.competitors[].active | boolean | Yes | Default: true. |
current.lists.competitors[].description | string | Yes | Up to 300 characters. Default: "". |
current.lists.competitors[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
current.lists.competitors[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
current.lists.competitors[].label | string | Yes | 1–80 characters. |
current.lists.competitors[].sensitive | boolean | Yes | Default: false. |
current.lists.intents | array<object> | Yes | Up to 20 items. |
current.lists.intents[].active | boolean | Yes | Default: true. |
current.lists.intents[].description | string | Yes | Up to 300 characters. Default: "". |
current.lists.intents[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
current.lists.intents[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
current.lists.intents[].label | string | Yes | 1–80 characters. |
current.lists.intents[].sensitive | boolean | Yes | Default: false. |
current.lists.objections | array<object> | Yes | Up to 30 items. |
current.lists.objections[].active | boolean | Yes | Default: true. |
current.lists.objections[].description | string | Yes | Up to 300 characters. Default: "". |
current.lists.objections[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
current.lists.objections[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
current.lists.objections[].label | string | Yes | 1–80 characters. |
current.lists.objections[].sensitive | boolean | Yes | Default: false. |
current.lists.topics | array<object> | Yes | Up to 60 items. |
current.lists.topics[].active | boolean | Yes | Default: true. |
current.lists.topics[].description | string | Yes | Up to 300 characters. Default: "". |
current.lists.topics[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
current.lists.topics[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
current.lists.topics[].label | string | Yes | 1–80 characters. |
current.lists.topics[].sensitive | boolean | Yes | Default: false. |
current.name | string | Yes | — |
current.version | integer | Yes | — |
draft | object | null | Yes | — |
draft.id | string (itx_… ID) | Yes | ID (itx_…) |
draft.lists | InsightsTaxonomyLists | Yes | — |
draft.lists.competitors | array<object> | Yes | Up to 50 items. |
draft.lists.competitors[].active | boolean | Yes | Default: true. |
draft.lists.competitors[].description | string | Yes | Up to 300 characters. Default: "". |
draft.lists.competitors[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
draft.lists.competitors[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
draft.lists.competitors[].label | string | Yes | 1–80 characters. |
draft.lists.competitors[].sensitive | boolean | Yes | Default: false. |
draft.lists.intents | array<object> | Yes | Up to 20 items. |
draft.lists.intents[].active | boolean | Yes | Default: true. |
draft.lists.intents[].description | string | Yes | Up to 300 characters. Default: "". |
draft.lists.intents[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
draft.lists.intents[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
draft.lists.intents[].label | string | Yes | 1–80 characters. |
draft.lists.intents[].sensitive | boolean | Yes | Default: false. |
draft.lists.objections | array<object> | Yes | Up to 30 items. |
draft.lists.objections[].active | boolean | Yes | Default: true. |
draft.lists.objections[].description | string | Yes | Up to 300 characters. Default: "". |
draft.lists.objections[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
draft.lists.objections[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
draft.lists.objections[].label | string | Yes | 1–80 characters. |
draft.lists.objections[].sensitive | boolean | Yes | Default: false. |
draft.lists.topics | array<object> | Yes | Up to 60 items. |
draft.lists.topics[].active | boolean | Yes | Default: true. |
draft.lists.topics[].description | string | Yes | Up to 300 characters. Default: "". |
draft.lists.topics[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
draft.lists.topics[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
draft.lists.topics[].label | string | Yes | 1–80 characters. |
draft.lists.topics[].sensitive | boolean | Yes | Default: false. |
draft.pack | enum | Yes | One of: "senior_living", "general". |
draft.problems | array<object> | Yes | — |
draft.problems[].message | string | Yes | — |
draft.problems[].path | string | Yes | — |
draft.updatedAt | string (date-time) | Yes | — |
pack | enum | Yes | One of: "senior_living", "general". |
versions | array<object> | Yes | — |
versions[].id | string (itx_… ID) | Yes | ID (itx_…) |
versions[].name | string | Yes | — |
versions[].publishedAt | string (date-time) | null | Yes | — |
versions[].status | enum | Yes | One of: "draft", "published", "retired". |
versions[].version | integer | Yes | — |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X PUT "$ANSWERSTACK_API_URL/v1/account/insights/taxonomy/communities/{groupId}" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"topics": [
{
"key": "string",
"label": "string"
}
]
}'Promote a community’s topic into the account’s draft (and out of the community’s). Both apply when published#
POST /v1/account/insights/taxonomy/communities/{groupId}/promote
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
groupId | string (grp_… ID) | Yes | ID (grp_…) |
Request body
application/json, required.
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Yes | 1–48 characters. |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
canEdit | boolean | Yes | — |
communities | array<object> | Yes | — |
communities[].draft | object | null | Yes | — |
communities[].draft.problems | array<object> | Yes | — |
communities[].draft.problems[].message | string | Yes | — |
communities[].draft.problems[].path | string | Yes | — |
communities[].draft.topics | array<object> | Yes | — |
communities[].draft.topics[].active | boolean | Yes | Default: true. |
communities[].draft.topics[].description | string | Yes | Up to 300 characters. Default: "". |
communities[].draft.topics[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
communities[].draft.topics[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
communities[].draft.topics[].label | string | Yes | 1–80 characters. |
communities[].draft.topics[].sensitive | boolean | Yes | Default: false. |
communities[].draft.updatedAt | string (date-time) | Yes | — |
communities[].groupId | string (grp_… ID) | Yes | ID (grp_…) |
communities[].groupName | string | Yes | — |
communities[].published | object | null | Yes | — |
communities[].published.name | string | Yes | — |
communities[].published.topics | array<object> | Yes | — |
communities[].published.topics[].active | boolean | Yes | Default: true. |
communities[].published.topics[].description | string | Yes | Up to 300 characters. Default: "". |
communities[].published.topics[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
communities[].published.topics[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
communities[].published.topics[].label | string | Yes | 1–80 characters. |
communities[].published.topics[].sensitive | boolean | Yes | Default: false. |
communities[].published.version | integer | Yes | — |
current | object | Yes | — |
current.lists | InsightsTaxonomyLists | Yes | — |
current.lists.competitors | array<object> | Yes | Up to 50 items. |
current.lists.competitors[].active | boolean | Yes | Default: true. |
current.lists.competitors[].description | string | Yes | Up to 300 characters. Default: "". |
current.lists.competitors[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
current.lists.competitors[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
current.lists.competitors[].label | string | Yes | 1–80 characters. |
current.lists.competitors[].sensitive | boolean | Yes | Default: false. |
current.lists.intents | array<object> | Yes | Up to 20 items. |
current.lists.intents[].active | boolean | Yes | Default: true. |
current.lists.intents[].description | string | Yes | Up to 300 characters. Default: "". |
current.lists.intents[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
current.lists.intents[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
current.lists.intents[].label | string | Yes | 1–80 characters. |
current.lists.intents[].sensitive | boolean | Yes | Default: false. |
current.lists.objections | array<object> | Yes | Up to 30 items. |
current.lists.objections[].active | boolean | Yes | Default: true. |
current.lists.objections[].description | string | Yes | Up to 300 characters. Default: "". |
current.lists.objections[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
current.lists.objections[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
current.lists.objections[].label | string | Yes | 1–80 characters. |
current.lists.objections[].sensitive | boolean | Yes | Default: false. |
current.lists.topics | array<object> | Yes | Up to 60 items. |
current.lists.topics[].active | boolean | Yes | Default: true. |
current.lists.topics[].description | string | Yes | Up to 300 characters. Default: "". |
current.lists.topics[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
current.lists.topics[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
current.lists.topics[].label | string | Yes | 1–80 characters. |
current.lists.topics[].sensitive | boolean | Yes | Default: false. |
current.name | string | Yes | — |
current.version | integer | Yes | — |
draft | object | null | Yes | — |
draft.id | string (itx_… ID) | Yes | ID (itx_…) |
draft.lists | InsightsTaxonomyLists | Yes | — |
draft.lists.competitors | array<object> | Yes | Up to 50 items. |
draft.lists.competitors[].active | boolean | Yes | Default: true. |
draft.lists.competitors[].description | string | Yes | Up to 300 characters. Default: "". |
draft.lists.competitors[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
draft.lists.competitors[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
draft.lists.competitors[].label | string | Yes | 1–80 characters. |
draft.lists.competitors[].sensitive | boolean | Yes | Default: false. |
draft.lists.intents | array<object> | Yes | Up to 20 items. |
draft.lists.intents[].active | boolean | Yes | Default: true. |
draft.lists.intents[].description | string | Yes | Up to 300 characters. Default: "". |
draft.lists.intents[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
draft.lists.intents[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
draft.lists.intents[].label | string | Yes | 1–80 characters. |
draft.lists.intents[].sensitive | boolean | Yes | Default: false. |
draft.lists.objections | array<object> | Yes | Up to 30 items. |
draft.lists.objections[].active | boolean | Yes | Default: true. |
draft.lists.objections[].description | string | Yes | Up to 300 characters. Default: "". |
draft.lists.objections[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
draft.lists.objections[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
draft.lists.objections[].label | string | Yes | 1–80 characters. |
draft.lists.objections[].sensitive | boolean | Yes | Default: false. |
draft.lists.topics | array<object> | Yes | Up to 60 items. |
draft.lists.topics[].active | boolean | Yes | Default: true. |
draft.lists.topics[].description | string | Yes | Up to 300 characters. Default: "". |
draft.lists.topics[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
draft.lists.topics[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
draft.lists.topics[].label | string | Yes | 1–80 characters. |
draft.lists.topics[].sensitive | boolean | Yes | Default: false. |
draft.pack | enum | Yes | One of: "senior_living", "general". |
draft.problems | array<object> | Yes | — |
draft.problems[].message | string | Yes | — |
draft.problems[].path | string | Yes | — |
draft.updatedAt | string (date-time) | Yes | — |
pack | enum | Yes | One of: "senior_living", "general". |
versions | array<object> | Yes | — |
versions[].id | string (itx_… ID) | Yes | ID (itx_…) |
versions[].name | string | Yes | — |
versions[].publishedAt | string (date-time) | null | Yes | — |
versions[].status | enum | Yes | One of: "draft", "published", "retired". |
versions[].version | integer | Yes | — |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X POST "$ANSWERSTACK_API_URL/v1/account/insights/taxonomy/communities/{groupId}/promote" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"key": "string"
}'Publish a community’s topics as its next version#
POST /v1/account/insights/taxonomy/communities/{groupId}/publish
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
groupId | string (grp_… ID) | Yes | ID (grp_…) |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
canEdit | boolean | Yes | — |
communities | array<object> | Yes | — |
communities[].draft | object | null | Yes | — |
communities[].draft.problems | array<object> | Yes | — |
communities[].draft.problems[].message | string | Yes | — |
communities[].draft.problems[].path | string | Yes | — |
communities[].draft.topics | array<object> | Yes | — |
communities[].draft.topics[].active | boolean | Yes | Default: true. |
communities[].draft.topics[].description | string | Yes | Up to 300 characters. Default: "". |
communities[].draft.topics[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
communities[].draft.topics[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
communities[].draft.topics[].label | string | Yes | 1–80 characters. |
communities[].draft.topics[].sensitive | boolean | Yes | Default: false. |
communities[].draft.updatedAt | string (date-time) | Yes | — |
communities[].groupId | string (grp_… ID) | Yes | ID (grp_…) |
communities[].groupName | string | Yes | — |
communities[].published | object | null | Yes | — |
communities[].published.name | string | Yes | — |
communities[].published.topics | array<object> | Yes | — |
communities[].published.topics[].active | boolean | Yes | Default: true. |
communities[].published.topics[].description | string | Yes | Up to 300 characters. Default: "". |
communities[].published.topics[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
communities[].published.topics[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
communities[].published.topics[].label | string | Yes | 1–80 characters. |
communities[].published.topics[].sensitive | boolean | Yes | Default: false. |
communities[].published.version | integer | Yes | — |
current | object | Yes | — |
current.lists | InsightsTaxonomyLists | Yes | — |
current.lists.competitors | array<object> | Yes | Up to 50 items. |
current.lists.competitors[].active | boolean | Yes | Default: true. |
current.lists.competitors[].description | string | Yes | Up to 300 characters. Default: "". |
current.lists.competitors[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
current.lists.competitors[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
current.lists.competitors[].label | string | Yes | 1–80 characters. |
current.lists.competitors[].sensitive | boolean | Yes | Default: false. |
current.lists.intents | array<object> | Yes | Up to 20 items. |
current.lists.intents[].active | boolean | Yes | Default: true. |
current.lists.intents[].description | string | Yes | Up to 300 characters. Default: "". |
current.lists.intents[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
current.lists.intents[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
current.lists.intents[].label | string | Yes | 1–80 characters. |
current.lists.intents[].sensitive | boolean | Yes | Default: false. |
current.lists.objections | array<object> | Yes | Up to 30 items. |
current.lists.objections[].active | boolean | Yes | Default: true. |
current.lists.objections[].description | string | Yes | Up to 300 characters. Default: "". |
current.lists.objections[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
current.lists.objections[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
current.lists.objections[].label | string | Yes | 1–80 characters. |
current.lists.objections[].sensitive | boolean | Yes | Default: false. |
current.lists.topics | array<object> | Yes | Up to 60 items. |
current.lists.topics[].active | boolean | Yes | Default: true. |
current.lists.topics[].description | string | Yes | Up to 300 characters. Default: "". |
current.lists.topics[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
current.lists.topics[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
current.lists.topics[].label | string | Yes | 1–80 characters. |
current.lists.topics[].sensitive | boolean | Yes | Default: false. |
current.name | string | Yes | — |
current.version | integer | Yes | — |
draft | object | null | Yes | — |
draft.id | string (itx_… ID) | Yes | ID (itx_…) |
draft.lists | InsightsTaxonomyLists | Yes | — |
draft.lists.competitors | array<object> | Yes | Up to 50 items. |
draft.lists.competitors[].active | boolean | Yes | Default: true. |
draft.lists.competitors[].description | string | Yes | Up to 300 characters. Default: "". |
draft.lists.competitors[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
draft.lists.competitors[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
draft.lists.competitors[].label | string | Yes | 1–80 characters. |
draft.lists.competitors[].sensitive | boolean | Yes | Default: false. |
draft.lists.intents | array<object> | Yes | Up to 20 items. |
draft.lists.intents[].active | boolean | Yes | Default: true. |
draft.lists.intents[].description | string | Yes | Up to 300 characters. Default: "". |
draft.lists.intents[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
draft.lists.intents[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
draft.lists.intents[].label | string | Yes | 1–80 characters. |
draft.lists.intents[].sensitive | boolean | Yes | Default: false. |
draft.lists.objections | array<object> | Yes | Up to 30 items. |
draft.lists.objections[].active | boolean | Yes | Default: true. |
draft.lists.objections[].description | string | Yes | Up to 300 characters. Default: "". |
draft.lists.objections[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
draft.lists.objections[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
draft.lists.objections[].label | string | Yes | 1–80 characters. |
draft.lists.objections[].sensitive | boolean | Yes | Default: false. |
draft.lists.topics | array<object> | Yes | Up to 60 items. |
draft.lists.topics[].active | boolean | Yes | Default: true. |
draft.lists.topics[].description | string | Yes | Up to 300 characters. Default: "". |
draft.lists.topics[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
draft.lists.topics[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
draft.lists.topics[].label | string | Yes | 1–80 characters. |
draft.lists.topics[].sensitive | boolean | Yes | Default: false. |
draft.pack | enum | Yes | One of: "senior_living", "general". |
draft.problems | array<object> | Yes | — |
draft.problems[].message | string | Yes | — |
draft.problems[].path | string | Yes | — |
draft.updatedAt | string (date-time) | Yes | — |
pack | enum | Yes | One of: "senior_living", "general". |
versions | array<object> | Yes | — |
versions[].id | string (itx_… ID) | Yes | ID (itx_…) |
versions[].name | string | Yes | — |
versions[].publishedAt | string (date-time) | null | Yes | — |
versions[].status | enum | Yes | One of: "draft", "published", "retired". |
versions[].version | integer | Yes | — |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X POST "$ANSWERSTACK_API_URL/v1/account/insights/taxonomy/communities/{groupId}/publish" \
-H "Authorization: Bearer $ACCESS_TOKEN"Discard the account’s draft, or a community’s (groupId)#
DELETE /v1/account/insights/taxonomy/draft
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
groupId | string (grp_… ID) | No | ID (grp_…) |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
canEdit | boolean | Yes | — |
communities | array<object> | Yes | — |
communities[].draft | object | null | Yes | — |
communities[].draft.problems | array<object> | Yes | — |
communities[].draft.problems[].message | string | Yes | — |
communities[].draft.problems[].path | string | Yes | — |
communities[].draft.topics | array<object> | Yes | — |
communities[].draft.topics[].active | boolean | Yes | Default: true. |
communities[].draft.topics[].description | string | Yes | Up to 300 characters. Default: "". |
communities[].draft.topics[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
communities[].draft.topics[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
communities[].draft.topics[].label | string | Yes | 1–80 characters. |
communities[].draft.topics[].sensitive | boolean | Yes | Default: false. |
communities[].draft.updatedAt | string (date-time) | Yes | — |
communities[].groupId | string (grp_… ID) | Yes | ID (grp_…) |
communities[].groupName | string | Yes | — |
communities[].published | object | null | Yes | — |
communities[].published.name | string | Yes | — |
communities[].published.topics | array<object> | Yes | — |
communities[].published.topics[].active | boolean | Yes | Default: true. |
communities[].published.topics[].description | string | Yes | Up to 300 characters. Default: "". |
communities[].published.topics[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
communities[].published.topics[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
communities[].published.topics[].label | string | Yes | 1–80 characters. |
communities[].published.topics[].sensitive | boolean | Yes | Default: false. |
communities[].published.version | integer | Yes | — |
current | object | Yes | — |
current.lists | InsightsTaxonomyLists | Yes | — |
current.lists.competitors | array<object> | Yes | Up to 50 items. |
current.lists.competitors[].active | boolean | Yes | Default: true. |
current.lists.competitors[].description | string | Yes | Up to 300 characters. Default: "". |
current.lists.competitors[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
current.lists.competitors[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
current.lists.competitors[].label | string | Yes | 1–80 characters. |
current.lists.competitors[].sensitive | boolean | Yes | Default: false. |
current.lists.intents | array<object> | Yes | Up to 20 items. |
current.lists.intents[].active | boolean | Yes | Default: true. |
current.lists.intents[].description | string | Yes | Up to 300 characters. Default: "". |
current.lists.intents[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
current.lists.intents[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
current.lists.intents[].label | string | Yes | 1–80 characters. |
current.lists.intents[].sensitive | boolean | Yes | Default: false. |
current.lists.objections | array<object> | Yes | Up to 30 items. |
current.lists.objections[].active | boolean | Yes | Default: true. |
current.lists.objections[].description | string | Yes | Up to 300 characters. Default: "". |
current.lists.objections[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
current.lists.objections[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
current.lists.objections[].label | string | Yes | 1–80 characters. |
current.lists.objections[].sensitive | boolean | Yes | Default: false. |
current.lists.topics | array<object> | Yes | Up to 60 items. |
current.lists.topics[].active | boolean | Yes | Default: true. |
current.lists.topics[].description | string | Yes | Up to 300 characters. Default: "". |
current.lists.topics[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
current.lists.topics[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
current.lists.topics[].label | string | Yes | 1–80 characters. |
current.lists.topics[].sensitive | boolean | Yes | Default: false. |
current.name | string | Yes | — |
current.version | integer | Yes | — |
draft | object | null | Yes | — |
draft.id | string (itx_… ID) | Yes | ID (itx_…) |
draft.lists | InsightsTaxonomyLists | Yes | — |
draft.lists.competitors | array<object> | Yes | Up to 50 items. |
draft.lists.competitors[].active | boolean | Yes | Default: true. |
draft.lists.competitors[].description | string | Yes | Up to 300 characters. Default: "". |
draft.lists.competitors[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
draft.lists.competitors[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
draft.lists.competitors[].label | string | Yes | 1–80 characters. |
draft.lists.competitors[].sensitive | boolean | Yes | Default: false. |
draft.lists.intents | array<object> | Yes | Up to 20 items. |
draft.lists.intents[].active | boolean | Yes | Default: true. |
draft.lists.intents[].description | string | Yes | Up to 300 characters. Default: "". |
draft.lists.intents[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
draft.lists.intents[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
draft.lists.intents[].label | string | Yes | 1–80 characters. |
draft.lists.intents[].sensitive | boolean | Yes | Default: false. |
draft.lists.objections | array<object> | Yes | Up to 30 items. |
draft.lists.objections[].active | boolean | Yes | Default: true. |
draft.lists.objections[].description | string | Yes | Up to 300 characters. Default: "". |
draft.lists.objections[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
draft.lists.objections[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
draft.lists.objections[].label | string | Yes | 1–80 characters. |
draft.lists.objections[].sensitive | boolean | Yes | Default: false. |
draft.lists.topics | array<object> | Yes | Up to 60 items. |
draft.lists.topics[].active | boolean | Yes | Default: true. |
draft.lists.topics[].description | string | Yes | Up to 300 characters. Default: "". |
draft.lists.topics[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
draft.lists.topics[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
draft.lists.topics[].label | string | Yes | 1–80 characters. |
draft.lists.topics[].sensitive | boolean | Yes | Default: false. |
draft.pack | enum | Yes | One of: "senior_living", "general". |
draft.problems | array<object> | Yes | — |
draft.problems[].message | string | Yes | — |
draft.problems[].path | string | Yes | — |
draft.updatedAt | string (date-time) | Yes | — |
pack | enum | Yes | One of: "senior_living", "general". |
versions | array<object> | Yes | — |
versions[].id | string (itx_… ID) | Yes | ID (itx_…) |
versions[].name | string | Yes | — |
versions[].publishedAt | string (date-time) | null | Yes | — |
versions[].status | enum | Yes | One of: "draft", "published", "retired". |
versions[].version | integer | Yes | — |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X DELETE "$ANSWERSTACK_API_URL/v1/account/insights/taxonomy/draft" \
-H "Authorization: Bearer $ACCESS_TOKEN"Publish the account’s draft as its next version. New analyses use it; old ones keep theirs#
POST /v1/account/insights/taxonomy/publish
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
canEdit | boolean | Yes | — |
communities | array<object> | Yes | — |
communities[].draft | object | null | Yes | — |
communities[].draft.problems | array<object> | Yes | — |
communities[].draft.problems[].message | string | Yes | — |
communities[].draft.problems[].path | string | Yes | — |
communities[].draft.topics | array<object> | Yes | — |
communities[].draft.topics[].active | boolean | Yes | Default: true. |
communities[].draft.topics[].description | string | Yes | Up to 300 characters. Default: "". |
communities[].draft.topics[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
communities[].draft.topics[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
communities[].draft.topics[].label | string | Yes | 1–80 characters. |
communities[].draft.topics[].sensitive | boolean | Yes | Default: false. |
communities[].draft.updatedAt | string (date-time) | Yes | — |
communities[].groupId | string (grp_… ID) | Yes | ID (grp_…) |
communities[].groupName | string | Yes | — |
communities[].published | object | null | Yes | — |
communities[].published.name | string | Yes | — |
communities[].published.topics | array<object> | Yes | — |
communities[].published.topics[].active | boolean | Yes | Default: true. |
communities[].published.topics[].description | string | Yes | Up to 300 characters. Default: "". |
communities[].published.topics[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
communities[].published.topics[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
communities[].published.topics[].label | string | Yes | 1–80 characters. |
communities[].published.topics[].sensitive | boolean | Yes | Default: false. |
communities[].published.version | integer | Yes | — |
current | object | Yes | — |
current.lists | InsightsTaxonomyLists | Yes | — |
current.lists.competitors | array<object> | Yes | Up to 50 items. |
current.lists.competitors[].active | boolean | Yes | Default: true. |
current.lists.competitors[].description | string | Yes | Up to 300 characters. Default: "". |
current.lists.competitors[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
current.lists.competitors[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
current.lists.competitors[].label | string | Yes | 1–80 characters. |
current.lists.competitors[].sensitive | boolean | Yes | Default: false. |
current.lists.intents | array<object> | Yes | Up to 20 items. |
current.lists.intents[].active | boolean | Yes | Default: true. |
current.lists.intents[].description | string | Yes | Up to 300 characters. Default: "". |
current.lists.intents[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
current.lists.intents[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
current.lists.intents[].label | string | Yes | 1–80 characters. |
current.lists.intents[].sensitive | boolean | Yes | Default: false. |
current.lists.objections | array<object> | Yes | Up to 30 items. |
current.lists.objections[].active | boolean | Yes | Default: true. |
current.lists.objections[].description | string | Yes | Up to 300 characters. Default: "". |
current.lists.objections[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
current.lists.objections[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
current.lists.objections[].label | string | Yes | 1–80 characters. |
current.lists.objections[].sensitive | boolean | Yes | Default: false. |
current.lists.topics | array<object> | Yes | Up to 60 items. |
current.lists.topics[].active | boolean | Yes | Default: true. |
current.lists.topics[].description | string | Yes | Up to 300 characters. Default: "". |
current.lists.topics[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
current.lists.topics[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
current.lists.topics[].label | string | Yes | 1–80 characters. |
current.lists.topics[].sensitive | boolean | Yes | Default: false. |
current.name | string | Yes | — |
current.version | integer | Yes | — |
draft | object | null | Yes | — |
draft.id | string (itx_… ID) | Yes | ID (itx_…) |
draft.lists | InsightsTaxonomyLists | Yes | — |
draft.lists.competitors | array<object> | Yes | Up to 50 items. |
draft.lists.competitors[].active | boolean | Yes | Default: true. |
draft.lists.competitors[].description | string | Yes | Up to 300 characters. Default: "". |
draft.lists.competitors[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
draft.lists.competitors[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
draft.lists.competitors[].label | string | Yes | 1–80 characters. |
draft.lists.competitors[].sensitive | boolean | Yes | Default: false. |
draft.lists.intents | array<object> | Yes | Up to 20 items. |
draft.lists.intents[].active | boolean | Yes | Default: true. |
draft.lists.intents[].description | string | Yes | Up to 300 characters. Default: "". |
draft.lists.intents[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
draft.lists.intents[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
draft.lists.intents[].label | string | Yes | 1–80 characters. |
draft.lists.intents[].sensitive | boolean | Yes | Default: false. |
draft.lists.objections | array<object> | Yes | Up to 30 items. |
draft.lists.objections[].active | boolean | Yes | Default: true. |
draft.lists.objections[].description | string | Yes | Up to 300 characters. Default: "". |
draft.lists.objections[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
draft.lists.objections[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
draft.lists.objections[].label | string | Yes | 1–80 characters. |
draft.lists.objections[].sensitive | boolean | Yes | Default: false. |
draft.lists.topics | array<object> | Yes | Up to 60 items. |
draft.lists.topics[].active | boolean | Yes | Default: true. |
draft.lists.topics[].description | string | Yes | Up to 300 characters. Default: "". |
draft.lists.topics[].key | string | Yes | Pattern: ^[a-z][a-z0-9_]\{1,47\}$. |
draft.lists.topics[].keywords | array<string> | Yes | Up to 40 items. Default: []. |
draft.lists.topics[].label | string | Yes | 1–80 characters. |
draft.lists.topics[].sensitive | boolean | Yes | Default: false. |
draft.pack | enum | Yes | One of: "senior_living", "general". |
draft.problems | array<object> | Yes | — |
draft.problems[].message | string | Yes | — |
draft.problems[].path | string | Yes | — |
draft.updatedAt | string (date-time) | Yes | — |
pack | enum | Yes | One of: "senior_living", "general". |
versions | array<object> | Yes | — |
versions[].id | string (itx_… ID) | Yes | ID (itx_…) |
versions[].name | string | Yes | — |
versions[].publishedAt | string (date-time) | null | Yes | — |
versions[].status | enum | Yes | One of: "draft", "published", "retired". |
versions[].version | integer | Yes | — |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X POST "$ANSWERSTACK_API_URL/v1/account/insights/taxonomy/publish" \
-H "Authorization: Bearer $ACCESS_TOKEN"Estimate, then queue, a re-analysis of up to 90 days with the current taxonomy: low priority, within half the daily budget, the old analyses kept as superseded#
POST /v1/account/insights/taxonomy/reanalyze
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).
Request body
application/json, required.
| Field | Type | Required | Description |
|---|---|---|---|
confirm | boolean | No | Default: false. |
days | integer | Yes | Between 1 and 90. |
groupId | string (grp_… ID) | No | ID (grp_…) |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
capped | boolean | Yes | — |
conversations | integer | Yes | — |
dailyBudget | integer | Yes | — |
days | integer | Yes | — |
daysToFinish | integer | Yes | — |
estimatedCents | number | Yes | — |
queued | integer | Yes | — |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X POST "$ANSWERSTACK_API_URL/v1/account/insights/taxonomy/reanalyze" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"days": 1
}'Topics and demand: topics by volume and change, attainment and sentiment by topic, timeline demand and the intent mix, with community topics folded above community level#
GET /v1/account/insights/topics
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token). Bearer token: Authorization: Bearer <token> (An API token (ans_pat_ or ans_svc_). Only routes that list a scope here accept one, and only with that scope.).
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
level | enum | No | One of: "account", "group", "playbook", "version", "effective". Default: "account". |
id | string | No | Up to 64 characters. |
from | string | No | Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
to | string | No | Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
channel | enum | No | One of: "phone", "site_chat", "page_chat", "web_voice". |
source | enum | No | One of: "number", "widget", "page". |
caller | enum | No | One of: "prospect", "other". |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
analysed | integer | Yes | — |
communityTopics | array<object> | Yes | — |
communityTopics[].conversations | number | Yes | — |
communityTopics[].groupId | string | Yes | — |
communityTopics[].key | string | Yes | — |
communityTopics[].label | string | Yes | — |
intents | array<InsightsLabelRow> | Yes | — |
intents[].change | object | null | Yes | — |
intents[].change.previousConversations | number | Yes | — |
intents[].change.previousShare | number | null | Yes | — |
intents[].change.verdict | enum | Yes | One of: "better", "worse", "no_clear_difference", "not_enough". |
intents[].community | boolean | Yes | — |
intents[].conversations | number | Yes | — |
intents[].key | string | Yes | — |
intents[].label | string | Yes | — |
intents[].metrics | map | Yes | — |
intents[].metrics.{key} | InsightsLabelMetric | No | Any key. |
intents[].metrics.{key}.interval | object | null | Yes | — |
intents[].metrics.{key}.k | number | Yes | — |
intents[].metrics.{key}.label | string | Yes | — |
intents[].metrics.{key}.metric | enum | Yes | One of: "topic_share", "attainment_with_label", "sentiment_end", "knowledge_gap_rate", "objection_addressed", "objection_resolved", "objection_recovery". |
intents[].metrics.{key}.n | number | Yes | — |
intents[].metrics.{key}.notEnough | boolean | Yes | — |
intents[].metrics.{key}.value | number | null | Yes | — |
intents[].sensitive | boolean | Yes | — |
minSample | integer | Yes | — |
previousAnalysed | integer | Yes | — |
timeline | array<InsightsLabelRow> | Yes | — |
timeline[].change | object | null | Yes | — |
timeline[].change.previousConversations | number | Yes | — |
timeline[].change.previousShare | number | null | Yes | — |
timeline[].change.verdict | enum | Yes | One of: "better", "worse", "no_clear_difference", "not_enough". |
timeline[].community | boolean | Yes | — |
timeline[].conversations | number | Yes | — |
timeline[].key | string | Yes | — |
timeline[].label | string | Yes | — |
timeline[].metrics | map | Yes | — |
timeline[].metrics.{key} | InsightsLabelMetric | No | Any key. |
timeline[].metrics.{key}.interval | object | null | Yes | — |
timeline[].metrics.{key}.k | number | Yes | — |
timeline[].metrics.{key}.label | string | Yes | — |
timeline[].metrics.{key}.metric | enum | Yes | One of: "topic_share", "attainment_with_label", "sentiment_end", "knowledge_gap_rate", "objection_addressed", "objection_resolved", "objection_recovery". |
timeline[].metrics.{key}.n | number | Yes | — |
timeline[].metrics.{key}.notEnough | boolean | Yes | — |
timeline[].metrics.{key}.value | number | null | Yes | — |
timeline[].sensitive | boolean | Yes | — |
topics | array<InsightsLabelRow> | Yes | — |
topics[].change | object | null | Yes | — |
topics[].change.previousConversations | number | Yes | — |
topics[].change.previousShare | number | null | Yes | — |
topics[].change.verdict | enum | Yes | One of: "better", "worse", "no_clear_difference", "not_enough". |
topics[].community | boolean | Yes | — |
topics[].conversations | number | Yes | — |
topics[].key | string | Yes | — |
topics[].label | string | Yes | — |
topics[].metrics | map | Yes | — |
topics[].metrics.{key} | InsightsLabelMetric | No | Any key. |
topics[].metrics.{key}.interval | object | null | Yes | — |
topics[].metrics.{key}.k | number | Yes | — |
topics[].metrics.{key}.label | string | Yes | — |
topics[].metrics.{key}.metric | enum | Yes | One of: "topic_share", "attainment_with_label", "sentiment_end", "knowledge_gap_rate", "objection_addressed", "objection_resolved", "objection_recovery". |
topics[].metrics.{key}.n | number | Yes | — |
topics[].metrics.{key}.notEnough | boolean | Yes | — |
topics[].metrics.{key}.value | number | null | Yes | — |
topics[].sensitive | boolean | Yes | — |
trend | array<object> | Yes | — |
trend[].conversations | number | Yes | — |
trend[].key | string | Yes | — |
trend[].week | string | Yes | — |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X GET "$ANSWERSTACK_API_URL/v1/account/insights/topics" \
-H "Authorization: Bearer $ACCESS_TOKEN"One metric over time at one level, with publishes and value changes marked#
GET /v1/account/insights/trend
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token). Bearer token: Authorization: Bearer <token> (An API token (ans_pat_ or ans_svc_). Only routes that list a scope here accept one, and only with that scope.).
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
level | enum | No | One of: "account", "group", "playbook", "version", "effective". Default: "account". |
id | string | No | Up to 64 characters. |
from | string | No | Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
to | string | No | Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$. |
channel | enum | No | One of: "phone", "site_chat", "page_chat", "web_voice". |
source | enum | No | One of: "number", "widget", "page". |
caller | enum | No | One of: "prospect", "other". |
metric | enum | No | One of: "target_attainment", "primary_attainment", "reached_rate", "fallback_rate", "opportunity_rate", "attempt_rate", "conversion_after_attempt", "ai_miss_rate", "content_miss_rate", "operations_miss_rate", "caller_miss_rate", "value_per_eligible", "held_rate", "time_to_attempt". Default: "target_attainment". |
bucket | enum | No | One of: "day", "week". Default: "week". |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
bucket | enum | Yes | One of: "day", "week". |
markers | array<object> | Yes | — |
markers[].at | string | Yes | — |
markers[].kind | enum | Yes | One of: "publish", "values", "taxonomy". |
markers[].label | string | Yes | — |
metric | enum | Yes | One of: "target_attainment", "primary_attainment", "reached_rate", "fallback_rate", "opportunity_rate", "attempt_rate", "conversion_after_attempt", "ai_miss_rate", "content_miss_rate", "operations_miss_rate", "caller_miss_rate", "value_per_eligible", "held_rate", "time_to_attempt". |
minSample | integer | Yes | — |
points | array<object> | Yes | — |
points[].interval | object | null | Yes | — |
points[].interval.hi | number | Yes | — |
points[].interval.lo | number | Yes | — |
points[].n | number | Yes | — |
points[].notEnough | boolean | Yes | — |
points[].period | string | Yes | — |
points[].value | number | null | Yes | — |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X GET "$ANSWERSTACK_API_URL/v1/account/insights/trend" \
-H "Authorization: Bearer $ACCESS_TOKEN"Knowledge gaps, most recently asked first, with how often and where. Questions need transcript access#
GET /v1/account/knowledge-gaps
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token). Bearer token: Authorization: Bearer <token> (An API token (ans_pat_ or ans_svc_). Only routes that list a scope here accept one, and only with that scope.).
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
status | enum | No | One of: "open", "fixed", "dismissed". |
limit | integer | No | Between 1 and 200. Default: 50. |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
gaps | array<KnowledgeGapSummary> | Yes | — |
gaps[].communities | number | Yes | — |
gaps[].firstSeenAt | string (date-time) | Yes | — |
gaps[].fixedAt | string (date-time) | null | Yes | — |
gaps[].id | string (kgap_… ID) | Yes | ID (kgap_…) |
gaps[].label | string | null | Yes | — |
gaps[].lastSeenAt | string (date-time) | Yes | — |
gaps[].occurrences | number | Yes | — |
gaps[].question | string | null | Yes | — |
gaps[].sinceFix | number | Yes | — |
gaps[].status | enum | Yes | One of: "open", "fixed", "dismissed". |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X GET "$ANSWERSTACK_API_URL/v1/account/knowledge-gaps" \
-H "Authorization: Bearer $ACCESS_TOKEN"One knowledge gap: its questions, where they were asked, weekly counts, and occurrences before and after its fix#
GET /v1/account/knowledge-gaps/{gapId}
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token). Bearer token: Authorization: Bearer <token> (An API token (ans_pat_ or ans_svc_). Only routes that list a scope here accept one, and only with that scope.).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
gapId | string (kgap_… ID) | Yes | ID (kgap_…) |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
beforeAfter | object | null | Yes | — |
beforeAfter.after | number | Yes | — |
beforeAfter.before | number | Yes | — |
beforeAfter.days | number | Yes | — |
gap | object | Yes | — |
gap.communities | number | Yes | — |
gap.firstSeenAt | string (date-time) | Yes | — |
gap.fixKind | enum | null | Yes | One of: "knowledge_doc", "playbook_version", "other". |
gap.fixNote | string | null | Yes | — |
gap.fixRef | string | null | Yes | — |
gap.fixedAt | string (date-time) | null | Yes | — |
gap.fixedBy | string | null | Yes | — |
gap.id | string (kgap_… ID) | Yes | ID (kgap_…) |
gap.label | string | null | Yes | — |
gap.lastSeenAt | string (date-time) | Yes | — |
gap.occurrences | number | Yes | — |
gap.question | string | null | Yes | — |
gap.sinceFix | number | Yes | — |
gap.status | enum | Yes | One of: "open", "fixed", "dismissed". |
occurrences | array<object> | Yes | — |
occurrences[].callId | string (call_… ID) | Yes | ID (call_…) |
occurrences[].groupId | string (grp_… ID) | Yes | ID (grp_…) |
occurrences[].id | string (kgo_… ID) | Yes | ID (kgo_…) |
occurrences[].occurredAt | string (date-time) | Yes | — |
occurrences[].question | string | null | Yes | — |
occurrences[].source | enum | Yes | One of: "code", "model". |
weekly | array<object> | Yes | — |
weekly[].occurrences | number | Yes | — |
weekly[].week | string | Yes | — |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X GET "$ANSWERSTACK_API_URL/v1/account/knowledge-gaps/{gapId}" \
-H "Authorization: Bearer $ACCESS_TOKEN"Move a knowledge gap through the fix loop: link a fix (a knowledge document, a playbook version, or a note) and mark it fixed, dismiss it, or open it again#
PATCH /v1/account/knowledge-gaps/{gapId}
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
gapId | string (kgap_… ID) | Yes | ID (kgap_…) |
Request body
application/json, required.
| Field | Type | Required | Description |
|---|---|---|---|
fix | object | No | — |
fix.kind | enum | Yes | One of: "knowledge_doc", "playbook_version", "other". |
fix.note | string | null | No | Up to 500 characters. |
fix.ref | string | null | No | Up to 64 characters. |
status | enum | Yes | One of: "open", "fixed", "dismissed". |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
communities | number | Yes | — |
firstSeenAt | string (date-time) | Yes | — |
fixKind | enum | null | Yes | One of: "knowledge_doc", "playbook_version", "other". |
fixNote | string | null | Yes | — |
fixRef | string | null | Yes | — |
fixedAt | string (date-time) | null | Yes | — |
fixedBy | string | null | Yes | — |
id | string (kgap_… ID) | Yes | ID (kgap_…) |
label | string | null | Yes | — |
lastSeenAt | string (date-time) | Yes | — |
occurrences | number | Yes | — |
question | string | null | Yes | — |
sinceFix | number | Yes | — |
status | enum | Yes | One of: "open", "fixed", "dismissed". |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X PATCH "$ANSWERSTACK_API_URL/v1/account/knowledge-gaps/{gapId}" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"status": "open"
}'Leads, sortable by readiness, momentum and last activity, with their last tier change (Conversation Intelligence)#
GET /v1/account/leads
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token). Bearer token: Authorization: Bearer <token> (An API token (ans_pat_ or ans_svc_). Only routes that list a scope here accept one, and only with that scope.).
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
groupId | string (grp_… ID) | No | ID (grp_…) |
tier | enum | No | One of: "cold", "warm", "hot", "not_a_fit". |
momentum | enum | No | One of: "rising", "steady", "cooling", "silent". |
state | enum | No | One of: "open", "closed", "all". Default: "open". |
sort | enum | No | One of: "readiness", "momentum", "last_activity". Default: "readiness". |
limit | integer | No | Between 1 and 200. Default: 50. |
offset | integer | No | Between 0 and 100000. Default: 0. |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
leads | array<LeadSummary> | Yes | — |
leads[].closedAt | string (date-time) | null | Yes | — |
leads[].closedReason | enum | null | Yes | One of: "moved_in", "chose_elsewhere", "not_a_fit", "no_longer_looking", "duplicate", "other". |
leads[].conversations | integer | Yes | — |
leads[].crmStatus | enum | null | Yes | One of: "open", "won", "lost", "other". |
leads[].firstSeenAt | string (date-time) | Yes | — |
leads[].groupId | string (grp_… ID) | Yes | ID (grp_…) |
leads[].groupName | string | Yes | — |
leads[].id | string (lead_… ID) | Yes | ID (lead_…) |
leads[].interests | array<object> | Yes | — |
leads[].interests[].key | string | Yes | — |
leads[].interests[].label | string | Yes | — |
leads[].keyKind | enum | Yes | One of: "crm_contact", "phone", "email", "widget_visitor". |
leads[].lastActivityAt | string (date-time) | Yes | — |
leads[].momentum | enum | Yes | One of: "rising", "steady", "cooling", "silent". |
leads[].points | number | Yes | — |
leads[].previousTier | enum | null | Yes | One of: "cold", "warm", "hot", "not_a_fit". |
leads[].returnVisits | integer | Yes | — |
leads[].tier | enum | Yes | One of: "cold", "warm", "hot", "not_a_fit". |
leads[].tierChangedAt | string (date-time) | null | Yes | — |
total | integer | Yes | — |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X GET "$ANSWERSTACK_API_URL/v1/account/leads" \
-H "Authorization: Bearer $ACCESS_TOKEN"One lead: readiness with its reasons, tier history, interests, conversations, the timeline across channels, and linked profiles#
GET /v1/account/leads/{leadId}
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token). Bearer token: Authorization: Bearer <token> (An API token (ans_pat_ or ans_svc_). Only routes that list a scope here accept one, and only with that scope.).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
leadId | string (lead_… ID) | Yes | ID (lead_…) |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
conversations | array<object> | Yes | — |
conversations[].callId | string (call_… ID) | Yes | ID (call_…) |
conversations[].channelKind | enum | Yes | One of: "phone", "site_chat", "page_chat", "web_voice". |
conversations[].startedAt | string (date-time) | Yes | — |
conversations[].targetState | enum | null | Yes | One of: "achieved", "fallback", "partial", "missed", "not_applicable", "unknown". |
conversations[].targetType | enum | null | Yes | One of: "book_meeting", "live_transfer", "capture_callback", "capture_contact", "qualify", "text_follow_up", "manage_booking", "route_correctly", "nurture", "run_tool", "answer_questions", "custom_condition", "custom_judged". |
history | array<object> | Yes | — |
history[].at | string (date-time) | Yes | — |
history[].points | number | Yes | — |
history[].previousTier | enum | null | Yes | One of: "cold", "warm", "hot", "not_a_fit". |
history[].tier | enum | Yes | One of: "cold", "warm", "hot", "not_a_fit". |
history[].version | string | Yes | — |
interests | array<object> | Yes | — |
interests[].key | string | Yes | — |
interests[].label | string | Yes | — |
interests[].sources | array<enum> | Yes | Items: "conversation", "page". |
interests[].weight | number | Yes | — |
lead | object | Yes | — |
lead.closedAt | string (date-time) | null | Yes | — |
lead.closedReason | enum | null | Yes | One of: "moved_in", "chose_elsewhere", "not_a_fit", "no_longer_looking", "duplicate", "other". |
lead.conversations | integer | Yes | — |
lead.crm | object | Yes | — |
lead.crm.changedAt | string (date-time) | null | Yes | — |
lead.crm.checkedAt | string (date-time) | null | Yes | — |
lead.crm.hasContact | boolean | Yes | — |
lead.crm.stage | string | null | Yes | — |
lead.crm.status | enum | null | Yes | One of: "open", "won", "lost", "other". |
lead.crm.statusLabel | string | null | Yes | — |
lead.crmStatus | enum | null | Yes | One of: "open", "won", "lost", "other". |
lead.firstSeenAt | string (date-time) | Yes | — |
lead.groupId | string (grp_… ID) | Yes | ID (grp_…) |
lead.groupName | string | Yes | — |
lead.id | string (lead_… ID) | Yes | ID (lead_…) |
lead.identifiers | object | Yes | — |
lead.identifiers.emails | integer | Yes | — |
lead.identifiers.numbers | integer | Yes | — |
lead.identifiers.widgetVisitors | integer | Yes | — |
lead.interests | array<object> | Yes | — |
lead.interests[].key | string | Yes | — |
lead.interests[].label | string | Yes | — |
lead.keyKind | enum | Yes | One of: "crm_contact", "phone", "email", "widget_visitor". |
lead.lastActivityAt | string (date-time) | Yes | — |
lead.momentum | enum | Yes | One of: "rising", "steady", "cooling", "silent". |
lead.points | number | Yes | — |
lead.previousTier | enum | null | Yes | One of: "cold", "warm", "hot", "not_a_fit". |
lead.returnVisits | integer | Yes | — |
lead.tier | enum | Yes | One of: "cold", "warm", "hot", "not_a_fit". |
lead.tierChangedAt | string (date-time) | null | Yes | — |
linked | array<object> | Yes | — |
linked[].groupId | string (grp_… ID) | Yes | ID (grp_…) |
linked[].groupName | string | Yes | — |
linked[].id | string (lead_… ID) | Yes | ID (lead_…) |
linked[].tier | enum | Yes | One of: "cold", "warm", "hot", "not_a_fit". |
readiness | Readiness | Yes | — |
readiness.basePoints | number | Yes | — |
readiness.points | number | Yes | — |
readiness.reasons | array<object> | Yes | — |
readiness.reasons[].key | string | Yes | — |
readiness.reasons[].points | number | Yes | — |
readiness.reasons[].words | string | Yes | — |
readiness.sentence | string | Yes | — |
readiness.silentDays | integer | null | Yes | — |
readiness.source | enum | Yes | One of: "lead", "call". |
readiness.tier | enum | Yes | One of: "cold", "warm", "hot", "not_a_fit". |
readiness.version | string | Yes | — |
timeline | array<object> | Yes | — |
timeline[].at | string (date-time) | Yes | — |
timeline[].callId | string | null | Yes | — |
timeline[].detail | map | Yes | — |
timeline[].detail.{key} | any | No | Any key. |
timeline[].kind | enum | Yes | One of: "conversation", "page_event", "message", "booking", "booking_cancelled", "booking_outcome", "callback", "commitment", "commitment_closed", "action", "action_closed". |
timeline[].subjectId | string | Yes | — |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X GET "$ANSWERSTACK_API_URL/v1/account/leads/{leadId}" \
-H "Authorization: Bearer $ACCESS_TOKEN"Close a lead with a reason (moved in, chose elsewhere, not a fit…) or reopen it. Readiness is recomputed#
PATCH /v1/account/leads/{leadId}
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
leadId | string (lead_… ID) | Yes | ID (lead_…) |
Request body
application/json, required.
| Field | Type | Required | Description |
|---|---|---|---|
closed | boolean | Yes | — |
reason | enum | No | One of: "moved_in", "chose_elsewhere", "not_a_fit", "no_longer_looking", "duplicate", "other". |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
closedAt | string (date-time) | null | Yes | — |
closedReason | enum | null | Yes | One of: "moved_in", "chose_elsewhere", "not_a_fit", "no_longer_looking", "duplicate", "other". |
conversations | integer | Yes | — |
crmStatus | enum | null | Yes | One of: "open", "won", "lost", "other". |
firstSeenAt | string (date-time) | Yes | — |
groupId | string (grp_… ID) | Yes | ID (grp_…) |
groupName | string | Yes | — |
id | string (lead_… ID) | Yes | ID (lead_…) |
interests | array<object> | Yes | — |
interests[].key | string | Yes | — |
interests[].label | string | Yes | — |
keyKind | enum | Yes | One of: "crm_contact", "phone", "email", "widget_visitor". |
lastActivityAt | string (date-time) | Yes | — |
momentum | enum | Yes | One of: "rising", "steady", "cooling", "silent". |
points | number | Yes | — |
previousTier | enum | null | Yes | One of: "cold", "warm", "hot", "not_a_fit". |
returnVisits | integer | Yes | — |
tier | enum | Yes | One of: "cold", "warm", "hot", "not_a_fit". |
tierChangedAt | string (date-time) | null | Yes | — |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X PATCH "$ANSWERSTACK_API_URL/v1/account/leads/{leadId}" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"closed": true
}'A draft's objectives run on this playbook's conversations of the last 30 days (up to 200), in code, beside the objectives they ran with#
POST /v1/account/playbooks/{playbookId}/objectives/simulate
Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
playbookId | string (pb_… ID) | Yes | ID (pb_…) |
Request body
application/json, required.
| Field | Type | Required | Description |
|---|---|---|---|
objectives | any | Yes | — |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
capped | boolean | Yes | — |
conversations | integer | Yes | — |
current | object | Yes | — |
current.primary | object | Yes | — |
current.primary.achieved | integer | Yes | — |
current.primary.agentMisses | integer | Yes | — |
current.primary.attempted | integer | Yes | — |
current.primary.eligible | integer | Yes | — |
current.primary.fallback | integer | Yes | — |
current.primary.missed | integer | Yes | — |
current.primary.notApplicable | integer | Yes | — |
current.primary.opportunity | integer | Yes | — |
current.primary.partial | integer | Yes | — |
current.primary.unknown | integer | Yes | — |
current.primary.value | number | Yes | — |
current.target | object | Yes | — |
current.target.achieved | integer | Yes | — |
current.target.agentMisses | integer | Yes | — |
current.target.attempted | integer | Yes | — |
current.target.eligible | integer | Yes | — |
current.target.fallback | integer | Yes | — |
current.target.missed | integer | Yes | — |
current.target.notApplicable | integer | Yes | — |
current.target.opportunity | integer | Yes | — |
current.target.partial | integer | Yes | — |
current.target.unknown | integer | Yes | — |
current.target.value | number | Yes | — |
draft | object | Yes | — |
draft.primary | object | Yes | — |
draft.primary.achieved | integer | Yes | — |
draft.primary.agentMisses | integer | Yes | — |
draft.primary.attempted | integer | Yes | — |
draft.primary.eligible | integer | Yes | — |
draft.primary.fallback | integer | Yes | — |
draft.primary.missed | integer | Yes | — |
draft.primary.notApplicable | integer | Yes | — |
draft.primary.opportunity | integer | Yes | — |
draft.primary.partial | integer | Yes | — |
draft.primary.unknown | integer | Yes | — |
draft.primary.value | number | Yes | — |
draft.secondary | array<object> | Yes | — |
draft.secondary[].label | string | Yes | — |
draft.secondary[].objectiveId | string | Yes | — |
draft.secondary[].tally | object | Yes | — |
draft.secondary[].tally.achieved | integer | Yes | — |
draft.secondary[].tally.agentMisses | integer | Yes | — |
draft.secondary[].tally.attempted | integer | Yes | — |
draft.secondary[].tally.eligible | integer | Yes | — |
draft.secondary[].tally.fallback | integer | Yes | — |
draft.secondary[].tally.missed | integer | Yes | — |
draft.secondary[].tally.notApplicable | integer | Yes | — |
draft.secondary[].tally.opportunity | integer | Yes | — |
draft.secondary[].tally.partial | integer | Yes | — |
draft.secondary[].tally.unknown | integer | Yes | — |
draft.secondary[].tally.value | number | Yes | — |
draft.target | object | Yes | — |
draft.target.achieved | integer | Yes | — |
draft.target.agentMisses | integer | Yes | — |
draft.target.attempted | integer | Yes | — |
draft.target.eligible | integer | Yes | — |
draft.target.fallback | integer | Yes | — |
draft.target.missed | integer | Yes | — |
draft.target.notApplicable | integer | Yes | — |
draft.target.opportunity | integer | Yes | — |
draft.target.partial | integer | Yes | — |
draft.target.unknown | integer | Yes | — |
draft.target.value | number | Yes | — |
from | string (date-time) | Yes | — |
Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.
Example
curl -X POST "$ANSWERSTACK_API_URL/v1/account/playbooks/{playbookId}/objectives/simulate" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"objectives": {}
}'