{"openapi":"3.1.0","info":{"title":"API Reference","version":"1.0.0"},"paths":{"/v0/agent/sign-up":{"post":{"operationId":"sign-up","summary":"Sign Up","description":"Create a new agent organization with an inbox and API key. This endpoint is for signing up for the first time. If you've already signed up, you're all set — just use your existing API key.\n\nA 6-digit OTP is sent to the human's email for verification.\n\nThis endpoint is idempotent. Calling it again with the same `human_email` will rotate the API key and resend the OTP if expired.\n\nThe returned API key has limited permissions until the organization is verified via the verify endpoint.\n\n**CLI:**\n```bash\nagentmail agent sign-up --human-email user@example.com --username my-agent\n```","tags":["subpackage_agent"],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_agent:AgentSignupResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_agent:AgentSignupRequest"}}}}}},"/v0/agent/verify":{"post":{"operationId":"verify","summary":"Verify","description":"Verify an agent organization using the 6-digit OTP sent to the human's email during sign-up.\n\nOn success, the organization is upgraded from `agent_unverified` to `agent_verified`, the send allowlist is removed, and free plan entitlements are applied.\n\nThe OTP expires after 24 hours and allows a maximum of 10 attempts. If you run into any difficulties receiving the OTP code, you can also create an account on [console.agentmail.to](https://console.agentmail.to) using the human email address you provided to verify your account.\n\n**CLI:**\n```bash\nagentmail agent verify --otp-code 123456\n```","tags":["subpackage_agent"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_agent:AgentVerifyResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_agent:AgentVerifyRequest"}}}}}},"/v0/inboxes":{"get":{"operationId":"list","summary":"List Inboxes","description":"**CLI:**\n```bash\nagentmail inboxes list\n```","tags":["subpackage_inboxes"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:PageToken"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Ascending"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_inboxes:ListInboxesResponse"}}}}}},"post":{"operationId":"create","summary":"Create Inbox","description":"**CLI:**\n```bash\nagentmail inboxes create --display-name \"My Agent\" --username myagent --domain agentmail.to\n```","tags":["subpackage_inboxes"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_inboxes:Inbox"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}},"422":{"description":"Error response with status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_inboxes:CreateInboxRequest"}}}}}},"/v0/inboxes/{inbox_id}":{"get":{"operationId":"get","summary":"Get Inbox","description":"**CLI:**\n```bash\nagentmail inboxes get --inbox-id <inbox_id>\n```","tags":["subpackage_inboxes"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_inboxes:Inbox"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}},"patch":{"operationId":"update","summary":"Update Inbox","description":"**CLI:**\n```bash\nagentmail inboxes update --inbox-id <inbox_id> --display-name \"Updated Name\"\n```","tags":["subpackage_inboxes"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_inboxes:Inbox"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}},"requestBody":{"description":"Expects an object; provide at least one of `display_name` or `metadata`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_inboxes:UpdateInboxRequest"}}}}},"delete":{"operationId":"delete","summary":"Delete Inbox","description":"**CLI:**\n```bash\nagentmail inboxes delete --inbox-id <inbox_id>\n```","tags":["subpackage_inboxes"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/inboxes/{inbox_id}/threads":{"get":{"operationId":"list","summary":"List Threads","description":"Lists threads in the inbox, most recent first. Pass `senders`,\n`recipients`, or `subject` to filter by substring. Filtered requests are\nserved by search, which caps `limit` at 100. For relevance-ranked\nfull-text search, use `Search Threads`.\n\n**CLI:**\n```bash\nagentmail inboxes:threads list --inbox-id <inbox_id>\n```","tags":["subpackage_inboxes.subpackage_inboxes/threads"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:PageToken"}},{"name":"labels","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Labels"}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Before"}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:After"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Ascending"}},{"name":"include_spam","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:IncludeSpam"}},{"name":"include_blocked","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:IncludeBlocked"}},{"name":"include_unauthenticated","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:IncludeUnauthenticated"}},{"name":"include_trash","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:IncludeTrash"}},{"name":"senders","in":"query","description":"Filter to threads whose senders contain this value (substring match). Repeatable; all values must match.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"recipients","in":"query","description":"Filter to threads whose recipients contain this value (substring match). Repeatable; all values must match.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"subject","in":"query","description":"Filter to threads whose subject contains this value (substring match). Repeatable; all values must match.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_threads:ListThreadsResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/inboxes/{inbox_id}/threads/search":{"get":{"operationId":"search","summary":"Search Threads","description":"Full-text search across threads in the inbox, ranked by relevance. The\nquery is matched against senders, recipients, and subject (substring)\nand the message body (tokenized full text). Spam, trash, blocked, and\nunauthenticated threads are always excluded. `limit` cannot exceed 100.","tags":["subpackage_inboxes.subpackage_inboxes/threads"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"q","in":"query","required":true,"schema":{"$ref":"#/components/schemas/type_:Query"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:PageToken"}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Before"}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:After"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_threads:SearchThreadsResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/inboxes/{inbox_id}/threads/{thread_id}":{"get":{"operationId":"get","summary":"Get Thread","description":"**CLI:**\n```bash\nagentmail inboxes:threads get --inbox-id <inbox_id> --thread-id <thread_id>\n```","tags":["subpackage_inboxes.subpackage_inboxes/threads"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_threads:ThreadId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_threads:Thread"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}},"patch":{"operationId":"update","summary":"Update Thread","description":"Updates thread labels. Cannot add or remove system labels (sent, received, bounced, etc.). Rejects requests with a `422` for threads with 100 or more messages.","tags":["subpackage_inboxes.subpackage_inboxes/threads"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_threads:ThreadId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_threads:UpdateThreadResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}},"422":{"description":"Error response with status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_threads:UpdateThreadRequest"}}}}},"delete":{"operationId":"delete","summary":"Delete Thread","description":"Moves the thread to trash by adding a trash label to all messages. If the thread is already in trash, it will be permanently deleted. Use `permanent=true` to force permanent deletion.\n\n**CLI:**\n```bash\nagentmail inboxes:threads delete --inbox-id <inbox_id> --thread-id <thread_id>\n```","tags":["subpackage_inboxes.subpackage_inboxes/threads"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_threads:ThreadId"}},{"name":"permanent","in":"query","description":"If true, permanently delete the thread instead of moving to trash.","required":false,"schema":{"type":"boolean"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/inboxes/{inbox_id}/threads/{thread_id}/attachments/{attachment_id}":{"get":{"operationId":"get-attachment","summary":"Get Attachment","description":"**CLI:**\n```bash\nagentmail inboxes:threads get-attachment --inbox-id <inbox_id> --thread-id <thread_id> --attachment-id <attachment_id>\n```","tags":["subpackage_inboxes.subpackage_inboxes/threads"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_threads:ThreadId"}},{"name":"attachment_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_attachments:AttachmentId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_attachments:AttachmentResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/inboxes/{inbox_id}/messages":{"get":{"operationId":"list","summary":"List Messages","description":"Lists messages in the inbox, most recent first. Pass `from`, `to`, or\n`subject` to filter by substring. Filtered requests are served by\nsearch, which caps `limit` at 100. For relevance-ranked full-text\nsearch across sender, recipients, subject, and message body, use\n`Search Messages`.\n\n**CLI:**\n```bash\nagentmail inboxes:messages list --inbox-id <inbox_id>\n```","tags":["subpackage_inboxes.subpackage_inboxes/messages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:PageToken"}},{"name":"labels","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Labels"}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Before"}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:After"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Ascending"}},{"name":"include_spam","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:IncludeSpam"}},{"name":"include_blocked","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:IncludeBlocked"}},{"name":"include_unauthenticated","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:IncludeUnauthenticated"}},{"name":"include_trash","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:IncludeTrash"}},{"name":"from","in":"query","description":"Filter to messages whose sender contains this value (substring match). Repeatable; all values must match.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"to","in":"query","description":"Filter to messages whose recipients (to, cc, or bcc) contain this value (substring match). Repeatable; all values must match.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"subject","in":"query","description":"Filter to messages whose subject contains this value (substring match). Repeatable; all values must match.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_messages:ListMessagesResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/inboxes/{inbox_id}/messages/search":{"get":{"operationId":"search","summary":"Search Messages","description":"Full-text search across messages in the inbox, ranked by relevance. The\nquery is matched against the sender, recipients, and subject (substring)\nand the message body (tokenized full text). Spam, trash, blocked, and\nunauthenticated messages are always excluded. `limit` cannot exceed 100.","tags":["subpackage_inboxes.subpackage_inboxes/messages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"q","in":"query","required":true,"schema":{"$ref":"#/components/schemas/type_:Query"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:PageToken"}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Before"}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:After"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_messages:SearchMessagesResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/inboxes/{inbox_id}/messages/{message_id}":{"get":{"operationId":"get","summary":"Get Message","description":"**CLI:**\n```bash\nagentmail inboxes:messages get --inbox-id <inbox_id> --message-id <message_id>\n```","tags":["subpackage_inboxes.subpackage_inboxes/messages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_messages:MessageId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_messages:Message"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}},"patch":{"operationId":"update","summary":"Update Message","description":"**CLI:**\n```bash\nagentmail inboxes:messages update --inbox-id <inbox_id> --message-id <message_id> --add-label read --remove-label unread\n```","tags":["subpackage_inboxes.subpackage_inboxes/messages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_messages:MessageId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_messages:UpdateMessageResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_messages:UpdateMessageRequest"}}}}},"delete":{"operationId":"delete","summary":"Delete Message","description":"Permanently deletes a message.\n\n**CLI:**\n```bash\nagentmail inboxes:messages delete --inbox-id <inbox_id> --message-id <message_id>\n```","tags":["subpackage_inboxes.subpackage_inboxes/messages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_messages:MessageId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/inboxes/{inbox_id}/messages/batch-get":{"post":{"operationId":"batch-get","summary":"Batch Get Messages","description":"Fetch metadata for up to 500 messages in one request. Missing or\nrestricted IDs are silently omitted; compare `count` against `limit`\nto detect misses.\n\n**CLI:**\n```bash\nagentmail inboxes:messages batch-get --inbox-id <inbox_id> --message-id <id1> --message-id <id2>\n```","tags":["subpackage_inboxes.subpackage_inboxes/messages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_messages:BatchGetMessagesResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_messages:BatchGetMessagesRequest"}}}}}},"/v0/inboxes/{inbox_id}/messages/batch-update":{"post":{"operationId":"batch-update","summary":"Batch Update Messages","description":"Apply one label change to up to 50 messages in a single request. The\nsame add_labels and remove_labels apply to every message id, and at\nleast one of them must be provided. The update is atomic: either all\nresolved messages are updated or none are. Missing or restricted ids\nare silently excluded; compare `count` against `limit` to detect\nexclusions.\n\n**CLI:**\n```bash\nagentmail inboxes:messages batch-update --inbox-id <inbox_id> --message-id <id1> --message-id <id2> --add-label read --remove-label unread\n```","tags":["subpackage_inboxes.subpackage_inboxes/messages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_messages:BatchUpdateMessagesResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_messages:BatchUpdateMessagesRequest"}}}}}},"/v0/inboxes/{inbox_id}/messages/{message_id}/attachments/{attachment_id}":{"get":{"operationId":"get-attachment","summary":"Get Attachment","description":"**CLI:**\n```bash\nagentmail inboxes:messages get-attachment --inbox-id <inbox_id> --message-id <message_id> --attachment-id <attachment_id>\n```","tags":["subpackage_inboxes.subpackage_inboxes/messages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_messages:MessageId"}},{"name":"attachment_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_attachments:AttachmentId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_attachments:AttachmentResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/inboxes/{inbox_id}/messages/{message_id}/raw":{"get":{"operationId":"get-raw","summary":"Get Raw Message","description":"**CLI:**\n```bash\nagentmail inboxes:messages get-raw --inbox-id <inbox_id> --message-id <message_id>\n```","tags":["subpackage_inboxes.subpackage_inboxes/messages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_messages:MessageId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_messages:RawMessageResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/inboxes/{inbox_id}/messages/send":{"post":{"operationId":"send","summary":"Send Message","description":"**CLI:**\n```bash\nagentmail inboxes:messages send --inbox-id <inbox_id> --to recipient@example.com --subject \"Hello\" --text \"Body\"\n```","tags":["subpackage_inboxes.subpackage_inboxes/messages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_messages:SendMessageResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_messages:SendMessageRequest"}}}}}},"/v0/inboxes/{inbox_id}/messages/{message_id}/reply":{"post":{"operationId":"reply","summary":"Reply To Message","description":"**CLI:**\n```bash\nagentmail inboxes:messages reply --inbox-id <inbox_id> --message-id <message_id> --text \"Reply text\"\n```","tags":["subpackage_inboxes.subpackage_inboxes/messages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_messages:MessageId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_messages:SendMessageResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_messages:ReplyToMessageRequest"}}}}}},"/v0/inboxes/{inbox_id}/messages/{message_id}/reply-all":{"post":{"operationId":"reply-all","summary":"Reply All Message","description":"**CLI:**\n```bash\nagentmail inboxes:messages reply-all --inbox-id <inbox_id> --message-id <message_id> --text \"Reply text\"\n```","tags":["subpackage_inboxes.subpackage_inboxes/messages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_messages:MessageId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_messages:SendMessageResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_messages:ReplyAllMessageRequest"}}}}}},"/v0/inboxes/{inbox_id}/messages/{message_id}/forward":{"post":{"operationId":"forward","summary":"Forward Message","description":"**CLI:**\n```bash\nagentmail inboxes:messages forward --inbox-id <inbox_id> --message-id <message_id> --to recipient@example.com\n```","tags":["subpackage_inboxes.subpackage_inboxes/messages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_messages:MessageId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_messages:SendMessageResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_messages:SendMessageRequest"}}}}}},"/v0/inboxes/{inbox_id}/drafts":{"get":{"operationId":"list","summary":"List Drafts","description":"**CLI:**\n```bash\nagentmail inboxes:drafts list --inbox-id <inbox_id>\n```","tags":["subpackage_inboxes.subpackage_inboxes/drafts"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:PageToken"}},{"name":"labels","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Labels"}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Before"}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:After"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Ascending"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_drafts:ListDraftsResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}},"post":{"operationId":"create","summary":"Create Draft","description":"**CLI:**\n```bash\nagentmail inboxes:drafts create --inbox-id <inbox_id> --to recipient@example.com --subject \"Draft subject\" --text \"Draft body\"\n```","tags":["subpackage_inboxes.subpackage_inboxes/drafts"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_drafts:Draft"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_drafts:CreateDraftRequest"}}}}}},"/v0/inboxes/{inbox_id}/drafts/{draft_id}":{"get":{"operationId":"get","summary":"Get Draft","description":"**CLI:**\n```bash\nagentmail inboxes:drafts get --inbox-id <inbox_id> --draft-id <draft_id>\n```","tags":["subpackage_inboxes.subpackage_inboxes/drafts"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_drafts:DraftId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_drafts:Draft"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}},"patch":{"operationId":"update","summary":"Update Draft","description":"**CLI:**\n```bash\nagentmail inboxes:drafts update --inbox-id <inbox_id> --draft-id <draft_id> --subject \"Updated subject\"\n```","tags":["subpackage_inboxes.subpackage_inboxes/drafts"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_drafts:DraftId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_drafts:Draft"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_drafts:UpdateDraftRequest"}}}}},"delete":{"operationId":"delete","summary":"Delete Draft","description":"**CLI:**\n```bash\nagentmail inboxes:drafts delete --inbox-id <inbox_id> --draft-id <draft_id>\n```","tags":["subpackage_inboxes.subpackage_inboxes/drafts"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_drafts:DraftId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/inboxes/{inbox_id}/drafts/{draft_id}/attachments/{attachment_id}":{"get":{"operationId":"get-attachment","summary":"Get Attachment","description":"**CLI:**\n```bash\nagentmail inboxes:drafts get-attachment --inbox-id <inbox_id> --draft-id <draft_id> --attachment-id <attachment_id>\n```","tags":["subpackage_inboxes.subpackage_inboxes/drafts"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_drafts:DraftId"}},{"name":"attachment_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_attachments:AttachmentId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_attachments:AttachmentResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/inboxes/{inbox_id}/drafts/{draft_id}/send":{"post":{"operationId":"send","summary":"Send Draft","description":"**CLI:**\n```bash\nagentmail inboxes:drafts send --inbox-id <inbox_id> --draft-id <draft_id>\n```","tags":["subpackage_inboxes.subpackage_inboxes/drafts"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_drafts:DraftId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_messages:SendMessageResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_messages:UpdateMessageRequest"}}}}}},"/v0/inboxes/{inbox_id}/lists/{direction}/{type}":{"get":{"operationId":"list","summary":"List Entries","description":"**CLI:**\n```bash\nagentmail inboxes:lists list --inbox-id <inbox_id> --direction <direction> --type <type>\n```","tags":["subpackage_inboxes.subpackage_inboxes/lists"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_lists:Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_lists:ListType"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:PageToken"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_lists:PodListListEntriesResponse"}}}}}},"post":{"operationId":"create","summary":"Create List Entry","description":"**CLI:**\n```bash\nagentmail inboxes:lists create --inbox-id <inbox_id> --direction <direction> --type <type> --entry user@example.com\n```","tags":["subpackage_inboxes.subpackage_inboxes/lists"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_lists:Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_lists:ListType"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_lists:PodListEntry"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_lists:CreateListEntryRequest"}}}}}},"/v0/inboxes/{inbox_id}/lists/{direction}/{type}/{entry}":{"get":{"operationId":"get","summary":"Get List Entry","description":"**CLI:**\n```bash\nagentmail inboxes:lists get --inbox-id <inbox_id> --direction <direction> --type <type> --entry <entry>\n```","tags":["subpackage_inboxes.subpackage_inboxes/lists"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_lists:Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_lists:ListType"}},{"name":"entry","in":"path","description":"Email address or domain.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_lists:PodListEntry"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}},"delete":{"operationId":"delete","summary":"Delete List Entry","description":"**CLI:**\n```bash\nagentmail inboxes:lists delete --inbox-id <inbox_id> --direction <direction> --type <type> --entry <entry>\n```","tags":["subpackage_inboxes.subpackage_inboxes/lists"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_lists:Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_lists:ListType"}},{"name":"entry","in":"path","description":"Email address or domain.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/inboxes/{inbox_id}/metrics/events":{"get":{"operationId":"query-events","summary":"Query Events","description":"Counts of email events (sent, delivered, bounced, etc.) over time for\nthe inbox. Defaults to the last 24 hours; `start` must be within the\nlast 90 days, and a future `end` is clamped to now. Omit `period` for\nindividual event counts, or set it to sum counts into buckets of that\nmany seconds.\n\n**CLI:**\n```bash\nagentmail inboxes:metrics query --inbox-id <inbox_id>\n```","tags":["subpackage_inboxes.subpackage_inboxes/metrics"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"event_types","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:MetricEventTypes"}},{"name":"start","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:Start"}},{"name":"end","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:End"}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:Period"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:MetricLimit"}},{"name":"descending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:Descending"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_metrics:QueryMetricsResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}}}}},"/v0/inboxes/{inbox_id}/metrics/usage":{"get":{"operationId":"query-usage","summary":"Query Usage","description":"Cumulative usage series for the inbox. Each point is the running total\nof the usage type at that timestamp, not the change within the bucket.\nInbox-scoped queries carry `storage_bytes`, `message_count`, and\n`thread_count`; requested types that don't apply to the scope are\nignored. Defaults to the last 24 hours; `start` must be within the\nlast 90 days, and a future `end` is clamped to now. The range divided\nby `period` must not exceed 1000 buckets.","tags":["subpackage_inboxes.subpackage_inboxes/metrics"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"usage_types","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:UsageTypes"}},{"name":"start","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:Start"}},{"name":"end","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:End"}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:Period"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:MetricLimit"}},{"name":"descending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:Descending"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_metrics:QueryUsageResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}}}}},"/v0/inboxes/{inbox_id}/events":{"get":{"operationId":"list","summary":"List Inbox Events","description":"List label change events for an inbox. Returns events in reverse chronological order by default. Use for IMAP UID projection or audit logging.\n\n**CLI:**\n```bash\nagentmail inboxes:events list --inbox-id <inbox_id>\n```","tags":["subpackage_inboxes.subpackage_inboxes/events"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:PageToken"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Ascending"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_inbox-events:ListInboxEventsResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/inboxes/{inbox_id}/api-keys":{"get":{"operationId":"list","summary":"List API Keys","description":"**CLI:**\n```bash\nagentmail inboxes:api-keys list --inbox-id <inbox_id>\n```","tags":["subpackage_inboxes.subpackage_inboxes/api-keys"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:PageToken"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_api-keys:ListApiKeysResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}},"post":{"operationId":"create","summary":"Create API Key","description":"**CLI:**\n```bash\nagentmail inboxes:api-keys create --inbox-id <inbox_id> --name \"My Key\"\n```","tags":["subpackage_inboxes.subpackage_inboxes/api-keys"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_api-keys:CreateApiKeyResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_api-keys:CreateApiKeyRequest"}}}}}},"/v0/inboxes/{inbox_id}/api-keys/{api_key_id}":{"delete":{"operationId":"delete","summary":"Delete API Key","description":"**CLI:**\n```bash\nagentmail inboxes:api-keys delete --inbox-id <inbox_id> --api-key-id <api_key_id>\n```","tags":["subpackage_inboxes.subpackage_inboxes/api-keys"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"api_key_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_api-keys:ApiKeyId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/threads":{"get":{"operationId":"list","summary":"List Threads","description":"Lists threads, most recent first. Pass `senders`, `recipients`, or\n`subject` to filter by substring. Filtered requests are served by\nsearch, which caps `limit` at 100. For relevance-ranked full-text\nsearch across senders, recipients, subject, and message body, use\n`Search Threads`.\n\n**CLI:**\n```bash\nagentmail threads list\n```","tags":["subpackage_threads"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:PageToken"}},{"name":"labels","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Labels"}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Before"}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:After"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Ascending"}},{"name":"include_spam","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:IncludeSpam"}},{"name":"include_blocked","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:IncludeBlocked"}},{"name":"include_unauthenticated","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:IncludeUnauthenticated"}},{"name":"include_trash","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:IncludeTrash"}},{"name":"senders","in":"query","description":"Filter to threads whose senders contain this value (substring match). Repeatable; all values must match.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"recipients","in":"query","description":"Filter to threads whose recipients contain this value (substring match). Repeatable; all values must match.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"subject","in":"query","description":"Filter to threads whose subject contains this value (substring match). Repeatable; all values must match.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_threads:ListThreadsResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/threads/search":{"get":{"operationId":"search","summary":"Search Threads","description":"Full-text search across threads in the organization, ranked by\nrelevance. The query is matched against senders, recipients, and\nsubject (substring) and the message body (tokenized full text). Spam,\ntrash, blocked, and unauthenticated threads are always excluded.\n`limit` cannot exceed 100.","tags":["subpackage_threads"],"parameters":[{"name":"q","in":"query","required":true,"schema":{"$ref":"#/components/schemas/type_:Query"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:PageToken"}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Before"}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:After"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_threads:SearchThreadsResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/threads/{thread_id}":{"get":{"operationId":"get","summary":"Get Thread","description":"**CLI:**\n```bash\nagentmail threads get --thread-id <thread_id>\n```","tags":["subpackage_threads"],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_threads:ThreadId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_threads:Thread"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}},"patch":{"operationId":"update","summary":"Update Thread","description":"Updates thread labels. Cannot add or remove system labels (sent, received, bounced, etc.). Rejects requests with a `422` for threads with 100 or more messages.","tags":["subpackage_threads"],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_threads:ThreadId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_threads:UpdateThreadResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}},"422":{"description":"Error response with status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_threads:UpdateThreadRequest"}}}}},"delete":{"operationId":"delete","summary":"Delete Thread","description":"Moves the thread to trash by adding a trash label to all messages. If the thread is already in trash, it will be permanently deleted. Use `permanent=true` to force permanent deletion.\n\n**CLI:**\n```bash\nagentmail threads delete --thread-id <thread_id>\n```","tags":["subpackage_threads"],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_threads:ThreadId"}},{"name":"permanent","in":"query","description":"If true, permanently delete the thread instead of moving to trash.","required":false,"schema":{"type":"boolean"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/threads/{thread_id}/attachments/{attachment_id}":{"get":{"operationId":"get-attachment","summary":"Get Attachment","description":"**CLI:**\n```bash\nagentmail threads get-attachment --thread-id <thread_id> --attachment-id <attachment_id>\n```","tags":["subpackage_threads"],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_threads:ThreadId"}},{"name":"attachment_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_attachments:AttachmentId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_attachments:AttachmentResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/drafts":{"get":{"operationId":"list","summary":"List Drafts","description":"**CLI:**\n```bash\nagentmail drafts list\n```","tags":["subpackage_drafts"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:PageToken"}},{"name":"labels","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Labels"}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Before"}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:After"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Ascending"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_drafts:ListDraftsResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/drafts/{draft_id}":{"get":{"operationId":"get","summary":"Get Draft","description":"**CLI:**\n```bash\nagentmail drafts get --draft-id <draft_id>\n```","tags":["subpackage_drafts"],"parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_drafts:DraftId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_drafts:Draft"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/drafts/{draft_id}/attachments/{attachment_id}":{"get":{"operationId":"get-attachment","summary":"Get Attachment","description":"**CLI:**\n```bash\nagentmail drafts get-attachment --draft-id <draft_id> --attachment-id <attachment_id>\n```","tags":["subpackage_drafts"],"parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_drafts:DraftId"}},{"name":"attachment_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_attachments:AttachmentId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_attachments:AttachmentResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/webhooks":{"get":{"operationId":"list","summary":"List Webhooks","description":"**CLI:**\n```bash\nagentmail webhooks list\n```","tags":["subpackage_webhooks"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:PageToken"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Ascending"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_webhooks:ListWebhooksResponse"}}}}}},"post":{"operationId":"create","summary":"Create Webhook","description":"**CLI:**\n```bash\nagentmail webhooks create --url https://example.com/webhook --event-type message.received\n```","tags":["subpackage_webhooks"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_webhooks:Webhook"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_webhooks:CreateWebhookRequest"}}}}}},"/v0/webhooks/{webhook_id}":{"get":{"operationId":"get","summary":"Get Webhook","description":"**CLI:**\n```bash\nagentmail webhooks get --webhook-id <webhook_id>\n```","tags":["subpackage_webhooks"],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_webhooks:WebhookId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_webhooks:Webhook"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}},"patch":{"operationId":"update","summary":"Update Webhook","description":"Update inbox or pod subscriptions, or replace the webhook's `event_types` in full when you pass a\nnon-empty `event_types` array (see request field docs). Inbox and pod changes use add/remove lists.\n\n**CLI:**\n```bash\nagentmail webhooks update --webhook-id <webhook_id> --add-inbox-id <inbox_id>\n```","tags":["subpackage_webhooks"],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_webhooks:WebhookId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_webhooks:Webhook"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_webhooks:UpdateWebhookRequest"}}}}},"delete":{"operationId":"delete","summary":"Delete Webhook","description":"**CLI:**\n```bash\nagentmail webhooks delete --webhook-id <webhook_id>\n```","tags":["subpackage_webhooks"],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_webhooks:WebhookId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/domains":{"get":{"operationId":"list","summary":"List Domains","description":"**CLI:**\n```bash\nagentmail domains list\n```","tags":["subpackage_domains"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:PageToken"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Ascending"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_domains:ListDomainsResponse"}}}}}},"post":{"operationId":"create","summary":"Create Domain","description":"**CLI:**\n```bash\nagentmail domains create --domain example.com\n```","tags":["subpackage_domains"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_domains:Domain"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_domains:CreateDomainRequest"}}}}}},"/v0/domains/{domain_id}":{"get":{"operationId":"get","summary":"Get Domain","description":"**CLI:**\n```bash\nagentmail domains get --domain-id <domain_id>\n```","tags":["subpackage_domains"],"parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_domains:DomainId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_domains:Domain"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}},"patch":{"operationId":"update","summary":"Update Domain","description":"**CLI:**\n```bash\nagentmail domains update --domain-id <domain_id>\n```","tags":["subpackage_domains"],"parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_domains:DomainId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_domains:Domain"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_domains:UpdateDomainRequest"}}}}},"delete":{"operationId":"delete","summary":"Delete Domain","description":"**CLI:**\n```bash\nagentmail domains delete --domain-id <domain_id>\n```","tags":["subpackage_domains"],"parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_domains:DomainId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/domains/{domain_id}/zone-file":{"get":{"operationId":"get-zone-file","summary":"Get Zone File","description":"**CLI:**\n```bash\nagentmail domains get-zone-file --domain-id <domain_id>\n```","tags":["subpackage_domains"],"parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_domains:DomainId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/domains/{domain_id}/verify":{"post":{"operationId":"verify","summary":"Verify Domain","description":"**CLI:**\n```bash\nagentmail domains verify --domain-id <domain_id>\n```","tags":["subpackage_domains"],"parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_domains:DomainId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/lists/{direction}/{type}":{"get":{"operationId":"list","summary":"List Entries","description":"**CLI:**\n```bash\nagentmail lists list --direction <direction> --type <type>\n```","tags":["subpackage_lists"],"parameters":[{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_lists:Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_lists:ListType"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:PageToken"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_lists:ListListEntriesResponse"}}}}}},"post":{"operationId":"create","summary":"Create List Entry","description":"**CLI:**\n```bash\nagentmail lists create --direction <direction> --type <type> --entry user@example.com\n```","tags":["subpackage_lists"],"parameters":[{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_lists:Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_lists:ListType"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_lists:ListEntry"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_lists:CreateListEntryRequest"}}}}}},"/v0/lists/{direction}/{type}/{entry}":{"get":{"operationId":"get","summary":"Get List Entry","description":"**CLI:**\n```bash\nagentmail lists get --direction <direction> --type <type> --entry <entry>\n```","tags":["subpackage_lists"],"parameters":[{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_lists:Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_lists:ListType"}},{"name":"entry","in":"path","description":"Email address or domain.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_lists:ListEntry"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}},"delete":{"operationId":"delete","summary":"Delete List Entry","description":"**CLI:**\n```bash\nagentmail lists delete --direction <direction> --type <type> --entry <entry>\n```","tags":["subpackage_lists"],"parameters":[{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_lists:Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_lists:ListType"}},{"name":"entry","in":"path","description":"Email address or domain.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/metrics/events":{"get":{"operationId":"query-events","summary":"Query Events","description":"Counts of email events (sent, delivered, bounced, etc.) over time for\nthe organization. Defaults to the last 24 hours; `start` must be within\nthe last 90 days, and a future `end` is clamped to now. Omit `period`\nfor individual event counts, or set it to sum counts into buckets of\nthat many seconds.\n\n**CLI:**\n```bash\nagentmail metrics list\n```","tags":["subpackage_metrics"],"parameters":[{"name":"event_types","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:MetricEventTypes"}},{"name":"start","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:Start"}},{"name":"end","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:End"}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:Period"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:MetricLimit"}},{"name":"descending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:Descending"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_metrics:QueryMetricsResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}}}}},"/v0/metrics/usage":{"get":{"operationId":"query-usage","summary":"Query Usage","description":"Cumulative usage series for the organization. Each point is the running\ntotal of the usage type at that timestamp, not the change within the\nbucket. Defaults to the last 24 hours; `start` must be within the last\n90 days, and a future `end` is clamped to now. The range divided by\n`period` must not exceed 1000 buckets.","tags":["subpackage_metrics"],"parameters":[{"name":"usage_types","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:UsageTypes"}},{"name":"start","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:Start"}},{"name":"end","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:End"}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:Period"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:MetricLimit"}},{"name":"descending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:Descending"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_metrics:QueryUsageResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}}}}},"/v0/api-keys":{"get":{"operationId":"list","summary":"List API Keys","description":"**CLI:**\n```bash\nagentmail api-keys list\n```","tags":["subpackage_api-keys"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:PageToken"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Ascending"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_api-keys:ListApiKeysResponse"}}}}}},"post":{"operationId":"create","summary":"Create API Key","description":"**CLI:**\n```bash\nagentmail api-keys create --name \"My Key\"\n```","tags":["subpackage_api-keys"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_api-keys:CreateApiKeyResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_api-keys:CreateApiKeyRequest"}}}}}},"/v0/api-keys/{api_key_id}":{"delete":{"operationId":"delete","summary":"Delete API Key","description":"**CLI:**\n```bash\nagentmail api-keys delete --api-key-id <api_key_id>\n```","tags":["subpackage_api-keys"],"parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_api-keys:ApiKeyId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/pods":{"get":{"operationId":"list","summary":"List Pods","description":"**CLI:**\n```bash\nagentmail pods list\n```","tags":["subpackage_pods"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:PageToken"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Ascending"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_pods:ListPodsResponse"}}}}}},"post":{"operationId":"create","summary":"Create Pod","description":"**CLI:**\n```bash\nagentmail pods create --client-id my-pod\n```","tags":["subpackage_pods"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_pods:Pod"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_pods:CreatePodRequest"}}}}}},"/v0/pods/{pod_id}":{"get":{"operationId":"get","summary":"Get Pod","description":"**CLI:**\n```bash\nagentmail pods get --pod-id <pod_id>\n```","tags":["subpackage_pods"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_pods:PodId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_pods:Pod"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}},"delete":{"operationId":"delete","summary":"Delete Pod","description":"**CLI:**\n```bash\nagentmail pods delete --pod-id <pod_id>\n```","tags":["subpackage_pods"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_pods:PodId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/pods/{pod_id}/inboxes":{"get":{"operationId":"list","summary":"List Inboxes","description":"**CLI:**\n```bash\nagentmail pods:inboxes list --pod-id <pod_id>\n```","tags":["subpackage_pods.subpackage_pods/inboxes"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_pods:PodId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:PageToken"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Ascending"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_inboxes:ListInboxesResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}},"post":{"operationId":"create","summary":"Create Inbox","description":"**CLI:**\n```bash\nagentmail pods:inboxes create --pod-id <pod_id> --username myagent --domain example.com\n```","tags":["subpackage_pods.subpackage_pods/inboxes"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_pods:PodId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_inboxes:Inbox"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}},"422":{"description":"Error response with status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_inboxes:CreateInboxRequest"}}}}}},"/v0/pods/{pod_id}/inboxes/{inbox_id}":{"get":{"operationId":"get","summary":"Get Inbox","description":"**CLI:**\n```bash\nagentmail pods:inboxes get --pod-id <pod_id> --inbox-id <inbox_id>\n```","tags":["subpackage_pods.subpackage_pods/inboxes"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_pods:PodId"}},{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_inboxes:Inbox"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}},"patch":{"operationId":"update","summary":"Update Inbox","description":"**CLI:**\n```bash\nagentmail pods:inboxes update --pod-id <pod_id> --inbox-id <inbox_id>\n```","tags":["subpackage_pods.subpackage_pods/inboxes"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_pods:PodId"}},{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_inboxes:Inbox"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_inboxes:UpdateInboxRequest"}}}}},"delete":{"operationId":"delete","summary":"Delete Inbox","description":"**CLI:**\n```bash\nagentmail pods:inboxes delete --pod-id <pod_id> --inbox-id <inbox_id>\n```","tags":["subpackage_pods.subpackage_pods/inboxes"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_pods:PodId"}},{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_inboxes:InboxId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/pods/{pod_id}/threads":{"get":{"operationId":"list","summary":"List Threads","description":"Lists threads in the pod, most recent first. Pass `senders`,\n`recipients`, or `subject` to filter by substring. Filtered requests are\nserved by search, which caps `limit` at 100. For relevance-ranked\nfull-text search, use `Search Threads`.\n\n**CLI:**\n```bash\nagentmail pods:threads list --pod-id <pod_id>\n```","tags":["subpackage_pods.subpackage_pods/threads"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_pods:PodId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:PageToken"}},{"name":"labels","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Labels"}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Before"}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:After"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Ascending"}},{"name":"include_spam","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:IncludeSpam"}},{"name":"include_blocked","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:IncludeBlocked"}},{"name":"include_unauthenticated","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:IncludeUnauthenticated"}},{"name":"include_trash","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:IncludeTrash"}},{"name":"senders","in":"query","description":"Filter to threads whose senders contain this value (substring match). Repeatable; all values must match.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"recipients","in":"query","description":"Filter to threads whose recipients contain this value (substring match). Repeatable; all values must match.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"subject","in":"query","description":"Filter to threads whose subject contains this value (substring match). Repeatable; all values must match.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_threads:ListThreadsResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/pods/{pod_id}/threads/search":{"get":{"operationId":"search","summary":"Search Threads","description":"Full-text search across threads in the pod, ranked by relevance. The\nquery is matched against senders, recipients, and subject (substring)\nand the message body (tokenized full text). Spam, trash, blocked, and\nunauthenticated threads are always excluded. `limit` cannot exceed 100.","tags":["subpackage_pods.subpackage_pods/threads"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_pods:PodId"}},{"name":"q","in":"query","required":true,"schema":{"$ref":"#/components/schemas/type_:Query"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:PageToken"}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Before"}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:After"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_threads:SearchThreadsResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/pods/{pod_id}/threads/{thread_id}":{"get":{"operationId":"get","summary":"Get Thread","description":"**CLI:**\n```bash\nagentmail pods:threads get --pod-id <pod_id> --thread-id <thread_id>\n```","tags":["subpackage_pods.subpackage_pods/threads"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_pods:PodId"}},{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_threads:ThreadId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_threads:Thread"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}},"patch":{"operationId":"update","summary":"Update Thread","description":"Updates thread labels. Cannot add or remove system labels (sent, received, bounced, etc.). Rejects requests with a `422` for threads with 100 or more messages.","tags":["subpackage_pods.subpackage_pods/threads"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_pods:PodId"}},{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_threads:ThreadId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_threads:UpdateThreadResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}},"422":{"description":"Error response with status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_threads:UpdateThreadRequest"}}}}},"delete":{"operationId":"delete","summary":"Delete Thread","description":"Moves the thread to trash by adding a trash label to all messages. If the thread is already in trash, it will be permanently deleted. Use `permanent=true` to force permanent deletion.\n\n**CLI:**\n```bash\nagentmail pods:threads delete --pod-id <pod_id> --thread-id <thread_id>\n```","tags":["subpackage_pods.subpackage_pods/threads"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_pods:PodId"}},{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_threads:ThreadId"}},{"name":"permanent","in":"query","description":"If true, permanently delete the thread instead of moving to trash.","required":false,"schema":{"type":"boolean"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/pods/{pod_id}/threads/{thread_id}/attachments/{attachment_id}":{"get":{"operationId":"get-attachment","summary":"Get Attachment","description":"**CLI:**\n```bash\nagentmail pods:threads get-attachment --pod-id <pod_id> --thread-id <thread_id> --attachment-id <attachment_id>\n```","tags":["subpackage_pods.subpackage_pods/threads"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_pods:PodId"}},{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_threads:ThreadId"}},{"name":"attachment_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_attachments:AttachmentId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_attachments:AttachmentResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/pods/{pod_id}/drafts":{"get":{"operationId":"list","summary":"List Drafts","description":"**CLI:**\n```bash\nagentmail pods:drafts list --pod-id <pod_id>\n```","tags":["subpackage_pods.subpackage_pods/drafts"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_pods:PodId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:PageToken"}},{"name":"labels","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Labels"}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Before"}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:After"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Ascending"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_drafts:ListDraftsResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/pods/{pod_id}/drafts/{draft_id}":{"get":{"operationId":"get","summary":"Get Draft","description":"**CLI:**\n```bash\nagentmail pods:drafts get --pod-id <pod_id> --draft-id <draft_id>\n```","tags":["subpackage_pods.subpackage_pods/drafts"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_pods:PodId"}},{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_drafts:DraftId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_drafts:Draft"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/pods/{pod_id}/drafts/{draft_id}/attachments/{attachment_id}":{"get":{"operationId":"get-attachment","summary":"Get Attachment","description":"**CLI:**\n```bash\nagentmail pods:drafts get-attachment --pod-id <pod_id> --draft-id <draft_id> --attachment-id <attachment_id>\n```","tags":["subpackage_pods.subpackage_pods/drafts"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_pods:PodId"}},{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_drafts:DraftId"}},{"name":"attachment_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_attachments:AttachmentId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_attachments:AttachmentResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/pods/{pod_id}/domains":{"get":{"operationId":"list","summary":"List Domains","description":"**CLI:**\n```bash\nagentmail pods:domains list --pod-id <pod_id>\n```","tags":["subpackage_pods.subpackage_pods/domains"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_pods:PodId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:PageToken"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Ascending"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_domains:ListDomainsResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}},"post":{"operationId":"create","summary":"Create Domain","description":"**CLI:**\n```bash\nagentmail pods:domains create --pod-id <pod_id> --domain example.com\n```","tags":["subpackage_pods.subpackage_pods/domains"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_pods:PodId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_domains:Domain"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_domains:CreateDomainRequest"}}}}}},"/v0/pods/{pod_id}/domains/{domain_id}":{"get":{"operationId":"get","summary":"Get Domain","description":"**CLI:**\n```bash\nagentmail pods:domains get --pod-id <pod_id> --domain-id <domain_id>\n```","tags":["subpackage_pods.subpackage_pods/domains"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_pods:PodId"}},{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_domains:DomainId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_domains:Domain"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}},"patch":{"operationId":"update","summary":"Update Domain","description":"**CLI:**\n```bash\nagentmail pods:domains update --pod-id <pod_id> --domain-id <domain_id>\n```","tags":["subpackage_pods.subpackage_pods/domains"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_pods:PodId"}},{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_domains:DomainId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_domains:Domain"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_domains:UpdateDomainRequest"}}}}},"delete":{"operationId":"delete","summary":"Delete Domain","description":"**CLI:**\n```bash\nagentmail pods:domains delete --pod-id <pod_id> --domain-id <domain_id>\n```","tags":["subpackage_pods.subpackage_pods/domains"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_pods:PodId"}},{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_domains:DomainId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/pods/{pod_id}/domains/{domain_id}/zone-file":{"get":{"operationId":"get-zone-file","summary":"Get Zone File","description":"**CLI:**\n```bash\nagentmail pods:domains get-zone-file --pod-id <pod_id> --domain-id <domain_id>\n```","tags":["subpackage_pods.subpackage_pods/domains"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_pods:PodId"}},{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_domains:DomainId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/pods/{pod_id}/domains/{domain_id}/verify":{"post":{"operationId":"verify","summary":"Verify Domain","description":"**CLI:**\n```bash\nagentmail pods:domains verify --pod-id <pod_id> --domain-id <domain_id>\n```","tags":["subpackage_pods.subpackage_pods/domains"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_pods:PodId"}},{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_domains:DomainId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/pods/{pod_id}/lists/{direction}/{type}":{"get":{"operationId":"list","summary":"List Entries","description":"**CLI:**\n```bash\nagentmail pods:lists list --pod-id <pod_id> --direction <direction> --type <type>\n```","tags":["subpackage_pods.subpackage_pods/lists"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_pods:PodId"}},{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_lists:Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_lists:ListType"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:PageToken"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_lists:PodListListEntriesResponse"}}}}}},"post":{"operationId":"create","summary":"Create List Entry","description":"**CLI:**\n```bash\nagentmail pods:lists create --pod-id <pod_id> --direction <direction> --type <type> --entry user@example.com\n```","tags":["subpackage_pods.subpackage_pods/lists"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_pods:PodId"}},{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_lists:Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_lists:ListType"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_lists:PodListEntry"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_lists:CreateListEntryRequest"}}}}}},"/v0/pods/{pod_id}/lists/{direction}/{type}/{entry}":{"get":{"operationId":"get","summary":"Get List Entry","description":"**CLI:**\n```bash\nagentmail pods:lists get --pod-id <pod_id> --direction <direction> --type <type> --entry <entry>\n```","tags":["subpackage_pods.subpackage_pods/lists"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_pods:PodId"}},{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_lists:Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_lists:ListType"}},{"name":"entry","in":"path","description":"Email address or domain.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_lists:PodListEntry"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}},"delete":{"operationId":"delete","summary":"Delete List Entry","description":"**CLI:**\n```bash\nagentmail pods:lists delete --pod-id <pod_id> --direction <direction> --type <type> --entry <entry>\n```","tags":["subpackage_pods.subpackage_pods/lists"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_pods:PodId"}},{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_lists:Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_lists:ListType"}},{"name":"entry","in":"path","description":"Email address or domain.","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/pods/{pod_id}/metrics/events":{"get":{"operationId":"query-events","summary":"Query Events","description":"Counts of email events (sent, delivered, bounced, etc.) over time for\nthe pod. Defaults to the last 24 hours; `start` must be within the last\n90 days, and a future `end` is clamped to now. Omit `period` for\nindividual event counts, or set it to sum counts into buckets of that\nmany seconds.\n\n**CLI:**\n```bash\nagentmail pods:metrics query --pod-id <pod_id>\n```","tags":["subpackage_pods.subpackage_pods/metrics"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_pods:PodId"}},{"name":"event_types","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:MetricEventTypes"}},{"name":"start","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:Start"}},{"name":"end","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:End"}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:Period"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:MetricLimit"}},{"name":"descending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:Descending"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_metrics:QueryMetricsResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}}}}},"/v0/pods/{pod_id}/metrics/usage":{"get":{"operationId":"query-usage","summary":"Query Usage","description":"Cumulative usage series for the pod. Each point is the running total of\nthe usage type at that timestamp, not the change within the bucket.\nPod-scoped queries carry every usage type except `pod_count`; requested\ntypes that don't apply to the scope are ignored. Defaults to the last\n24 hours; `start` must be within the last 90 days, and a future `end`\nis clamped to now. The range divided by `period` must not exceed 1000\nbuckets.","tags":["subpackage_pods.subpackage_pods/metrics"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_pods:PodId"}},{"name":"usage_types","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:UsageTypes"}},{"name":"start","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:Start"}},{"name":"end","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:End"}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:Period"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:MetricLimit"}},{"name":"descending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_metrics:Descending"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_metrics:QueryUsageResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}}}}},"/v0/pods/{pod_id}/api-keys":{"get":{"operationId":"list","summary":"List API Keys","description":"**CLI:**\n```bash\nagentmail pods:api-keys list --pod-id <pod_id>\n```","tags":["subpackage_pods.subpackage_pods/api-keys"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_pods:PodId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/type_:PageToken"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_api-keys:ListApiKeysResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}},"post":{"operationId":"create","summary":"Create API Key","description":"**CLI:**\n```bash\nagentmail pods:api-keys create --pod-id <pod_id> --name \"My Key\"\n```","tags":["subpackage_pods.subpackage_pods/api-keys"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_pods:PodId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_api-keys:CreateApiKeyResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_api-keys:CreateApiKeyRequest"}}}}}},"/v0/pods/{pod_id}/api-keys/{api_key_id}":{"delete":{"operationId":"delete","summary":"Delete API Key","description":"**CLI:**\n```bash\nagentmail pods:api-keys delete --pod-id <pod_id> --api-key-id <api_key_id>\n```","tags":["subpackage_pods.subpackage_pods/api-keys"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_pods:PodId"}},{"name":"api_key_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/type_api-keys:ApiKeyId"}},{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_:ErrorResponse"}}}}}}},"/v0/organizations":{"get":{"operationId":"get","summary":"Get Organization","description":"Returns the organization for the authenticated API key (usage limits, counts, and billing metadata).\n\n**CLI:**\n```bash\nagentmail organizations get\n```","tags":["subpackage_organizations"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_organizations:Organization"}}}}}}},"/v0/auth/me":{"get":{"operationId":"me","summary":"Who Am I","description":"Returns the identity and scope of the authenticated credential. Useful when a client holds a pod-scoped or inbox-scoped API key and needs to discover the parent organization, pod, or inbox without prior knowledge.\n\n**CLI:**\n```bash\nagentmail auth me\n```","tags":["subpackage_auth"],"parameters":[{"name":"Authorization","in":"header","description":"Bearer authentication","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_auth:Identity"}}}}}}}},"servers":[{"url":"https://api.agentmail.to","description":"prod"},{"url":"https://x402.api.agentmail.to","description":"prod-x402"},{"url":"https://mpp.api.agentmail.to","description":"prod-mpp"},{"url":"https://api.agentmail.eu","description":"eu-prod"}],"webhooks":{"message-received":{"post":{"operationId":"message-received","summary":"Message Received","parameters":[{"name":"svix-id","in":"header","required":true,"schema":{"$ref":"#/components/schemas/type_webhooks/events:SvixId"}},{"name":"svix-signature","in":"header","required":true,"schema":{"$ref":"#/components/schemas/type_webhooks/events:SvixSignature"}},{"name":"svix-timestamp","in":"header","required":true,"schema":{"$ref":"#/components/schemas/type_webhooks/events:SvixTimestamp"}}],"responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_events:MessageReceivedEvent"}}}}}},"message-sent":{"post":{"operationId":"message-sent","summary":"Message Sent","parameters":[{"name":"svix-id","in":"header","required":true,"schema":{"$ref":"#/components/schemas/type_webhooks/events:SvixId"}},{"name":"svix-signature","in":"header","required":true,"schema":{"$ref":"#/components/schemas/type_webhooks/events:SvixSignature"}},{"name":"svix-timestamp","in":"header","required":true,"schema":{"$ref":"#/components/schemas/type_webhooks/events:SvixTimestamp"}}],"responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_events:MessageSentEvent"}}}}}},"message-delivered":{"post":{"operationId":"message-delivered","summary":"Message Delivered","parameters":[{"name":"svix-id","in":"header","required":true,"schema":{"$ref":"#/components/schemas/type_webhooks/events:SvixId"}},{"name":"svix-signature","in":"header","required":true,"schema":{"$ref":"#/components/schemas/type_webhooks/events:SvixSignature"}},{"name":"svix-timestamp","in":"header","required":true,"schema":{"$ref":"#/components/schemas/type_webhooks/events:SvixTimestamp"}}],"responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_events:MessageDeliveredEvent"}}}}}},"message-bounced":{"post":{"operationId":"message-bounced","summary":"Message Bounced","parameters":[{"name":"svix-id","in":"header","required":true,"schema":{"$ref":"#/components/schemas/type_webhooks/events:SvixId"}},{"name":"svix-signature","in":"header","required":true,"schema":{"$ref":"#/components/schemas/type_webhooks/events:SvixSignature"}},{"name":"svix-timestamp","in":"header","required":true,"schema":{"$ref":"#/components/schemas/type_webhooks/events:SvixTimestamp"}}],"responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_events:MessageBouncedEvent"}}}}}},"message-complained":{"post":{"operationId":"message-complained","summary":"Message Complained","parameters":[{"name":"svix-id","in":"header","required":true,"schema":{"$ref":"#/components/schemas/type_webhooks/events:SvixId"}},{"name":"svix-signature","in":"header","required":true,"schema":{"$ref":"#/components/schemas/type_webhooks/events:SvixSignature"}},{"name":"svix-timestamp","in":"header","required":true,"schema":{"$ref":"#/components/schemas/type_webhooks/events:SvixTimestamp"}}],"responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_events:MessageComplainedEvent"}}}}}},"message-rejected":{"post":{"operationId":"message-rejected","summary":"Message Rejected","parameters":[{"name":"svix-id","in":"header","required":true,"schema":{"$ref":"#/components/schemas/type_webhooks/events:SvixId"}},{"name":"svix-signature","in":"header","required":true,"schema":{"$ref":"#/components/schemas/type_webhooks/events:SvixSignature"}},{"name":"svix-timestamp","in":"header","required":true,"schema":{"$ref":"#/components/schemas/type_webhooks/events:SvixTimestamp"}}],"responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_events:MessageRejectedEvent"}}}}}},"domain-verified":{"post":{"operationId":"domain-verified","summary":"Domain Verified","parameters":[{"name":"svix-id","in":"header","required":true,"schema":{"$ref":"#/components/schemas/type_webhooks/events:SvixId"}},{"name":"svix-signature","in":"header","required":true,"schema":{"$ref":"#/components/schemas/type_webhooks/events:SvixSignature"}},{"name":"svix-timestamp","in":"header","required":true,"schema":{"$ref":"#/components/schemas/type_webhooks/events:SvixTimestamp"}}],"responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_events:DomainVerifiedEvent"}}}}}}},"components":{"schemas":{"type_agent:AgentSignupRequest":{"type":"object","properties":{"human_email":{"type":"string","description":"Email address of the human who owns the agent. A 6-digit OTP will be sent to this address."},"username":{"type":"string","description":"Username for the auto-created inbox (e.g. \"my-agent\" creates my-agent@agentmail.to)."},"source":{"type":"string","description":"The SDK, framework, or platform issuing this sign-up (e.g. `agentmail-python`, `agentmail-cli`, `agentmail-mcp`).\nIdentifies the caller — answers \"who is signing up\".\nMax 2048 characters."},"referrer":{"type":"string","description":"The channel that drove this sign-up — where the agent or its developer discovered AgentMail\n(e.g. `agent.email`, a partner URL, a campaign tag). Answers \"where did this sign-up come from\".\nMax 2048 characters."}},"required":["human_email","username"],"description":"Request body to sign up an agent.","title":"AgentSignupRequest"},"type_agent:AgentSignupResponse":{"type":"object","properties":{"organization_id":{"type":"string","description":"ID of the created organization."},"inbox_id":{"type":"string","description":"ID of the auto-created inbox."},"api_key":{"type":"string","description":"API key for authenticating subsequent requests. Store this securely, it cannot be retrieved again."}},"required":["organization_id","inbox_id","api_key"],"description":"Response after successful agent sign-up.","title":"AgentSignupResponse"},"type_:ErrorName":{"type":"string","description":"Name of error.","title":"ErrorName"},"type_:ValidationErrorResponse":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/type_:ErrorName"},"errors":{"description":"Validation errors."}},"required":["name","errors"],"title":"ValidationErrorResponse"},"type_agent:AgentVerifyRequest":{"type":"object","properties":{"otp_code":{"type":"string","description":"6-digit verification code sent to the human's email address."}},"required":["otp_code"],"description":"Request body to verify an agent with an OTP code.","title":"AgentVerifyRequest"},"type_agent:AgentVerifyResponse":{"type":"object","properties":{"verified":{"type":"boolean","description":"Whether the organization was verified."}},"required":["verified"],"description":"Response after successful agent verification.","title":"AgentVerifyResponse"},"type_:Limit":{"type":"integer","description":"Limit of number of items returned.","title":"Limit"},"type_:PageToken":{"type":"string","description":"Page token for pagination.","title":"PageToken"},"type_:Ascending":{"type":"boolean","description":"Sort in ascending temporal order.","title":"Ascending"},"type_:Count":{"type":"integer","description":"Number of items returned.","title":"Count"},"type_pods:PodId":{"type":"string","description":"ID of pod.","title":"PodId"},"type_inboxes:InboxId":{"type":"string","description":"The ID of the inbox.","title":"InboxId"},"type_inboxes:Email":{"type":"string","description":"Email address of the inbox.","title":"Email"},"type_inboxes:DisplayName":{"type":"string","description":"Display name: `Display Name <username@domain.com>`.","title":"DisplayName"},"type_inboxes:ClientId":{"type":"string","description":"Client ID of inbox.","title":"ClientId"},"type_inboxes:MetadataValue":{"oneOf":[{"type":"string"},{"type":"number","format":"double"},{"type":"boolean"}],"description":"A metadata value. May be a string, number, or boolean.","title":"MetadataValue"},"type_inboxes:Metadata":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/type_inboxes:MetadataValue"},"description":"Custom key-value pairs attached to the inbox. Up to 256 keys. Keys and\nstring values are each limited to 256 characters. When updating metadata,\nsend a key with a null value to remove that key.","title":"Metadata"},"type_inboxes:Inbox":{"type":"object","properties":{"pod_id":{"$ref":"#/components/schemas/type_pods:PodId"},"inbox_id":{"$ref":"#/components/schemas/type_inboxes:InboxId"},"email":{"$ref":"#/components/schemas/type_inboxes:Email"},"display_name":{"$ref":"#/components/schemas/type_inboxes:DisplayName"},"client_id":{"$ref":"#/components/schemas/type_inboxes:ClientId"},"metadata":{"$ref":"#/components/schemas/type_inboxes:Metadata","description":"Custom metadata attached to the inbox."},"updated_at":{"type":"string","format":"date-time","description":"Time at which inbox was last updated."},"created_at":{"type":"string","format":"date-time","description":"Time at which inbox was created."}},"required":["pod_id","inbox_id","email","updated_at","created_at"],"title":"Inbox"},"type_inboxes:ListInboxesResponse":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/type_:Count"},"limit":{"$ref":"#/components/schemas/type_:Limit"},"next_page_token":{"$ref":"#/components/schemas/type_:PageToken"},"inboxes":{"type":"array","items":{"$ref":"#/components/schemas/type_inboxes:Inbox"},"description":"Ordered by `created_at` descending."}},"required":["count","inboxes"],"title":"ListInboxesResponse"},"type_:ErrorMessage":{"type":"string","description":"Error message.","title":"ErrorMessage"},"type_:ErrorResponse":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/type_:ErrorName"},"message":{"$ref":"#/components/schemas/type_:ErrorMessage"}},"required":["name","message"],"title":"ErrorResponse"},"type_inboxes:CreateInboxRequest":{"type":"object","properties":{"username":{"type":"string","description":"Username of address. Randomly generated if not specified."},"domain":{"type":"string","description":"Domain of address. Must be a verified domain, or any subdomain of a\nverified domain that has subdomains enabled (e.g., `bot.example.com`).\nDefaults to `agentmail.to`."},"display_name":{"$ref":"#/components/schemas/type_inboxes:DisplayName"},"client_id":{"$ref":"#/components/schemas/type_inboxes:ClientId"},"metadata":{"$ref":"#/components/schemas/type_inboxes:Metadata","description":"Custom metadata to attach to the inbox."}},"title":"CreateInboxRequest"},"type_inboxes:UpdateMetadata":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/type_inboxes:MetadataValue"},{"type":"null"}]},"description":"Custom key-value pairs to merge into the inbox's existing metadata. A\nvalue may be a string, number, boolean, or null. Setting a key to null\nremoves it. Up to 256 keys; keys and string values are each limited to\n256 characters.","title":"UpdateMetadata"},"type_inboxes:UpdateInboxRequest":{"type":"object","properties":{"display_name":{"$ref":"#/components/schemas/type_inboxes:DisplayName"},"metadata":{"oneOf":[{"$ref":"#/components/schemas/type_inboxes:UpdateMetadata"},{"type":"null"}],"description":"Metadata to merge into the inbox's existing metadata. Keys you include\nare added or overwritten; keys you omit are left unchanged. To remove a\nsingle key, send it with a null value. To clear all metadata, send\n`metadata` as null. Sending an empty object is rejected; use null to\nclear. Each update must include at least one of `display_name` or\n`metadata`."}},"title":"UpdateInboxRequest"},"type_:Labels":{"type":"array","items":{"type":"string"},"description":"Labels to filter by.","title":"Labels"},"type_:Before":{"type":"string","format":"date-time","description":"Timestamp before which to filter by.","title":"Before"},"type_:After":{"type":"string","format":"date-time","description":"Timestamp after which to filter by.","title":"After"},"type_:IncludeSpam":{"type":"boolean","description":"Include spam in results.","title":"IncludeSpam"},"type_:IncludeBlocked":{"type":"boolean","description":"Include blocked in results.","title":"IncludeBlocked"},"type_:IncludeUnauthenticated":{"type":"boolean","description":"Include unauthenticated in results.","title":"IncludeUnauthenticated"},"type_:IncludeTrash":{"type":"boolean","description":"Include trash in results.","title":"IncludeTrash"},"type_threads:ThreadId":{"type":"string","description":"ID of thread.","title":"ThreadId"},"type_threads:ThreadLabels":{"type":"array","items":{"type":"string"},"description":"Labels of thread.","title":"ThreadLabels"},"type_threads:ThreadTimestamp":{"type":"string","format":"date-time","description":"Timestamp of last sent or received message.","title":"ThreadTimestamp"},"type_threads:ThreadReceivedTimestamp":{"type":"string","format":"date-time","description":"Timestamp of last received message.","title":"ThreadReceivedTimestamp"},"type_threads:ThreadSentTimestamp":{"type":"string","format":"date-time","description":"Timestamp of last sent message.","title":"ThreadSentTimestamp"},"type_threads:ThreadSenders":{"type":"array","items":{"type":"string"},"description":"Senders in thread. In format `username@domain.com` or `Display Name <username@domain.com>`.","title":"ThreadSenders"},"type_threads:ThreadRecipients":{"type":"array","items":{"type":"string"},"description":"Recipients in thread. In format `username@domain.com` or `Display Name <username@domain.com>`.","title":"ThreadRecipients"},"type_threads:ThreadSubject":{"type":"string","description":"Subject of thread.","title":"ThreadSubject"},"type_threads:ThreadPreview":{"type":"string","description":"Text preview of last message in thread.","title":"ThreadPreview"},"type_attachments:AttachmentId":{"type":"string","description":"ID of attachment.","title":"AttachmentId"},"type_attachments:AttachmentFilename":{"type":"string","description":"Filename of attachment.","title":"AttachmentFilename"},"type_attachments:AttachmentSize":{"type":"integer","description":"Size of attachment in bytes.","title":"AttachmentSize"},"type_attachments:AttachmentContentType":{"type":"string","description":"Content type of attachment.","title":"AttachmentContentType"},"type_attachments:AttachmentContentDisposition":{"type":"string","enum":["inline","attachment"],"description":"Content disposition of attachment.","title":"AttachmentContentDisposition"},"type_attachments:AttachmentContentId":{"type":"string","description":"Content ID of attachment.","title":"AttachmentContentId"},"type_attachments:Attachment":{"type":"object","properties":{"attachment_id":{"$ref":"#/components/schemas/type_attachments:AttachmentId"},"filename":{"$ref":"#/components/schemas/type_attachments:AttachmentFilename"},"size":{"$ref":"#/components/schemas/type_attachments:AttachmentSize"},"content_type":{"$ref":"#/components/schemas/type_attachments:AttachmentContentType"},"content_disposition":{"$ref":"#/components/schemas/type_attachments:AttachmentContentDisposition"},"content_id":{"$ref":"#/components/schemas/type_attachments:AttachmentContentId"}},"required":["attachment_id","size"],"title":"Attachment"},"type_threads:ThreadAttachments":{"type":"array","items":{"$ref":"#/components/schemas/type_attachments:Attachment"},"description":"Attachments in thread.","title":"ThreadAttachments"},"type_threads:ThreadLastMessageId":{"type":"string","description":"ID of last message in thread.","title":"ThreadLastMessageId"},"type_threads:ThreadMessageCount":{"type":"integer","description":"Number of messages in thread.","title":"ThreadMessageCount"},"type_threads:ThreadSize":{"type":"integer","description":"Size of thread in bytes.","title":"ThreadSize"},"type_threads:ThreadUpdatedAt":{"type":"string","format":"date-time","description":"Time at which thread was last updated.","title":"ThreadUpdatedAt"},"type_threads:ThreadCreatedAt":{"type":"string","format":"date-time","description":"Time at which thread was created.","title":"ThreadCreatedAt"},"type_threads:ThreadItem":{"type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/type_inboxes:InboxId"},"thread_id":{"$ref":"#/components/schemas/type_threads:ThreadId"},"labels":{"$ref":"#/components/schemas/type_threads:ThreadLabels"},"timestamp":{"$ref":"#/components/schemas/type_threads:ThreadTimestamp"},"received_timestamp":{"$ref":"#/components/schemas/type_threads:ThreadReceivedTimestamp"},"sent_timestamp":{"$ref":"#/components/schemas/type_threads:ThreadSentTimestamp"},"senders":{"$ref":"#/components/schemas/type_threads:ThreadSenders"},"recipients":{"$ref":"#/components/schemas/type_threads:ThreadRecipients"},"subject":{"$ref":"#/components/schemas/type_threads:ThreadSubject"},"preview":{"$ref":"#/components/schemas/type_threads:ThreadPreview"},"attachments":{"$ref":"#/components/schemas/type_threads:ThreadAttachments"},"last_message_id":{"$ref":"#/components/schemas/type_threads:ThreadLastMessageId"},"message_count":{"$ref":"#/components/schemas/type_threads:ThreadMessageCount"},"size":{"$ref":"#/components/schemas/type_threads:ThreadSize"},"updated_at":{"$ref":"#/components/schemas/type_threads:ThreadUpdatedAt"},"created_at":{"$ref":"#/components/schemas/type_threads:ThreadCreatedAt"}},"required":["inbox_id","thread_id","labels","timestamp","senders","recipients","last_message_id","message_count","size","updated_at","created_at"],"title":"ThreadItem"},"type_threads:ListThreadsResponse":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/type_:Count"},"limit":{"$ref":"#/components/schemas/type_:Limit"},"next_page_token":{"$ref":"#/components/schemas/type_:PageToken"},"threads":{"type":"array","items":{"$ref":"#/components/schemas/type_threads:ThreadItem"},"description":"Ordered by `timestamp` descending."}},"required":["count","threads"],"title":"ListThreadsResponse"},"type_:Query":{"type":"string","description":"Full-text search query. Matched against the sender, recipients, and\nsubject (substring) and the message body (tokenized full text).","title":"Query"},"type_threads:SearchThreadHighlights":{"type":"object","properties":{"from":{"type":"array","items":{"type":"string"},"description":"Matched fragments from a sender address in the thread."},"recipients":{"type":"array","items":{"type":"string"},"description":"Matched fragments from a recipient address in the thread (to, cc, or bcc)."},"subject":{"type":"array","items":{"type":"string"},"description":"Matched fragments from the subject."},"text":{"type":"array","items":{"type":"string"},"description":"Matched fragments from a message body in the thread."}},"description":"Matched fragments per field on a thread search result, with matched terms\nwrapped in `**`. A field key is present only when the query matched that\nfield, so the present keys also tell you which fields produced the hit.","title":"SearchThreadHighlights"},"type_threads:SearchThreadItem":{"type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/type_inboxes:InboxId"},"thread_id":{"$ref":"#/components/schemas/type_threads:ThreadId"},"labels":{"$ref":"#/components/schemas/type_threads:ThreadLabels"},"timestamp":{"$ref":"#/components/schemas/type_threads:ThreadTimestamp"},"received_timestamp":{"$ref":"#/components/schemas/type_threads:ThreadReceivedTimestamp"},"sent_timestamp":{"$ref":"#/components/schemas/type_threads:ThreadSentTimestamp"},"senders":{"$ref":"#/components/schemas/type_threads:ThreadSenders"},"recipients":{"$ref":"#/components/schemas/type_threads:ThreadRecipients"},"subject":{"$ref":"#/components/schemas/type_threads:ThreadSubject"},"preview":{"$ref":"#/components/schemas/type_threads:ThreadPreview"},"attachments":{"$ref":"#/components/schemas/type_threads:ThreadAttachments"},"last_message_id":{"$ref":"#/components/schemas/type_threads:ThreadLastMessageId"},"message_count":{"$ref":"#/components/schemas/type_threads:ThreadMessageCount"},"size":{"$ref":"#/components/schemas/type_threads:ThreadSize"},"updated_at":{"$ref":"#/components/schemas/type_threads:ThreadUpdatedAt"},"created_at":{"$ref":"#/components/schemas/type_threads:ThreadCreatedAt"},"highlights":{"$ref":"#/components/schemas/type_threads:SearchThreadHighlights","description":"Matched fragments per field. Present only when the query matched an indexed field."}},"required":["inbox_id","thread_id","labels","timestamp","senders","recipients","last_message_id","message_count","size","updated_at","created_at"],"title":"SearchThreadItem"},"type_threads:SearchThreadsResponse":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/type_:Count"},"limit":{"$ref":"#/components/schemas/type_:Limit"},"next_page_token":{"$ref":"#/components/schemas/type_:PageToken"},"threads":{"type":"array","items":{"$ref":"#/components/schemas/type_threads:SearchThreadItem"},"description":"Ordered by relevance, best match first."}},"required":["count","threads"],"title":"SearchThreadsResponse"},"type_messages:MessageId":{"type":"string","description":"ID of message.","title":"MessageId"},"type_messages:MessageLabels":{"type":"array","items":{"type":"string"},"description":"Labels of message.","title":"MessageLabels"},"type_messages:MessageTimestamp":{"type":"string","format":"date-time","description":"Time at which message was sent or drafted.","title":"MessageTimestamp"},"type_messages:MessageFrom":{"type":"string","description":"Address of sender. In format `username@domain.com` or `Display Name <username@domain.com>`.","title":"MessageFrom"},"type_messages:MessageTo":{"type":"array","items":{"type":"string"},"description":"Addresses of recipients. In format `username@domain.com` or `Display Name <username@domain.com>`.","title":"MessageTo"},"type_messages:MessageCc":{"type":"array","items":{"type":"string"},"description":"Addresses of CC recipients. In format `username@domain.com` or `Display Name <username@domain.com>`.","title":"MessageCc"},"type_messages:MessageBcc":{"type":"array","items":{"type":"string"},"description":"Addresses of BCC recipients. In format `username@domain.com` or `Display Name <username@domain.com>`.","title":"MessageBcc"},"type_messages:MessageSubject":{"type":"string","description":"Subject of message.","title":"MessageSubject"},"type_messages:MessagePreview":{"type":"string","description":"Text preview of message.","title":"MessagePreview"},"type_messages:MessageText":{"type":"string","description":"Plain text body of message.","title":"MessageText"},"type_messages:MessageHtml":{"type":"string","description":"HTML body of message.","title":"MessageHtml"},"type_messages:MessageAttachments":{"type":"array","items":{"$ref":"#/components/schemas/type_attachments:Attachment"},"description":"Attachments in message.","title":"MessageAttachments"},"type_messages:MessageInReplyTo":{"type":"string","description":"ID of message being replied to.","title":"MessageInReplyTo"},"type_messages:MessageReferences":{"type":"array","items":{"type":"string"},"description":"IDs of previous messages in thread.","title":"MessageReferences"},"type_messages:MessageHeaders":{"type":"object","additionalProperties":{"type":"string"},"description":"Headers in message.","title":"MessageHeaders"},"type_messages:MessageSize":{"type":"integer","description":"Size of message in bytes.","title":"MessageSize"},"type_messages:MessageUpdatedAt":{"type":"string","format":"date-time","description":"Time at which message was last updated.","title":"MessageUpdatedAt"},"type_messages:MessageCreatedAt":{"type":"string","format":"date-time","description":"Time at which message was created.","title":"MessageCreatedAt"},"type_messages:Message":{"type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/type_inboxes:InboxId"},"thread_id":{"$ref":"#/components/schemas/type_threads:ThreadId"},"message_id":{"$ref":"#/components/schemas/type_messages:MessageId"},"labels":{"$ref":"#/components/schemas/type_messages:MessageLabels"},"timestamp":{"$ref":"#/components/schemas/type_messages:MessageTimestamp"},"from":{"$ref":"#/components/schemas/type_messages:MessageFrom"},"reply_to":{"type":"array","items":{"type":"string"},"description":"Reply-to addresses. In format `username@domain.com` or `Display Name <username@domain.com>`."},"to":{"$ref":"#/components/schemas/type_messages:MessageTo"},"cc":{"$ref":"#/components/schemas/type_messages:MessageCc"},"bcc":{"$ref":"#/components/schemas/type_messages:MessageBcc"},"subject":{"$ref":"#/components/schemas/type_messages:MessageSubject"},"preview":{"$ref":"#/components/schemas/type_messages:MessagePreview"},"text":{"$ref":"#/components/schemas/type_messages:MessageText"},"html":{"$ref":"#/components/schemas/type_messages:MessageHtml"},"extracted_text":{"type":"string","description":"Extracted new text content."},"extracted_html":{"type":"string","description":"Extracted new HTML content."},"attachments":{"$ref":"#/components/schemas/type_messages:MessageAttachments"},"in_reply_to":{"$ref":"#/components/schemas/type_messages:MessageInReplyTo"},"references":{"$ref":"#/components/schemas/type_messages:MessageReferences"},"headers":{"$ref":"#/components/schemas/type_messages:MessageHeaders"},"size":{"$ref":"#/components/schemas/type_messages:MessageSize"},"updated_at":{"$ref":"#/components/schemas/type_messages:MessageUpdatedAt"},"created_at":{"$ref":"#/components/schemas/type_messages:MessageCreatedAt"}},"required":["inbox_id","thread_id","message_id","labels","timestamp","from","to","size","updated_at","created_at"],"title":"Message"},"type_threads:Thread":{"type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/type_inboxes:InboxId"},"thread_id":{"$ref":"#/components/schemas/type_threads:ThreadId"},"labels":{"$ref":"#/components/schemas/type_threads:ThreadLabels"},"timestamp":{"$ref":"#/components/schemas/type_threads:ThreadTimestamp"},"received_timestamp":{"$ref":"#/components/schemas/type_threads:ThreadReceivedTimestamp"},"sent_timestamp":{"$ref":"#/components/schemas/type_threads:ThreadSentTimestamp"},"senders":{"$ref":"#/components/schemas/type_threads:ThreadSenders"},"recipients":{"$ref":"#/components/schemas/type_threads:ThreadRecipients"},"subject":{"$ref":"#/components/schemas/type_threads:ThreadSubject"},"preview":{"$ref":"#/components/schemas/type_threads:ThreadPreview"},"attachments":{"$ref":"#/components/schemas/type_threads:ThreadAttachments"},"last_message_id":{"$ref":"#/components/schemas/type_threads:ThreadLastMessageId"},"message_count":{"$ref":"#/components/schemas/type_threads:ThreadMessageCount"},"size":{"$ref":"#/components/schemas/type_threads:ThreadSize"},"updated_at":{"$ref":"#/components/schemas/type_threads:ThreadUpdatedAt"},"created_at":{"$ref":"#/components/schemas/type_threads:ThreadCreatedAt"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/type_messages:Message"},"description":"Messages in thread. Ordered by `timestamp` ascending."}},"required":["inbox_id","thread_id","labels","timestamp","senders","recipients","last_message_id","message_count","size","updated_at","created_at","messages"],"title":"Thread"},"type_attachments:AttachmentResponse":{"type":"object","properties":{"attachment_id":{"$ref":"#/components/schemas/type_attachments:AttachmentId"},"filename":{"$ref":"#/components/schemas/type_attachments:AttachmentFilename"},"size":{"$ref":"#/components/schemas/type_attachments:AttachmentSize"},"content_type":{"$ref":"#/components/schemas/type_attachments:AttachmentContentType"},"content_disposition":{"$ref":"#/components/schemas/type_attachments:AttachmentContentDisposition"},"content_id":{"$ref":"#/components/schemas/type_attachments:AttachmentContentId"},"download_url":{"type":"string","description":"URL to download the attachment."},"expires_at":{"type":"string","format":"date-time","description":"Time at which the download URL expires."}},"required":["attachment_id","size","download_url","expires_at"],"title":"AttachmentResponse"},"type_threads:UpdateThreadRequest":{"type":"object","properties":{"add_labels":{"type":"array","items":{"type":"string"},"description":"Labels to add to thread. Cannot be system labels."},"remove_labels":{"type":"array","items":{"type":"string"},"description":"Labels to remove from thread. Cannot be system labels. Takes priority over `add_labels` (in the event of duplicate labels passed in)."}},"title":"UpdateThreadRequest"},"type_threads:UpdateThreadResponse":{"type":"object","properties":{"thread_id":{"$ref":"#/components/schemas/type_threads:ThreadId"},"labels":{"$ref":"#/components/schemas/type_threads:ThreadLabels"}},"required":["thread_id","labels"],"title":"UpdateThreadResponse"},"type_messages:MessageItem":{"type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/type_inboxes:InboxId"},"thread_id":{"$ref":"#/components/schemas/type_threads:ThreadId"},"message_id":{"$ref":"#/components/schemas/type_messages:MessageId"},"labels":{"$ref":"#/components/schemas/type_messages:MessageLabels"},"timestamp":{"$ref":"#/components/schemas/type_messages:MessageTimestamp"},"from":{"$ref":"#/components/schemas/type_messages:MessageFrom"},"to":{"$ref":"#/components/schemas/type_messages:MessageTo"},"cc":{"$ref":"#/components/schemas/type_messages:MessageCc"},"bcc":{"$ref":"#/components/schemas/type_messages:MessageBcc"},"subject":{"$ref":"#/components/schemas/type_messages:MessageSubject"},"preview":{"$ref":"#/components/schemas/type_messages:MessagePreview"},"attachments":{"$ref":"#/components/schemas/type_messages:MessageAttachments"},"in_reply_to":{"$ref":"#/components/schemas/type_messages:MessageInReplyTo"},"references":{"$ref":"#/components/schemas/type_messages:MessageReferences"},"headers":{"$ref":"#/components/schemas/type_messages:MessageHeaders"},"size":{"$ref":"#/components/schemas/type_messages:MessageSize"},"updated_at":{"$ref":"#/components/schemas/type_messages:MessageUpdatedAt"},"created_at":{"$ref":"#/components/schemas/type_messages:MessageCreatedAt"}},"required":["inbox_id","thread_id","message_id","labels","timestamp","from","to","size","updated_at","created_at"],"title":"MessageItem"},"type_messages:ListMessagesResponse":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/type_:Count"},"limit":{"$ref":"#/components/schemas/type_:Limit"},"next_page_token":{"$ref":"#/components/schemas/type_:PageToken"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/type_messages:MessageItem"},"description":"Ordered by `timestamp` descending."}},"required":["count","messages"],"title":"ListMessagesResponse"},"type_messages:SearchMessageHighlights":{"type":"object","properties":{"from":{"type":"array","items":{"type":"string"},"description":"Matched fragments from the sender address."},"recipients":{"type":"array","items":{"type":"string"},"description":"Matched fragments from the recipient addresses (to, cc, or bcc)."},"subject":{"type":"array","items":{"type":"string"},"description":"Matched fragments from the subject."},"text":{"type":"array","items":{"type":"string"},"description":"Matched fragments from the message body."}},"description":"Matched fragments per field on a message search result, with matched terms\nwrapped in `**`. A field key is present only when the query matched that\nfield, so the present keys also tell you which fields produced the hit.","title":"SearchMessageHighlights"},"type_messages:SearchMessageItem":{"type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/type_inboxes:InboxId"},"thread_id":{"$ref":"#/components/schemas/type_threads:ThreadId"},"message_id":{"$ref":"#/components/schemas/type_messages:MessageId"},"labels":{"$ref":"#/components/schemas/type_messages:MessageLabels"},"timestamp":{"$ref":"#/components/schemas/type_messages:MessageTimestamp"},"from":{"$ref":"#/components/schemas/type_messages:MessageFrom"},"to":{"$ref":"#/components/schemas/type_messages:MessageTo"},"cc":{"$ref":"#/components/schemas/type_messages:MessageCc"},"bcc":{"$ref":"#/components/schemas/type_messages:MessageBcc"},"subject":{"$ref":"#/components/schemas/type_messages:MessageSubject"},"preview":{"$ref":"#/components/schemas/type_messages:MessagePreview"},"attachments":{"$ref":"#/components/schemas/type_messages:MessageAttachments"},"in_reply_to":{"$ref":"#/components/schemas/type_messages:MessageInReplyTo"},"references":{"$ref":"#/components/schemas/type_messages:MessageReferences"},"headers":{"$ref":"#/components/schemas/type_messages:MessageHeaders"},"size":{"$ref":"#/components/schemas/type_messages:MessageSize"},"updated_at":{"$ref":"#/components/schemas/type_messages:MessageUpdatedAt"},"created_at":{"$ref":"#/components/schemas/type_messages:MessageCreatedAt"},"highlights":{"$ref":"#/components/schemas/type_messages:SearchMessageHighlights","description":"Matched fragments per field. Present only when the query matched an indexed field."}},"required":["inbox_id","thread_id","message_id","labels","timestamp","from","to","size","updated_at","created_at"],"title":"SearchMessageItem"},"type_messages:SearchMessagesResponse":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/type_:Count"},"limit":{"$ref":"#/components/schemas/type_:Limit"},"next_page_token":{"$ref":"#/components/schemas/type_:PageToken"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/type_messages:SearchMessageItem"},"description":"Ordered by relevance, best match first."}},"required":["count","messages"],"title":"SearchMessagesResponse"},"type_messages:BatchGetMessagesMessageIds":{"type":"array","items":{"$ref":"#/components/schemas/type_messages:MessageId"},"description":"IDs of messages to fetch. Maximum 500 ids per request. Duplicates are\nrejected with a validation error. IDs not found in the inbox (including\ncross-inbox or permission-restricted) are silently omitted from the\nresponse; callers detect misses by comparing `count` against `limit`.","title":"BatchGetMessagesMessageIds"},"type_messages:BatchGetMessagesRequest":{"type":"object","properties":{"message_ids":{"$ref":"#/components/schemas/type_messages:BatchGetMessagesMessageIds"}},"required":["message_ids"],"title":"BatchGetMessagesRequest"},"type_messages:BatchGetMessagesResponse":{"type":"object","properties":{"limit":{"$ref":"#/components/schemas/type_:Limit"},"count":{"$ref":"#/components/schemas/type_:Count"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/type_messages:Message"},"description":"Found messages. Order matches `message_ids` in the request. Body\nfields (`text`, `html`, `extracted_text`, `extracted_html`) are\nnever populated; use the single-message endpoint to retrieve bodies."}},"required":["limit","count","messages"],"title":"BatchGetMessagesResponse"},"type_messages:BatchUpdateMessagesMessageIds":{"type":"array","items":{"$ref":"#/components/schemas/type_messages:MessageId"},"description":"IDs of messages to update. Maximum 50 ids per request. Duplicates are\nrejected with a validation error. IDs not found in the inbox (including\ncross-inbox or permission-restricted) are silently excluded from the\nupdate; callers detect exclusions by comparing `count` against `limit`.","title":"BatchUpdateMessagesMessageIds"},"type_messages:UpdateMessageLabels":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Label or list of labels.","title":"UpdateMessageLabels"},"type_messages:BatchUpdateMessagesRequest":{"type":"object","properties":{"message_ids":{"$ref":"#/components/schemas/type_messages:BatchUpdateMessagesMessageIds"},"add_labels":{"$ref":"#/components/schemas/type_messages:UpdateMessageLabels","description":"Label or labels to add to every message."},"remove_labels":{"$ref":"#/components/schemas/type_messages:UpdateMessageLabels","description":"Label or labels to remove from every message."}},"required":["message_ids"],"title":"BatchUpdateMessagesRequest"},"type_messages:UpdateMessageResponse":{"type":"object","properties":{"message_id":{"$ref":"#/components/schemas/type_messages:MessageId"},"labels":{"$ref":"#/components/schemas/type_messages:MessageLabels"}},"required":["message_id","labels"],"title":"UpdateMessageResponse"},"type_messages:BatchUpdateMessagesResponse":{"type":"object","properties":{"limit":{"$ref":"#/components/schemas/type_:Limit"},"count":{"$ref":"#/components/schemas/type_:Count"},"updates":{"type":"array","items":{"$ref":"#/components/schemas/type_messages:UpdateMessageResponse"},"description":"Updated messages with their new labels. Order matches `message_ids`\nin the request. Excluded ids are omitted, so `count` may be less than\n`limit`."}},"required":["limit","count","updates"],"title":"BatchUpdateMessagesResponse"},"type_messages:RawMessageResponse":{"type":"object","properties":{"message_id":{"$ref":"#/components/schemas/type_messages:MessageId","description":"ID of the message."},"size":{"$ref":"#/components/schemas/type_messages:MessageSize","description":"Size of the raw message in bytes."},"download_url":{"type":"string","description":"S3 presigned URL to download the raw message. Expires at expires_at."},"expires_at":{"type":"string","format":"date-time","description":"Time at which the download URL expires."}},"required":["message_id","size","download_url","expires_at"],"description":"S3 presigned URL to download the raw .eml file.","title":"RawMessageResponse"},"type_messages:UpdateMessageRequest":{"type":"object","properties":{"add_labels":{"$ref":"#/components/schemas/type_messages:UpdateMessageLabels","description":"Label or labels to add to message."},"remove_labels":{"$ref":"#/components/schemas/type_messages:UpdateMessageLabels","description":"Label or labels to remove from message."}},"title":"UpdateMessageRequest"},"type_messages:Addresses":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"title":"Addresses"},"type_messages:SendMessageReplyTo":{"$ref":"#/components/schemas/type_messages:Addresses","description":"Reply-to address or addresses.","title":"SendMessageReplyTo"},"type_messages:SendMessageTo":{"$ref":"#/components/schemas/type_messages:Addresses","description":"Recipient address or addresses.","title":"SendMessageTo"},"type_messages:SendMessageCc":{"$ref":"#/components/schemas/type_messages:Addresses","description":"CC recipient address or addresses.","title":"SendMessageCc"},"type_messages:SendMessageBcc":{"$ref":"#/components/schemas/type_messages:Addresses","description":"BCC recipient address or addresses.","title":"SendMessageBcc"},"type_attachments:SendAttachment":{"type":"object","properties":{"filename":{"$ref":"#/components/schemas/type_attachments:AttachmentFilename"},"content_type":{"$ref":"#/components/schemas/type_attachments:AttachmentContentType"},"content_disposition":{"$ref":"#/components/schemas/type_attachments:AttachmentContentDisposition"},"content_id":{"$ref":"#/components/schemas/type_attachments:AttachmentContentId"},"content":{"type":"string","description":"Base64 encoded content of attachment."},"url":{"type":"string","description":"URL to the attachment."}},"title":"SendAttachment"},"type_messages:SendMessageAttachments":{"type":"array","items":{"$ref":"#/components/schemas/type_attachments:SendAttachment"},"description":"Attachments to include in message.","title":"SendMessageAttachments"},"type_messages:SendMessageHeaders":{"type":"object","additionalProperties":{"type":"string"},"description":"Headers to include in message.","title":"SendMessageHeaders"},"type_messages:SendMessageRequest":{"type":"object","properties":{"labels":{"$ref":"#/components/schemas/type_messages:MessageLabels"},"reply_to":{"$ref":"#/components/schemas/type_messages:SendMessageReplyTo"},"to":{"$ref":"#/components/schemas/type_messages:SendMessageTo"},"cc":{"$ref":"#/components/schemas/type_messages:SendMessageCc"},"bcc":{"$ref":"#/components/schemas/type_messages:SendMessageBcc"},"subject":{"$ref":"#/components/schemas/type_messages:MessageSubject"},"text":{"$ref":"#/components/schemas/type_messages:MessageText"},"html":{"$ref":"#/components/schemas/type_messages:MessageHtml"},"attachments":{"$ref":"#/components/schemas/type_messages:SendMessageAttachments"},"headers":{"$ref":"#/components/schemas/type_messages:SendMessageHeaders"}},"title":"SendMessageRequest"},"type_messages:SendMessageResponse":{"type":"object","properties":{"message_id":{"$ref":"#/components/schemas/type_messages:MessageId"},"thread_id":{"$ref":"#/components/schemas/type_threads:ThreadId"}},"required":["message_id","thread_id"],"title":"SendMessageResponse"},"type_messages:ReplyAll":{"type":"boolean","description":"Reply to all recipients of the original message.","title":"ReplyAll"},"type_messages:ReplyToMessageRequest":{"type":"object","properties":{"labels":{"$ref":"#/components/schemas/type_messages:MessageLabels"},"reply_to":{"$ref":"#/components/schemas/type_messages:SendMessageReplyTo"},"to":{"$ref":"#/components/schemas/type_messages:SendMessageTo"},"cc":{"$ref":"#/components/schemas/type_messages:SendMessageCc"},"bcc":{"$ref":"#/components/schemas/type_messages:SendMessageBcc"},"reply_all":{"$ref":"#/components/schemas/type_messages:ReplyAll"},"text":{"$ref":"#/components/schemas/type_messages:MessageText"},"html":{"$ref":"#/components/schemas/type_messages:MessageHtml"},"attachments":{"$ref":"#/components/schemas/type_messages:SendMessageAttachments"},"headers":{"$ref":"#/components/schemas/type_messages:SendMessageHeaders"}},"title":"ReplyToMessageRequest"},"type_messages:ReplyAllMessageRequest":{"type":"object","properties":{"labels":{"$ref":"#/components/schemas/type_messages:MessageLabels"},"reply_to":{"$ref":"#/components/schemas/type_messages:SendMessageReplyTo"},"text":{"$ref":"#/components/schemas/type_messages:MessageText"},"html":{"$ref":"#/components/schemas/type_messages:MessageHtml"},"attachments":{"$ref":"#/components/schemas/type_messages:SendMessageAttachments"},"headers":{"$ref":"#/components/schemas/type_messages:SendMessageHeaders"}},"title":"ReplyAllMessageRequest"},"type_drafts:DraftId":{"type":"string","description":"ID of draft.","title":"DraftId"},"type_drafts:DraftLabels":{"type":"array","items":{"type":"string"},"description":"Labels of draft.","title":"DraftLabels"},"type_drafts:DraftTo":{"type":"array","items":{"type":"string"},"description":"Addresses of recipients. In format `username@domain.com` or `Display Name <username@domain.com>`.","title":"DraftTo"},"type_drafts:DraftCc":{"type":"array","items":{"type":"string"},"description":"Addresses of CC recipients. In format `username@domain.com` or `Display Name <username@domain.com>`.","title":"DraftCc"},"type_drafts:DraftBcc":{"type":"array","items":{"type":"string"},"description":"Addresses of BCC recipients. In format `username@domain.com` or `Display Name <username@domain.com>`.","title":"DraftBcc"},"type_drafts:DraftSubject":{"type":"string","description":"Subject of draft.","title":"DraftSubject"},"type_drafts:DraftPreview":{"type":"string","description":"Text preview of draft.","title":"DraftPreview"},"type_drafts:DraftAttachments":{"type":"array","items":{"$ref":"#/components/schemas/type_attachments:Attachment"},"description":"Attachments in draft.","title":"DraftAttachments"},"type_drafts:DraftInReplyTo":{"type":"string","description":"ID of message being replied to.","title":"DraftInReplyTo"},"type_drafts:DraftSendStatus":{"type":"string","enum":["scheduled","sending","failed"],"description":"Schedule send status of draft.","title":"DraftSendStatus"},"type_drafts:DraftSendAt":{"type":"string","format":"date-time","description":"Time at which to schedule send draft.","title":"DraftSendAt"},"type_drafts:DraftUpdatedAt":{"type":"string","format":"date-time","description":"Time at which draft was last updated.","title":"DraftUpdatedAt"},"type_drafts:DraftItem":{"type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/type_inboxes:InboxId"},"draft_id":{"$ref":"#/components/schemas/type_drafts:DraftId"},"labels":{"$ref":"#/components/schemas/type_drafts:DraftLabels"},"to":{"$ref":"#/components/schemas/type_drafts:DraftTo"},"cc":{"$ref":"#/components/schemas/type_drafts:DraftCc"},"bcc":{"$ref":"#/components/schemas/type_drafts:DraftBcc"},"subject":{"$ref":"#/components/schemas/type_drafts:DraftSubject"},"preview":{"$ref":"#/components/schemas/type_drafts:DraftPreview"},"attachments":{"$ref":"#/components/schemas/type_drafts:DraftAttachments"},"in_reply_to":{"$ref":"#/components/schemas/type_drafts:DraftInReplyTo"},"send_status":{"$ref":"#/components/schemas/type_drafts:DraftSendStatus"},"send_at":{"$ref":"#/components/schemas/type_drafts:DraftSendAt"},"updated_at":{"$ref":"#/components/schemas/type_drafts:DraftUpdatedAt"}},"required":["inbox_id","draft_id","labels","updated_at"],"title":"DraftItem"},"type_drafts:ListDraftsResponse":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/type_:Count"},"limit":{"$ref":"#/components/schemas/type_:Limit"},"next_page_token":{"$ref":"#/components/schemas/type_:PageToken"},"drafts":{"type":"array","items":{"$ref":"#/components/schemas/type_drafts:DraftItem"},"description":"Ordered by `updated_at` descending."}},"required":["count","drafts"],"title":"ListDraftsResponse"},"type_drafts:DraftClientId":{"type":"string","description":"Client ID of draft.","title":"DraftClientId"},"type_drafts:DraftReplyTo":{"type":"array","items":{"type":"string"},"description":"Reply-to addresses. In format `username@domain.com` or `Display Name <username@domain.com>`.","title":"DraftReplyTo"},"type_drafts:DraftText":{"type":"string","description":"Plain text body of draft.","title":"DraftText"},"type_drafts:DraftHtml":{"type":"string","description":"HTML body of draft.","title":"DraftHtml"},"type_drafts:Draft":{"type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/type_inboxes:InboxId"},"draft_id":{"$ref":"#/components/schemas/type_drafts:DraftId"},"client_id":{"$ref":"#/components/schemas/type_drafts:DraftClientId"},"labels":{"$ref":"#/components/schemas/type_drafts:DraftLabels"},"reply_to":{"$ref":"#/components/schemas/type_drafts:DraftReplyTo"},"to":{"$ref":"#/components/schemas/type_drafts:DraftTo"},"cc":{"$ref":"#/components/schemas/type_drafts:DraftCc"},"bcc":{"$ref":"#/components/schemas/type_drafts:DraftBcc"},"subject":{"$ref":"#/components/schemas/type_drafts:DraftSubject"},"preview":{"$ref":"#/components/schemas/type_drafts:DraftPreview"},"text":{"$ref":"#/components/schemas/type_drafts:DraftText"},"html":{"$ref":"#/components/schemas/type_drafts:DraftHtml"},"attachments":{"$ref":"#/components/schemas/type_drafts:DraftAttachments"},"in_reply_to":{"$ref":"#/components/schemas/type_drafts:DraftInReplyTo"},"references":{"type":"array","items":{"type":"string"},"description":"IDs of previous messages in thread."},"send_status":{"$ref":"#/components/schemas/type_drafts:DraftSendStatus"},"send_at":{"$ref":"#/components/schemas/type_drafts:DraftSendAt"},"updated_at":{"$ref":"#/components/schemas/type_drafts:DraftUpdatedAt"},"created_at":{"type":"string","format":"date-time","description":"Time at which draft was created."}},"required":["inbox_id","draft_id","labels","updated_at","created_at"],"title":"Draft"},"type_drafts:CreateDraftRequest":{"type":"object","properties":{"labels":{"$ref":"#/components/schemas/type_drafts:DraftLabels"},"reply_to":{"$ref":"#/components/schemas/type_drafts:DraftReplyTo"},"to":{"$ref":"#/components/schemas/type_drafts:DraftTo"},"cc":{"$ref":"#/components/schemas/type_drafts:DraftCc"},"bcc":{"$ref":"#/components/schemas/type_drafts:DraftBcc"},"subject":{"$ref":"#/components/schemas/type_drafts:DraftSubject"},"text":{"$ref":"#/components/schemas/type_drafts:DraftText"},"html":{"$ref":"#/components/schemas/type_drafts:DraftHtml"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/type_attachments:SendAttachment"},"description":"Attachments to include in draft."},"in_reply_to":{"$ref":"#/components/schemas/type_drafts:DraftInReplyTo"},"send_at":{"$ref":"#/components/schemas/type_drafts:DraftSendAt"},"client_id":{"$ref":"#/components/schemas/type_drafts:DraftClientId"}},"title":"CreateDraftRequest"},"type_drafts:UpdateDraftRequest":{"type":"object","properties":{"reply_to":{"$ref":"#/components/schemas/type_drafts:DraftReplyTo"},"to":{"$ref":"#/components/schemas/type_drafts:DraftTo"},"cc":{"$ref":"#/components/schemas/type_drafts:DraftCc"},"bcc":{"$ref":"#/components/schemas/type_drafts:DraftBcc"},"subject":{"$ref":"#/components/schemas/type_drafts:DraftSubject"},"text":{"$ref":"#/components/schemas/type_drafts:DraftText"},"html":{"$ref":"#/components/schemas/type_drafts:DraftHtml"},"send_at":{"$ref":"#/components/schemas/type_drafts:DraftSendAt"}},"title":"UpdateDraftRequest"},"type_lists:Direction":{"type":"string","enum":["send","receive","reply"],"description":"Direction of list entry.","title":"Direction"},"type_lists:ListType":{"type":"string","enum":["allow","block"],"description":"Type of list entry.","title":"ListType"},"type_:OrganizationId":{"type":"string","description":"ID of organization.","title":"OrganizationId"},"type_lists:EntryType":{"type":"string","enum":["email","domain"],"description":"Whether the entry is an email address or domain.","title":"EntryType"},"type_lists:PodListEntry":{"type":"object","properties":{"entry":{"type":"string","description":"Email address or domain of list entry."},"organization_id":{"$ref":"#/components/schemas/type_:OrganizationId"},"reason":{"type":"string","description":"Reason for adding the entry."},"direction":{"$ref":"#/components/schemas/type_lists:Direction"},"list_type":{"$ref":"#/components/schemas/type_lists:ListType"},"entry_type":{"$ref":"#/components/schemas/type_lists:EntryType"},"created_at":{"type":"string","format":"date-time","description":"Time at which entry was created."},"read_only":{"type":"boolean","description":"Whether the entry is read-only and cannot be deleted via the API."},"pod_id":{"type":"string","description":"ID of pod."},"inbox_id":{"type":"string","description":"ID of inbox, if entry is inbox-scoped."}},"required":["entry","organization_id","direction","list_type","entry_type","created_at","pod_id"],"title":"PodListEntry"},"type_lists:PodListListEntriesResponse":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/type_:Count"},"limit":{"$ref":"#/components/schemas/type_:Limit"},"next_page_token":{"$ref":"#/components/schemas/type_:PageToken"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/type_lists:PodListEntry"},"description":"Ordered by entry ascending."}},"required":["count","entries"],"title":"PodListListEntriesResponse"},"type_lists:CreateListEntryRequest":{"type":"object","properties":{"entry":{"type":"string","description":"Email address or domain to add."},"reason":{"type":"string","description":"Reason for adding the entry."}},"required":["entry"],"title":"CreateListEntryRequest"},"type_metrics:MetricEventType":{"type":"string","enum":["message.received","message.received.spam","message.received.blocked","message.received.unauthenticated","message.sent","message.delivered","message.bounced","message.complained","message.rejected","domain.verified"],"description":"Type of metric event.","title":"MetricEventType"},"type_metrics:MetricEventTypes":{"type":"array","items":{"$ref":"#/components/schemas/type_metrics:MetricEventType"},"description":"List of metric event types to query.","title":"MetricEventTypes"},"type_metrics:Start":{"type":"string","format":"date-time","description":"Start timestamp for the query.","title":"Start"},"type_metrics:End":{"type":"string","format":"date-time","description":"End timestamp for the query.","title":"End"},"type_metrics:Period":{"type":"integer","description":"Size of each time bucket as a whole number of seconds, between 1 and 86400.","title":"Period"},"type_metrics:MetricLimit":{"type":"integer","description":"Limit on number of buckets to return.","title":"MetricLimit"},"type_metrics:Descending":{"type":"boolean","description":"Sort in descending order.","title":"Descending"},"type_metrics:MetricBucket":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"Timestamp of the bucket."},"count":{"type":"integer","description":"Count of events in the bucket."}},"required":["timestamp","count"],"title":"MetricBucket"},"type_metrics:QueryMetricsResponse":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/type_metrics:MetricBucket"}},"description":"Metrics grouped by event type.","title":"QueryMetricsResponse"},"type_metrics:UsageType":{"type":"string","enum":["storage_bytes","message_count","thread_count","inbox_count","pod_count","domain_count"],"description":"Type of usage metric. Inbox-scoped queries carry `storage_bytes`,\n`message_count`, and `thread_count`; pod-scoped queries add `inbox_count`\nand `domain_count`; organization-scoped queries add `pod_count`.","title":"UsageType"},"type_metrics:UsageTypes":{"type":"array","items":{"$ref":"#/components/schemas/type_metrics:UsageType"},"description":"List of usage metric types to query. Omit to query every type valid for the scope.","title":"UsageTypes"},"type_metrics:UsagePoint":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"Timestamp of the point."},"value":{"type":"integer","format":"int64","description":"Cumulative value of the usage metric at the timestamp."}},"required":["timestamp","value"],"title":"UsagePoint"},"type_metrics:QueryUsageResponse":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/type_metrics:UsagePoint"}},"description":"Cumulative usage series grouped by usage type.","title":"QueryUsageResponse"},"type_inbox-events:InboxEventId":{"type":"string","description":"ID of event.","title":"InboxEventId"},"type_inbox-events:InboxEventType":{"type":"string","enum":["label.added","label.removed"],"description":"Type of inbox event. Wire format is dot.case to match the\nconvention used by webhook events (`message.received`,\n`domain.verified`, etc. in events.yml). Pre-2026-04 these were\n`label_added`/`label_removed` (snake_case). The Fern enum's `name`\nfield stays uppercase-snake (Fern convention); only the wire\n`value` changed.","title":"InboxEventType"},"type_inbox-events:InboxEvent":{"type":"object","properties":{"organization_id":{"$ref":"#/components/schemas/type_:OrganizationId"},"pod_id":{"type":"string","description":"ID of pod."},"inbox_id":{"$ref":"#/components/schemas/type_inboxes:InboxId"},"event_id":{"$ref":"#/components/schemas/type_inbox-events:InboxEventId"},"event_type":{"$ref":"#/components/schemas/type_inbox-events:InboxEventType"},"message_id":{"type":"string","description":"ID of message."},"label":{"type":"string","description":"Label added or removed."},"event_at":{"type":"string","format":"date-time","description":"Time at which the event occurred."},"created_at":{"type":"string","format":"date-time","description":"Time at which the event was recorded."}},"required":["organization_id","pod_id","inbox_id","event_id","event_type","message_id","label","event_at","created_at"],"title":"InboxEvent"},"type_inbox-events:ListInboxEventsResponse":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/type_:Count"},"limit":{"$ref":"#/components/schemas/type_:Limit"},"next_page_token":{"$ref":"#/components/schemas/type_:PageToken"},"events":{"type":"array","items":{"$ref":"#/components/schemas/type_inbox-events:InboxEvent"},"description":"Ordered by `event_id` descending."}},"required":["count","events"],"title":"ListInboxEventsResponse"},"type_api-keys:ApiKeyId":{"type":"string","description":"ID of api key.","title":"ApiKeyId"},"type_api-keys:Prefix":{"type":"string","description":"Prefix of api key.","title":"Prefix"},"type_api-keys:Name":{"type":"string","description":"Name of api key.","title":"Name"},"type_api-keys:ApiKeyPermissions":{"type":"object","properties":{"inbox_read":{"type":"boolean","description":"Read inbox details."},"inbox_create":{"type":"boolean","description":"Create new inboxes."},"inbox_update":{"type":"boolean","description":"Update inbox settings."},"inbox_delete":{"type":"boolean","description":"Delete inboxes."},"thread_read":{"type":"boolean","description":"Read threads."},"thread_delete":{"type":"boolean","description":"Delete threads."},"message_read":{"type":"boolean","description":"Read messages."},"message_send":{"type":"boolean","description":"Send messages."},"message_update":{"type":"boolean","description":"Update message labels."},"label_spam_read":{"type":"boolean","description":"Access messages labeled spam."},"label_blocked_read":{"type":"boolean","description":"Access messages labeled blocked."},"label_trash_read":{"type":"boolean","description":"Access messages labeled trash."},"draft_read":{"type":"boolean","description":"Read drafts."},"draft_create":{"type":"boolean","description":"Create drafts."},"draft_update":{"type":"boolean","description":"Update drafts."},"draft_delete":{"type":"boolean","description":"Delete drafts."},"draft_send":{"type":"boolean","description":"Send drafts."},"webhook_read":{"type":"boolean","description":"Read webhook configurations."},"webhook_create":{"type":"boolean","description":"Create webhooks."},"webhook_update":{"type":"boolean","description":"Update webhooks."},"webhook_delete":{"type":"boolean","description":"Delete webhooks."},"domain_read":{"type":"boolean","description":"Read domain details."},"domain_create":{"type":"boolean","description":"Create domains."},"domain_update":{"type":"boolean","description":"Update domains."},"domain_delete":{"type":"boolean","description":"Delete domains."},"list_entry_read":{"type":"boolean","description":"Read list entries."},"list_entry_create":{"type":"boolean","description":"Create list entries."},"list_entry_delete":{"type":"boolean","description":"Delete list entries."},"metrics_read":{"type":"boolean","description":"Read metrics."},"api_key_read":{"type":"boolean","description":"Read API keys."},"api_key_create":{"type":"boolean","description":"Create API keys."},"api_key_delete":{"type":"boolean","description":"Delete API keys."},"pod_read":{"type":"boolean","description":"Read pods."},"pod_create":{"type":"boolean","description":"Create pods."},"pod_delete":{"type":"boolean","description":"Delete pods."}},"description":"Granular permissions for the API key. When ommitted all permissions are granted. Otherwise, only permissions set to true are granted.","title":"ApiKeyPermissions"},"type_api-keys:CreatedAt":{"type":"string","format":"date-time","description":"Time at which api key was created.","title":"CreatedAt"},"type_api-keys:ApiKey":{"type":"object","properties":{"api_key_id":{"$ref":"#/components/schemas/type_api-keys:ApiKeyId"},"prefix":{"$ref":"#/components/schemas/type_api-keys:Prefix"},"name":{"$ref":"#/components/schemas/type_api-keys:Name"},"pod_id":{"type":"string","description":"Pod ID the api key is scoped to. If set, the key can only access resources within this pod."},"inbox_id":{"type":"string","description":"Inbox ID the api key is scoped to. If set, the key can only access resources within this inbox."},"used_at":{"type":"string","format":"date-time","description":"Time at which api key was last used."},"permissions":{"$ref":"#/components/schemas/type_api-keys:ApiKeyPermissions"},"created_at":{"$ref":"#/components/schemas/type_api-keys:CreatedAt"}},"required":["api_key_id","prefix","name","created_at"],"title":"ApiKey"},"type_api-keys:ListApiKeysResponse":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/type_:Count"},"next_page_token":{"$ref":"#/components/schemas/type_:PageToken"},"api_keys":{"type":"array","items":{"$ref":"#/components/schemas/type_api-keys:ApiKey"},"description":"Ordered by `created_at` descending."}},"required":["count","api_keys"],"title":"ListApiKeysResponse"},"type_api-keys:CreateApiKeyRequest":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/type_api-keys:Name"},"permissions":{"$ref":"#/components/schemas/type_api-keys:ApiKeyPermissions"}},"title":"CreateApiKeyRequest"},"type_api-keys:CreateApiKeyResponse":{"type":"object","properties":{"api_key_id":{"$ref":"#/components/schemas/type_api-keys:ApiKeyId"},"api_key":{"type":"string","description":"API key."},"prefix":{"$ref":"#/components/schemas/type_api-keys:Prefix"},"name":{"$ref":"#/components/schemas/type_api-keys:Name"},"pod_id":{"type":"string","description":"Pod ID the api key is scoped to."},"inbox_id":{"type":"string","description":"Inbox ID the api key is scoped to."},"permissions":{"$ref":"#/components/schemas/type_api-keys:ApiKeyPermissions"},"created_at":{"$ref":"#/components/schemas/type_api-keys:CreatedAt"}},"required":["api_key_id","api_key","prefix","name","created_at"],"title":"CreateApiKeyResponse"},"type_webhooks:WebhookId":{"type":"string","description":"ID of webhook.","title":"WebhookId"},"type_webhooks:Url":{"type":"string","description":"URL of webhook endpoint.","title":"Url"},"type_events:EventType":{"type":"string","enum":["message.received","message.received.spam","message.received.blocked","message.received.unauthenticated","message.sent","message.delivered","message.bounced","message.complained","message.rejected","domain.verified"],"title":"EventType"},"type_events:EventTypes":{"type":"array","items":{"$ref":"#/components/schemas/type_events:EventType"},"description":"Event types for which to send events.","title":"EventTypes"},"type_events:PodIds":{"type":"array","items":{"type":"string"},"description":"Pods for which to send events. Maximum 10 per webhook.","title":"PodIds"},"type_events:InboxIds":{"type":"array","items":{"type":"string"},"description":"Inboxes for which to send events. Maximum 10 per webhook.","title":"InboxIds"},"type_webhooks:ClientId":{"type":"string","description":"Client ID of webhook.","title":"ClientId"},"type_webhooks:Webhook":{"type":"object","properties":{"webhook_id":{"$ref":"#/components/schemas/type_webhooks:WebhookId"},"url":{"$ref":"#/components/schemas/type_webhooks:Url"},"event_types":{"$ref":"#/components/schemas/type_events:EventTypes"},"pod_ids":{"$ref":"#/components/schemas/type_events:PodIds"},"inbox_ids":{"$ref":"#/components/schemas/type_events:InboxIds"},"secret":{"type":"string","description":"Secret for webhook signature verification."},"enabled":{"type":"boolean","description":"Webhook is enabled."},"updated_at":{"type":"string","format":"date-time","description":"Time at which webhook was last updated."},"created_at":{"type":"string","format":"date-time","description":"Time at which webhook was created."},"client_id":{"$ref":"#/components/schemas/type_webhooks:ClientId"}},"required":["webhook_id","url","secret","enabled","updated_at","created_at"],"title":"Webhook"},"type_webhooks:ListWebhooksResponse":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/type_:Count"},"limit":{"$ref":"#/components/schemas/type_:Limit"},"next_page_token":{"$ref":"#/components/schemas/type_:PageToken"},"webhooks":{"type":"array","items":{"$ref":"#/components/schemas/type_webhooks:Webhook"},"description":"Ordered by `created_at` descending."}},"required":["count","webhooks"],"title":"ListWebhooksResponse"},"type_webhooks:CreateWebhookRequest":{"type":"object","properties":{"url":{"$ref":"#/components/schemas/type_webhooks:Url"},"event_types":{"$ref":"#/components/schemas/type_events:EventTypes","description":"Full list of event types this webhook should receive. At least one type is required. Send every type you\nwant in this array (not incremental). See [Webhooks overview](https://docs.agentmail.to/webhooks-overview)\nfor spam, blocked, and unauthenticated events and required permissions."},"pod_ids":{"$ref":"#/components/schemas/type_events:PodIds"},"inbox_ids":{"$ref":"#/components/schemas/type_events:InboxIds"},"client_id":{"$ref":"#/components/schemas/type_webhooks:ClientId"}},"required":["url","event_types"],"title":"CreateWebhookRequest"},"type_webhooks:UpdateWebhookRequest":{"type":"object","properties":{"add_inbox_ids":{"$ref":"#/components/schemas/type_events:InboxIds","description":"Inbox IDs to subscribe to the webhook."},"remove_inbox_ids":{"$ref":"#/components/schemas/type_events:InboxIds","description":"Inbox IDs to unsubscribe from the webhook."},"add_pod_ids":{"$ref":"#/components/schemas/type_events:PodIds","description":"Pod IDs to subscribe to the webhook."},"remove_pod_ids":{"$ref":"#/components/schemas/type_events:PodIds","description":"Pod IDs to unsubscribe from the webhook."},"event_types":{"$ref":"#/components/schemas/type_events:EventTypes","description":"When you send a non-empty list, it replaces the webhook's subscribed event types in full (the same\n\"set the list\" behavior as create). It is not a merge or diff: include every event type you want after\nthe update. Sending a one-element array means the webhook will only receive that one type afterward.\nOmit this field or send an empty array to leave event types unchanged. Clearing all types with an empty\nlist is not supported. Subscribing to `message.received.spam`, `message.received.blocked`, or\n`message.received.unauthenticated` requires the matching label permission on the API key."}},"title":"UpdateWebhookRequest"},"type_domains:DomainId":{"type":"string","description":"The ID of the domain.","title":"DomainId"},"type_domains:DomainName":{"type":"string","description":"The name of the domain (e.g., `example.com`).","title":"DomainName"},"type_domains:FeedbackEnabled":{"type":"boolean","description":"Bounce and complaint notifications are sent to your inboxes.","title":"FeedbackEnabled"},"type_domains:SubdomainsEnabled":{"type":"boolean","description":"Allow inboxes on any subdomain of this domain. Adds a required wildcard MX\nrecord (`*.<domain>`) to `records`.","title":"SubdomainsEnabled"},"type_domains:ClientId":{"type":"string","description":"Client ID of domain.","title":"ClientId"},"type_domains:DomainItem":{"type":"object","properties":{"pod_id":{"$ref":"#/components/schemas/type_pods:PodId"},"domain_id":{"$ref":"#/components/schemas/type_domains:DomainId"},"domain":{"$ref":"#/components/schemas/type_domains:DomainName"},"feedback_enabled":{"$ref":"#/components/schemas/type_domains:FeedbackEnabled"},"subdomains_enabled":{"$ref":"#/components/schemas/type_domains:SubdomainsEnabled"},"client_id":{"$ref":"#/components/schemas/type_domains:ClientId"},"updated_at":{"type":"string","format":"date-time","description":"Time at which the domain was last updated."},"created_at":{"type":"string","format":"date-time","description":"Time at which the domain was created."}},"required":["domain_id","domain","feedback_enabled","subdomains_enabled","updated_at","created_at"],"title":"DomainItem"},"type_domains:ListDomainsResponse":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/type_:Count"},"limit":{"$ref":"#/components/schemas/type_:Limit"},"next_page_token":{"$ref":"#/components/schemas/type_:PageToken"},"domains":{"type":"array","items":{"$ref":"#/components/schemas/type_domains:DomainItem"},"description":"Ordered by `created_at` descending."}},"required":["count","domains"],"title":"ListDomainsResponse"},"type_domains:VerificationStatus":{"type":"string","enum":["NOT_STARTED","PENDING","INVALID","FAILED","VERIFYING","VERIFIED"],"title":"VerificationStatus"},"type_domains:Status":{"$ref":"#/components/schemas/type_domains:VerificationStatus","description":"The verification status of the domain.","title":"Status"},"type_domains:RecordType":{"type":"string","enum":["TXT","CNAME","MX"],"title":"RecordType"},"type_domains:RecordStatus":{"type":"string","enum":["MISSING","INVALID","VALID"],"title":"RecordStatus"},"type_domains:VerificationRecord":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/type_domains:RecordType","description":"The type of the DNS record."},"name":{"type":"string","description":"The name or host of the record."},"value":{"type":"string","description":"The value of the record."},"status":{"$ref":"#/components/schemas/type_domains:RecordStatus","description":"The verification status of this specific record."},"priority":{"type":"integer","description":"The priority of the MX record."}},"required":["type","name","value","status"],"title":"VerificationRecord"},"type_domains:Domain":{"type":"object","properties":{"pod_id":{"$ref":"#/components/schemas/type_pods:PodId"},"domain_id":{"$ref":"#/components/schemas/type_domains:DomainId"},"domain":{"$ref":"#/components/schemas/type_domains:DomainName"},"status":{"$ref":"#/components/schemas/type_domains:Status"},"feedback_enabled":{"$ref":"#/components/schemas/type_domains:FeedbackEnabled"},"subdomains_enabled":{"$ref":"#/components/schemas/type_domains:SubdomainsEnabled"},"records":{"type":"array","items":{"$ref":"#/components/schemas/type_domains:VerificationRecord"},"description":"A list of DNS records required to verify the domain. Includes a\nwildcard MX record (`*.<domain>`) when `subdomains_enabled` is true."},"client_id":{"$ref":"#/components/schemas/type_domains:ClientId"},"updated_at":{"type":"string","format":"date-time","description":"Time at which the domain was last updated."},"created_at":{"type":"string","format":"date-time","description":"Time at which the domain was created."}},"required":["domain_id","domain","status","feedback_enabled","subdomains_enabled","records","updated_at","created_at"],"title":"Domain"},"type_domains:CreateDomainRequest":{"type":"object","properties":{"domain":{"$ref":"#/components/schemas/type_domains:DomainName"},"feedback_enabled":{"$ref":"#/components/schemas/type_domains:FeedbackEnabled"},"subdomains_enabled":{"$ref":"#/components/schemas/type_domains:SubdomainsEnabled"}},"required":["domain"],"title":"CreateDomainRequest"},"type_domains:UpdateDomainRequest":{"type":"object","properties":{"feedback_enabled":{"$ref":"#/components/schemas/type_domains:FeedbackEnabled"},"subdomains_enabled":{"$ref":"#/components/schemas/type_domains:SubdomainsEnabled"}},"description":"Provide at least one of `feedback_enabled` or `subdomains_enabled`. Omitted\nfields are left unchanged; an empty body is rejected. Enabling\n`subdomains_enabled` on a verified domain returns it to `PENDING` until the\nnewly-required wildcard MX record (`*.<domain>`) is published and verified.","title":"UpdateDomainRequest"},"type_lists:ListEntry":{"type":"object","properties":{"entry":{"type":"string","description":"Email address or domain of list entry."},"organization_id":{"$ref":"#/components/schemas/type_:OrganizationId"},"reason":{"type":"string","description":"Reason for adding the entry."},"direction":{"$ref":"#/components/schemas/type_lists:Direction"},"list_type":{"$ref":"#/components/schemas/type_lists:ListType"},"entry_type":{"$ref":"#/components/schemas/type_lists:EntryType"},"created_at":{"type":"string","format":"date-time","description":"Time at which entry was created."},"read_only":{"type":"boolean","description":"Whether the entry is read-only and cannot be deleted via the API."}},"required":["entry","organization_id","direction","list_type","entry_type","created_at"],"title":"ListEntry"},"type_lists:ListListEntriesResponse":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/type_:Count"},"limit":{"$ref":"#/components/schemas/type_:Limit"},"next_page_token":{"$ref":"#/components/schemas/type_:PageToken"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/type_lists:ListEntry"},"description":"Ordered by entry ascending."}},"required":["count","entries"],"title":"ListListEntriesResponse"},"type_pods:Name":{"type":"string","description":"Name of pod.","title":"Name"},"type_pods:ClientId":{"type":"string","description":"Client ID of pod.","title":"ClientId"},"type_pods:Pod":{"type":"object","properties":{"pod_id":{"$ref":"#/components/schemas/type_pods:PodId"},"name":{"$ref":"#/components/schemas/type_pods:Name"},"updated_at":{"type":"string","format":"date-time","description":"Time at which pod was last updated."},"created_at":{"type":"string","format":"date-time","description":"Time at which pod was created."},"client_id":{"$ref":"#/components/schemas/type_pods:ClientId"}},"required":["pod_id","name","updated_at","created_at"],"title":"Pod"},"type_pods:ListPodsResponse":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/type_:Count"},"limit":{"$ref":"#/components/schemas/type_:Limit"},"next_page_token":{"$ref":"#/components/schemas/type_:PageToken"},"pods":{"type":"array","items":{"$ref":"#/components/schemas/type_pods:Pod"},"description":"Ordered by `created_at` descending."}},"required":["count","pods"],"title":"ListPodsResponse"},"type_pods:CreatePodRequest":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/type_pods:Name"},"client_id":{"$ref":"#/components/schemas/type_pods:ClientId"}},"title":"CreatePodRequest"},"type_organizations:Organization":{"type":"object","properties":{"organization_id":{"$ref":"#/components/schemas/type_:OrganizationId"},"inbox_count":{"type":"integer","description":"Current number of inboxes."},"domain_count":{"type":"integer","description":"Current number of domains."},"inbox_limit":{"type":"integer","description":"Maximum number of inboxes allowed."},"domain_limit":{"type":"integer","description":"Maximum number of domains allowed."},"billing_id":{"type":"string","description":"Provider-agnostic billing customer ID."},"billing_type":{"type":"string","description":"Billing provider type (e.g. \"stripe\")."},"billing_subscription_id":{"type":"string","description":"Active billing subscription ID."},"authentication_id":{"type":"string","description":"Provider-agnostic authentication ID."},"authentication_type":{"type":"string","description":"Authentication provider type."},"updated_at":{"type":"string","format":"date-time","description":"Time at which organization was last updated."},"created_at":{"type":"string","format":"date-time","description":"Time at which organization was created."}},"required":["organization_id","inbox_count","domain_count","updated_at","created_at"],"description":"Organization details with usage limits and counts.","title":"Organization"},"type_auth:ScopeType":{"type":"string","enum":["organization","pod","inbox"],"description":"The scope tier the authenticated credential is bound to.","title":"ScopeType"},"type_auth:Identity":{"type":"object","properties":{"scope_type":{"$ref":"#/components/schemas/type_auth:ScopeType"},"scope_id":{"type":"string","description":"ID of the most specific scope the credential is bound to.\nEquals inbox_id when scope_type is inbox, pod_id when pod, organization_id when organization."},"organization_id":{"$ref":"#/components/schemas/type_:OrganizationId"},"pod_id":{"type":"string","description":"ID of the pod the credential is scoped to. Present when scope_type is pod or inbox."},"inbox_id":{"type":"string","description":"ID of the inbox the credential is scoped to. Present when scope_type is inbox."},"api_key_id":{"type":"string","description":"ID of the API key used to authenticate. Absent for JWT and proxy credentials."}},"required":["scope_type","scope_id","organization_id"],"description":"Identity and scope of the authenticated credential.","title":"Identity"},"type_webhooks/events:SvixId":{"type":"string","description":"ID of webhook message.","title":"SvixId"},"type_webhooks/events:SvixSignature":{"type":"string","description":"Signature of webhook message.","title":"SvixSignature"},"type_webhooks/events:SvixTimestamp":{"type":"string","format":"date-time","description":"Timestamp of webhook message.","title":"SvixTimestamp"},"type_events:MessageReceivedEventType":{"type":"string","enum":["message.received","message.received.spam","message.received.blocked","message.received.unauthenticated"],"title":"MessageReceivedEventType"},"type_events:EventId":{"type":"string","description":"ID of event.","title":"EventId"},"type_events:MessageReceivedEvent":{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"event_type":{"$ref":"#/components/schemas/type_events:MessageReceivedEventType"},"event_id":{"$ref":"#/components/schemas/type_events:EventId"},"message":{"$ref":"#/components/schemas/type_messages:Message"},"thread":{"$ref":"#/components/schemas/type_threads:ThreadItem"}},"required":["type","event_type","event_id","message","thread"],"description":"A message was received. Spam, blocked, and unauthenticated received-message events use the same payload shape with different `event_type` values.","title":"MessageReceivedEvent"},"type_events:Timestamp":{"type":"string","format":"date-time","description":"Timestamp of event.","title":"Timestamp"},"type_events:Send":{"type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/type_inboxes:InboxId"},"thread_id":{"$ref":"#/components/schemas/type_threads:ThreadId"},"message_id":{"$ref":"#/components/schemas/type_messages:MessageId"},"timestamp":{"$ref":"#/components/schemas/type_events:Timestamp"},"recipients":{"type":"array","items":{"type":"string"},"description":"Sent recipients."}},"required":["inbox_id","thread_id","message_id","timestamp","recipients"],"title":"Send"},"type_events:MessageSentEvent":{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"event_type":{"type":"string","enum":["message.sent"]},"event_id":{"$ref":"#/components/schemas/type_events:EventId"},"send":{"$ref":"#/components/schemas/type_events:Send"}},"required":["type","event_type","event_id","send"],"title":"MessageSentEvent"},"type_events:Delivery":{"type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/type_inboxes:InboxId"},"thread_id":{"$ref":"#/components/schemas/type_threads:ThreadId"},"message_id":{"$ref":"#/components/schemas/type_messages:MessageId"},"timestamp":{"$ref":"#/components/schemas/type_events:Timestamp"},"recipients":{"type":"array","items":{"type":"string"},"description":"Delivered recipients."}},"required":["inbox_id","thread_id","message_id","timestamp","recipients"],"title":"Delivery"},"type_events:MessageDeliveredEvent":{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"event_type":{"type":"string","enum":["message.delivered"]},"event_id":{"$ref":"#/components/schemas/type_events:EventId"},"delivery":{"$ref":"#/components/schemas/type_events:Delivery"}},"required":["type","event_type","event_id","delivery"],"title":"MessageDeliveredEvent"},"type_events:Recipient":{"type":"object","properties":{"address":{"type":"string","description":"Recipient address."},"status":{"type":"string","description":"Recipient status."}},"required":["address","status"],"title":"Recipient"},"type_events:Bounce":{"type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/type_inboxes:InboxId"},"thread_id":{"$ref":"#/components/schemas/type_threads:ThreadId"},"message_id":{"$ref":"#/components/schemas/type_messages:MessageId"},"timestamp":{"$ref":"#/components/schemas/type_events:Timestamp"},"type":{"type":"string","description":"Bounce type."},"sub_type":{"type":"string","description":"Bounce sub-type."},"recipients":{"type":"array","items":{"$ref":"#/components/schemas/type_events:Recipient"},"description":"Bounced recipients."}},"required":["inbox_id","thread_id","message_id","timestamp","type","sub_type","recipients"],"title":"Bounce"},"type_events:MessageBouncedEvent":{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"event_type":{"type":"string","enum":["message.bounced"]},"event_id":{"$ref":"#/components/schemas/type_events:EventId"},"bounce":{"$ref":"#/components/schemas/type_events:Bounce"}},"required":["type","event_type","event_id","bounce"],"title":"MessageBouncedEvent"},"type_events:Complaint":{"type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/type_inboxes:InboxId"},"thread_id":{"$ref":"#/components/schemas/type_threads:ThreadId"},"message_id":{"$ref":"#/components/schemas/type_messages:MessageId"},"timestamp":{"$ref":"#/components/schemas/type_events:Timestamp"},"type":{"type":"string","description":"Complaint type."},"sub_type":{"type":"string","description":"Complaint sub-type."},"recipients":{"type":"array","items":{"type":"string"},"description":"Complained recipients."}},"required":["inbox_id","thread_id","message_id","timestamp","type","sub_type","recipients"],"title":"Complaint"},"type_events:MessageComplainedEvent":{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"event_type":{"type":"string","enum":["message.complained"]},"event_id":{"$ref":"#/components/schemas/type_events:EventId"},"complaint":{"$ref":"#/components/schemas/type_events:Complaint"}},"required":["type","event_type","event_id","complaint"],"title":"MessageComplainedEvent"},"type_events:Reject":{"type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/type_inboxes:InboxId"},"thread_id":{"$ref":"#/components/schemas/type_threads:ThreadId"},"message_id":{"$ref":"#/components/schemas/type_messages:MessageId"},"timestamp":{"$ref":"#/components/schemas/type_events:Timestamp"},"reason":{"type":"string","description":"Reject reason."}},"required":["inbox_id","thread_id","message_id","timestamp","reason"],"title":"Reject"},"type_events:MessageRejectedEvent":{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"event_type":{"type":"string","enum":["message.rejected"]},"event_id":{"$ref":"#/components/schemas/type_events:EventId"},"reject":{"$ref":"#/components/schemas/type_events:Reject"}},"required":["type","event_type","event_id","reject"],"title":"MessageRejectedEvent"},"type_events:DomainVerifiedEvent":{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"event_type":{"type":"string","enum":["domain.verified"]},"event_id":{"$ref":"#/components/schemas/type_events:EventId"},"domain":{"$ref":"#/components/schemas/type_domains:Domain"}},"required":["type","event_type","event_id","domain"],"title":"DomainVerifiedEvent"}},"securitySchemes":{"Bearer":{"type":"http","scheme":"bearer"}}}}