{"uid":"cap_aCykbq7VSTWBl-MjSo4t8","slug":"agentmail-threads-ec3ce2d0","name":"AgentMail List Threads","description":"List Threads","url":"https://mpp.api.agentmail.to/v0/inboxes/:inbox_id/threads?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","required":["inbox_id"],"properties":{"after":{"type":"string","title":"After","format":"date-time","description":"Timestamp after which to filter by."},"limit":{"type":"integer","title":"Limit","description":"Limit of number of items returned."},"before":{"type":"string","title":"Before","format":"date-time","description":"Timestamp before which to filter by."},"labels":{"type":"array","items":{"type":"string"},"title":"Labels","description":"Labels to filter by."},"inbox_id":{"type":"string","title":"InboxId","description":"The ID of the inbox."},"ascending":{"type":"boolean","title":"Ascending","description":"Sort in ascending temporal order."},"page_token":{"type":"string","title":"PageToken","description":"Page token for pagination."},"include_spam":{"type":"boolean","title":"IncludeSpam","description":"Include spam in results."},"include_trash":{"type":"boolean","title":"IncludeTrash","description":"Include trash in results."},"include_blocked":{"type":"boolean","title":"IncludeBlocked","description":"Include blocked in results."}}},"responseSchema":{"type":"object","title":"ListThreadsResponse","required":["count","threads"],"properties":{"count":{"type":"integer","title":"Count","description":"Number of items returned."},"limit":{"type":"integer","title":"Limit","description":"Limit of number of items returned."},"threads":{"type":"array","items":{"type":"object","title":"ThreadItem","required":["inbox_id","thread_id","labels","timestamp","senders","recipients","last_message_id","message_count","size","updated_at","created_at"],"properties":{"size":{"type":"integer","title":"ThreadSize","description":"Size of thread in bytes."},"labels":{"type":"array","items":{"type":"string"},"title":"ThreadLabels","description":"Labels of thread."},"preview":{"type":"string","title":"ThreadPreview","description":"Text preview of last message in thread."},"senders":{"type":"array","items":{"type":"string"},"title":"ThreadSenders","description":"Senders in thread. In format `username@domain.com` or `Display Name <username@domain.com>`."},"subject":{"type":"string","title":"ThreadSubject","description":"Subject of thread."},"inbox_id":{"type":"string","title":"InboxId","description":"The ID of the inbox."},"thread_id":{"type":"string","title":"ThreadId","description":"ID of thread."},"timestamp":{"type":"string","title":"ThreadTimestamp","format":"date-time","description":"Timestamp of last sent or received message."},"created_at":{"type":"string","title":"ThreadCreatedAt","format":"date-time","description":"Time at which thread was created."},"recipients":{"type":"array","items":{"type":"string"},"title":"ThreadRecipients","description":"Recipients in thread. In format `username@domain.com` or `Display Name <username@domain.com>`."},"updated_at":{"type":"string","title":"ThreadUpdatedAt","format":"date-time","description":"Time at which thread was last updated."},"attachments":{"type":"array","items":{"type":"object","title":"Attachment","required":["attachment_id","size"],"properties":{"size":{"$ref":"#/components/schemas/type_attachments:AttachmentSize"},"filename":{"$ref":"#/components/schemas/type_attachments:AttachmentFilename"},"content_id":{"$ref":"#/components/schemas/type_attachments:AttachmentContentId"},"content_type":{"$ref":"#/components/schemas/type_attachments:AttachmentContentType"},"attachment_id":{"$ref":"#/components/schemas/type_attachments:AttachmentId"},"content_disposition":{"$ref":"#/components/schemas/type_attachments:AttachmentContentDisposition"}}},"title":"ThreadAttachments","description":"Attachments in thread."},"message_count":{"type":"integer","title":"ThreadMessageCount","description":"Number of messages in thread."},"sent_timestamp":{"type":"string","title":"ThreadSentTimestamp","format":"date-time","description":"Timestamp of last sent message."},"last_message_id":{"type":"string","title":"ThreadLastMessageId","description":"ID of last message in thread."},"received_timestamp":{"type":"string","title":"ThreadReceivedTimestamp","format":"date-time","description":"Timestamp of last received message."}}},"description":"Ordered by `timestamp` descending."},"next_page_token":{"type":"string","title":"PageToken","description":"Page token for pagination."}}},"example":null,"exampleRequest":null,"tags":["email","inboxes","domains","drafts","threads","webhooks","messaging","ai","social"],"displayCostAmount":"0","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"unprobed","priceSource":"unknown","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"free","summary":"Free","primary":null,"accepted":[]},"paymentMethods":[],"brandName":"AgentMail","brandSlug":"agentmail","brandBaseUrl":"https://agentmail.to","brandDocsUrl":"https://docs.agentmail.to","whatItDoes":"Lists email threads in a specified AgentMail inbox with filtering and pagination support","exampleAgentPrompt":"Show me the last 20 email threads in inbox 'agent-inbox-abc123' on AgentMail, filtered to only threads labeled 'support', received after January 1 2025, sorted newest first.","exampleUseCases":null,"resultDescription":"Returns a paginated list of thread objects including thread_id, subject, preview text of the last message, senders, recipients, labels, timestamps, message count, size, and attachment metadata, along with a total count and optional next page token.","failureModes":["inbox_id not found — 404 with error message","missing or invalid Authorization header — 401 unauthorized","invalid date-time format for before/after filters — 400 validation error","invalid page_token — 400 or empty results","inbox has no threads matching filters — returns empty threads array with count 0"],"whenToPreferThis":"Use this endpoint when an AI agent needs to browse, monitor, or process incoming emails in an AgentMail inbox — especially when building automated email workflows, checking for new conversations, or processing threads by label. Prefer over alternatives when the inbox is managed by AgentMail and you need structured thread-level (not message-level) data with filtering capabilities.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T12:38:33.963Z","isFirstParty":false,"canonicalSlug":"agentmail-threads-ec3ce2d0"}