Skip to content

Search Message triage

POST
/v1/object-types/hospitality.message_triage/search
curl --request POST \
--url https://api.aerandil.com/v1/object-types/hospitality.message_triage/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "branch": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "cursor": "example", "filters": [ { "property": "id", "type": "eq", "value": "example" } ], "limit": 1, "order": "asc", "property_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "scope": { "level": "tenant" }, "sort_by": "created_at" }'

Search for instances. Filters eq, contains, gte and lte AND-compose; or / not are additive follow-ups. Pages with an opaque cursor; the +1 fetch returns has_more without a second round-trip. Ordered by sort_by (default created_at) in order (default ascending), id breaking ties; rows with no value for a property key sort last.

A typed triage decision issued by an agent (or, less commonly, a human operator logging a manual triage into the audit trail) against a single inbound guest_message. Mostly-immutable post-issue: the intent / sentiment / urgency / factors / rationale / enrichment_snapshot are frozen at write time so the audit trail is the rationale at decision time, not against today’s profile. The decision_* and chained_* fields mutate exactly once on the transition out of suggested (apply / reject / escalate / expire / supersede) — that single mutation is gated by the decision_status_transitions cross-link validator.

Media typeapplication/json
object
branch

Optional open-branch id. Search composes that branch’s copy-on-first-write overlay instead of main, so a preview reads its own hypothetical writes. Omit to read main.

string format: uuid
cursor

Opaque cursor from a prior response’s next_cursor. Pass back verbatim; do not introspect.

string
filters

Conjunctive list of predicates. Empty or omitted matches every row in scope, capped by limit.

Array
One of:
object
property
required
Allowed value: id
type
required
Allowed value: eq
value
required
string
limit

Page size. Server defaults to 50, silently clamps at 500 (AIP-158 §3).

integer
>= 1 <= 500
order

Direction of sort_by: asc (oldest / smallest first) or desc. A cursor is bound to the sort_by and order it was minted under; another pair is refused (422).

string
default: asc
Allowed values: asc desc
property_id

The house a desk stands in: keeps this property’s rows (property- or venue-scoped there) and every row scoped to no property (tenant, brand, portfolio), and drops a sibling house’s — the meaning property_id has on the event tail.

string format: uuid
scope
One of: discriminator: level
object
level
required
string
Allowed value: tenant
Allowed values: tenant
sort_by

What the page is ordered by: the row’s created_at or updated_at, or a property whose type orders — strings, enums and dates as text, ints, decimals and durations as numbers, datetimes as instants. Rows with no value sort last in either direction. A property the caller is not cleared to read is refused (403).

string
default: created_at
Allowed values: created_at updated_at id intent_primary intent_confidence intent_confidence_score sentiment sentiment_score urgency recommended_action_kind recommended_action_ref recommended_response_text rationale_text issued_at expires_at decision_status decided_at decided_by chained_action_correlation_id escalation_reason rejection_reason

Search results, ordered by (sort_by, id) in the requested order (ascending by default).

Media typeapplication/json
object
data
required
Array<object>
object
created_at
required
string format: date-time
id
required
string format: uuid
object_type
required
Allowed value: hospitality.message_triage
properties
required
object
chained_action_correlation_id
correlation_id of the chained action's ApplyActionResponse (set on `applied`)
string
conversation_ref
required
Denormalised conversation ref (for per-conversation triage queries)
string format: uuid
decided_at
When the triage transitioned out of suggested
string format: date-time
decided_by
`principal.stable_id()` of the deciding principal
string
decision_status
required
Lifecycle state
string
Allowed values: suggested applied rejected escalated expired superseded
enrichment_snapshot
Frozen context snapshot at issue time (§3.3.1; JSON; host populates)
escalation_reason
Reason recorded on escalation
string
Allowed values: low_confidence policy_block safety_keyword explicit_guest_request sensitive_topic ambiguity operator_override pci_disclosed phi_disclosed
expires_at
required
After this, decision_status moves to expired
string format: date-time
factors_considered
required
Signals the classifier conditioned on
Array<string>
Allowed values: message_text conversation_history guest_profile reservation_context recognition_history recovery_history loyalty_tier time_of_day language_detected attachment_present prior_triage_history safety_keywords other
id
required
Triage id
string
intent_alternatives
Message triage intent alternatives

