Inbox & Messages
Read synced conversations (email, LinkedIn, WhatsApp) from the Unified Inbox. Messages are accessed through message participants; channel and direction metadata comes from the message-channel associations resource.
GET
/rest/messageParticipantsGET
/rest/messageChannelMessageAssociationsRecipe: recent messages
Fetch participants and filter locally by date (ISO 8601 strings compare lexicographically, so string comparison is safe):
curl -sG "https://app.usedalil.ai/rest/messageParticipants" \
--data-urlencode "depth=1" --data-urlencode "limit=100" \
-H "Authorization: Bearer YOUR_API_KEY" | \
jq --arg since "2026-08-01T00:00:00.000Z" \
'[.data.messageParticipants[]
| select(.message.receivedAt // "" >= $since)
| { receivedAt: .message.receivedAt,
subject: .message.subject,
snippet: (.message.text // "" | .[:300]),
from: .displayName, handle: .handle }]
| sort_by(.receivedAt) | reverse'Recipe: keyword search
Search subject and body case-insensitively:
jq --arg kw "pricing" \
'[.data.messageParticipants[] | select(
(.message.text // "" | ascii_downcase | contains($kw)) or
(.message.subject // "" | ascii_downcase | contains($kw))
)]'Recipe: group into threads
Group participants by message.messageThreadId and join channel metadata to build a thread list with direction and channel:
jq -n \
--slurpfile p /tmp/participants.json \
--slurpfile c /tmp/channels.json \
'($c[0].data.messageChannelMessageAssociations
| map({key: .messageId,
value: {direction: .direction,
channelType: .messageChannel.type}})
| from_entries) as $channelMap |
$p[0].data.messageParticipants
| group_by(.message.messageThreadId)
| map(sort_by(.message.receivedAt) | last | {
threadId: .message.messageThreadId,
lastReceivedAt: .message.receivedAt,
subject: .message.subject,
from: .displayName,
direction: ($channelMap[.message.id].direction // "unknown"),
channelType: ($channelMap[.message.id].channelType // "unknown")
})
| sort_by(.lastReceivedAt) | reverse'Use this as the base for higher-level questions: threads with no reply (last message direction is INCOMING), per-channel activity summaries, or follow-up candidates.
Common Gotchas
- Do not call
/rest/messageswithout amessageThreadId; it returns 400. Go through message participants instead. displayNameis often empty; when filtering by person, match on bothdisplayNameandhandle.- Server-side filters only work on top-level fields; anything on the embedded message must be filtered client-side.
- Direction lives on the channel association, not the participant; join on
messageIdwhen you need it.
Was this page helpful?
Your feedback helps us improve our documentation.