Browse email conversations grouped by subject. Mark threads as read or spam, and assign them to an agent.
Summary
Functions
List Inbox Threads
List threads in an inbox.
Arguments
client— ANuntly.Clientreturned byNuntly.new/1.inbox_id— Required path parameter, string.params— Optional map of query parameters:"cursor"— Optional query parameter, string. Pagination cursor from a previous response"limit"— Optional query parameter, integer. Maximum number of items to return Defaults to30."labels"— Optional query parameter, string. Comma-separated labels to filter by (AND logic). Threads with spam/trash are excluded by default unless explicitly requested via ?labels=spam or ?labels=trash.
opts— Optional keyword list passed to Req for this request.
Example
client = Nuntly.new(api_key: "ntly_...")
Nuntly.Threads.list_inbox_threads(
client,
"inbox-id",
%{
"cursor" => "cursor",
"limit" => 30,
"labels" => "labels"
}
)
List Thread Messages
List messages in a thread (chronological order).
Arguments
client— ANuntly.Clientreturned byNuntly.new/1.thread_id— Required path parameter, string.params— Optional map of query parameters:"cursor"— Optional query parameter, string. Pagination cursor from a previous response"limit"— Optional query parameter, integer. Maximum number of items to return Defaults to30.
opts— Optional keyword list passed to Req for this request.
Example
client = Nuntly.new(api_key: "ntly_...")
Nuntly.Threads.list_thread_messages(
client,
"thread-id",
%{
"cursor" => "cursor",
"limit" => 30
}
)
Retrieve Thread
Retrieve a thread. Pass ?markRead=true to automatically remove the unread label from all messages.
Arguments
client— ANuntly.Clientreturned byNuntly.new/1.thread_id— Required path parameter, string.opts— Optional keyword list passed to Req for this request.
Example
client = Nuntly.new(api_key: "ntly_...")
Nuntly.Threads.retrieve_thread(client, "thread-id")
Update Thread
Update thread labels and agent assignment. Label operations apply to all messages in the thread.
Arguments
client— ANuntly.Clientreturned byNuntly.new/1.thread_id— Required path parameter, string.body— application/json request body usingUpdateThreadRequest. Accepted fields:"addLabels"(list of string, optional) — Labels to add to all messages in the thread."removeLabels"(list of string, optional) — Labels to remove from all messages in the thread."agentId"(string or nil, optional) — The AI agent identifier.
opts— Optional keyword list passed to Req for this request.
Example
client = Nuntly.new(api_key: "ntly_...")
Nuntly.Threads.update_thread(
client,
"thread-id",
%{
"addLabels" => ["add-label"]
}
)