API reference

Insights

Insights endpoints.

MethodPathSummary
GET/v1/account/actionsToday: 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}/feedbackCorrect 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}/rerunAnalyse one conversation again, model pass included (admins; counts against the daily budget)
GET/v1/account/bookings/{bookingId}/briefThe 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}/analysisA 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/commitmentsCommitments 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/askAsk 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}/feedbackRate 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}/openedCount that you opened a link under one of your Stack answers (ADR 0173)
GET/v1/account/insights/ask/threadsYour 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}/rerunRe-run a thread with edited context chips, without the model: the same tools, checks and blocks
POST/v1/account/insights/ask/threads/{threadId}/saveSave a thread as a saved question (or unsave it), rename it, or put it in your weekly digest
GET/v1/account/insights/chatChat: 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/compareTwo to six entities side by side: every metric raw and adjusted for mix, with verdicts and the mix table
GET/v1/account/insights/competitorsCompetitor mentions: how often each is named, in what context, and how those conversations ended
GET/v1/account/insights/drilldownThe conversations behind a number or a flow link, newest first
GET/v1/account/insights/entitiesThe communities, playbooks, versions or customized playbooks with conversations in the period, by name
GET/v1/account/insights/flowsA flow as a Sankey: step by step or first visits, thin links folded, unknowns drawn, optionally against a second scope
GET/v1/account/insights/gapsKnowledge gaps in a scope: the knowledge-gap rate and the clusters asked most, with the communities affected
GET/v1/account/insights/journeyJourney and follow-up: conversation → target → page opened → held, by readiness tier and engagement cohort, with interests, family reach and calibration
GET/v1/account/insights/leaderboardEntities 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/matrixPlaybooks by communities on one metric: is it the playbook or the community?
GET/v1/account/insights/objectionsObjections: 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/objectivesThe opportunity, attempt and conversion funnel per objective, with fallbacks, misses by owner and held
GET/v1/account/insights/scorecardEvery metric at one level, with n, intervals and a verdict against its parent
GET/v1/account/insights/settingsObjective values, the minimum sample and named peers, with the defaults
PUT/v1/account/insights/settingsChange 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/taxonomyThe 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/taxonomySave 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}/promotePromote 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}/publishPublish a community’s topics as its next version
DELETE/v1/account/insights/taxonomy/draftDiscard the account’s draft, or a community’s (groupId)
POST/v1/account/insights/taxonomy/publishPublish the account’s draft as its next version. New analyses use it; old ones keep theirs
POST/v1/account/insights/taxonomy/reanalyzeEstimate, 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/topicsTopics 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/trendOne metric over time at one level, with publishes and value changes marked
GET/v1/account/knowledge-gapsKnowledge 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/leadsLeads, 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/simulateA 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

NameTypeRequiredDescription
scopeenumNoOne of: "mine", "team", "editors". Default: "team".
stateenumNoOne of: "active", "open", "snoozed", "done", "dismissed", "all". Default: "active".
groupIdstring (grp_… ID)NoID (grp_…)
leadIdstring (lead_… ID)NoID (lead_…)
callIdstring (call_… ID)NoID (call_…)
ruleenumNoOne 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".
severityenumNoOne of: "high", "medium", "low".
limitintegerNoBetween 1 and 200. Default: 50.
offsetintegerNoBetween 0 and 100000. Default: 0.

Response 200

FieldTypeRequiredDescription
actionsarray<InsightAction>Yes—
actions[].assigneeobjectYes—
actions[].assignee.namestring | nullYes—
actions[].assignee.sourceenumYesOne of: "rep", "booking_assignee", "human_backup", "editors", "staff".
actions[].assignee.userIdstring (usr_… ID) | nullYes—
actions[].autoClosedbooleanYes—
actions[].bookingIdstring (bkg_… ID) | nullYes—
actions[].callIdstring (call_… ID) | nullYes—
actions[].closedAtstring (date-time) | nullYes—
actions[].commitmentIdstring (cmt_… ID) | nullYes—
actions[].crmTaskbooleanYes—
actions[].dueAtstring (date-time)Yes—
actions[].firedAtstring (date-time)Yes—
actions[].groupIdstring (grp_… ID) | nullYes—
actions[].groupNamestring | nullYes—
actions[].idstring (iact_… ID)YesID (iact_…)
actions[].lastSeenAtstring (date-time)Yes—
actions[].leadobject | nullYes—
actions[].lead.pointsnumberYes—
actions[].lead.tierenumYesOne of: "cold", "warm", "hot", "not_a_fit".
actions[].leadIdstring (lead_… ID) | nullYes—
actions[].notestring | nullYes—
actions[].reasonobjectYes—
actions[].reason.keystringYes—
actions[].reason.paramsmapYes—
actions[].reason.params.{key}string | number | boolean | nullNoAny key.
actions[].reasonWordsstringYes—
actions[].ruleenumYesOne 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[].ruleLabelstringYes—
actions[].severityenumYesOne of: "high", "medium", "low".
actions[].snoozedUntilstring (date-time) | nullYes—
actions[].stateenumYesOne of: "open", "snoozed", "done", "dismissed".
openobjectYes—
open.highintegerYes—
open.lowintegerYes—
open.mediumintegerYes—
totalintegerYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
actionIdstring (iact_… ID)YesID (iact_…)

Request body

application/json, required.

FieldTypeRequiredDescription
actionenumYesOne of: "snooze", "done", "dismiss", "reopen", "assign".
assigneeUserIdstring (usr_… ID) | nullNo—
notestringNoUp to 1000 characters.
untilanyNo—

Response 200

FieldTypeRequiredDescription
assigneeobjectYes—
assignee.namestring | nullYes—
assignee.sourceenumYesOne of: "rep", "booking_assignee", "human_backup", "editors", "staff".
assignee.userIdstring (usr_… ID) | nullYes—
autoClosedbooleanYes—
bookingIdstring (bkg_… ID) | nullYes—
callIdstring (call_… ID) | nullYes—
closedAtstring (date-time) | nullYes—
commitmentIdstring (cmt_… ID) | nullYes—
crmTaskbooleanYes—
dueAtstring (date-time)Yes—
firedAtstring (date-time)Yes—
groupIdstring (grp_… ID) | nullYes—
groupNamestring | nullYes—
idstring (iact_… ID)YesID (iact_…)
lastSeenAtstring (date-time)Yes—
leadobject | nullYes—
lead.pointsnumberYes—
lead.tierenumYesOne of: "cold", "warm", "hot", "not_a_fit".
leadIdstring (lead_… ID) | nullYes—
notestring | nullYes—
reasonobjectYes—
reason.keystringYes—
reason.paramsmapYes—
reason.params.{key}string | number | boolean | nullNoAny key.
reasonWordsstringYes—
ruleenumYesOne 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".
ruleLabelstringYes—
severityenumYesOne of: "high", "medium", "low".
snoozedUntilstring (date-time) | nullYes—
stateenumYesOne of: "open", "snoozed", "done", "dismissed".

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
analysisIdstring (cia_… ID)YesID (cia_…)

Request body

application/json, required.

FieldTypeRequiredDescription
dimensionenumYesOne 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".
fromKeystring | nullNoUp to 80 characters.
notestring | nullNoUp to 500 characters.
objectiveIdstring | nullNoUp to 64 characters.
toKeystring | nullNoUp to 80 characters.

Response 201

FieldTypeRequiredDescription
idstring (ifb_… ID)YesID (ifb_…)
refreshingbooleanYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
analysisIdstring (cia_… ID)YesID (cia_…)

Response 202

FieldTypeRequiredDescription
statusenumYesOne of: "queued".

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
bookingIdstring (bkg_… ID)YesID (bkg_…)

Response 200

FieldTypeRequiredDescription
bookingIdstring (bkg_… ID)YesID (bkg_…)
contentany | nullYes—
crmLoggedbooleanYes—
generatedAtstring (date-time) | nullYes—
notifiedAtstring (date-time) | nullYes—
recipientobject | nullYes—
recipient.namestring | nullYes—
recipient.sourceenumYesOne of: "rep", "booking_assignee", "human_backup", "editors", "staff".
recipient.userIdstring (usr_… ID) | nullYes—
stageenum | nullYesOne of: "booked", "day_before", "two_hours".
stateenumYesOne of: "ready", "pending", "cleared".

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
callIdstring (call_… ID)YesID (call_…)

Response 200

FieldTypeRequiredDescription
analysisobject | nullYes—
analysis.analyzedAtstring (date-time)Yes—
analysis.analyzerVersionstringYes—
analysis.channelKindenumYesOne of: "phone", "site_chat", "page_chat", "web_voice".
analysis.craftScoreinteger | nullYes—
analysis.engagedbooleanYes—
analysis.idstring (cia_… ID)YesID (cia_…)
analysis.missOwnerenum | nullYesOne of: "agent", "content", "operations", "caller", "system".
analysis.missReasonenum | nullYesOne 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.partialReasonstring | nullYes—
analysis.realizedValuenumber | nullYes—
analysis.statusstringYes—
analysis.traceTruncatedbooleanYes—
analysis.valuenumberYes—
checksarray<PerformanceCheck>Yes—
checks[].checkstringYes—
checks[].detailmapYes—
checks[].detail.{key}number | nullNoAny key.
checks[].kindenumYesOne of: "craft", "compliance".
checks[].labelstringYes—
checks[].resultenumYesOne of: "pass", "fail", "n_a".
checks[].verifiedByenumYesOne of: "code", "judged".
intelligenceAnalysisIntelligenceYes—
intelligence.contentWithheldbooleanYes—
intelligence.correctionsarray<object>Yes—
intelligence.corrections[].createdAtstring (date-time)Yes—
intelligence.corrections[].dimensionenumYesOne 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[].fromKeystring | nullYes—
intelligence.corrections[].idstring (ifb_… ID)YesID (ifb_…)
intelligence.corrections[].objectiveIdstring | nullYes—
intelligence.corrections[].toKeystring | nullYes—
intelligence.dimensionsany | nullYes—
intelligence.droppedLabelsintegerYes—
intelligence.labelsarray<AnalysisLabel>Yes—
intelligence.labels[].detailmapYes—
intelligence.labels[].detail.{key}anyNoAny key.
intelligence.labels[].dimensionenumYesOne 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[].evidencearray<object>Yes—
intelligence.labels[].evidence[].endintegerYes—
intelligence.labels[].evidence[].seqintegerYes—
intelligence.labels[].evidence[].startintegerYes—
intelligence.labels[].idstring (cil_… ID)YesID (cil_…)
intelligence.labels[].keystringYes—
intelligence.labels[].labelstringYes—
intelligence.labels[].reasonstring | nullYes—
intelligence.labels[].roleenum | nullYesOne of: "primary", "secondary".
intelligence.labels[].scoreinteger | nullYes—
intelligence.labels[].sensitivebooleanYes—
intelligence.labels[].sourceenumYesOne of: "model", "human".
intelligence.labels[].statestring | nullYes—
intelligence.modelstring | nullYes—
intelligence.momentsarray<object>Yes—
intelligence.moments[].keystring | nullYes—
intelligence.moments[].kindenumYesOne of: "price_question", "objection", "opportunity", "attempt", "conversion", "risk".
intelligence.moments[].seqinteger | nullYes—
intelligence.moments[].tnumber | nullYes—
intelligence.reasonstring | nullYes—
intelligence.stateenumYesOne of: "locked", "not_run", "failed", "ready".
intelligence.summarystring | nullYes—
intelligence.taxonomyVersionstring | nullYes—
resultsarray<ObjectiveResult>Yes—
results[].attemptedbooleanYes—
results[].attemptsintegerYes—
results[].convertedAtnumber | nullYes—
results[].eligiblebooleanYes—
results[].fallbackIdstring | nullYes—
results[].fallbackTypeenum | nullYesOne 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[].firstAttemptAtnumber | nullYes—
results[].heldStateenum | nullYesOne of: "held", "lost", "unknown".
results[].labelstringYes—
results[].missOwnerenum | nullYesOne of: "agent", "content", "operations", "caller", "system".
results[].missReasonenum | nullYesOne 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[].objectiveIdstringYes—
results[].opportunityAtnumber | nullYes—
results[].reasonenum | nullYesOne of: "not_engaged", "out_of_scope", "channel", "applies_when", "no_consent", "needs_analysis".
results[].roleenumYesOne of: "target", "primary", "secondary".
results[].sharenumber | nullYes—
results[].stateenumYesOne of: "achieved", "fallback", "partial", "missed", "not_applicable", "unknown".
results[].targetSourceenum | nullYesOne of: "rule", "playbook".
results[].typeenumYesOne 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[].valuenumberYes—
results[].verifiedByenumYesOne of: "code", "judged".

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
statusenumNoOne of: "open", "done", "dismissed", "all". Default: "open".
mineenumNoOne of: "true", "false".
groupIdstring (grp_… ID)NoID (grp_…)
leadIdstring (lead_… ID)NoID (lead_…)
callIdstring (call_… ID)NoID (call_…)
limitintegerNoBetween 1 and 200. Default: 50.
offsetintegerNoBetween 0 and 100000. Default: 0.

Response 200

FieldTypeRequiredDescription
commitmentsarray<Commitment>Yes—
commitments[].callIdstring (call_… ID)YesID (call_…)
commitments[].closedAtstring (date-time) | nullYes—
commitments[].closedByenum | nullYesOne of: "staff", "callback", "crm_task", "later_conversation", "message_sent".
commitments[].createdAtstring (date-time)Yes—
commitments[].crmTaskbooleanYes—
commitments[].descriptionstring | nullYes—
commitments[].dueAtstring (date-time)Yes—
commitments[].evidencearray<object>Yes—
commitments[].evidence[].endintegerYes—
commitments[].evidence[].seqintegerYes—
commitments[].evidence[].startintegerYes—
commitments[].groupIdstring (grp_… ID)YesID (grp_…)
commitments[].idstring (cmt_… ID)YesID (cmt_…)
commitments[].kindenumYesOne of: "callback", "specialist_confirm", "send_information", "other".
commitments[].leadIdstring (lead_… ID) | nullYes—
commitments[].ownerobjectYes—
commitments[].owner.namestring | nullYes—
commitments[].owner.sourceenumYesOne of: "rep", "booking_assignee", "human_backup", "editors", "staff".
commitments[].owner.userIdstring (usr_… ID) | nullYes—
commitments[].sourceenumYesOne of: "code", "model".
commitments[].statusenumYesOne of: "open", "done", "dismissed".
totalintegerYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
commitmentIdstring (cmt_… ID)YesID (cmt_…)

Request body

application/json, required.

FieldTypeRequiredDescription
actionenumYesOne of: "done", "dismiss", "reopen", "assign", "reschedule".
dueAtanyNo—
ownerUserIdstring (usr_… ID) | nullNo—

Response 200

FieldTypeRequiredDescription
callIdstring (call_… ID)YesID (call_…)
closedAtstring (date-time) | nullYes—
closedByenum | nullYesOne of: "staff", "callback", "crm_task", "later_conversation", "message_sent".
createdAtstring (date-time)Yes—
crmTaskbooleanYes—
descriptionstring | nullYes—
dueAtstring (date-time)Yes—
evidencearray<object>Yes—
evidence[].endintegerYes—
evidence[].seqintegerYes—
evidence[].startintegerYes—
groupIdstring (grp_… ID)YesID (grp_…)
idstring (cmt_… ID)YesID (cmt_…)
kindenumYesOne of: "callback", "specialist_confirm", "send_information", "other".
leadIdstring (lead_… ID) | nullYes—
ownerobjectYes—
owner.namestring | nullYes—
owner.sourceenumYesOne of: "rep", "booking_assignee", "human_backup", "editors", "staff".
owner.userIdstring (usr_… ID) | nullYes—
sourceenumYesOne of: "code", "model".
statusenumYesOne of: "open", "done", "dismissed".

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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.

FieldTypeRequiredDescription
contextobjectNo—
context.callIdstring | nullNoUp to 64 characters.
context.callerTypestring | nullNoUp to 40 characters.
context.channelenum | nullNoOne of: "phone", "site_chat", "page_chat", "web_voice".
context.comparePeriodenum | nullNoOne of: "previous", "week_before".
context.competitorstring | nullNoUp to 64 characters.
context.flowenumNoOne of: "stages", "questions", "objective". Default: "objective".
context.idsarray<string>NoUp to 6 items. Default: [].
context.levelenumNoOne of: "account", "group", "playbook", "version", "effective". Default: "account".
context.measureenumNoOne of: "rate", "count". Default: "rate".
context.metricenum | nullNoOne 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.objectiveenum | nullNoOne 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.periodobject | object | object | object | object | object | object | object | object | object | object | object | objectNoDefault: \{"kind":"last_days","n":30\}.
context.period.kindenumYes(variant 1) One of: "last_days".
context.period.nintegerYes(variant 1) Between 1 and 730.
context.period.kindenumYes(variant 2) One of: "last_units".
context.period.nintegerYes(variant 2) Between 1 and 24.
context.period.unitenumYes(variant 2) One of: "week", "month".
context.period.kindenumYes(variant 3) One of: "today".
context.period.kindenumYes(variant 4) One of: "yesterday".
context.period.kindenumYes(variant 5) One of: "this_week".
context.period.kindenumYes(variant 6) One of: "last_calendar_week".
context.period.kindenumYes(variant 7) One of: "this_month".
context.period.kindenumYes(variant 8) One of: "last_month".
context.period.kindenumYes(variant 9) One of: "this_quarter".
context.period.kindenumYes(variant 10) One of: "last_quarter".
context.period.kindenumYes(variant 11) One of: "month".
context.period.monthintegerYes(variant 11) Between 1 and 12.
context.period.yearintegerNo(variant 11) Between 2020 and 2100.
context.period.fromstringYes(variant 12) Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
context.period.kindenumYes(variant 12) One of: "range".
context.period.tostringYes(variant 12) Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
context.period.kindenumYes(variant 13) One of: "since_version".
context.period.playbookIdstring | nullNo(variant 13) Up to 64 characters.
context.period.versioninteger | nullYes(variant 13) Minimum 1.
context.rankenumNoOne of: "group", "playbook", "version", "effective". Default: "group".
context.sourceenum | nullNoOne of: "number", "widget", "page".
context.topicstring | nullNoUp to 64 characters.
context.viewenumNoOne 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".
questionstringYes1–1000 characters.
threadIdstring (askt_… ID)NoID (askt_…)

