{"uid":"cap_Zdn0fV36k8hOaCMs6S7Gm","slug":"agentmail-list-messages-by-direction-and-type-ee2e4b23","name":"AgentMail List Messages by Direction and Type","description":"AgentMail gives AI agents real email inboxes. Create, send, receive, and search messages via REST API — built for autonomous agents and agentic workflows.","url":"https://x402.api.agentmail.to/v0/lists/%7Bdirection%7D/%7Btype%7D","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","pathParams"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"pathParams":{"type":"object","required":["direction","type"],"properties":{"type":{"type":"string"},"direction":{"type":"string"}},"additionalProperties":false},"queryParams":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"json"},"example":{"type":"object","additionalProperties":true}},"additionalProperties":false}},"additionalProperties":false},"responseSchema":{"type":"json","example":{}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_mqXe4O_FiSIzinWriYPtP","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Lists email messages filtered by direction (inbound/outbound) and type via the AgentMail REST API for AI agents","exampleAgentPrompt":"Show me all inbound emails of type 'message' from my AgentMail inbox — I want to see what messages my agent has received so far.","exampleUseCases":null,"resultDescription":"Returns a JSON list of email messages matching the specified direction (e.g. inbound or outbound) and type, including message metadata such as sender, recipient, subject, and timestamps.","failureModes":["Invalid direction value returns 400 or empty result","Invalid type value returns 400 or empty result","No messages matching criteria returns empty list","Authentication failure returns 401/402 requiring USDC payment","Rate limiting or quota exceeded returns 429","Malformed path parameters cause 404 or 422"],"whenToPreferThis":"Use this endpoint when you need to list and browse email messages filtered by direction (inbound vs outbound) and message type within an AgentMail agent inbox. Prefer this over generic email APIs when building autonomous AI agent workflows that require programmatic access to structured email lists with x402 micropayment support.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-12T00:35:18.534Z","isFirstParty":false}