{"uid":"cap_stpppuqbh_8LNwzzBFh8d","slug":"agentmail-messages-44af3e44","name":"AgentMail List Messages","description":"List Messages","url":"https://mpp.api.agentmail.to/v0/inboxes/:inbox_id/messages?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":"ListMessagesResponse","required":["count","messages"],"properties":{"count":{"type":"integer","title":"Count","description":"Number of items returned."},"limit":{"type":"integer","title":"Limit","description":"Limit of number of items returned."},"messages":{"type":"array","items":{"type":"object","title":"MessageItem","required":["inbox_id","thread_id","message_id","labels","timestamp","from","to","size","updated_at","created_at"],"properties":{"cc":{"type":"array","items":{"type":"string"},"title":"MessageCc","description":"Addresses of CC recipients. In format `username@domain.com` or `Display Name <username@domain.com>`."},"to":{"type":"array","items":{"type":"string"},"title":"MessageTo","description":"Addresses of recipients. In format `username@domain.com` or `Display Name <username@domain.com>`."},"bcc":{"type":"array","items":{"type":"string"},"title":"MessageBcc","description":"Addresses of BCC recipients. In format `username@domain.com` or `Display Name <username@domain.com>`."},"from":{"type":"string","title":"MessageFrom","description":"Address of sender. In format `username@domain.com` or `Display Name <username@domain.com>`."},"size":{"type":"integer","title":"MessageSize","description":"Size of message in bytes."},"labels":{"type":"array","items":{"type":"string"},"title":"MessageLabels","description":"Labels of message."},"headers":{"type":"object","title":"MessageHeaders","description":"Headers in message.","additionalProperties":{"type":"string"}},"preview":{"type":"string","title":"MessagePreview","description":"Text preview of message."},"subject":{"type":"string","title":"MessageSubject","description":"Subject of message."},"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":"MessageTimestamp","format":"date-time","description":"Time at which message was sent or drafted."},"created_at":{"type":"string","title":"MessageCreatedAt","format":"date-time","description":"Time at which message was created."},"message_id":{"type":"string","title":"MessageId","description":"ID of message."},"references":{"type":"array","items":{"type":"string"},"title":"MessageReferences","description":"IDs of previous messages in thread."},"updated_at":{"type":"string","title":"MessageUpdatedAt","format":"date-time","description":"Time at which message 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":"MessageAttachments","description":"Attachments in message."},"in_reply_to":{"type":"string","title":"MessageInReplyTo","description":"ID of message being replied to."}}},"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":"proven_free","priceSource":"unknown","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"1.00","reviews":0,"stars":null,"state":"rated"},"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 messages in a specific AgentMail inbox with filtering by date, labels, and message status","exampleAgentPrompt":"Show me the last 20 messages in AgentMail inbox 'agent-123', sorted newest first, and include any spam — only messages labeled 'support' after January 1, 2025.","exampleUseCases":[{"title":"Filter customer support emails by date range","prompt":"Pull all messages from my support inbox that arrived between March 1st and March 15th, 2025 — I need to review what came in during that period and see which ones have the 'urgent' label."},{"title":"Monitor unread messages across inbox","prompt":"Show me the 30 most recent unread messages in my agent inbox, sorted by newest first, so I can catch up on what needs attention today."},{"title":"Retrieve archived emails by label","prompt":"Get all messages labeled 'completed' from my agent inbox from the last 60 days, paginate through them 25 at a time, and include the sender info and subject line for each one."}],"resultDescription":"Returns a paginated list of MessageItem objects including message ID, thread ID, subject, sender, recipients (to/cc/bcc), labels, text preview, size in bytes, headers, and timestamps (sent, created, updated). Also returns the count of items returned and a limit field for pagination context.","failureModes":["Invalid or missing inbox_id returns 404 not found","Missing or invalid Authorization Bearer token returns 401 unauthorized","Malformed date-time format for before/after parameters returns 400 bad request","Requesting a non-existent page_token returns empty result or error","Rate limit exceeded returns 429 too many requests"],"whenToPreferThis":"Use this endpoint when you need to list or browse messages in a specific AgentMail inbox, especially when filtering by date range, labels, or message status (spam/trash/blocked). Prefer this over thread-level endpoints when you need individual message metadata rather than threaded conversation views.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":2,"lastUsedAt":"2026-08-08T20:06:45.254Z","lastSuccessfullyRanAt":"2026-08-08T20:06:45.254Z","lastHealthCheckAt":"2026-10-11T12:45:40.608Z","isFirstParty":false,"canonicalSlug":"agentmail-messages-44af3e44"}