Response 200

No content.

Errors: 400, 401, 402, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
messageIdstring (askm_… ID)YesID (askm_…)

Request body

application/json, required.

FieldTypeRequiredDescription
notestringNoUp to 1000 characters.
ratingenumYesOne of: "up", "down".

Response 204

No content.

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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"
}'

POST /v1/account/insights/ask/messages/{messageId}/opened

Authentication: Bearer token: Authorization: Bearer <token> (Supabase access token).

NameTypeRequiredDescription
messageIdstring (askm_… ID)YesID (askm_…)

No content.

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

bash
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

NameTypeRequiredDescription
savedenumNoOne of: "true", "false".

Response 200

FieldTypeRequiredDescription
threadsarray<AskThread>Yes—
threads[].contextobjectYes—
threads[].context.callIdstring | nullYesUp to 64 characters.
threads[].context.callerTypestring | nullYesUp to 40 characters.
threads[].context.channelenum | nullYesOne of: "phone", "site_chat", "page_chat", "web_voice".
threads[].context.comparePeriodenum | nullYesOne of: "previous", "week_before".
threads[].context.competitorstring | nullYesUp to 64 characters.
threads[].context.flowenumYesOne of: "stages", "questions", "objective". Default: "objective".
threads[].context.idsarray<string>YesUp to 6 items. Default: [].
threads[].context.levelenumYesOne of: "account", "group", "playbook", "version", "effective". Default: "account".
threads[].context.measureenumYesOne of: "rate", "count". Default: "rate".
threads[].context.metricenum | nullYesOne 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.objectiveenum | nullYesOne 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.periodobject | object | object | object | object | object | object | object | object | object | object | object | objectYesDefault: \{"kind":"last_days","n":30\}.
threads[].context.period.kindconstantYes(variant 1) Always "last_days".
threads[].context.period.nintegerYes(variant 1) Between 1 and 730.
threads[].context.period.kindconstantYes(variant 2) Always "last_units".
threads[].context.period.nintegerYes(variant 2) Between 1 and 24.
threads[].context.period.unitenumYes(variant 2) One of: "week", "month".
threads[].context.period.kindconstantYes(variant 3) Always "today".
threads[].context.period.kindconstantYes(variant 4) Always "yesterday".
threads[].context.period.kindconstantYes(variant 5) Always "this_week".
threads[].context.period.kindconstantYes(variant 6) Always "last_calendar_week".
threads[].context.period.kindconstantYes(variant 7) Always "this_month".
threads[].context.period.kindconstantYes(variant 8) Always "last_month".
threads[].context.period.kindconstantYes(variant 9) Always "this_quarter".
threads[].context.period.kindconstantYes(variant 10) Always "last_quarter".
threads[].context.period.kindconstantYes(variant 11) Always "month".
threads[].context.period.monthintegerYes(variant 11) Between 1 and 12.
threads[].context.period.yearintegerNo(variant 11) Between 2020 and 2100.
threads[].context.period.fromstringYes(variant 12) Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
threads[].context.period.kindconstantYes(variant 12) Always "range".
threads[].context.period.tostringYes(variant 12) Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
threads[].context.period.kindconstantYes(variant 13) Always "since_version".
threads[].context.period.playbookIdstring | nullYes(variant 13) Up to 64 characters.
threads[].context.period.versioninteger | nullYes(variant 13) Minimum 1.
threads[].context.rankenumYesOne of: "group", "playbook", "version", "effective". Default: "group".
threads[].context.sourceenum | nullYesOne of: "number", "widget", "page".
threads[].context.topicstring | nullYesUp to 64 characters.
threads[].context.viewenumYesOne 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[].createdAtstring (date-time)Yes—
threads[].idstring (askt_… ID)YesID (askt_…)
threads[].inDigestbooleanYes—
threads[].lastUsedAtstring (date-time)Yes—
threads[].savedbooleanYes—
threads[].savedAtstring (date-time) | nullYes—
threads[].titlestringYes—

Errors: 400, 401, 402, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
threadIdstring (askt_… ID)YesID (askt_…)

Response 200

FieldTypeRequiredDescription
messagesarray<AskMessage>Yes—
messages[].answerstringYes—
messages[].blocksarray<object | object | object | object>Yes—
messages[].blocks[].columnsarray<object>Yes(variant 1)
messages[].blocks[].columns[].keystringYes(variant 1)
messages[].blocks[].columns[].labelstringYes(variant 1)
messages[].blocks[].columns[].numericbooleanYes(variant 1)
messages[].blocks[].kindconstantYes(variant 1) Always "table".
messages[].blocks[].notestring | nullYes(variant 1)
messages[].blocks[].rowsarray<array<string | number | null>>Yes(variant 1)
messages[].blocks[].sourcestringYes(variant 1)
messages[].blocks[].titlestringYes(variant 1)
messages[].blocks[].categoriesarray<string>Yes(variant 2)
messages[].blocks[].cellsarray<object>Yes(variant 2)
messages[].blocks[].cells[].colintegerYes(variant 2)
messages[].blocks[].cells[].rowintegerYes(variant 2)
messages[].blocks[].cells[].valuenumber | nullYes(variant 2)
messages[].blocks[].chartenumYes(variant 2) One of: "bar", "ranked_bar", "line", "sankey", "matrix".
messages[].blocks[].kindconstantYes(variant 2) Always "chart".
messages[].blocks[].linksarray<object>Yes(variant 2)
messages[].blocks[].links[].sourcestringYes(variant 2)
messages[].blocks[].links[].targetstringYes(variant 2)
messages[].blocks[].links[].valuenumberYes(variant 2)
messages[].blocks[].markersarray<object>Yes(variant 2)
messages[].blocks[].markers[].atstringYes(variant 2)
messages[].blocks[].markers[].labelstringYes(variant 2)
messages[].blocks[].nodesarray<object>Yes(variant 2)
messages[].blocks[].nodes[].idstringYes(variant 2)
messages[].blocks[].nodes[].kindstringYes(variant 2)
messages[].blocks[].nodes[].namestringYes(variant 2)
messages[].blocks[].rowLabelsarray<string>Yes(variant 2)
messages[].blocks[].seriesarray<object>Yes(variant 2)
messages[].blocks[].series[].intervalsarray<object | null>Yes(variant 2)
messages[].blocks[].series[].namestringYes(variant 2)
messages[].blocks[].series[].valuesarray<number | null>Yes(variant 2)
messages[].blocks[].sourcestringYes(variant 2)
messages[].blocks[].titlestringYes(variant 2)
messages[].blocks[].unitenumYes(variant 2) One of: "rate", "count", "mean", "seconds".
messages[].blocks[].kindconstantYes(variant 3) Always "view_link".
messages[].blocks[].labelstringYes(variant 3)
messages[].blocks[].querymapYes(variant 3)
messages[].blocks[].query.{key}stringNo(variant 3) Any key.
messages[].blocks[].viewenumYes(variant 3) One of: "", "objectives", "compare", "matrix", "leaderboard", "trends", "flows", "experiments".
messages[].blocks[].idstring | nullYes(variant 4) Up to 120 characters.
messages[].blocks[].kindconstantYes(variant 4) Always "page_link".
messages[].blocks[].labelstringYes(variant 4)
messages[].blocks[].pageenumYes(variant 4) One of: "numbers", "playbooks", "playbook", "groups", "group", "connections", "team", "calls", "knowledge", "usage", "insights", "pricing", "bookingPages", "leads", "today", "myMeetings", "help".
messages[].chipsarray<object>Yes—
messages[].chips[].keyenumYesOne of: "period", "scope", "rank", "metric", "objective", "channel", "comparePeriod", "topic", "competitor", "callerType", "source".
messages[].chips[].labelstringYes—
messages[].compareobject | nullYes—
messages[].compare.daysintegerYes—
messages[].compare.fromstringYes—
messages[].compare.labelstringYes—
messages[].compare.partialbooleanYes—
messages[].compare.timeZonestringYes—
messages[].compare.tostringYes—
messages[].contextobjectYes—
messages[].context.callIdstring | nullYesUp to 64 characters.
messages[].context.callerTypestring | nullYesUp to 40 characters.
messages[].context.channelenum | nullYesOne of: "phone", "site_chat", "page_chat", "web_voice".
messages[].context.comparePeriodenum | nullYesOne of: "previous", "week_before".
messages[].context.competitorstring | nullYesUp to 64 characters.
messages[].context.flowenumYesOne of: "stages", "questions", "objective". Default: "objective".
messages[].context.idsarray<string>YesUp to 6 items. Default: [].
messages[].context.levelenumYesOne of: "account", "group", "playbook", "version", "effective". Default: "account".
messages[].context.measureenumYesOne of: "rate", "count". Default: "rate".
messages[].context.metricenum | nullYesOne 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.objectiveenum | nullYesOne 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.periodobject | object | object | object | object | object | object | object | object | object | object | object | objectYesDefault: \{"kind":"last_days","n":30\}.
messages[].context.period.kindconstantYes(variant 1) Always "last_days".
messages[].context.period.nintegerYes(variant 1) Between 1 and 730.
messages[].context.period.kindconstantYes(variant 2) Always "last_units".
messages[].context.period.nintegerYes(variant 2) Between 1 and 24.
messages[].context.period.unitenumYes(variant 2) One of: "week", "month".
messages[].context.period.kindconstantYes(variant 3) Always "today".
messages[].context.period.kindconstantYes(variant 4) Always "yesterday".
messages[].context.period.kindconstantYes(variant 5) Always "this_week".
messages[].context.period.kindconstantYes(variant 6) Always "last_calendar_week".
messages[].context.period.kindconstantYes(variant 7) Always "this_month".
messages[].context.period.kindconstantYes(variant 8) Always "last_month".
messages[].context.period.kindconstantYes(variant 9) Always "this_quarter".
messages[].context.period.kindconstantYes(variant 10) Always "last_quarter".
messages[].context.period.kindconstantYes(variant 11) Always "month".
messages[].context.period.monthintegerYes(variant 11) Between 1 and 12.
messages[].context.period.yearintegerNo(variant 11) Between 2020 and 2100.
messages[].context.period.fromstringYes(variant 12) Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
messages[].context.period.kindconstantYes(variant 12) Always "range".
messages[].context.period.tostringYes(variant 12) Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
messages[].context.period.kindconstantYes(variant 13) Always "since_version".
messages[].context.period.playbookIdstring | nullYes(variant 13) Up to 64 characters.
messages[].context.period.versioninteger | nullYes(variant 13) Minimum 1.
messages[].context.rankenumYesOne of: "group", "playbook", "version", "effective". Default: "group".
messages[].context.sourceenum | nullYesOne of: "number", "widget", "page".
messages[].context.topicstring | nullYesUp to 64 characters.
messages[].context.viewenumYesOne 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[].createdAtstring (date-time)Yes—
messages[].droppedintegerYes—
messages[].idstring (askm_… ID)YesID (askm_…)
messages[].kindenumYesOne of: "answer", "clarify", "unavailable", "failed".
messages[].optionsarray<object>Yes—
messages[].options[].contextobjectYes—
messages[].options[].context.callIdstring | nullYesUp to 64 characters.
messages[].options[].context.callerTypestring | nullYesUp to 40 characters.
messages[].options[].context.channelenum | nullYesOne of: "phone", "site_chat", "page_chat", "web_voice".
messages[].options[].context.comparePeriodenum | nullYesOne of: "previous", "week_before".
messages[].options[].context.competitorstring | nullYesUp to 64 characters.
messages[].options[].context.flowenumYesOne of: "stages", "questions", "objective". Default: "objective".
messages[].options[].context.idsarray<string>YesUp to 6 items. Default: [].
messages[].options[].context.levelenumYesOne of: "account", "group", "playbook", "version", "effective". Default: "account".
messages[].options[].context.measureenumYesOne of: "rate", "count". Default: "rate".
messages[].options[].context.metricenum | nullYesOne 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.objectiveenum | nullYesOne 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.periodobject | object | object | object | object | object | object | object | object | object | object | object | objectYesDefault: \{"kind":"last_days","n":30\}.
messages[].options[].context.rankenumYesOne of: "group", "playbook", "version", "effective". Default: "group".
messages[].options[].context.sourceenum | nullYesOne of: "number", "widget", "page".
messages[].options[].context.topicstring | nullYesUp to 64 characters.
messages[].options[].context.viewenumYesOne 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[].labelstringYes—
messages[].periodobject | nullYes—
messages[].period.daysintegerYes—
messages[].period.fromstringYes—
messages[].period.labelstringYes—
messages[].period.partialbooleanYes—
messages[].period.timeZonestringYes—
messages[].period.tostringYes—
messages[].plannerstringYes—
messages[].questionstringYes—
messages[].seqintegerYes—
messages[].toolCallsarray<object>Yes—
messages[].toolCalls[].idstringYes—
messages[].toolCalls[].msnumberYes—
messages[].toolCalls[].okbooleanYes—
messages[].toolCalls[].statusintegerYes—
messages[].toolCalls[].toolstringYes—
threadAskThreadYes—
thread.contextobjectYes—
thread.context.callIdstring | nullYesUp to 64 characters.
thread.context.callerTypestring | nullYesUp to 40 characters.
thread.context.channelenum | nullYesOne of: "phone", "site_chat", "page_chat", "web_voice".
thread.context.comparePeriodenum | nullYesOne of: "previous", "week_before".
thread.context.competitorstring | nullYesUp to 64 characters.
thread.context.flowenumYesOne of: "stages", "questions", "objective". Default: "objective".
thread.context.idsarray<string>YesUp to 6 items. Default: [].
thread.context.levelenumYesOne of: "account", "group", "playbook", "version", "effective". Default: "account".
thread.context.measureenumYesOne of: "rate", "count". Default: "rate".
thread.context.metricenum | nullYesOne 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.objectiveenum | nullYesOne 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.periodobject | object | object | object | object | object | object | object | object | object | object | object | objectYesDefault: \{"kind":"last_days","n":30\}.
thread.context.period.kindconstantYes(variant 1) Always "last_days".
thread.context.period.nintegerYes(variant 1) Between 1 and 730.
thread.context.period.kindconstantYes(variant 2) Always "last_units".
thread.context.period.nintegerYes(variant 2) Between 1 and 24.
thread.context.period.unitenumYes(variant 2) One of: "week", "month".
thread.context.period.kindconstantYes(variant 3) Always "today".
thread.context.period.kindconstantYes(variant 4) Always "yesterday".
thread.context.period.kindconstantYes(variant 5) Always "this_week".
thread.context.period.kindconstantYes(variant 6) Always "last_calendar_week".
thread.context.period.kindconstantYes(variant 7) Always "this_month".
thread.context.period.kindconstantYes(variant 8) Always "last_month".
thread.context.period.kindconstantYes(variant 9) Always "this_quarter".
thread.context.period.kindconstantYes(variant 10) Always "last_quarter".
thread.context.period.kindconstantYes(variant 11) Always "month".
thread.context.period.monthintegerYes(variant 11) Between 1 and 12.
thread.context.period.yearintegerNo(variant 11) Between 2020 and 2100.
thread.context.period.fromstringYes(variant 12) Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
thread.context.period.kindconstantYes(variant 12) Always "range".
thread.context.period.tostringYes(variant 12) Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
thread.context.period.kindconstantYes(variant 13) Always "since_version".
thread.context.period.playbookIdstring | nullYes(variant 13) Up to 64 characters.
thread.context.period.versioninteger | nullYes(variant 13) Minimum 1.
thread.context.rankenumYesOne of: "group", "playbook", "version", "effective". Default: "group".
thread.context.sourceenum | nullYesOne of: "number", "widget", "page".
thread.context.topicstring | nullYesUp to 64 characters.
thread.context.viewenumYesOne 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.createdAtstring (date-time)Yes—
thread.idstring (askt_… ID)YesID (askt_…)
thread.inDigestbooleanYes—
thread.lastUsedAtstring (date-time)Yes—
thread.savedbooleanYes—
thread.savedAtstring (date-time) | nullYes—
thread.titlestringYes—

Errors: 400, 401, 402, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
threadIdstring (askt_… ID)YesID (askt_…)

