Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.vh3.ai/llms.txt

Use this file to discover all available pages before exploring further.

Email Triage

Classify inbound emails against your tenant taxonomy. Returns category, urgency, sentiment, and a deterministic routing decision. Known FM portal senders can short-circuit to portal_ingest without an LLM call.

POST /triage/classify

Classify a single email. Request body:
FieldTypeRequiredDescription
company_idstringYesYour tenant identifier
api_keystringYesYour tenant API key
bodystringYesEmail body (plaintext or stripped HTML)
subjectstringNoEmail subject line
sender_addressstringYesSender email address
sender_namestringNoSender display name
timestampstringNoISO 8601 send time
attachmentsarrayNoAttachment metadata (filename, mime_type, size_bytes)
is_replybooleanNoEmail is a reply (default false)
is_forwardbooleanNoEmail is a forward (default false)
source_refstringNoExternal message ID for deduplication
skip_portal_checkbooleanNoSkip portal sender detection when the caller has already routed portal traffic upstream
Response fields:
FieldTypeDescription
classification.categorystringTaxonomy category code
classification.category_confidencenumberCategory confidence (0–1)
classification.urgencystringemergency, urgent, standard, or low
classification.sentimentstringfrustrated, neutral, or positive
classification.safety_overridebooleanH&S language forced a safety category
classification.is_follow_upbooleanRepeated chase or escalation
classification.reasoningstringClassification rationale
decision.actionstringroute, archive, priority_alert, or portal_ingest
decision.destinationstringTarget queue or team
decision.prioritybooleanElevated attention required
decision.flagsarrayRouting flags (e.g. cs_attention, urgency_bumped)
decision.reasoningstringRouting rationale
portal_matchstringMatched portal ID when sender is a known FM portal; otherwise null
pre_filter_hitbooleanCaught as noise without an LLM call
processed_atstringISO 8601 processing timestamp
Example:
curl -X POST "https://api.vh3connect.io/api:kP8T1CK7/triage/classify" \
  -H "Content-Type: application/json" \
  -d '{
    "company_id": "your-company-id",
    "api_key": "your-api-key",
    "subject": "RE: Cabin delivery for site WX-4821",
    "body": "We need to change the delivery date for the cabin order.",
    "sender_address": "john@contractor.example.com",
    "sender_name": "John Smith",
    "timestamp": "2026-03-05T10:30:00Z",
    "is_reply": true
  }'
Use cases:
  • Inbox routing: Branch n8n or helpdesk workflows on decision.action and decision.destination before human review.
  • Portal handoff: When decision.action is portal_ingest, forward the message to POST /ingest/email/portal instead of a generic queue.
  • Priority escalation: Filter on classification.urgency and decision.priority for same-day handling.
  • Volume analytics: Aggregate classification.category counts to measure inbound mix by type.
Notes:
  • Pipeline order: portal short-circuit → pre-filter → LLM classification → rule-based routing.
  • Pass skip_portal_check: true when upstream logic has already separated portal traffic.
  • Typical latency: instant for portal/pre-filter hits; 2–5s when the LLM runs.
  • Use GET /triage/categories to fetch the active taxonomy for UI pickers.

GET /triage/categories

Return the category taxonomy for UI rendering (system default plus tenant overlay). Query parameters:
ParamTypeRequiredDescription
company_idstringNoTenant scope; omit for system default taxonomy
curl -G "https://api.vh3connect.io/api:kP8T1CK7/triage/categories" \
  --data-urlencode "company_id=your-company-id" \
  --data-urlencode "api_key=your-api-key"
Response: categories[] with value (category code), label, and description.