Skip to main content

Briefing and Search

Two read endpoints that power the dashboard home screen and global search bar, and the equivalent AI agent tools.

Daily briefing

GET /api/v1/briefing returns one payload with everything an owner needs to triage their morning: missed calls, unread SMS, new bookings, in-flight campaigns, usage vs plan, and any alerts. Scope: read. It powers both the dashboard home screen and the MCP get_daily_briefing tool, so the same payload is what your AI agent sees when an owner asks "what happened overnight?".

Query parameters

ParameterDescription
sinceISO 8601 lower bound for missed calls, unread SMS, and new bookings. Defaults to 24 hours ago
untilISO 8601 upper bound. Defaults to now
receptionist_idOptional UUID. When supplied, missed calls are scoped to this receptionist (it must belong to your tenant; 404 otherwise). Bookings and usage stay tenant-wide because the plan minute pool is shared across receptionists

Caching

The response is cached server-side for 60 seconds per (tenant, receptionist, since, until) tuple. The response also sets Cache-Control: private, max-age=60 so browsers and agents can cache between calls.

Example
curl "https://app.autorev.ai/api/v1/briefing" \
-H "Authorization: Bearer ar_live_..."

Payload sections

Response
{
"summary": "Last 24 hours: 2 missed calls, 3 unread SMS, 2 new bookings, 1 alert.",
"missed_calls": [
{
"call_id": "uuid",
"from_phone": "+15551234567",
"from_name": "Bob Mendez",
"at": "2026-05-12T03:14:00Z",
"transcript_excerpt": "Hi this is Bob, calling about my install...",
"receptionist_name": "Acme HVAC"
}
],
"unanswered_sms": [
{
"conversation_id": "uuid",
"customer_name": "Sarah Lee",
"customer_phone": "+15555550123",
"last_inbound_at": "2026-05-12T07:42:00Z",
"preview": "Yes, Tuesday at 2pm works."
}
],
"new_bookings": [
{
"booking_id": "uuid",
"customer_name": "Donna Rivera",
"service": "Spring tune-up",
"starts_at": "2026-05-12T13:00:00Z"
}
],
"campaigns_in_flight": [
{
"campaign_id": "uuid",
"name": "Spring Tune-Up Promo",
"sent_today": 84,
"replies_today": 9,
"bookings_today": 2
}
],
"usage_vs_plan": {
"plan_tier": "your-plan",
"minutes_used": 782,
"minutes_included": 1000,
"days_remaining_in_period": 11,
"projected_overage": false
},
"alerts": [
{
"severity": "warn",
"kind": "low_minutes",
"message": "You've used 78% of your included minutes with 11 days left."
}
]
}
  • summary is a one-line human-readable digest.
  • missed_calls, unanswered_sms, and new_bookings are bounded by since/until.
  • usage_vs_plan reflects your subscription; values depend on your plan.

Alert kinds

Alert kind values: low_minutes, delivery_rate, cost_spike, payment_failed. Severity is warn or critical.

GET /api/v1/search runs one free-text query across three surfaces in parallel: leads (name, company, email, phone), conversations (customer name, intent summary, phone), and calls (caller name, phone). Scope: read. It powers the dashboard global search bar and the MCP search tool.

v1 matching is exact-substring (Postgres ILIKE), fast at any tenant size because every per-type query is narrowed by tenant_id first. Trigram and GIN indexes will widen this to fuzzy, typo-tolerant matches in a later phase.

Query parameters

ParameterDescription
qRequired. Min 2 chars, max 200. Phone-shaped queries (4+ digits) also match phone columns
limitMax results per type (default 20, max 100). The result list is the union, sorted by score
typesCSV subset of leads,conversations,calls. Defaults to all three

Scoring

Score = the number of distinct query words that appear in the matched field. Results are sorted by score descending, then per-type recency. next_cursor is always null in v1; pagination across the union is a planned addition.

Response
{
"summary": "12 results for \"Bob\" across 2 leads, 3 conversations, 7 calls.",
"results": [
{
"type": "lead",
"id": "uuid",
"name": "Bob Mendez",
"phone": "+15551234567",
"email": "bob@acme.com",
"score": 2,
"match_field": "name"
},
{
"type": "conversation",
"id": "uuid",
"customer_name": "Bob Mendez",
"customer_phone": "+15551234567",
"last_message_at": "2026-05-12T07:42:00Z",
"preview": "Bob asked about Tuesday reschedule.",
"status": "active",
"score": 1,
"match_field": "customer_name"
},
{
"type": "call",
"id": "uuid",
"from_phone": "+15551234567",
"from_name": "Bob Mendez",
"at": "2026-05-11T14:30:00Z",
"duration": 180,
"summary_excerpt": "booked, 3m",
"score": 1,
"match_field": "customer_name"
}
],
"next_cursor": null
}
Example: search by partial phone
curl "https://app.autorev.ai/api/v1/search?q=5551234&types=leads,calls" \
-H "Authorization: Bearer ar_live_..."