Response 204

No content.

Errors: 400, 401, 402, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
threadIdstring (askt_… ID)YesID (askt_…)

Request body

application/json, required.

FieldTypeRequiredDescription
contextobjectYes—
context.callIdstring | nullNoUp to 64 characters.
context.callerTypestring | nullNoUp to 40 characters.
context.channelenum | nullNoOne of: "phone", "site_chat", "page_chat", "web_voice".
context.comparePeriodenum | nullNoOne of: "previous", "week_before".
context.competitorstring | nullNoUp to 64 characters.
context.flowenumNoOne of: "stages", "questions", "objective". Default: "objective".
context.idsarray<string>NoUp to 6 items. Default: [].
context.levelenumNoOne of: "account", "group", "playbook", "version", "effective". Default: "account".
context.measureenumNoOne of: "rate", "count". Default: "rate".
context.metricenum | nullNoOne 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.objectiveenum | nullNoOne 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.periodobject | object | object | object | object | object | object | object | object | object | object | object | objectNoDefault: \{"kind":"last_days","n":30\}.
context.period.kindenumYes(variant 1) One of: "last_days".
context.period.nintegerYes(variant 1) Between 1 and 730.
context.period.kindenumYes(variant 2) One of: "last_units".
context.period.nintegerYes(variant 2) Between 1 and 24.
context.period.unitenumYes(variant 2) One of: "week", "month".
context.period.kindenumYes(variant 3) One of: "today".
context.period.kindenumYes(variant 4) One of: "yesterday".
context.period.kindenumYes(variant 5) One of: "this_week".
context.period.kindenumYes(variant 6) One of: "last_calendar_week".
context.period.kindenumYes(variant 7) One of: "this_month".
context.period.kindenumYes(variant 8) One of: "last_month".
context.period.kindenumYes(variant 9) One of: "this_quarter".
context.period.kindenumYes(variant 10) One of: "last_quarter".
context.period.kindenumYes(variant 11) One of: "month".
context.period.monthintegerYes(variant 11) Between 1 and 12.
context.period.yearintegerNo(variant 11) Between 2020 and 2100.
context.period.fromstringYes(variant 12) Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
context.period.kindenumYes(variant 12) One of: "range".
context.period.tostringYes(variant 12) Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
context.period.kindenumYes(variant 13) One of: "since_version".
context.period.playbookIdstring | nullNo(variant 13) Up to 64 characters.
context.period.versioninteger | nullYes(variant 13) Minimum 1.
context.rankenumNoOne of: "group", "playbook", "version", "effective". Default: "group".
context.sourceenum | nullNoOne of: "number", "widget", "page".
context.topicstring | nullNoUp to 64 characters.
context.viewenumNoOne 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

FieldTypeRequiredDescription
messageAskMessageYes—
message.answerstringYes—
message.blocksarray<object | object | object | object>Yes—
message.blocks[].columnsarray<object>Yes(variant 1)
message.blocks[].columns[].keystringYes(variant 1)
message.blocks[].columns[].labelstringYes(variant 1)
message.blocks[].columns[].numericbooleanYes(variant 1)
message.blocks[].kindconstantYes(variant 1) Always "table".
message.blocks[].notestring | nullYes(variant 1)
message.blocks[].rowsarray<array<string | number | null>>Yes(variant 1)
message.blocks[].sourcestringYes(variant 1)
message.blocks[].titlestringYes(variant 1)
message.blocks[].categoriesarray<string>Yes(variant 2)
message.blocks[].cellsarray<object>Yes(variant 2)
message.blocks[].cells[].colintegerYes(variant 2)
message.blocks[].cells[].rowintegerYes(variant 2)
message.blocks[].cells[].valuenumber | nullYes(variant 2)
message.blocks[].chartenumYes(variant 2) One of: "bar", "ranked_bar", "line", "sankey", "matrix".
message.blocks[].kindconstantYes(variant 2) Always "chart".
message.blocks[].linksarray<object>Yes(variant 2)
message.blocks[].links[].sourcestringYes(variant 2)
message.blocks[].links[].targetstringYes(variant 2)
message.blocks[].links[].valuenumberYes(variant 2)
message.blocks[].markersarray<object>Yes(variant 2)
message.blocks[].markers[].atstringYes(variant 2)
message.blocks[].markers[].labelstringYes(variant 2)
message.blocks[].nodesarray<object>Yes(variant 2)
message.blocks[].nodes[].idstringYes(variant 2)
message.blocks[].nodes[].kindstringYes(variant 2)
message.blocks[].nodes[].namestringYes(variant 2)
message.blocks[].rowLabelsarray<string>Yes(variant 2)
message.blocks[].seriesarray<object>Yes(variant 2)
message.blocks[].series[].intervalsarray<object | null>Yes(variant 2)
message.blocks[].series[].namestringYes(variant 2)
message.blocks[].series[].valuesarray<number | null>Yes(variant 2)
message.blocks[].sourcestringYes(variant 2)
message.blocks[].titlestringYes(variant 2)
message.blocks[].unitenumYes(variant 2) One of: "rate", "count", "mean", "seconds".
message.blocks[].kindconstantYes(variant 3) Always "view_link".
message.blocks[].labelstringYes(variant 3)
message.blocks[].querymapYes(variant 3)
message.blocks[].query.{key}stringNo(variant 3) Any key.
message.blocks[].viewenumYes(variant 3) One of: "", "objectives", "compare", "matrix", "leaderboard", "trends", "flows", "experiments".
message.blocks[].idstring | nullYes(variant 4) Up to 120 characters.
message.blocks[].kindconstantYes(variant 4) Always "page_link".
message.blocks[].labelstringYes(variant 4)
message.blocks[].pageenumYes(variant 4) One of: "numbers", "playbooks", "playbook", "groups", "group", "connections", "team", "calls", "knowledge", "usage", "insights", "pricing", "bookingPages", "leads", "today", "myMeetings", "help".
message.chipsarray<object>Yes—
message.chips[].keyenumYesOne of: "period", "scope", "rank", "metric", "objective", "channel", "comparePeriod", "topic", "competitor", "callerType", "source".
message.chips[].labelstringYes—
message.compareobject | nullYes—
message.compare.daysintegerYes—
message.compare.fromstringYes—
message.compare.labelstringYes—
message.compare.partialbooleanYes—
message.compare.timeZonestringYes—
message.compare.tostringYes—
message.contextobjectYes—
message.context.callIdstring | nullYesUp to 64 characters.
message.context.callerTypestring | nullYesUp to 40 characters.
message.context.channelenum | nullYesOne of: "phone", "site_chat", "page_chat", "web_voice".
message.context.comparePeriodenum | nullYesOne of: "previous", "week_before".
message.context.competitorstring | nullYesUp to 64 characters.
message.context.flowenumYesOne of: "stages", "questions", "objective". Default: "objective".
message.context.idsarray<string>YesUp to 6 items. Default: [].
message.context.levelenumYesOne of: "account", "group", "playbook", "version", "effective". Default: "account".
message.context.measureenumYesOne of: "rate", "count". Default: "rate".
message.context.metricenum | nullYesOne 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.objectiveenum | nullYesOne 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.periodobject | object | object | object | object | object | object | object | object | object | object | object | objectYesDefault: \{"kind":"last_days","n":30\}.
message.context.period.kindconstantYes(variant 1) Always "last_days".
message.context.period.nintegerYes(variant 1) Between 1 and 730.
message.context.period.kindconstantYes(variant 2) Always "last_units".
message.context.period.nintegerYes(variant 2) Between 1 and 24.
message.context.period.unitenumYes(variant 2) One of: "week", "month".
message.context.period.kindconstantYes(variant 3) Always "today".
message.context.period.kindconstantYes(variant 4) Always "yesterday".
message.context.period.kindconstantYes(variant 5) Always "this_week".
message.context.period.kindconstantYes(variant 6) Always "last_calendar_week".
message.context.period.kindconstantYes(variant 7) Always "this_month".
message.context.period.kindconstantYes(variant 8) Always "last_month".
message.context.period.kindconstantYes(variant 9) Always "this_quarter".
message.context.period.kindconstantYes(variant 10) Always "last_quarter".
message.context.period.kindconstantYes(variant 11) Always "month".
message.context.period.monthintegerYes(variant 11) Between 1 and 12.
message.context.period.yearintegerNo(variant 11) Between 2020 and 2100.
message.context.period.fromstringYes(variant 12) Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
message.context.period.kindconstantYes(variant 12) Always "range".
message.context.period.tostringYes(variant 12) Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
message.context.period.kindconstantYes(variant 13) Always "since_version".
message.context.period.playbookIdstring | nullYes(variant 13) Up to 64 characters.
message.context.period.versioninteger | nullYes(variant 13) Minimum 1.
message.context.rankenumYesOne of: "group", "playbook", "version", "effective". Default: "group".
message.context.sourceenum | nullYesOne of: "number", "widget", "page".
message.context.topicstring | nullYesUp to 64 characters.
message.context.viewenumYesOne 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.createdAtstring (date-time)Yes—
message.droppedintegerYes—
message.idstring (askm_… ID)YesID (askm_…)
message.kindenumYesOne of: "answer", "clarify", "unavailable", "failed".
message.optionsarray<object>Yes—
message.options[].contextobjectYes—
message.options[].context.callIdstring | nullYesUp to 64 characters.
message.options[].context.callerTypestring | nullYesUp to 40 characters.
message.options[].context.channelenum | nullYesOne of: "phone", "site_chat", "page_chat", "web_voice".
message.options[].context.comparePeriodenum | nullYesOne of: "previous", "week_before".
message.options[].context.competitorstring | nullYesUp to 64 characters.
message.options[].context.flowenumYesOne of: "stages", "questions", "objective". Default: "objective".
message.options[].context.idsarray<string>YesUp to 6 items. Default: [].
message.options[].context.levelenumYesOne of: "account", "group", "playbook", "version", "effective". Default: "account".
message.options[].context.measureenumYesOne of: "rate", "count". Default: "rate".
message.options[].context.metricenum | nullYesOne 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.objectiveenum | nullYesOne 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.periodobject | object | object | object | object | object | object | object | object | object | object | object | objectYesDefault: \{"kind":"last_days","n":30\}.
message.options[].context.rankenumYesOne of: "group", "playbook", "version", "effective". Default: "group".
message.options[].context.sourceenum | nullYesOne of: "number", "widget", "page".
message.options[].context.topicstring | nullYesUp to 64 characters.
message.options[].context.viewenumYesOne 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[].labelstringYes—
message.periodobject | nullYes—
message.period.daysintegerYes—
message.period.fromstringYes—
message.period.labelstringYes—
message.period.partialbooleanYes—
message.period.timeZonestringYes—
message.period.tostringYes—
message.plannerstringYes—
message.questionstringYes—
message.seqintegerYes—
message.toolCallsarray<object>Yes—
message.toolCalls[].idstringYes—
message.toolCalls[].msnumberYes—
message.toolCalls[].okbooleanYes—
message.toolCalls[].statusintegerYes—
message.toolCalls[].toolstringYes—
threadAskThreadYes—
thread.contextobjectYes—
thread.context.callIdstring | nullYesUp to 64 characters.
thread.context.callerTypestring | nullYesUp to 40 characters.
thread.context.channelenum | nullYesOne of: "phone", "site_chat", "page_chat", "web_voice".
thread.context.comparePeriodenum | nullYesOne of: "previous", "week_before".
thread.context.competitorstring | nullYesUp to 64 characters.
thread.context.flowenumYesOne of: "stages", "questions", "objective". Default: "objective".
thread.context.idsarray<string>YesUp to 6 items. Default: [].
thread.context.levelenumYesOne of: "account", "group", "playbook", "version", "effective". Default: "account".
thread.context.measureenumYesOne of: "rate", "count". Default: "rate".
thread.context.metricenum | nullYesOne 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.objectiveenum | nullYesOne 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.periodobject | object | object | object | object | object | object | object | object | object | object | object | objectYesDefault: \{"kind":"last_days","n":30\}.
thread.context.period.kindconstantYes(variant 1) Always "last_days".
thread.context.period.nintegerYes(variant 1) Between 1 and 730.
thread.context.period.kindconstantYes(variant 2) Always "last_units".
thread.context.period.nintegerYes(variant 2) Between 1 and 24.
thread.context.period.unitenumYes(variant 2) One of: "week", "month".
thread.context.period.kindconstantYes(variant 3) Always "today".
thread.context.period.kindconstantYes(variant 4) Always "yesterday".
thread.context.period.kindconstantYes(variant 5) Always "this_week".
thread.context.period.kindconstantYes(variant 6) Always "last_calendar_week".
thread.context.period.kindconstantYes(variant 7) Always "this_month".
thread.context.period.kindconstantYes(variant 8) Always "last_month".
thread.context.period.kindconstantYes(variant 9) Always "this_quarter".
thread.context.period.kindconstantYes(variant 10) Always "last_quarter".
thread.context.period.kindconstantYes(variant 11) Always "month".
thread.context.period.monthintegerYes(variant 11) Between 1 and 12.
thread.context.period.yearintegerNo(variant 11) Between 2020 and 2100.
thread.context.period.fromstringYes(variant 12) Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
thread.context.period.kindconstantYes(variant 12) Always "range".
thread.context.period.tostringYes(variant 12) Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
thread.context.period.kindconstantYes(variant 13) Always "since_version".
thread.context.period.playbookIdstring | nullYes(variant 13) Up to 64 characters.
thread.context.period.versioninteger | nullYes(variant 13) Minimum 1.
thread.context.rankenumYesOne of: "group", "playbook", "version", "effective". Default: "group".
thread.context.sourceenum | nullYesOne of: "number", "widget", "page".
thread.context.topicstring | nullYesUp to 64 characters.
thread.context.viewenumYesOne 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.createdAtstring (date-time)Yes—
thread.idstring (askt_… ID)YesID (askt_…)
thread.inDigestbooleanYes—
thread.lastUsedAtstring (date-time)Yes—
thread.savedbooleanYes—
thread.savedAtstring (date-time) | nullYes—
thread.titlestringYes—

Errors: 400, 401, 402, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
threadIdstring (askt_… ID)YesID (askt_…)

Request body

application/json, required.

FieldTypeRequiredDescription
inDigestbooleanNo—
savedbooleanYes—
titlestringNo1–200 characters.

Response 200

FieldTypeRequiredDescription
contextobjectYes—
context.callIdstring | nullYesUp to 64 characters.
context.callerTypestring | nullYesUp to 40 characters.
context.channelenum | nullYesOne of: "phone", "site_chat", "page_chat", "web_voice".
context.comparePeriodenum | nullYesOne of: "previous", "week_before".
context.competitorstring | nullYesUp to 64 characters.
context.flowenumYesOne of: "stages", "questions", "objective". Default: "objective".
context.idsarray<string>YesUp to 6 items. Default: [].
context.levelenumYesOne of: "account", "group", "playbook", "version", "effective". Default: "account".
context.measureenumYesOne of: "rate", "count". Default: "rate".
context.metricenum | nullYesOne 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.objectiveenum | nullYesOne 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.periodobject | object | object | object | object | object | object | object | object | object | object | object | objectYesDefault: \{"kind":"last_days","n":30\}.
context.period.kindconstantYes(variant 1) Always "last_days".
context.period.nintegerYes(variant 1) Between 1 and 730.
context.period.kindconstantYes(variant 2) Always "last_units".
context.period.nintegerYes(variant 2) Between 1 and 24.
context.period.unitenumYes(variant 2) One of: "week", "month".
context.period.kindconstantYes(variant 3) Always "today".
context.period.kindconstantYes(variant 4) Always "yesterday".
context.period.kindconstantYes(variant 5) Always "this_week".
context.period.kindconstantYes(variant 6) Always "last_calendar_week".
context.period.kindconstantYes(variant 7) Always "this_month".
context.period.kindconstantYes(variant 8) Always "last_month".
context.period.kindconstantYes(variant 9) Always "this_quarter".
context.period.kindconstantYes(variant 10) Always "last_quarter".
context.period.kindconstantYes(variant 11) Always "month".
context.period.monthintegerYes(variant 11) Between 1 and 12.
context.period.yearintegerNo(variant 11) Between 2020 and 2100.
context.period.fromstringYes(variant 12) Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
context.period.kindconstantYes(variant 12) Always "range".
context.period.tostringYes(variant 12) Pattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
context.period.kindconstantYes(variant 13) Always "since_version".
context.period.playbookIdstring | nullYes(variant 13) Up to 64 characters.
context.period.versioninteger | nullYes(variant 13) Minimum 1.
context.rankenumYesOne of: "group", "playbook", "version", "effective". Default: "group".
context.sourceenum | nullYesOne of: "number", "widget", "page".
context.topicstring | nullYesUp to 64 characters.
context.viewenumYesOne 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".
createdAtstring (date-time)Yes—
idstring (askt_… ID)YesID (askt_…)
inDigestbooleanYes—
lastUsedAtstring (date-time)Yes—
savedbooleanYes—
savedAtstring (date-time) | nullYes—
titlestringYes—

Errors: 400, 401, 402, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
levelenumNoOne of: "account", "group", "playbook", "version", "effective". Default: "account".
idstringNoUp to 64 characters.
fromstringNoPattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
tostringNoPattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
sourceenumNoOne of: "number", "widget", "page".
callerenumNoOne of: "prospect", "other".

