Knowledge CenterAPI ReferencesDalil MCPClaude Skills

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.

Source:apiDocs/Inbox.md
MethodPathDescription
GET/rest/messageParticipantsMessages with sender/recipient context (primary entry point)
GET/rest/messageChannelMessageAssociationsChannel type and direction per message
GET/rest/messagesDirect message access (requires messageThreadId)
GET/rest/messageParticipants

The primary entry point for reading inbox content. Each record links a participant (from/to) to a message; depth=1 embeds the message itself (subject, text, receivedAt, thread ID).

💡 Nested field filters (message.subject[like]:...) do not work server-side. Fetch a window of records and filter client-side.

Parameters

depthrequirednumber

1 = embed the message object (required in practice)

limitnumber

Records per page (use 100 to 500 for local filtering)

Requestcurl
curl -G "https://app.usedalil.ai/rest/messageParticipants" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "depth=1" \
  --data-urlencode "limit=100"
GET/rest/messageChannelMessageAssociations

Maps each message to its channel and direction. Join against message participants on messageId to answer questions like 'incoming LinkedIn messages this week'.

💡 Channel type values are lowercase: email, linkedin, whatsapp, sms. Direction (INCOMING/OUTGOING) exists only on this resource, not on participants.

Parameters

depthnumber

1 = include the message channel (type, handle)

limitnumber

Records per page

Requestcurl
curl -G "https://app.usedalil.ai/rest/messageChannelMessageAssociations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "depth=1" \
  --data-urlencode "limit=500"

Recipe: 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/messages without a messageThreadId; it returns 400. Go through message participants instead.
  • displayName is often empty; when filtering by person, match on both displayName and handle.
  • 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 messageId when you need it.
← PREVIOUSWorkflows
NEXT →Pipeline

Was this page helpful?

Your feedback helps us improve our documentation.