Top-k alternative intents with scores (optional)

Array<object>
object
intent
required
string
Allowed values: booking.inquiry booking.modification booking.cancellation booking.confirmation_query complaint.cleanliness complaint.noise complaint.billing complaint.service complaint.food complaint.other service.amenities service.spa service.restaurant service.transport service.lost_and_found service.wake_up service.technical service.housekeeping service.in_room_dining service.other info.amenities info.directions info.payment_policy info.wifi info.hours info.other recognition.celebration safety.emergency marketing.feedback chitchat.general injection.suspected other.unclassified
score
required
string format: decimal
intent_confidence
required
Operator-facing confidence ordinal
string
Allowed values: low medium high
intent_confidence_score
Calibrated probability (0..=1) — set when the model emits one
string format: decimal
intent_primary
required
Leaf intent from MESSAGE_INTENTS (§3.3.2)
string
Allowed values: booking.inquiry booking.modification booking.cancellation booking.confirmation_query complaint.cleanliness complaint.noise complaint.billing complaint.service complaint.food complaint.other service.amenities service.spa service.restaurant service.transport service.lost_and_found service.wake_up service.technical service.housekeeping service.in_room_dining service.other info.amenities info.directions info.payment_policy info.wifi info.hours info.other recognition.celebration safety.emergency marketing.feedback chitchat.general injection.suspected other.unclassified
issued_at
required
When the agent emitted the triage
string format: date-time
message_ref
required
The inbound `guest_message` this triage classifies
string format: uuid
policy_outcomes
required
Compliance flags observed during triage
Array<string>
Allowed values: pan_redacted phi_redacted tcpa_opt_out_detected gdpr_erasure_referenced whatsapp_window_outside voice_consent_missing injection_attempt_detected safety_keyword_matched none
rationale_text
Human-readable explanation surfaced to operators
string
recommended_action_kind
required
Discriminator for the apply path
string
Allowed values: auto_respond chain_typed_action escalate_to_staff silent_acknowledge no_action
recommended_action_params
Proposed parameters for the chained action (JSON object; validated at apply time)
recommended_action_ref
API name of the chained action (when kind = chain_typed_action)
string
recommended_response_text
Drafted reply text (when kind = auto_respond)
string
rejection_reason
Free-text reason on reject (gold-standard decision-log pattern)
string
sentiment
required
Sentiment ordinal
string
Allowed values: negative neutral positive
sentiment_score
Calibrated sentiment score [-1.0, 1.0]
string format: decimal
urgency
required
Urgency classification
string
Allowed values: low normal high critical
provenance

Per-property source attribution and pins. An entry under properties means the property’s current value came from that source (on the source’s own clock, source_updated_at); an entry under pins is a human override protecting the property from sourced writes.

object
pins
object
key
additional properties
object
pinned_at
string format: date-time
pinned_by
object
reason
required
string
properties
object
key
additional properties
object
external_id
string
recorded_at
required
string format: date-time
source
required
string
source_updated_at
string format: date-time
stream
string
scope
required
One of: discriminator: level
object
level
required
string
Allowed value: tenant
Allowed values: tenant
tenant_id
required
string format: uuid
updated_at
required
string format: date-time
version
required
integer
>= 1
has_more
required
boolean
next_cursor

Cursor for the next page; omitted when the result set is exhausted.

string
Example
{
"data": [
{
"object_type": "hospitality.message_triage",
"properties": {
"decision_status": "suggested",
"escalation_reason": "low_confidence",
"factors_considered": [
"message_text"
],
"intent_alternatives": [
{
"intent": "booking.inquiry"
}
],
"intent_confidence": "low",
"intent_primary": "booking.inquiry",
"policy_outcomes": [
"pan_redacted"
],
"recommended_action_kind": "auto_respond",
"sentiment": "negative",
"urgency": "low"
},
"scope": {
"level": "tenant"
}
}
]
}

Validation error — unknown property or filter type mismatch.