Response 200

FieldTypeRequiredDescription
abandonmentarray<object>Yes—
abandonment[].conversationsnumberYes—
abandonment[].lastQuestionstring | nullYes—
abandonment[].stagestringYes—
attainmentobjectYes—
attainment.intervalobject | nullYes—
attainment.interval.hinumberYes—
attainment.interval.lonumberYes—
attainment.knumberYes—
attainment.labelstringYes—
attainment.metricstringYes—
attainment.nnumberYes—
attainment.notEnoughbooleanYes—
attainment.valuenumber | nullYes—
eventsCountedbooleanYes—
funnelobjectYes—
funnel.chatsnumberYes—
funnel.engagednumberYes—
funnel.firstMessagenumberYes—
funnel.launcherShownnumberYes—
funnel.openednumberYes—
funnel.targetReachednumberYes—
identityobjectYes—
identity.anonymousnumberYes—
identity.identifiednumberYes—
minSampleintegerYes—
pageChatsobjectYes—
pageChats.attainmentobjectYes—
pageChats.attainment.intervalobject | nullYes—
pageChats.attainment.interval.hinumberYes—
pageChats.attainment.interval.lonumberYes—
pageChats.attainment.knumberYes—
pageChats.attainment.labelstringYes—
pageChats.attainment.metricstringYes—
pageChats.attainment.nnumberYes—
pageChats.attainment.notEnoughbooleanYes—
pageChats.attainment.valuenumber | nullYes—
pageChats.conversationsnumberYes—
pageChats.statesmapYes—
pageChats.states.{key}numberNoAny key.
pillsobjectYes—
pills.offerednumberYes—
pills.tappednumberYes—
pills.typednumberYes—
visitorsobjectYes—
visitors.chatsFromReturningnumberYes—
visitors.returningnumberYes—
visitors.visitorsnumberYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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.

FieldTypeRequiredDescription
callerenumNoOne of: "prospect", "other".
channelenumNoOne of: "phone", "site_chat", "page_chat", "web_voice".
fromstringNoPattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
idsarray<string>YesUp to 6 items.
levelenumYesOne of: "group", "playbook", "version", "effective".
sourceenumNoOne of: "number", "widget", "page".
tostringNoPattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.

Response 200

FieldTypeRequiredDescription
differentObjectivesbooleanYes—
entitiesarray<object>Yes—
entities[].entitystringYes—
entities[].idstringYes—
entities[].metricsarray<object>Yes—
entities[].metrics[].adjustednumber | nullYes—
entities[].metrics[].higherIsBetterbooleanYes—
entities[].metrics[].intervalobject | nullYes—
entities[].metrics[].interval.hinumberYes—
entities[].metrics[].interval.lonumberYes—
entities[].metrics[].knumberYes—
entities[].metrics[].labelstringYes—
entities[].metrics[].metricenumYesOne 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[].mixDiffersbooleanYes—
entities[].metrics[].nnumberYes—
entities[].metrics[].notEnoughbooleanYes—
entities[].metrics[].unitenumYesOne of: "rate", "mean", "seconds".
entities[].metrics[].unknownnumberYes—
entities[].metrics[].valuenumber | nullYes—
entities[].metrics[].verdictenumYesOne of: "better", "worse", "no_clear_difference", "not_enough".
entities[].primaryObjectivesarray<enum>YesItems: "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".
fromstringYes—
levelenumYesOne of: "account", "group", "playbook", "version", "effective".
minSampleintegerYes—
mixarray<object>Yes—
mix[].sharesarray<number>Yes—
mix[].stratumstringYes—
tostringYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
levelenumNoOne of: "account", "group", "playbook", "version", "effective". Default: "account".
idstringNoUp to 64 characters.
fromstringNoPattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
tostringNoPattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
channelenumNoOne of: "phone", "site_chat", "page_chat", "web_voice".
sourceenumNoOne of: "number", "widget", "page".
callerenumNoOne of: "prospect", "other".

Response 200

FieldTypeRequiredDescription
analysedintegerYes—
competitorsarray<object>Yes—
competitors[].changeobject | nullYes—
competitors[].change.previousConversationsnumberYes—
competitors[].change.previousSharenumber | nullYes—
competitors[].change.verdictenumYesOne of: "better", "worse", "no_clear_difference", "not_enough".
competitors[].communitybooleanYes—
competitors[].contextsobjectYes—
competitors[].contexts.comparingnumberYes—
competitors[].contexts.current_providernumberYes—
competitors[].contexts.mentionednumberYes—
competitors[].contexts.tourednumberYes—
competitors[].conversationsnumberYes—
competitors[].keystringYes—
competitors[].labelstringYes—
competitors[].metricsmapYes—
competitors[].metrics.{key}InsightsLabelMetricNoAny key.
competitors[].metrics.{key}.intervalobject | nullYes—
competitors[].metrics.{key}.knumberYes—
competitors[].metrics.{key}.labelstringYes—
competitors[].metrics.{key}.metricenumYesOne of: "topic_share", "attainment_with_label", "sentiment_end", "knowledge_gap_rate", "objection_addressed", "objection_resolved", "objection_recovery".
competitors[].metrics.{key}.nnumberYes—
competitors[].metrics.{key}.notEnoughbooleanYes—
competitors[].metrics.{key}.valuenumber | nullYes—
competitors[].sensitivebooleanYes—
minSampleintegerYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
levelenumNoOne of: "account", "group", "playbook", "version", "effective". Default: "account".
idstringNoUp to 64 characters.
fromstringNoPattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
tostringNoPattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
channelenumNoOne of: "phone", "site_chat", "page_chat", "web_voice".
sourceenumNoOne of: "number", "widget", "page".
callerenumNoOne of: "prospect", "other".
roleenumNoOne of: "target", "primary". Default: "target".
stateenumNoOne of: "achieved", "fallback", "partial", "missed", "not_applicable", "unknown".
objectiveenumNoOne 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".
linkstringNoUp to 400 characters.
limitintegerNoBetween 1 and 200. Default: 50.

Response 200

FieldTypeRequiredDescription
conversationsarray<object>Yes—
conversations[].callIdstringYes—
conversations[].channelKindenumYesOne of: "phone", "site_chat", "page_chat", "web_voice".
conversations[].groupIdstringYes—
conversations[].missReasonstring | nullYes—
conversations[].startedAtstring (date-time)Yes—
conversations[].targetStateenum | nullYesOne of: "achieved", "fallback", "partial", "missed", "not_applicable", "unknown".
conversations[].targetTypeenum | nullYesOne 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

bash
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

NameTypeRequiredDescription
fromstringNoPattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
tostringNoPattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
channelenumNoOne of: "phone", "site_chat", "page_chat", "web_voice".
sourceenumNoOne of: "number", "widget", "page".
callerenumNoOne of: "prospect", "other".
levelenumYesOne of: "group", "playbook", "version", "effective".

Response 200

FieldTypeRequiredDescription
entitiesarray<object>Yes—
entities[].conversationsintegerYes—
entities[].idstringYes—
entities[].labelstringYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
levelenumNoOne of: "account", "group", "playbook", "version", "effective". Default: "account".
idstringNoUp to 64 characters.
fromstringNoPattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
tostringNoPattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
channelenumNoOne of: "phone", "site_chat", "page_chat", "web_voice".
sourceenumNoOne of: "number", "widget", "page".
callerenumNoOne of: "prospect", "other".
typeenumNoOne of: "stages", "questions", "objective", "objection", "site_chat", "journey". Default: "stages".
modeenumNoOne of: "step", "first". Default: "step".
compareIdstringNoUp to 64 characters.

Response 200

FieldTypeRequiredDescription
compareobject | nullYes—
compare.linksarray<object>Yes—
compare.links[].foldednumberYes—
compare.links[].sharenumberYes—
compare.links[].sourcestringYes—
compare.links[].targetstringYes—
compare.links[].valuenumberYes—
compare.nodesarray<object>Yes—
compare.nodes[].countnumberYes—
compare.nodes[].depthnumberYes—
compare.nodes[].idstringYes—
compare.nodes[].kindenumYesOne of: "normal", "other", "unknown".
compare.nodes[].nodestringYes—
compare.totalnumberYes—
differencesarray<object>Yes—
differences[].sourcestringYes—
differences[].targetstringYes—
differences[].verdictenumYesOne of: "better", "worse", "no_clear_difference", "not_enough".
modeenumYesOne of: "step", "first".
sankeyobjectYes—
sankey.linksarray<object>Yes—
sankey.links[].foldednumberYes—
sankey.links[].sharenumberYes—
sankey.links[].sourcestringYes—
sankey.links[].targetstringYes—
sankey.links[].valuenumberYes—
sankey.nodesarray<object>Yes—
sankey.nodes[].countnumberYes—
sankey.nodes[].depthnumberYes—
sankey.nodes[].idstringYes—
sankey.nodes[].kindenumYesOne of: "normal", "other", "unknown".
sankey.nodes[].nodestringYes—
sankey.totalnumberYes—
typeenumYesOne of: "stages", "questions", "objective", "objection", "site_chat", "journey".

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
levelenumNoOne of: "account", "group", "playbook", "version", "effective". Default: "account".
idstringNoUp to 64 characters.
fromstringNoPattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
tostringNoPattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
channelenumNoOne of: "phone", "site_chat", "page_chat", "web_voice".
sourceenumNoOne of: "number", "widget", "page".
callerenumNoOne of: "prospect", "other".

Response 200

FieldTypeRequiredDescription
analysedintegerYes—
gapsarray<KnowledgeGapSummary>Yes—
gaps[].communitiesnumberYes—
gaps[].firstSeenAtstring (date-time)Yes—
gaps[].fixedAtstring (date-time) | nullYes—
gaps[].idstring (kgap_… ID)YesID (kgap_…)
gaps[].labelstring | nullYes—
gaps[].lastSeenAtstring (date-time)Yes—
gaps[].occurrencesnumberYes—
gaps[].questionstring | nullYes—
gaps[].sinceFixnumberYes—
gaps[].statusenumYesOne of: "open", "fixed", "dismissed".
minSampleintegerYes—
rateobjectYes—
rate.intervalobject | nullYes—
rate.interval.hinumberYes—
rate.interval.lonumberYes—
rate.knumberYes—
rate.labelstringYes—
rate.metricstringYes—
rate.nnumberYes—
rate.notEnoughbooleanYes—
rate.valuenumber | nullYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
levelenumNoOne of: "account", "group", "playbook", "version", "effective". Default: "account".
idstringNoUp to 64 characters.
fromstringNoPattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
tostringNoPattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
channelenumNoOne of: "phone", "site_chat", "page_chat", "web_voice".
sourceenumNoOne of: "number", "widget", "page".
callerenumNoOne of: "prospect", "other".

Response 200

FieldTypeRequiredDescription
calibrationobjectYes—
calibration.comparedenum | nullYesOne of: "hot", "warm_and_hot".
calibration.minSampleintegerYes—
calibration.noTierintegerYes—
calibration.pnumber | nullYes—
calibration.tiersarray<object>Yes—
calibration.tiers[].attendedintegerYes—
calibration.tiers[].bookingsintegerYes—
calibration.tiers[].intervalobject | nullYes—
calibration.tiers[].interval.hinumberYes—
calibration.tiers[].interval.lonumberYes—
calibration.tiers[].noShowintegerYes—
calibration.tiers[].ratenumber | nullYes—
calibration.tiers[].tierenumYesOne of: "cold", "warm", "hot", "not_a_fit".
calibration.tiers[].unknownintegerYes—
calibration.verdictenumYesOne of: "separates", "does_not_separate", "not_enough".
familyobjectYes—
family.familyOpenedintegerYes—
family.pagesSharedintegerYes—
family.reachnumber | nullYes—
funnelarray<object>Yes—
funnel[].groupenumYesOne of: "all", "tier", "cohort".
funnel[].heldobjectYes—
funnel[].held.attendedintegerYes—
funnel[].held.cancelledintegerYes—
funnel[].held.noShowintegerYes—
funnel[].held.unknownintegerYes—
funnel[].keystringYes—
funnel[].leadsintegerYes—
funnel[].pageOpenedintegerYes—
funnel[].targetAchievedintegerYes—
interestsarray<object>Yes—
interests[].keystringYes—
interests[].labelstringYes—
interests[].leadsintegerYes—
leadsintegerYes—
scopeobjectYes—
scope.channelenum | nullYesOne of: "phone", "site_chat", "page_chat", "web_voice".
scope.fromstringYes—
scope.idstring | nullYes—
scope.levelenumYesOne of: "account", "group", "playbook", "version", "effective".
scope.tostringYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
fromstringNoPattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
tostringNoPattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
channelenumNoOne of: "phone", "site_chat", "page_chat", "web_voice".
sourceenumNoOne of: "number", "widget", "page".
callerenumNoOne of: "prospect", "other".
levelenumNoOne of: "group", "playbook", "version", "effective". Default: "group".
metricenumNoOne 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".
objectiveenumNoOne 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

FieldTypeRequiredDescription
fromstringYes—
levelenumYesOne of: "account", "group", "playbook", "version", "effective".
metricenumYesOne 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".
minSampleintegerYes—
parentInsightsMetricYes—
parent.higherIsBetterbooleanYes—
parent.intervalobject | nullYes—
parent.interval.hinumberYes—
parent.interval.lonumberYes—
parent.knumberYes—
parent.labelstringYes—
parent.metricenumYesOne 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.nnumberYes—
parent.notEnoughbooleanYes—
parent.unitenumYesOne of: "rate", "mean", "seconds".
parent.unknownnumberYes—
parent.valuenumber | nullYes—
rowsarray<object>Yes—
rows[].entitystringYes—
rows[].higherIsBetterbooleanYes—
rows[].idstringYes—
rows[].intervalobject | nullYes—
rows[].interval.hinumberYes—
rows[].interval.lonumberYes—
rows[].knumberYes—
rows[].labelstringYes—
rows[].metricenumYesOne 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[].nnumberYes—
rows[].notEnoughbooleanYes—
rows[].unitenumYesOne of: "rate", "mean", "seconds".
rows[].unknownnumberYes—
rows[].valuenumber | nullYes—
rows[].verdictenumYesOne of: "better", "worse", "no_clear_difference", "not_enough".
rows[].visiblebooleanYes—
tostringYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
fromstringNoPattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
tostringNoPattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
channelenumNoOne of: "phone", "site_chat", "page_chat", "web_voice".
sourceenumNoOne of: "number", "widget", "page".
callerenumNoOne of: "prospect", "other".
metricenumNoOne 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

FieldTypeRequiredDescription
cellsarray<object>Yes—
cells[].colstringYes—
cells[].nnumberYes—
cells[].notEnoughbooleanYes—
cells[].rowstringYes—
cells[].valuenumber | nullYes—
colsarray<object>Yes—
cols[].idstringYes—
cols[].labelstringYes—
metricenumYesOne 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".
minSampleintegerYes—
rowsarray<object>Yes—
rows[].idstringYes—
rows[].labelstringYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
levelenumNoOne of: "account", "group", "playbook", "version", "effective". Default: "account".
idstringNoUp to 64 characters.
fromstringNoPattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
tostringNoPattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
channelenumNoOne of: "phone", "site_chat", "page_chat", "web_voice".
sourceenumNoOne of: "number", "widget", "page".
callerenumNoOne of: "prospect", "other".

Response 200

FieldTypeRequiredDescription
analysedintegerYes—
minSampleintegerYes—
objectionsarray<object>Yes—
objections[].changeobject | nullYes—
objections[].change.previousConversationsnumberYes—
objections[].change.previousSharenumber | nullYes—
objections[].change.verdictenumYesOne of: "better", "worse", "no_clear_difference", "not_enough".
objections[].communitybooleanYes—
objections[].conversationsnumberYes—
objections[].examplesarray<object>Yes—
objections[].examples[].callIdstring (call_… ID)YesID (call_…)
objections[].examples[].startedAtstring (date-time)Yes—
objections[].keystringYes—
objections[].labelstringYes—
objections[].metricsmapYes—
objections[].metrics.{key}InsightsLabelMetricNoAny key.
objections[].metrics.{key}.intervalobject | nullYes—
objections[].metrics.{key}.knumberYes—
objections[].metrics.{key}.labelstringYes—
objections[].metrics.{key}.metricenumYesOne of: "topic_share", "attainment_with_label", "sentiment_end", "knowledge_gap_rate", "objection_addressed", "objection_resolved", "objection_recovery".
objections[].metrics.{key}.nnumberYes—
objections[].metrics.{key}.notEnoughbooleanYes—
objections[].metrics.{key}.valuenumber | nullYes—
objections[].sensitivebooleanYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
levelenumNoOne of: "account", "group", "playbook", "version", "effective". Default: "account".
idstringNoUp to 64 characters.
fromstringNoPattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
tostringNoPattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
channelenumNoOne of: "phone", "site_chat", "page_chat", "web_voice".
sourceenumNoOne of: "number", "widget", "page".
callerenumNoOne of: "prospect", "other".

Response 200

FieldTypeRequiredDescription
minSampleintegerYes—
objectivesarray<object>Yes—
objectives[].achievednumberYes—
objectives[].attainmentInsightsMetricYes—
objectives[].attainment.higherIsBetterbooleanYes—
objectives[].attainment.intervalobject | nullYes—
objectives[].attainment.interval.hinumberYes—
objectives[].attainment.interval.lonumberYes—
objectives[].attainment.knumberYes—
objectives[].attainment.labelstringYes—
objectives[].attainment.metricenumYesOne 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.nnumberYes—
objectives[].attainment.notEnoughbooleanYes—
objectives[].attainment.unitenumYesOne of: "rate", "mean", "seconds".
objectives[].attainment.unknownnumberYes—
objectives[].attainment.valuenumber | nullYes—
objectives[].attemptednumberYes—
objectives[].eligiblenumberYes—
objectives[].fallbacknumberYes—
objectives[].heldnumberYes—
objectives[].heldUnknownnumberYes—
objectives[].lostnumberYes—
objectives[].missByOwnerobjectYes—
objectives[].missByOwner.agentnumberYes—
objectives[].missByOwner.callernumberYes—
objectives[].missByOwner.contentnumberYes—
objectives[].missByOwner.operationsnumberYes—
objectives[].missByOwner.systemnumberYes—
objectives[].missednumberYes—
objectives[].notApplicablenumberYes—
objectives[].objectiveTypeenumYesOne 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[].opportunitynumberYes—
objectives[].partialnumberYes—
objectives[].roleenumYesOne of: "target", "primary", "secondary".
objectives[].timeToAttemptInsightsMetricYes—
objectives[].timeToAttempt.higherIsBetterbooleanYes—
objectives[].timeToAttempt.intervalobject | nullYes—
objectives[].timeToAttempt.interval.hinumberYes—
objectives[].timeToAttempt.interval.lonumberYes—
objectives[].timeToAttempt.knumberYes—
objectives[].timeToAttempt.labelstringYes—
objectives[].timeToAttempt.metricenumYesOne 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.nnumberYes—
objectives[].timeToAttempt.notEnoughbooleanYes—
objectives[].timeToAttempt.unitenumYesOne of: "rate", "mean", "seconds".
objectives[].timeToAttempt.unknownnumberYes—
objectives[].timeToAttempt.valuenumber | nullYes—
objectives[].unknownnumberYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
levelenumNoOne of: "account", "group", "playbook", "version", "effective". Default: "account".
idstringNoUp to 64 characters.
fromstringNoPattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
tostringNoPattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
channelenumNoOne of: "phone", "site_chat", "page_chat", "web_voice".
sourceenumNoOne of: "number", "widget", "page".
callerenumNoOne of: "prospect", "other".

Response 200

FieldTypeRequiredDescription
channelsarray<object>Yes—
channels[].conversationsintegerYes—
channels[].kindenumYesOne of: "phone", "site_chat", "page_chat", "web_voice".
compliancearray<object>Yes—
compliance[].countintegerYes—
compliance[].rulestringYes—
conversationsintegerYes—
craftInsightsCraftYes—
craft.checksarray<object>Yes—
craft.checks[].checkstringYes—
craft.checks[].failintegerYes—
craft.checks[].labelstringYes—
craft.checks[].notApplicableintegerYes—
craft.checks[].passintegerYes—
craft.checks[].ratenumber | nullYes—
craft.compliancearray<object>Yes—
craft.compliance[].checkstringYes—
craft.compliance[].countintegerYes—
craft.compliance[].labelstringYes—
craft.scoreobjectYes—
craft.score.conversationsintegerYes—
craft.score.intervalobject | nullYes—
craft.score.interval.hinumberYes—
craft.score.interval.lonumberYes—
craft.score.kintegerYes—
craft.score.nintegerYes—
craft.score.notEnoughbooleanYes—
craft.score.valuenumber | nullYes—
metricsarray<object>Yes—
metrics[].higherIsBetterbooleanYes—
metrics[].intervalobject | nullYes—
metrics[].interval.hinumberYes—
metrics[].interval.lonumberYes—
metrics[].knumberYes—
metrics[].labelstringYes—
metrics[].metricenumYesOne 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[].nnumberYes—
metrics[].notEnoughbooleanYes—
metrics[].parentNnumberYes—
metrics[].parentValuenumber | nullYes—
metrics[].unitenumYesOne of: "rate", "mean", "seconds".
metrics[].unknownnumberYes—
metrics[].valuenumber | nullYes—
metrics[].verdictenumYesOne of: "better", "worse", "no_clear_difference", "not_enough".
minSampleintegerYes—
parentobject | nullYes—
parent.idstring | nullYes—
parent.labelstringYes—
parent.levelenumYesOne of: "account", "group", "playbook", "version", "effective".
scopeobjectYes—
scope.channelenum | nullYesOne of: "phone", "site_chat", "page_chat", "web_voice".
scope.fromstringYes—
scope.idstring | nullYes—
scope.labelstringYes—
scope.levelenumYesOne of: "account", "group", "playbook", "version", "effective".
scope.tostringYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

FieldTypeRequiredDescription
actionRulesActionRuleSettingsYes—
actionRules.crmTaskarray<enum>YesItems: "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.disabledarray<enum>YesItems: "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.groupsmapYes—
actionRules.groups.{key}array<enum>NoAny 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".
analysesTodayintegerYes—
askDailyBudgetintegerYes—
conversationIntelligencebooleanYes—
dailyAnalysisBudgetintegerYes—
defaultsmapYes—
defaults.{key}numberNoAny key.
effectiveValuesmapYes—
effectiveValues.{key}numberNoAny key.
minSampleintegerYes—
namedPeersbooleanYes—
objectiveValuesmapYes—
objectiveValues.{key}integerNoAny key. Between 0 and 100.
reportingTimeZonestring | nullYes—
taxonomyPackenumYesOne of: "senior_living", "general".
valueChangesarray<object>Yes—
valueChanges[].atstringYes—
valueChanges[].bystringYes—
weekStartenumYesOne of: "monday", "sunday".

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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.

FieldTypeRequiredDescription
actionRulesobjectNo—
actionRules.crmTaskarray<enum>YesItems: "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.disabledarray<enum>YesItems: "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.groupsmapYes—
actionRules.groups.{key}array<enum>NoAny 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".
askDailyBudgetintegerNoBetween 0 and 100000.
dailyAnalysisBudgetintegerNoBetween 0 and 100000.
minSampleintegerNoBetween 30 and 10000.
namedPeersbooleanNo—
objectiveValuesmapNo—
objectiveValues.{key}integerNoAny key. Between 0 and 100.
reportingTimeZonestring | nullNo1–64 characters.
taxonomyPackenumNoOne of: "senior_living", "general".
weekStartenumNoOne of: "monday", "sunday".

Response 200

FieldTypeRequiredDescription
actionRulesActionRuleSettingsYes—
actionRules.crmTaskarray<enum>YesItems: "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.disabledarray<enum>YesItems: "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.groupsmapYes—
actionRules.groups.{key}array<enum>NoAny 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".
analysesTodayintegerYes—
askDailyBudgetintegerYes—
conversationIntelligencebooleanYes—
dailyAnalysisBudgetintegerYes—
defaultsmapYes—
defaults.{key}numberNoAny key.
effectiveValuesmapYes—
effectiveValues.{key}numberNoAny key.
minSampleintegerYes—
namedPeersbooleanYes—
objectiveValuesmapYes—
objectiveValues.{key}integerNoAny key. Between 0 and 100.
reportingTimeZonestring | nullYes—
taxonomyPackenumYesOne of: "senior_living", "general".
valueChangesarray<object>Yes—
valueChanges[].atstringYes—
valueChanges[].bystringYes—
weekStartenumYesOne of: "monday", "sunday".

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

FieldTypeRequiredDescription
canEditbooleanYes—
communitiesarray<object>Yes—
communities[].draftobject | nullYes—
communities[].draft.problemsarray<object>Yes—
communities[].draft.problems[].messagestringYes—
communities[].draft.problems[].pathstringYes—
communities[].draft.topicsarray<object>Yes—
communities[].draft.topics[].activebooleanYesDefault: true.
communities[].draft.topics[].descriptionstringYesUp to 300 characters. Default: "".
communities[].draft.topics[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
communities[].draft.topics[].keywordsarray<string>YesUp to 40 items. Default: [].
communities[].draft.topics[].labelstringYes1–80 characters.
communities[].draft.topics[].sensitivebooleanYesDefault: false.
communities[].draft.updatedAtstring (date-time)Yes—
communities[].groupIdstring (grp_… ID)YesID (grp_…)
communities[].groupNamestringYes—
communities[].publishedobject | nullYes—
communities[].published.namestringYes—
communities[].published.topicsarray<object>Yes—
communities[].published.topics[].activebooleanYesDefault: true.
communities[].published.topics[].descriptionstringYesUp to 300 characters. Default: "".
communities[].published.topics[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
communities[].published.topics[].keywordsarray<string>YesUp to 40 items. Default: [].
communities[].published.topics[].labelstringYes1–80 characters.
communities[].published.topics[].sensitivebooleanYesDefault: false.
communities[].published.versionintegerYes—
currentobjectYes—
current.listsInsightsTaxonomyListsYes—
current.lists.competitorsarray<object>YesUp to 50 items.
current.lists.competitors[].activebooleanYesDefault: true.
current.lists.competitors[].descriptionstringYesUp to 300 characters. Default: "".
current.lists.competitors[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
current.lists.competitors[].keywordsarray<string>YesUp to 40 items. Default: [].
current.lists.competitors[].labelstringYes1–80 characters.
current.lists.competitors[].sensitivebooleanYesDefault: false.
current.lists.intentsarray<object>YesUp to 20 items.
current.lists.intents[].activebooleanYesDefault: true.
current.lists.intents[].descriptionstringYesUp to 300 characters. Default: "".
current.lists.intents[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
current.lists.intents[].keywordsarray<string>YesUp to 40 items. Default: [].
current.lists.intents[].labelstringYes1–80 characters.
current.lists.intents[].sensitivebooleanYesDefault: false.
current.lists.objectionsarray<object>YesUp to 30 items.
current.lists.objections[].activebooleanYesDefault: true.
current.lists.objections[].descriptionstringYesUp to 300 characters. Default: "".
current.lists.objections[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
current.lists.objections[].keywordsarray<string>YesUp to 40 items. Default: [].
current.lists.objections[].labelstringYes1–80 characters.
current.lists.objections[].sensitivebooleanYesDefault: false.
current.lists.topicsarray<object>YesUp to 60 items.
current.lists.topics[].activebooleanYesDefault: true.
current.lists.topics[].descriptionstringYesUp to 300 characters. Default: "".
current.lists.topics[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
current.lists.topics[].keywordsarray<string>YesUp to 40 items. Default: [].
current.lists.topics[].labelstringYes1–80 characters.
current.lists.topics[].sensitivebooleanYesDefault: false.
current.namestringYes—
current.versionintegerYes—
draftobject | nullYes—
draft.idstring (itx_… ID)YesID (itx_…)
draft.listsInsightsTaxonomyListsYes—
draft.lists.competitorsarray<object>YesUp to 50 items.
draft.lists.competitors[].activebooleanYesDefault: true.
draft.lists.competitors[].descriptionstringYesUp to 300 characters. Default: "".
draft.lists.competitors[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
draft.lists.competitors[].keywordsarray<string>YesUp to 40 items. Default: [].
draft.lists.competitors[].labelstringYes1–80 characters.
draft.lists.competitors[].sensitivebooleanYesDefault: false.
draft.lists.intentsarray<object>YesUp to 20 items.
draft.lists.intents[].activebooleanYesDefault: true.
draft.lists.intents[].descriptionstringYesUp to 300 characters. Default: "".
draft.lists.intents[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
draft.lists.intents[].keywordsarray<string>YesUp to 40 items. Default: [].
draft.lists.intents[].labelstringYes1–80 characters.
draft.lists.intents[].sensitivebooleanYesDefault: false.
draft.lists.objectionsarray<object>YesUp to 30 items.
draft.lists.objections[].activebooleanYesDefault: true.
draft.lists.objections[].descriptionstringYesUp to 300 characters. Default: "".
draft.lists.objections[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
draft.lists.objections[].keywordsarray<string>YesUp to 40 items. Default: [].
draft.lists.objections[].labelstringYes1–80 characters.
draft.lists.objections[].sensitivebooleanYesDefault: false.
draft.lists.topicsarray<object>YesUp to 60 items.
draft.lists.topics[].activebooleanYesDefault: true.
draft.lists.topics[].descriptionstringYesUp to 300 characters. Default: "".
draft.lists.topics[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
draft.lists.topics[].keywordsarray<string>YesUp to 40 items. Default: [].
draft.lists.topics[].labelstringYes1–80 characters.
draft.lists.topics[].sensitivebooleanYesDefault: false.
draft.packenumYesOne of: "senior_living", "general".
draft.problemsarray<object>Yes—
draft.problems[].messagestringYes—
draft.problems[].pathstringYes—
draft.updatedAtstring (date-time)Yes—
packenumYesOne of: "senior_living", "general".
versionsarray<object>Yes—
versions[].idstring (itx_… ID)YesID (itx_…)
versions[].namestringYes—
versions[].publishedAtstring (date-time) | nullYes—
versions[].statusenumYesOne of: "draft", "published", "retired".
versions[].versionintegerYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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.

FieldTypeRequiredDescription
listsInsightsTaxonomyListsInputNo—
lists.competitorsarray<object>YesUp to 50 items.
lists.competitors[].activebooleanNoDefault: true.
lists.competitors[].descriptionstringNoUp to 300 characters. Default: "".
lists.competitors[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
lists.competitors[].keywordsarray<string>NoUp to 40 items. Default: [].
lists.competitors[].labelstringYes1–80 characters.
lists.competitors[].sensitivebooleanNoDefault: false.
lists.intentsarray<object>YesUp to 20 items.
lists.intents[].activebooleanNoDefault: true.
lists.intents[].descriptionstringNoUp to 300 characters. Default: "".
lists.intents[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
lists.intents[].keywordsarray<string>NoUp to 40 items. Default: [].
lists.intents[].labelstringYes1–80 characters.
lists.intents[].sensitivebooleanNoDefault: false.
lists.objectionsarray<object>YesUp to 30 items.
lists.objections[].activebooleanNoDefault: true.
lists.objections[].descriptionstringNoUp to 300 characters. Default: "".
lists.objections[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
lists.objections[].keywordsarray<string>NoUp to 40 items. Default: [].
lists.objections[].labelstringYes1–80 characters.
lists.objections[].sensitivebooleanNoDefault: false.
lists.topicsarray<object>YesUp to 60 items.
lists.topics[].activebooleanNoDefault: true.
lists.topics[].descriptionstringNoUp to 300 characters. Default: "".
lists.topics[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
lists.topics[].keywordsarray<string>NoUp to 40 items. Default: [].
lists.topics[].labelstringYes1–80 characters.
lists.topics[].sensitivebooleanNoDefault: false.
startFromenumNoOne of: "senior_living", "general".

Response 200

FieldTypeRequiredDescription
canEditbooleanYes—
communitiesarray<object>Yes—
communities[].draftobject | nullYes—
communities[].draft.problemsarray<object>Yes—
communities[].draft.problems[].messagestringYes—
communities[].draft.problems[].pathstringYes—
communities[].draft.topicsarray<object>Yes—
communities[].draft.topics[].activebooleanYesDefault: true.
communities[].draft.topics[].descriptionstringYesUp to 300 characters. Default: "".
communities[].draft.topics[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
communities[].draft.topics[].keywordsarray<string>YesUp to 40 items. Default: [].
communities[].draft.topics[].labelstringYes1–80 characters.
communities[].draft.topics[].sensitivebooleanYesDefault: false.
communities[].draft.updatedAtstring (date-time)Yes—
communities[].groupIdstring (grp_… ID)YesID (grp_…)
communities[].groupNamestringYes—
communities[].publishedobject | nullYes—
communities[].published.namestringYes—
communities[].published.topicsarray<object>Yes—
communities[].published.topics[].activebooleanYesDefault: true.
communities[].published.topics[].descriptionstringYesUp to 300 characters. Default: "".
communities[].published.topics[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
communities[].published.topics[].keywordsarray<string>YesUp to 40 items. Default: [].
communities[].published.topics[].labelstringYes1–80 characters.
communities[].published.topics[].sensitivebooleanYesDefault: false.
communities[].published.versionintegerYes—
currentobjectYes—
current.listsInsightsTaxonomyListsYes—
current.lists.competitorsarray<object>YesUp to 50 items.
current.lists.competitors[].activebooleanYesDefault: true.
current.lists.competitors[].descriptionstringYesUp to 300 characters. Default: "".
current.lists.competitors[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
current.lists.competitors[].keywordsarray<string>YesUp to 40 items. Default: [].
current.lists.competitors[].labelstringYes1–80 characters.
current.lists.competitors[].sensitivebooleanYesDefault: false.
current.lists.intentsarray<object>YesUp to 20 items.
current.lists.intents[].activebooleanYesDefault: true.
current.lists.intents[].descriptionstringYesUp to 300 characters. Default: "".
current.lists.intents[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
current.lists.intents[].keywordsarray<string>YesUp to 40 items. Default: [].
current.lists.intents[].labelstringYes1–80 characters.
current.lists.intents[].sensitivebooleanYesDefault: false.
current.lists.objectionsarray<object>YesUp to 30 items.
current.lists.objections[].activebooleanYesDefault: true.
current.lists.objections[].descriptionstringYesUp to 300 characters. Default: "".
current.lists.objections[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
current.lists.objections[].keywordsarray<string>YesUp to 40 items. Default: [].
current.lists.objections[].labelstringYes1–80 characters.
current.lists.objections[].sensitivebooleanYesDefault: false.
current.lists.topicsarray<object>YesUp to 60 items.
current.lists.topics[].activebooleanYesDefault: true.
current.lists.topics[].descriptionstringYesUp to 300 characters. Default: "".
current.lists.topics[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
current.lists.topics[].keywordsarray<string>YesUp to 40 items. Default: [].
current.lists.topics[].labelstringYes1–80 characters.
current.lists.topics[].sensitivebooleanYesDefault: false.
current.namestringYes—
current.versionintegerYes—
draftobject | nullYes—
draft.idstring (itx_… ID)YesID (itx_…)
draft.listsInsightsTaxonomyListsYes—
draft.lists.competitorsarray<object>YesUp to 50 items.
draft.lists.competitors[].activebooleanYesDefault: true.
draft.lists.competitors[].descriptionstringYesUp to 300 characters. Default: "".
draft.lists.competitors[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
draft.lists.competitors[].keywordsarray<string>YesUp to 40 items. Default: [].
draft.lists.competitors[].labelstringYes1–80 characters.
draft.lists.competitors[].sensitivebooleanYesDefault: false.
draft.lists.intentsarray<object>YesUp to 20 items.
draft.lists.intents[].activebooleanYesDefault: true.
draft.lists.intents[].descriptionstringYesUp to 300 characters. Default: "".
draft.lists.intents[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
draft.lists.intents[].keywordsarray<string>YesUp to 40 items. Default: [].
draft.lists.intents[].labelstringYes1–80 characters.
draft.lists.intents[].sensitivebooleanYesDefault: false.
draft.lists.objectionsarray<object>YesUp to 30 items.
draft.lists.objections[].activebooleanYesDefault: true.
draft.lists.objections[].descriptionstringYesUp to 300 characters. Default: "".
draft.lists.objections[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
draft.lists.objections[].keywordsarray<string>YesUp to 40 items. Default: [].
draft.lists.objections[].labelstringYes1–80 characters.
draft.lists.objections[].sensitivebooleanYesDefault: false.
draft.lists.topicsarray<object>YesUp to 60 items.
draft.lists.topics[].activebooleanYesDefault: true.
draft.lists.topics[].descriptionstringYesUp to 300 characters. Default: "".
draft.lists.topics[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
draft.lists.topics[].keywordsarray<string>YesUp to 40 items. Default: [].
draft.lists.topics[].labelstringYes1–80 characters.
draft.lists.topics[].sensitivebooleanYesDefault: false.
draft.packenumYesOne of: "senior_living", "general".
draft.problemsarray<object>Yes—
draft.problems[].messagestringYes—
draft.problems[].pathstringYes—
draft.updatedAtstring (date-time)Yes—
packenumYesOne of: "senior_living", "general".
versionsarray<object>Yes—
versions[].idstring (itx_… ID)YesID (itx_…)
versions[].namestringYes—
versions[].publishedAtstring (date-time) | nullYes—
versions[].statusenumYesOne of: "draft", "published", "retired".
versions[].versionintegerYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
groupIdstring (grp_… ID)YesID (grp_…)

Request body

application/json, required.

FieldTypeRequiredDescription
topicsarray<object>YesUp to 20 items.
topics[].activebooleanNoDefault: true.
topics[].descriptionstringNoUp to 300 characters. Default: "".
topics[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
topics[].keywordsarray<string>NoUp to 40 items. Default: [].
topics[].labelstringYes1–80 characters.
topics[].sensitivebooleanNoDefault: false.

Response 200

FieldTypeRequiredDescription
canEditbooleanYes—
communitiesarray<object>Yes—
communities[].draftobject | nullYes—
communities[].draft.problemsarray<object>Yes—
communities[].draft.problems[].messagestringYes—
communities[].draft.problems[].pathstringYes—
communities[].draft.topicsarray<object>Yes—
communities[].draft.topics[].activebooleanYesDefault: true.
communities[].draft.topics[].descriptionstringYesUp to 300 characters. Default: "".
communities[].draft.topics[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
communities[].draft.topics[].keywordsarray<string>YesUp to 40 items. Default: [].
communities[].draft.topics[].labelstringYes1–80 characters.
communities[].draft.topics[].sensitivebooleanYesDefault: false.
communities[].draft.updatedAtstring (date-time)Yes—
communities[].groupIdstring (grp_… ID)YesID (grp_…)
communities[].groupNamestringYes—
communities[].publishedobject | nullYes—
communities[].published.namestringYes—
communities[].published.topicsarray<object>Yes—
communities[].published.topics[].activebooleanYesDefault: true.
communities[].published.topics[].descriptionstringYesUp to 300 characters. Default: "".
communities[].published.topics[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
communities[].published.topics[].keywordsarray<string>YesUp to 40 items. Default: [].
communities[].published.topics[].labelstringYes1–80 characters.
communities[].published.topics[].sensitivebooleanYesDefault: false.
communities[].published.versionintegerYes—
currentobjectYes—
current.listsInsightsTaxonomyListsYes—
current.lists.competitorsarray<object>YesUp to 50 items.
current.lists.competitors[].activebooleanYesDefault: true.
current.lists.competitors[].descriptionstringYesUp to 300 characters. Default: "".
current.lists.competitors[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
current.lists.competitors[].keywordsarray<string>YesUp to 40 items. Default: [].
current.lists.competitors[].labelstringYes1–80 characters.
current.lists.competitors[].sensitivebooleanYesDefault: false.
current.lists.intentsarray<object>YesUp to 20 items.
current.lists.intents[].activebooleanYesDefault: true.
current.lists.intents[].descriptionstringYesUp to 300 characters. Default: "".
current.lists.intents[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
current.lists.intents[].keywordsarray<string>YesUp to 40 items. Default: [].
current.lists.intents[].labelstringYes1–80 characters.
current.lists.intents[].sensitivebooleanYesDefault: false.
current.lists.objectionsarray<object>YesUp to 30 items.
current.lists.objections[].activebooleanYesDefault: true.
current.lists.objections[].descriptionstringYesUp to 300 characters. Default: "".
current.lists.objections[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
current.lists.objections[].keywordsarray<string>YesUp to 40 items. Default: [].
current.lists.objections[].labelstringYes1–80 characters.
current.lists.objections[].sensitivebooleanYesDefault: false.
current.lists.topicsarray<object>YesUp to 60 items.
current.lists.topics[].activebooleanYesDefault: true.
current.lists.topics[].descriptionstringYesUp to 300 characters. Default: "".
current.lists.topics[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
current.lists.topics[].keywordsarray<string>YesUp to 40 items. Default: [].
current.lists.topics[].labelstringYes1–80 characters.
current.lists.topics[].sensitivebooleanYesDefault: false.
current.namestringYes—
current.versionintegerYes—
draftobject | nullYes—
draft.idstring (itx_… ID)YesID (itx_…)
draft.listsInsightsTaxonomyListsYes—
draft.lists.competitorsarray<object>YesUp to 50 items.
draft.lists.competitors[].activebooleanYesDefault: true.
draft.lists.competitors[].descriptionstringYesUp to 300 characters. Default: "".
draft.lists.competitors[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
draft.lists.competitors[].keywordsarray<string>YesUp to 40 items. Default: [].
draft.lists.competitors[].labelstringYes1–80 characters.
draft.lists.competitors[].sensitivebooleanYesDefault: false.
draft.lists.intentsarray<object>YesUp to 20 items.
draft.lists.intents[].activebooleanYesDefault: true.
draft.lists.intents[].descriptionstringYesUp to 300 characters. Default: "".
draft.lists.intents[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
draft.lists.intents[].keywordsarray<string>YesUp to 40 items. Default: [].
draft.lists.intents[].labelstringYes1–80 characters.
draft.lists.intents[].sensitivebooleanYesDefault: false.
draft.lists.objectionsarray<object>YesUp to 30 items.
draft.lists.objections[].activebooleanYesDefault: true.
draft.lists.objections[].descriptionstringYesUp to 300 characters. Default: "".
draft.lists.objections[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
draft.lists.objections[].keywordsarray<string>YesUp to 40 items. Default: [].
draft.lists.objections[].labelstringYes1–80 characters.
draft.lists.objections[].sensitivebooleanYesDefault: false.
draft.lists.topicsarray<object>YesUp to 60 items.
draft.lists.topics[].activebooleanYesDefault: true.
draft.lists.topics[].descriptionstringYesUp to 300 characters. Default: "".
draft.lists.topics[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
draft.lists.topics[].keywordsarray<string>YesUp to 40 items. Default: [].
draft.lists.topics[].labelstringYes1–80 characters.
draft.lists.topics[].sensitivebooleanYesDefault: false.
draft.packenumYesOne of: "senior_living", "general".
draft.problemsarray<object>Yes—
draft.problems[].messagestringYes—
draft.problems[].pathstringYes—
draft.updatedAtstring (date-time)Yes—
packenumYesOne of: "senior_living", "general".
versionsarray<object>Yes—
versions[].idstring (itx_… ID)YesID (itx_…)
versions[].namestringYes—
versions[].publishedAtstring (date-time) | nullYes—
versions[].statusenumYesOne of: "draft", "published", "retired".
versions[].versionintegerYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
groupIdstring (grp_… ID)YesID (grp_…)

Request body

application/json, required.

FieldTypeRequiredDescription
keystringYes1–48 characters.

Response 200

FieldTypeRequiredDescription
canEditbooleanYes—
communitiesarray<object>Yes—
communities[].draftobject | nullYes—
communities[].draft.problemsarray<object>Yes—
communities[].draft.problems[].messagestringYes—
communities[].draft.problems[].pathstringYes—
communities[].draft.topicsarray<object>Yes—
communities[].draft.topics[].activebooleanYesDefault: true.
communities[].draft.topics[].descriptionstringYesUp to 300 characters. Default: "".
communities[].draft.topics[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
communities[].draft.topics[].keywordsarray<string>YesUp to 40 items. Default: [].
communities[].draft.topics[].labelstringYes1–80 characters.
communities[].draft.topics[].sensitivebooleanYesDefault: false.
communities[].draft.updatedAtstring (date-time)Yes—
communities[].groupIdstring (grp_… ID)YesID (grp_…)
communities[].groupNamestringYes—
communities[].publishedobject | nullYes—
communities[].published.namestringYes—
communities[].published.topicsarray<object>Yes—
communities[].published.topics[].activebooleanYesDefault: true.
communities[].published.topics[].descriptionstringYesUp to 300 characters. Default: "".
communities[].published.topics[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
communities[].published.topics[].keywordsarray<string>YesUp to 40 items. Default: [].
communities[].published.topics[].labelstringYes1–80 characters.
communities[].published.topics[].sensitivebooleanYesDefault: false.
communities[].published.versionintegerYes—
currentobjectYes—
current.listsInsightsTaxonomyListsYes—
current.lists.competitorsarray<object>YesUp to 50 items.
current.lists.competitors[].activebooleanYesDefault: true.
current.lists.competitors[].descriptionstringYesUp to 300 characters. Default: "".
current.lists.competitors[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
current.lists.competitors[].keywordsarray<string>YesUp to 40 items. Default: [].
current.lists.competitors[].labelstringYes1–80 characters.
current.lists.competitors[].sensitivebooleanYesDefault: false.
current.lists.intentsarray<object>YesUp to 20 items.
current.lists.intents[].activebooleanYesDefault: true.
current.lists.intents[].descriptionstringYesUp to 300 characters. Default: "".
current.lists.intents[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
current.lists.intents[].keywordsarray<string>YesUp to 40 items. Default: [].
current.lists.intents[].labelstringYes1–80 characters.
current.lists.intents[].sensitivebooleanYesDefault: false.
current.lists.objectionsarray<object>YesUp to 30 items.
current.lists.objections[].activebooleanYesDefault: true.
current.lists.objections[].descriptionstringYesUp to 300 characters. Default: "".
current.lists.objections[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
current.lists.objections[].keywordsarray<string>YesUp to 40 items. Default: [].
current.lists.objections[].labelstringYes1–80 characters.
current.lists.objections[].sensitivebooleanYesDefault: false.
current.lists.topicsarray<object>YesUp to 60 items.
current.lists.topics[].activebooleanYesDefault: true.
current.lists.topics[].descriptionstringYesUp to 300 characters. Default: "".
current.lists.topics[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
current.lists.topics[].keywordsarray<string>YesUp to 40 items. Default: [].
current.lists.topics[].labelstringYes1–80 characters.
current.lists.topics[].sensitivebooleanYesDefault: false.
current.namestringYes—
current.versionintegerYes—
draftobject | nullYes—
draft.idstring (itx_… ID)YesID (itx_…)
draft.listsInsightsTaxonomyListsYes—
draft.lists.competitorsarray<object>YesUp to 50 items.
draft.lists.competitors[].activebooleanYesDefault: true.
draft.lists.competitors[].descriptionstringYesUp to 300 characters. Default: "".
draft.lists.competitors[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
draft.lists.competitors[].keywordsarray<string>YesUp to 40 items. Default: [].
draft.lists.competitors[].labelstringYes1–80 characters.
draft.lists.competitors[].sensitivebooleanYesDefault: false.
draft.lists.intentsarray<object>YesUp to 20 items.
draft.lists.intents[].activebooleanYesDefault: true.
draft.lists.intents[].descriptionstringYesUp to 300 characters. Default: "".
draft.lists.intents[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
draft.lists.intents[].keywordsarray<string>YesUp to 40 items. Default: [].
draft.lists.intents[].labelstringYes1–80 characters.
draft.lists.intents[].sensitivebooleanYesDefault: false.
draft.lists.objectionsarray<object>YesUp to 30 items.
draft.lists.objections[].activebooleanYesDefault: true.
draft.lists.objections[].descriptionstringYesUp to 300 characters. Default: "".
draft.lists.objections[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
draft.lists.objections[].keywordsarray<string>YesUp to 40 items. Default: [].
draft.lists.objections[].labelstringYes1–80 characters.
draft.lists.objections[].sensitivebooleanYesDefault: false.
draft.lists.topicsarray<object>YesUp to 60 items.
draft.lists.topics[].activebooleanYesDefault: true.
draft.lists.topics[].descriptionstringYesUp to 300 characters. Default: "".
draft.lists.topics[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
draft.lists.topics[].keywordsarray<string>YesUp to 40 items. Default: [].
draft.lists.topics[].labelstringYes1–80 characters.
draft.lists.topics[].sensitivebooleanYesDefault: false.
draft.packenumYesOne of: "senior_living", "general".
draft.problemsarray<object>Yes—
draft.problems[].messagestringYes—
draft.problems[].pathstringYes—
draft.updatedAtstring (date-time)Yes—
packenumYesOne of: "senior_living", "general".
versionsarray<object>Yes—
versions[].idstring (itx_… ID)YesID (itx_…)
versions[].namestringYes—
versions[].publishedAtstring (date-time) | nullYes—
versions[].statusenumYesOne of: "draft", "published", "retired".
versions[].versionintegerYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
groupIdstring (grp_… ID)YesID (grp_…)

Response 200

FieldTypeRequiredDescription
canEditbooleanYes—
communitiesarray<object>Yes—
communities[].draftobject | nullYes—
communities[].draft.problemsarray<object>Yes—
communities[].draft.problems[].messagestringYes—
communities[].draft.problems[].pathstringYes—
communities[].draft.topicsarray<object>Yes—
communities[].draft.topics[].activebooleanYesDefault: true.
communities[].draft.topics[].descriptionstringYesUp to 300 characters. Default: "".
communities[].draft.topics[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
communities[].draft.topics[].keywordsarray<string>YesUp to 40 items. Default: [].
communities[].draft.topics[].labelstringYes1–80 characters.
communities[].draft.topics[].sensitivebooleanYesDefault: false.
communities[].draft.updatedAtstring (date-time)Yes—
communities[].groupIdstring (grp_… ID)YesID (grp_…)
communities[].groupNamestringYes—
communities[].publishedobject | nullYes—
communities[].published.namestringYes—
communities[].published.topicsarray<object>Yes—
communities[].published.topics[].activebooleanYesDefault: true.
communities[].published.topics[].descriptionstringYesUp to 300 characters. Default: "".
communities[].published.topics[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
communities[].published.topics[].keywordsarray<string>YesUp to 40 items. Default: [].
communities[].published.topics[].labelstringYes1–80 characters.
communities[].published.topics[].sensitivebooleanYesDefault: false.
communities[].published.versionintegerYes—
currentobjectYes—
current.listsInsightsTaxonomyListsYes—
current.lists.competitorsarray<object>YesUp to 50 items.
current.lists.competitors[].activebooleanYesDefault: true.
current.lists.competitors[].descriptionstringYesUp to 300 characters. Default: "".
current.lists.competitors[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
current.lists.competitors[].keywordsarray<string>YesUp to 40 items. Default: [].
current.lists.competitors[].labelstringYes1–80 characters.
current.lists.competitors[].sensitivebooleanYesDefault: false.
current.lists.intentsarray<object>YesUp to 20 items.
current.lists.intents[].activebooleanYesDefault: true.
current.lists.intents[].descriptionstringYesUp to 300 characters. Default: "".
current.lists.intents[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
current.lists.intents[].keywordsarray<string>YesUp to 40 items. Default: [].
current.lists.intents[].labelstringYes1–80 characters.
current.lists.intents[].sensitivebooleanYesDefault: false.
current.lists.objectionsarray<object>YesUp to 30 items.
current.lists.objections[].activebooleanYesDefault: true.
current.lists.objections[].descriptionstringYesUp to 300 characters. Default: "".
current.lists.objections[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
current.lists.objections[].keywordsarray<string>YesUp to 40 items. Default: [].
current.lists.objections[].labelstringYes1–80 characters.
current.lists.objections[].sensitivebooleanYesDefault: false.
current.lists.topicsarray<object>YesUp to 60 items.
current.lists.topics[].activebooleanYesDefault: true.
current.lists.topics[].descriptionstringYesUp to 300 characters. Default: "".
current.lists.topics[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
current.lists.topics[].keywordsarray<string>YesUp to 40 items. Default: [].
current.lists.topics[].labelstringYes1–80 characters.
current.lists.topics[].sensitivebooleanYesDefault: false.
current.namestringYes—
current.versionintegerYes—
draftobject | nullYes—
draft.idstring (itx_… ID)YesID (itx_…)
draft.listsInsightsTaxonomyListsYes—
draft.lists.competitorsarray<object>YesUp to 50 items.
draft.lists.competitors[].activebooleanYesDefault: true.
draft.lists.competitors[].descriptionstringYesUp to 300 characters. Default: "".
draft.lists.competitors[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
draft.lists.competitors[].keywordsarray<string>YesUp to 40 items. Default: [].
draft.lists.competitors[].labelstringYes1–80 characters.
draft.lists.competitors[].sensitivebooleanYesDefault: false.
draft.lists.intentsarray<object>YesUp to 20 items.
draft.lists.intents[].activebooleanYesDefault: true.
draft.lists.intents[].descriptionstringYesUp to 300 characters. Default: "".
draft.lists.intents[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
draft.lists.intents[].keywordsarray<string>YesUp to 40 items. Default: [].
draft.lists.intents[].labelstringYes1–80 characters.
draft.lists.intents[].sensitivebooleanYesDefault: false.
draft.lists.objectionsarray<object>YesUp to 30 items.
draft.lists.objections[].activebooleanYesDefault: true.
draft.lists.objections[].descriptionstringYesUp to 300 characters. Default: "".
draft.lists.objections[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
draft.lists.objections[].keywordsarray<string>YesUp to 40 items. Default: [].
draft.lists.objections[].labelstringYes1–80 characters.
draft.lists.objections[].sensitivebooleanYesDefault: false.
draft.lists.topicsarray<object>YesUp to 60 items.
draft.lists.topics[].activebooleanYesDefault: true.
draft.lists.topics[].descriptionstringYesUp to 300 characters. Default: "".
draft.lists.topics[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
draft.lists.topics[].keywordsarray<string>YesUp to 40 items. Default: [].
draft.lists.topics[].labelstringYes1–80 characters.
draft.lists.topics[].sensitivebooleanYesDefault: false.
draft.packenumYesOne of: "senior_living", "general".
draft.problemsarray<object>Yes—
draft.problems[].messagestringYes—
draft.problems[].pathstringYes—
draft.updatedAtstring (date-time)Yes—
packenumYesOne of: "senior_living", "general".
versionsarray<object>Yes—
versions[].idstring (itx_… ID)YesID (itx_…)
versions[].namestringYes—
versions[].publishedAtstring (date-time) | nullYes—
versions[].statusenumYesOne of: "draft", "published", "retired".
versions[].versionintegerYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
groupIdstring (grp_… ID)NoID (grp_…)

Response 200

FieldTypeRequiredDescription
canEditbooleanYes—
communitiesarray<object>Yes—
communities[].draftobject | nullYes—
communities[].draft.problemsarray<object>Yes—
communities[].draft.problems[].messagestringYes—
communities[].draft.problems[].pathstringYes—
communities[].draft.topicsarray<object>Yes—
communities[].draft.topics[].activebooleanYesDefault: true.
communities[].draft.topics[].descriptionstringYesUp to 300 characters. Default: "".
communities[].draft.topics[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
communities[].draft.topics[].keywordsarray<string>YesUp to 40 items. Default: [].
communities[].draft.topics[].labelstringYes1–80 characters.
communities[].draft.topics[].sensitivebooleanYesDefault: false.
communities[].draft.updatedAtstring (date-time)Yes—
communities[].groupIdstring (grp_… ID)YesID (grp_…)
communities[].groupNamestringYes—
communities[].publishedobject | nullYes—
communities[].published.namestringYes—
communities[].published.topicsarray<object>Yes—
communities[].published.topics[].activebooleanYesDefault: true.
communities[].published.topics[].descriptionstringYesUp to 300 characters. Default: "".
communities[].published.topics[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
communities[].published.topics[].keywordsarray<string>YesUp to 40 items. Default: [].
communities[].published.topics[].labelstringYes1–80 characters.
communities[].published.topics[].sensitivebooleanYesDefault: false.
communities[].published.versionintegerYes—
currentobjectYes—
current.listsInsightsTaxonomyListsYes—
current.lists.competitorsarray<object>YesUp to 50 items.
current.lists.competitors[].activebooleanYesDefault: true.
current.lists.competitors[].descriptionstringYesUp to 300 characters. Default: "".
current.lists.competitors[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
current.lists.competitors[].keywordsarray<string>YesUp to 40 items. Default: [].
current.lists.competitors[].labelstringYes1–80 characters.
current.lists.competitors[].sensitivebooleanYesDefault: false.
current.lists.intentsarray<object>YesUp to 20 items.
current.lists.intents[].activebooleanYesDefault: true.
current.lists.intents[].descriptionstringYesUp to 300 characters. Default: "".
current.lists.intents[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
current.lists.intents[].keywordsarray<string>YesUp to 40 items. Default: [].
current.lists.intents[].labelstringYes1–80 characters.
current.lists.intents[].sensitivebooleanYesDefault: false.
current.lists.objectionsarray<object>YesUp to 30 items.
current.lists.objections[].activebooleanYesDefault: true.
current.lists.objections[].descriptionstringYesUp to 300 characters. Default: "".
current.lists.objections[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
current.lists.objections[].keywordsarray<string>YesUp to 40 items. Default: [].
current.lists.objections[].labelstringYes1–80 characters.
current.lists.objections[].sensitivebooleanYesDefault: false.
current.lists.topicsarray<object>YesUp to 60 items.
current.lists.topics[].activebooleanYesDefault: true.
current.lists.topics[].descriptionstringYesUp to 300 characters. Default: "".
current.lists.topics[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
current.lists.topics[].keywordsarray<string>YesUp to 40 items. Default: [].
current.lists.topics[].labelstringYes1–80 characters.
current.lists.topics[].sensitivebooleanYesDefault: false.
current.namestringYes—
current.versionintegerYes—
draftobject | nullYes—
draft.idstring (itx_… ID)YesID (itx_…)
draft.listsInsightsTaxonomyListsYes—
draft.lists.competitorsarray<object>YesUp to 50 items.
draft.lists.competitors[].activebooleanYesDefault: true.
draft.lists.competitors[].descriptionstringYesUp to 300 characters. Default: "".
draft.lists.competitors[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
draft.lists.competitors[].keywordsarray<string>YesUp to 40 items. Default: [].
draft.lists.competitors[].labelstringYes1–80 characters.
draft.lists.competitors[].sensitivebooleanYesDefault: false.
draft.lists.intentsarray<object>YesUp to 20 items.
draft.lists.intents[].activebooleanYesDefault: true.
draft.lists.intents[].descriptionstringYesUp to 300 characters. Default: "".
draft.lists.intents[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
draft.lists.intents[].keywordsarray<string>YesUp to 40 items. Default: [].
draft.lists.intents[].labelstringYes1–80 characters.
draft.lists.intents[].sensitivebooleanYesDefault: false.
draft.lists.objectionsarray<object>YesUp to 30 items.
draft.lists.objections[].activebooleanYesDefault: true.
draft.lists.objections[].descriptionstringYesUp to 300 characters. Default: "".
draft.lists.objections[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
draft.lists.objections[].keywordsarray<string>YesUp to 40 items. Default: [].
draft.lists.objections[].labelstringYes1–80 characters.
draft.lists.objections[].sensitivebooleanYesDefault: false.
draft.lists.topicsarray<object>YesUp to 60 items.
draft.lists.topics[].activebooleanYesDefault: true.
draft.lists.topics[].descriptionstringYesUp to 300 characters. Default: "".
draft.lists.topics[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
draft.lists.topics[].keywordsarray<string>YesUp to 40 items. Default: [].
draft.lists.topics[].labelstringYes1–80 characters.
draft.lists.topics[].sensitivebooleanYesDefault: false.
draft.packenumYesOne of: "senior_living", "general".
draft.problemsarray<object>Yes—
draft.problems[].messagestringYes—
draft.problems[].pathstringYes—
draft.updatedAtstring (date-time)Yes—
packenumYesOne of: "senior_living", "general".
versionsarray<object>Yes—
versions[].idstring (itx_… ID)YesID (itx_…)
versions[].namestringYes—
versions[].publishedAtstring (date-time) | nullYes—
versions[].statusenumYesOne of: "draft", "published", "retired".
versions[].versionintegerYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

FieldTypeRequiredDescription
canEditbooleanYes—
communitiesarray<object>Yes—
communities[].draftobject | nullYes—
communities[].draft.problemsarray<object>Yes—
communities[].draft.problems[].messagestringYes—
communities[].draft.problems[].pathstringYes—
communities[].draft.topicsarray<object>Yes—
communities[].draft.topics[].activebooleanYesDefault: true.
communities[].draft.topics[].descriptionstringYesUp to 300 characters. Default: "".
communities[].draft.topics[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
communities[].draft.topics[].keywordsarray<string>YesUp to 40 items. Default: [].
communities[].draft.topics[].labelstringYes1–80 characters.
communities[].draft.topics[].sensitivebooleanYesDefault: false.
communities[].draft.updatedAtstring (date-time)Yes—
communities[].groupIdstring (grp_… ID)YesID (grp_…)
communities[].groupNamestringYes—
communities[].publishedobject | nullYes—
communities[].published.namestringYes—
communities[].published.topicsarray<object>Yes—
communities[].published.topics[].activebooleanYesDefault: true.
communities[].published.topics[].descriptionstringYesUp to 300 characters. Default: "".
communities[].published.topics[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
communities[].published.topics[].keywordsarray<string>YesUp to 40 items. Default: [].
communities[].published.topics[].labelstringYes1–80 characters.
communities[].published.topics[].sensitivebooleanYesDefault: false.
communities[].published.versionintegerYes—
currentobjectYes—
current.listsInsightsTaxonomyListsYes—
current.lists.competitorsarray<object>YesUp to 50 items.
current.lists.competitors[].activebooleanYesDefault: true.
current.lists.competitors[].descriptionstringYesUp to 300 characters. Default: "".
current.lists.competitors[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
current.lists.competitors[].keywordsarray<string>YesUp to 40 items. Default: [].
current.lists.competitors[].labelstringYes1–80 characters.
current.lists.competitors[].sensitivebooleanYesDefault: false.
current.lists.intentsarray<object>YesUp to 20 items.
current.lists.intents[].activebooleanYesDefault: true.
current.lists.intents[].descriptionstringYesUp to 300 characters. Default: "".
current.lists.intents[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
current.lists.intents[].keywordsarray<string>YesUp to 40 items. Default: [].
current.lists.intents[].labelstringYes1–80 characters.
current.lists.intents[].sensitivebooleanYesDefault: false.
current.lists.objectionsarray<object>YesUp to 30 items.
current.lists.objections[].activebooleanYesDefault: true.
current.lists.objections[].descriptionstringYesUp to 300 characters. Default: "".
current.lists.objections[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
current.lists.objections[].keywordsarray<string>YesUp to 40 items. Default: [].
current.lists.objections[].labelstringYes1–80 characters.
current.lists.objections[].sensitivebooleanYesDefault: false.
current.lists.topicsarray<object>YesUp to 60 items.
current.lists.topics[].activebooleanYesDefault: true.
current.lists.topics[].descriptionstringYesUp to 300 characters. Default: "".
current.lists.topics[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
current.lists.topics[].keywordsarray<string>YesUp to 40 items. Default: [].
current.lists.topics[].labelstringYes1–80 characters.
current.lists.topics[].sensitivebooleanYesDefault: false.
current.namestringYes—
current.versionintegerYes—
draftobject | nullYes—
draft.idstring (itx_… ID)YesID (itx_…)
draft.listsInsightsTaxonomyListsYes—
draft.lists.competitorsarray<object>YesUp to 50 items.
draft.lists.competitors[].activebooleanYesDefault: true.
draft.lists.competitors[].descriptionstringYesUp to 300 characters. Default: "".
draft.lists.competitors[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
draft.lists.competitors[].keywordsarray<string>YesUp to 40 items. Default: [].
draft.lists.competitors[].labelstringYes1–80 characters.
draft.lists.competitors[].sensitivebooleanYesDefault: false.
draft.lists.intentsarray<object>YesUp to 20 items.
draft.lists.intents[].activebooleanYesDefault: true.
draft.lists.intents[].descriptionstringYesUp to 300 characters. Default: "".
draft.lists.intents[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
draft.lists.intents[].keywordsarray<string>YesUp to 40 items. Default: [].
draft.lists.intents[].labelstringYes1–80 characters.
draft.lists.intents[].sensitivebooleanYesDefault: false.
draft.lists.objectionsarray<object>YesUp to 30 items.
draft.lists.objections[].activebooleanYesDefault: true.
draft.lists.objections[].descriptionstringYesUp to 300 characters. Default: "".
draft.lists.objections[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
draft.lists.objections[].keywordsarray<string>YesUp to 40 items. Default: [].
draft.lists.objections[].labelstringYes1–80 characters.
draft.lists.objections[].sensitivebooleanYesDefault: false.
draft.lists.topicsarray<object>YesUp to 60 items.
draft.lists.topics[].activebooleanYesDefault: true.
draft.lists.topics[].descriptionstringYesUp to 300 characters. Default: "".
draft.lists.topics[].keystringYesPattern: ^[a-z][a-z0-9_]\{1,47\}$.
draft.lists.topics[].keywordsarray<string>YesUp to 40 items. Default: [].
draft.lists.topics[].labelstringYes1–80 characters.
draft.lists.topics[].sensitivebooleanYesDefault: false.
draft.packenumYesOne of: "senior_living", "general".
draft.problemsarray<object>Yes—
draft.problems[].messagestringYes—
draft.problems[].pathstringYes—
draft.updatedAtstring (date-time)Yes—
packenumYesOne of: "senior_living", "general".
versionsarray<object>Yes—
versions[].idstring (itx_… ID)YesID (itx_…)
versions[].namestringYes—
versions[].publishedAtstring (date-time) | nullYes—
versions[].statusenumYesOne of: "draft", "published", "retired".
versions[].versionintegerYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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.

FieldTypeRequiredDescription
confirmbooleanNoDefault: false.
daysintegerYesBetween 1 and 90.
groupIdstring (grp_… ID)NoID (grp_…)

Response 200

FieldTypeRequiredDescription
cappedbooleanYes—
conversationsintegerYes—
dailyBudgetintegerYes—
daysintegerYes—
daysToFinishintegerYes—
estimatedCentsnumberYes—
queuedintegerYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
levelenumNoOne of: "account", "group", "playbook", "version", "effective". Default: "account".
idstringNoUp to 64 characters.
fromstringNoPattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
tostringNoPattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
channelenumNoOne of: "phone", "site_chat", "page_chat", "web_voice".
sourceenumNoOne of: "number", "widget", "page".
callerenumNoOne of: "prospect", "other".

Response 200

FieldTypeRequiredDescription
analysedintegerYes—
communityTopicsarray<object>Yes—
communityTopics[].conversationsnumberYes—
communityTopics[].groupIdstringYes—
communityTopics[].keystringYes—
communityTopics[].labelstringYes—
intentsarray<InsightsLabelRow>Yes—
intents[].changeobject | nullYes—
intents[].change.previousConversationsnumberYes—
intents[].change.previousSharenumber | nullYes—
intents[].change.verdictenumYesOne of: "better", "worse", "no_clear_difference", "not_enough".
intents[].communitybooleanYes—
intents[].conversationsnumberYes—
intents[].keystringYes—
intents[].labelstringYes—
intents[].metricsmapYes—
intents[].metrics.{key}InsightsLabelMetricNoAny key.
intents[].metrics.{key}.intervalobject | nullYes—
intents[].metrics.{key}.knumberYes—
intents[].metrics.{key}.labelstringYes—
intents[].metrics.{key}.metricenumYesOne of: "topic_share", "attainment_with_label", "sentiment_end", "knowledge_gap_rate", "objection_addressed", "objection_resolved", "objection_recovery".
intents[].metrics.{key}.nnumberYes—
intents[].metrics.{key}.notEnoughbooleanYes—
intents[].metrics.{key}.valuenumber | nullYes—
intents[].sensitivebooleanYes—
minSampleintegerYes—
previousAnalysedintegerYes—
timelinearray<InsightsLabelRow>Yes—
timeline[].changeobject | nullYes—
timeline[].change.previousConversationsnumberYes—
timeline[].change.previousSharenumber | nullYes—
timeline[].change.verdictenumYesOne of: "better", "worse", "no_clear_difference", "not_enough".
timeline[].communitybooleanYes—
timeline[].conversationsnumberYes—
timeline[].keystringYes—
timeline[].labelstringYes—
timeline[].metricsmapYes—
timeline[].metrics.{key}InsightsLabelMetricNoAny key.
timeline[].metrics.{key}.intervalobject | nullYes—
timeline[].metrics.{key}.knumberYes—
timeline[].metrics.{key}.labelstringYes—
timeline[].metrics.{key}.metricenumYesOne of: "topic_share", "attainment_with_label", "sentiment_end", "knowledge_gap_rate", "objection_addressed", "objection_resolved", "objection_recovery".
timeline[].metrics.{key}.nnumberYes—
timeline[].metrics.{key}.notEnoughbooleanYes—
timeline[].metrics.{key}.valuenumber | nullYes—
timeline[].sensitivebooleanYes—
topicsarray<InsightsLabelRow>Yes—
topics[].changeobject | nullYes—
topics[].change.previousConversationsnumberYes—
topics[].change.previousSharenumber | nullYes—
topics[].change.verdictenumYesOne of: "better", "worse", "no_clear_difference", "not_enough".
topics[].communitybooleanYes—
topics[].conversationsnumberYes—
topics[].keystringYes—
topics[].labelstringYes—
topics[].metricsmapYes—
topics[].metrics.{key}InsightsLabelMetricNoAny key.
topics[].metrics.{key}.intervalobject | nullYes—
topics[].metrics.{key}.knumberYes—
topics[].metrics.{key}.labelstringYes—
topics[].metrics.{key}.metricenumYesOne of: "topic_share", "attainment_with_label", "sentiment_end", "knowledge_gap_rate", "objection_addressed", "objection_resolved", "objection_recovery".
topics[].metrics.{key}.nnumberYes—
topics[].metrics.{key}.notEnoughbooleanYes—
topics[].metrics.{key}.valuenumber | nullYes—
topics[].sensitivebooleanYes—
trendarray<object>Yes—
trend[].conversationsnumberYes—
trend[].keystringYes—
trend[].weekstringYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
levelenumNoOne of: "account", "group", "playbook", "version", "effective". Default: "account".
idstringNoUp to 64 characters.
fromstringNoPattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
tostringNoPattern: ^\d\{4\}-\d\{2\}-\d\{2\}$.
channelenumNoOne of: "phone", "site_chat", "page_chat", "web_voice".
sourceenumNoOne of: "number", "widget", "page".
callerenumNoOne of: "prospect", "other".
metricenumNoOne 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".
bucketenumNoOne of: "day", "week". Default: "week".

Response 200

FieldTypeRequiredDescription
bucketenumYesOne of: "day", "week".
markersarray<object>Yes—
markers[].atstringYes—
markers[].kindenumYesOne of: "publish", "values", "taxonomy".
markers[].labelstringYes—
metricenumYesOne 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".
minSampleintegerYes—
pointsarray<object>Yes—
points[].intervalobject | nullYes—
points[].interval.hinumberYes—
points[].interval.lonumberYes—
points[].nnumberYes—
points[].notEnoughbooleanYes—
points[].periodstringYes—
points[].valuenumber | nullYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
statusenumNoOne of: "open", "fixed", "dismissed".
limitintegerNoBetween 1 and 200. Default: 50.

Response 200

FieldTypeRequiredDescription
gapsarray<KnowledgeGapSummary>Yes—
gaps[].communitiesnumberYes—
gaps[].firstSeenAtstring (date-time)Yes—
gaps[].fixedAtstring (date-time) | nullYes—
gaps[].idstring (kgap_… ID)YesID (kgap_…)
gaps[].labelstring | nullYes—
gaps[].lastSeenAtstring (date-time)Yes—
gaps[].occurrencesnumberYes—
gaps[].questionstring | nullYes—
gaps[].sinceFixnumberYes—
gaps[].statusenumYesOne of: "open", "fixed", "dismissed".

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
gapIdstring (kgap_… ID)YesID (kgap_…)

Response 200

FieldTypeRequiredDescription
beforeAfterobject | nullYes—
beforeAfter.afternumberYes—
beforeAfter.beforenumberYes—
beforeAfter.daysnumberYes—
gapobjectYes—
gap.communitiesnumberYes—
gap.firstSeenAtstring (date-time)Yes—
gap.fixKindenum | nullYesOne of: "knowledge_doc", "playbook_version", "other".
gap.fixNotestring | nullYes—
gap.fixRefstring | nullYes—
gap.fixedAtstring (date-time) | nullYes—
gap.fixedBystring | nullYes—
gap.idstring (kgap_… ID)YesID (kgap_…)
gap.labelstring | nullYes—
gap.lastSeenAtstring (date-time)Yes—
gap.occurrencesnumberYes—
gap.questionstring | nullYes—
gap.sinceFixnumberYes—
gap.statusenumYesOne of: "open", "fixed", "dismissed".
occurrencesarray<object>Yes—
occurrences[].callIdstring (call_… ID)YesID (call_…)
occurrences[].groupIdstring (grp_… ID)YesID (grp_…)
occurrences[].idstring (kgo_… ID)YesID (kgo_…)
occurrences[].occurredAtstring (date-time)Yes—
occurrences[].questionstring | nullYes—
occurrences[].sourceenumYesOne of: "code", "model".
weeklyarray<object>Yes—
weekly[].occurrencesnumberYes—
weekly[].weekstringYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
gapIdstring (kgap_… ID)YesID (kgap_…)

Request body

application/json, required.

FieldTypeRequiredDescription
fixobjectNo—
fix.kindenumYesOne of: "knowledge_doc", "playbook_version", "other".
fix.notestring | nullNoUp to 500 characters.
fix.refstring | nullNoUp to 64 characters.
statusenumYesOne of: "open", "fixed", "dismissed".

Response 200

FieldTypeRequiredDescription
communitiesnumberYes—
firstSeenAtstring (date-time)Yes—
fixKindenum | nullYesOne of: "knowledge_doc", "playbook_version", "other".
fixNotestring | nullYes—
fixRefstring | nullYes—
fixedAtstring (date-time) | nullYes—
fixedBystring | nullYes—
idstring (kgap_… ID)YesID (kgap_…)
labelstring | nullYes—
lastSeenAtstring (date-time)Yes—
occurrencesnumberYes—
questionstring | nullYes—
sinceFixnumberYes—
statusenumYesOne of: "open", "fixed", "dismissed".

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
groupIdstring (grp_… ID)NoID (grp_…)
tierenumNoOne of: "cold", "warm", "hot", "not_a_fit".
momentumenumNoOne of: "rising", "steady", "cooling", "silent".
stateenumNoOne of: "open", "closed", "all". Default: "open".
sortenumNoOne of: "readiness", "momentum", "last_activity". Default: "readiness".
limitintegerNoBetween 1 and 200. Default: 50.
offsetintegerNoBetween 0 and 100000. Default: 0.

Response 200

FieldTypeRequiredDescription
leadsarray<LeadSummary>Yes—
leads[].closedAtstring (date-time) | nullYes—
leads[].closedReasonenum | nullYesOne of: "moved_in", "chose_elsewhere", "not_a_fit", "no_longer_looking", "duplicate", "other".
leads[].conversationsintegerYes—
leads[].crmStatusenum | nullYesOne of: "open", "won", "lost", "other".
leads[].firstSeenAtstring (date-time)Yes—
leads[].groupIdstring (grp_… ID)YesID (grp_…)
leads[].groupNamestringYes—
leads[].idstring (lead_… ID)YesID (lead_…)
leads[].interestsarray<object>Yes—
leads[].interests[].keystringYes—
leads[].interests[].labelstringYes—
leads[].keyKindenumYesOne of: "crm_contact", "phone", "email", "widget_visitor".
leads[].lastActivityAtstring (date-time)Yes—
leads[].momentumenumYesOne of: "rising", "steady", "cooling", "silent".
leads[].pointsnumberYes—
leads[].previousTierenum | nullYesOne of: "cold", "warm", "hot", "not_a_fit".
leads[].returnVisitsintegerYes—
leads[].tierenumYesOne of: "cold", "warm", "hot", "not_a_fit".
leads[].tierChangedAtstring (date-time) | nullYes—
totalintegerYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
leadIdstring (lead_… ID)YesID (lead_…)

Response 200

FieldTypeRequiredDescription
conversationsarray<object>Yes—
conversations[].callIdstring (call_… ID)YesID (call_…)
conversations[].channelKindenumYesOne of: "phone", "site_chat", "page_chat", "web_voice".
conversations[].startedAtstring (date-time)Yes—
conversations[].targetStateenum | nullYesOne of: "achieved", "fallback", "partial", "missed", "not_applicable", "unknown".
conversations[].targetTypeenum | nullYesOne 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".
historyarray<object>Yes—
history[].atstring (date-time)Yes—
history[].pointsnumberYes—
history[].previousTierenum | nullYesOne of: "cold", "warm", "hot", "not_a_fit".
history[].tierenumYesOne of: "cold", "warm", "hot", "not_a_fit".
history[].versionstringYes—
interestsarray<object>Yes—
interests[].keystringYes—
interests[].labelstringYes—
interests[].sourcesarray<enum>YesItems: "conversation", "page".
interests[].weightnumberYes—
leadobjectYes—
lead.closedAtstring (date-time) | nullYes—
lead.closedReasonenum | nullYesOne of: "moved_in", "chose_elsewhere", "not_a_fit", "no_longer_looking", "duplicate", "other".
lead.conversationsintegerYes—
lead.crmobjectYes—
lead.crm.changedAtstring (date-time) | nullYes—
lead.crm.checkedAtstring (date-time) | nullYes—
lead.crm.hasContactbooleanYes—
lead.crm.stagestring | nullYes—
lead.crm.statusenum | nullYesOne of: "open", "won", "lost", "other".
lead.crm.statusLabelstring | nullYes—
lead.crmStatusenum | nullYesOne of: "open", "won", "lost", "other".
lead.firstSeenAtstring (date-time)Yes—
lead.groupIdstring (grp_… ID)YesID (grp_…)
lead.groupNamestringYes—
lead.idstring (lead_… ID)YesID (lead_…)
lead.identifiersobjectYes—
lead.identifiers.emailsintegerYes—
lead.identifiers.numbersintegerYes—
lead.identifiers.widgetVisitorsintegerYes—
lead.interestsarray<object>Yes—
lead.interests[].keystringYes—
lead.interests[].labelstringYes—
lead.keyKindenumYesOne of: "crm_contact", "phone", "email", "widget_visitor".
lead.lastActivityAtstring (date-time)Yes—
lead.momentumenumYesOne of: "rising", "steady", "cooling", "silent".
lead.pointsnumberYes—
lead.previousTierenum | nullYesOne of: "cold", "warm", "hot", "not_a_fit".
lead.returnVisitsintegerYes—
lead.tierenumYesOne of: "cold", "warm", "hot", "not_a_fit".
lead.tierChangedAtstring (date-time) | nullYes—
linkedarray<object>Yes—
linked[].groupIdstring (grp_… ID)YesID (grp_…)
linked[].groupNamestringYes—
linked[].idstring (lead_… ID)YesID (lead_…)
linked[].tierenumYesOne of: "cold", "warm", "hot", "not_a_fit".
readinessReadinessYes—
readiness.basePointsnumberYes—
readiness.pointsnumberYes—
readiness.reasonsarray<object>Yes—
readiness.reasons[].keystringYes—
readiness.reasons[].pointsnumberYes—
readiness.reasons[].wordsstringYes—
readiness.sentencestringYes—
readiness.silentDaysinteger | nullYes—
readiness.sourceenumYesOne of: "lead", "call".
readiness.tierenumYesOne of: "cold", "warm", "hot", "not_a_fit".
readiness.versionstringYes—
timelinearray<object>Yes—
timeline[].atstring (date-time)Yes—
timeline[].callIdstring | nullYes—
timeline[].detailmapYes—
timeline[].detail.{key}anyNoAny key.
timeline[].kindenumYesOne of: "conversation", "page_event", "message", "booking", "booking_cancelled", "booking_outcome", "callback", "commitment", "commitment_closed", "action", "action_closed".
timeline[].subjectIdstringYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
leadIdstring (lead_… ID)YesID (lead_…)

Request body

application/json, required.

FieldTypeRequiredDescription
closedbooleanYes—
reasonenumNoOne of: "moved_in", "chose_elsewhere", "not_a_fit", "no_longer_looking", "duplicate", "other".

Response 200

FieldTypeRequiredDescription
closedAtstring (date-time) | nullYes—
closedReasonenum | nullYesOne of: "moved_in", "chose_elsewhere", "not_a_fit", "no_longer_looking", "duplicate", "other".
conversationsintegerYes—
crmStatusenum | nullYesOne of: "open", "won", "lost", "other".
firstSeenAtstring (date-time)Yes—
groupIdstring (grp_… ID)YesID (grp_…)
groupNamestringYes—
idstring (lead_… ID)YesID (lead_…)
interestsarray<object>Yes—
interests[].keystringYes—
interests[].labelstringYes—
keyKindenumYesOne of: "crm_contact", "phone", "email", "widget_visitor".
lastActivityAtstring (date-time)Yes—
momentumenumYesOne of: "rising", "steady", "cooling", "silent".
pointsnumberYes—
previousTierenum | nullYesOne of: "cold", "warm", "hot", "not_a_fit".
returnVisitsintegerYes—
tierenumYesOne of: "cold", "warm", "hot", "not_a_fit".
tierChangedAtstring (date-time) | nullYes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
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

NameTypeRequiredDescription
playbookIdstring (pb_… ID)YesID (pb_…)

Request body

application/json, required.

FieldTypeRequiredDescription
objectivesanyYes—

Response 200

FieldTypeRequiredDescription
cappedbooleanYes—
conversationsintegerYes—
currentobjectYes—
current.primaryobjectYes—
current.primary.achievedintegerYes—
current.primary.agentMissesintegerYes—
current.primary.attemptedintegerYes—
current.primary.eligibleintegerYes—
current.primary.fallbackintegerYes—
current.primary.missedintegerYes—
current.primary.notApplicableintegerYes—
current.primary.opportunityintegerYes—
current.primary.partialintegerYes—
current.primary.unknownintegerYes—
current.primary.valuenumberYes—
current.targetobjectYes—
current.target.achievedintegerYes—
current.target.agentMissesintegerYes—
current.target.attemptedintegerYes—
current.target.eligibleintegerYes—
current.target.fallbackintegerYes—
current.target.missedintegerYes—
current.target.notApplicableintegerYes—
current.target.opportunityintegerYes—
current.target.partialintegerYes—
current.target.unknownintegerYes—
current.target.valuenumberYes—
draftobjectYes—
draft.primaryobjectYes—
draft.primary.achievedintegerYes—
draft.primary.agentMissesintegerYes—
draft.primary.attemptedintegerYes—
draft.primary.eligibleintegerYes—
draft.primary.fallbackintegerYes—
draft.primary.missedintegerYes—
draft.primary.notApplicableintegerYes—
draft.primary.opportunityintegerYes—
draft.primary.partialintegerYes—
draft.primary.unknownintegerYes—
draft.primary.valuenumberYes—
draft.secondaryarray<object>Yes—
draft.secondary[].labelstringYes—
draft.secondary[].objectiveIdstringYes—
draft.secondary[].tallyobjectYes—
draft.secondary[].tally.achievedintegerYes—
draft.secondary[].tally.agentMissesintegerYes—
draft.secondary[].tally.attemptedintegerYes—
draft.secondary[].tally.eligibleintegerYes—
draft.secondary[].tally.fallbackintegerYes—
draft.secondary[].tally.missedintegerYes—
draft.secondary[].tally.notApplicableintegerYes—
draft.secondary[].tally.opportunityintegerYes—
draft.secondary[].tally.partialintegerYes—
draft.secondary[].tally.unknownintegerYes—
draft.secondary[].tally.valuenumberYes—
draft.targetobjectYes—
draft.target.achievedintegerYes—
draft.target.agentMissesintegerYes—
draft.target.attemptedintegerYes—
draft.target.eligibleintegerYes—
draft.target.fallbackintegerYes—
draft.target.missedintegerYes—
draft.target.notApplicableintegerYes—
draft.target.opportunityintegerYes—
draft.target.partialintegerYes—
draft.target.unknownintegerYes—
draft.target.valuenumberYes—
fromstring (date-time)Yes—

Errors: 400, 401, 403, 404, 409, 429, 500, with an ErrorBody body.

Example

bash
curl -X POST "$ANSWERSTACK_API_URL/v1/account/playbooks/{playbookId}/objectives/simulate" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "objectives": {}
}'