{"openapi":"3.1.0","info":{"title":"API Reference","version":"1.0.0"},"paths":{"/v0/agent/sign-up":{"post":{"operationId":"agent_signUp","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\nThe new organization starts with 1 inbox, no custom domains, and 10 emails per day, which can be sent only to `human_email` until the organization is verified.\n\n`human_email` is optional. Without it, the inbox can receive email but cannot send to anyone until a human is attached with the attach human endpoint or, for a US-region inbox, claims it in the AgentMail Console with the API key (see [How do I claim my agent's inbox?](https://docs.agentmail.to/knowledge-base/claiming-agent-inbox)). There is also no way to recover the API key, so store it durably. Calling sign-up again without `human_email` creates a new organization, which needs a different `username`: the original username stays with the lost organization's inbox.\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":["agent"],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_AgentSignupResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_AgentSignupRequest"}}}}}},"/v0/agent/human":{"post":{"operationId":"agent_attachHuman","summary":"Attach Human","description":"Attach a human to an unverified agent organization. A 6-digit OTP is sent to the human's email, which you then submit to the verify endpoint.\n\nUse it after signing up without a `human_email`. Once the human is attached, the organization can send email to that human only, and verification lifts the remaining restrictions. For up to 5 minutes after attaching, sends to the human can still be rejected with a `429` daily send limit error while the API key's cached limits catch up. Wait and retry.\n\nCalling it again with the same `human_email` does not rotate the API key. It resends the OTP if it was never delivered, or issues a new one if it expired. While the current OTP is still valid, calling it again keeps that OTP and its attempt count. If all 10 attempts are used up, wait until the OTP expires, 24 hours after it was issued, then call it again for a new one.\n\nCalling it with a different `human_email` replaces the attached human and sends the new human an OTP. An organization can replace its human at most 2 times.\n\nOnly available until the organization is verified.\n\n**CLI:**\n```bash\nagentmail agent attach-human --human-email user@example.com\n```","tags":["agent"],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_AgentAttachHumanResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_AgentAttachHumanRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/agent/verify":{"post":{"operationId":"agent_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 the Free plan's entitlements are applied: 3 inboxes and 100 emails per day, at first to at most 3 distinct recipients in the first hour, 5 in the first day, and 10 in the first week.\n\nThe OTP expires after 24 hours and allows a maximum of 10 attempts. If the OTP expired, call the attach human endpoint with the same `human_email` to get a new one without rotating the API key. Once all 10 attempts are used, even the correct OTP is rejected, and attach human keeps returning the same OTP until it expires, so wait for it to expire before asking for a new one. An organization that signed up without a `human_email` has no OTP until a human is attached. 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":["agent"],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_AgentVerifyResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_AgentVerifyRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/files":{"post":{"operationId":"inboxes_files_create","summary":"Create File","description":"Starts an upload: creates a pending file at `path` and returns an `upload` to `PUT` its bytes to. The bytes go\nstraight to storage, not through the API. Then call Complete File to make the file `ready`.\n\nRetry-safe: sending the identical request again (same `path`, `size`, `sha256`, `content_type` and\n`expires_at`) returns the existing file with `200` instead of `201`: a pending one with a fresh `upload`, or\na `ready` one without. If its bytes were uploaded but the upload was never completed, it is completed then. A\ndifferent request at a path whose file is still pending and has no bytes replaces that file; at any other\ntaken path it returns `409`.\n\nThe file counts against the organization's Drive quota from creation, pending or not: 1 GiB and 10,000 files\nby default. A file that doesn't fit returns `403` with code `limit_exceeded`. Deleting a file frees its\nspace within seconds. Expired files count until a create needs their space: a create that doesn't fit first\ngives back what expired files hold, a batch at a time, so retry a refusal while many expired files remain.\n\nRequires the `file_create` permission, which an unverified organization's keys don't have at any scope until\nit completes agent verification. A key without `file_read` can still create files, but gets the plain `409` at\nany taken path, even for an identical request at a file it didn't create.\n\nAgent Drive is in AgentMail Labs, available in US production (`api.agentmail.to`) but not yet in EU\nproduction (`api.agentmail.eu`). Organizations that have not joined Labs receive a `403`.","tags":["inboxes > files"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/files_CreateFileResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"`code` says why: `forbidden` when the organization hasn't joined AgentMail Labs; `missing_permission` when the\ncredential lacks the file permission the endpoint needs, including `file_create` in an organization that hasn't\ncompleted agent verification, and every file permission for an organization- or pod-scoped key under a\ncontent-access policy; `account_suspended`, `pod_suspended` or `inbox_suspended` when the organization, pod or\ninbox is suspended; and, for Create File only, `limit_exceeded` when the file doesn't fit the organization's\nDrive quota.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"$ref":"#/components/schemas/files_FilePath"},"size":{"$ref":"#/components/schemas/files_FileSize"},"sha256":{"$ref":"#/components/schemas/files_FileSha256"},"content_type":{"$ref":"#/components/schemas/files_FileContentType"},"expires_at":{"$ref":"#/components/schemas/files_FileExpiresAt","description":"When the file expires, in the future. Rounded up to a whole second and returned in UTC. On a retry, send\nthe `expires_at` the first response returned."}},"required":["path","size","sha256"]}}}},"security":[{"Bearer":[]}]},"get":{"operationId":"inboxes_files_list","summary":"List Files","description":"Lists the inbox's files in path order, pending ones included, optionally only those whose path starts with\n`path_prefix`. A prefix matches characters, not whole segments: `reports/q` matches `reports/q3.pdf`. Items\ncarry no download URL; get a file for one.\n\nThe list is read in the region that serves the request, so a file created or deleted a moment ago may not\nshow yet. Expired files never show.\n\nRequires the `file_read` permission.","tags":["inboxes > files"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"path_prefix","in":"query","description":"Only files whose path starts with this. Held to the path rules, except it may stop partway.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Page size, 100 by default and at most 500.","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}},{"name":"ascending","in":"query","description":"Path order, `true` by default. `false` lists in reverse.","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/files_ListFilesResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"`code` says why: `forbidden` when the organization hasn't joined AgentMail Labs; `missing_permission` when the\ncredential lacks the file permission the endpoint needs, including `file_create` in an organization that hasn't\ncompleted agent verification, and every file permission for an organization- or pod-scoped key under a\ncontent-access policy; `account_suspended`, `pod_suspended` or `inbox_suspended` when the organization, pod or\ninbox is suspended; and, for Create File only, `limit_exceeded` when the file doesn't fit the organization's\nDrive quota.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/files/{file_id}/complete":{"post":{"operationId":"inboxes_files_complete","summary":"Complete File","description":"Makes a pending file `ready` once its bytes are uploaded, and returns it, with its `download_url` if the key\nhas `file_read`. Calling it on a file that is already `ready` returns the file.\n\nReturns `409` if the bytes haven't been uploaded yet, or if what was uploaded doesn't match the file's `size`\nand `sha256`. Returns `404` for a file that has expired or was deleted, including a pending file not\ncompleted within a day of its creation.\n\nRequires the `file_create` permission. Only a key with `file_read`, or the key that created the file, can\ncomplete it; any other key gets `404`.","tags":["inboxes > files"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"file_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/files_FileId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/files_File"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"`code` says why: `forbidden` when the organization hasn't joined AgentMail Labs; `missing_permission` when the\ncredential lacks the file permission the endpoint needs, including `file_create` in an organization that hasn't\ncompleted agent verification, and every file permission for an organization- or pod-scoped key under a\ncontent-access policy; `account_suspended`, `pod_suspended` or `inbox_suspended` when the organization, pod or\ninbox is suspended; and, for Create File only, `limit_exceeded` when the file doesn't fit the organization's\nDrive quota.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/files/{file_id}":{"get":{"operationId":"inboxes_files_get","summary":"Get File","description":"Gets a file. A `ready` file comes with a fresh `download_url`, valid for up to an hour.\n\nA get reads the region that serves the request, so for about a second after a delete it can still return\nthe deleted file. A file that has expired returns `404` at once.\n\nRequires the `file_read` permission.","tags":["inboxes > files"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"file_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/files_FileId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/files_File"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"`code` says why: `forbidden` when the organization hasn't joined AgentMail Labs; `missing_permission` when the\ncredential lacks the file permission the endpoint needs, including `file_create` in an organization that hasn't\ncompleted agent verification, and every file permission for an organization- or pod-scoped key under a\ncontent-access policy; `account_suspended`, `pod_suspended` or `inbox_suspended` when the organization, pod or\ninbox is suspended; and, for Create File only, `limit_exceeded` when the file doesn't fit the organization's\nDrive quota.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]},"delete":{"operationId":"inboxes_files_delete","summary":"Delete File","description":"Deletes a file, pending or `ready`, and frees its path at once. Its bytes are deleted, and its space given\nback to the organization's quota, within seconds. A download URL signed before the delete keeps working\nuntil it expires, at most an hour. Deleting a file that is already gone returns `404`.\n\nRequires the `file_delete` permission. Only a key with `file_read`, or the key that created the file, can\ndelete it; any other key gets `404`.","tags":["inboxes > files"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"file_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/files_FileId"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"`code` says why: `forbidden` when the organization hasn't joined AgentMail Labs; `missing_permission` when the\ncredential lacks the file permission the endpoint needs, including `file_create` in an organization that hasn't\ncompleted agent verification, and every file permission for an organization- or pod-scoped key under a\ncontent-access policy; `account_suspended`, `pod_suspended` or `inbox_suspended` when the organization, pod or\ninbox is suspended; and, for Create File only, `limit_exceeded` when the file doesn't fit the organization's\nDrive quota.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes":{"get":{"operationId":"inboxes_list","summary":"List Inboxes","description":"**CLI:**\n```bash\nagentmail inboxes list\n```","tags":["inboxes"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxes_ListInboxesResponse"}}}}},"security":[{"Bearer":[]}]},"post":{"operationId":"inboxes_create","summary":"Create Inbox","description":"**CLI:**\n```bash\nagentmail inboxes create --display-name \"My Agent\" --username myagent --domain agentmail.to\n```","tags":["inboxes"],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxes_Inbox"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"422":{"description":"Error response with status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxes_CreateInboxRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/search":{"get":{"operationId":"inboxes_search","summary":"Search Inboxes","description":"Searches inboxes in the organization by address or display name, ranked\nby relevance. Each word in the query matches the start of a word in the\naddress or display name, so `sup` matches `support@example.com` but\n`port` does not. An exact address match always ranks first. `limit`\ncannot exceed 100. A page can be empty and still carry a\n`next_page_token`; keep paging until the token is absent.","tags":["inboxes"],"parameters":[{"name":"q","in":"query","description":"Address or display name to search for. Matches word prefixes. Must be 2 to 256 characters.","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxes_SearchInboxesResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}":{"get":{"operationId":"inboxes_get","summary":"Get Inbox","description":"**CLI:**\n```bash\nagentmail inboxes get --inbox-id <inbox_id>\n```","tags":["inboxes"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxes_Inbox"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]},"patch":{"operationId":"inboxes_update","summary":"Update Inbox","description":"**CLI:**\n```bash\nagentmail inboxes update --inbox-id <inbox_id> --display-name \"Updated Name\"\n```\n\nTo pause an inbox, set `status` to `paused`; set it back to `active` to\nresume. To pause it later, set `pause_at`. See\n[Pausing an inbox](/inboxes#pausing-an-inbox).","tags":["inboxes"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxes_Inbox"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"description":"Expects an object; provide at least one of `display_name`, `status`, `pause_at`, `signature`, or `metadata`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxes_UpdateInboxRequest"}}}},"security":[{"Bearer":[]}]},"delete":{"operationId":"inboxes_delete","summary":"Delete Inbox","description":"**CLI:**\n```bash\nagentmail inboxes delete --inbox-id <inbox_id>\n```","tags":["inboxes"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/authorize":{"post":{"operationId":"inboxes_authorize","summary":"Authorize Inbox","description":"Authorizes the AgentID sign-in a client is already waiting in, for the\ninbox in the path, and returns the ID of the pending public key it will\nactivate. Read the key with Get API Key. A repeat for the same token,\ninbox, and bearer returns the same key ID. A `403` `AppSignupLimitError`\nmeans the app accepts no more sign-ups from your organization.","tags":["inboxes"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}}],"responses":{"202":{"description":"Response with status 202","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxes_AuthorizeInboxResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"The app's sign-up limit for your organization is reached, or the app has paused new\nsign-ups. `code` is `limit_exceeded` and `fix` says which. Inboxes that already have an\naccount at the app can still sign in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxes_AuthorizeInboxRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/threads":{"get":{"operationId":"inboxes_threads_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":["inboxes > threads"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}},{"name":"labels","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Labels"}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Before"}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/After"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending"}},{"name":"include_spam","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeSpam"}},{"name":"include_blocked","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeBlocked"}},{"name":"include_unauthenticated","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeUnauthenticated"}},{"name":"include_trash","in":"query","required":false,"schema":{"$ref":"#/components/schemas/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"}}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/threads_ListThreadsResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/threads/search":{"get":{"operationId":"inboxes_threads_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":["inboxes > threads"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"q","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Query"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Before"}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/After"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/threads_SearchThreadsResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/threads/{thread_id}":{"get":{"operationId":"inboxes_threads_get","summary":"Get Thread","description":"**CLI:**\n```bash\nagentmail inboxes threads get --inbox-id <inbox_id> --thread-id <thread_id>\n```","tags":["inboxes > threads"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/threads_ThreadId"}},{"name":"limit","in":"query","description":"Maximum number of messages to return. Cannot exceed 100.","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","description":"Token returned by the previous response for retrieving the next, older page.","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/threads_Thread"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]},"patch":{"operationId":"inboxes_threads_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":["inboxes > threads"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/threads_ThreadId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/threads_UpdateThreadResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Error response with status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/threads_UpdateThreadRequest"}}}},"security":[{"Bearer":[]}]},"delete":{"operationId":"inboxes_threads_delete","summary":"Delete Thread","description":"Permanently deletes a thread and all of its messages.\n\n**CLI:**\n```bash\nagentmail inboxes threads delete --inbox-id <inbox_id> --thread-id <thread_id>\n```","tags":["inboxes > threads"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/threads_ThreadId"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/threads/{thread_id}/attachments/{attachment_id}":{"get":{"operationId":"inboxes_threads_getAttachment","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":["inboxes > threads"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/threads_ThreadId"}},{"name":"attachment_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/attachments_AttachmentId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/attachments_AttachmentResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/messages":{"get":{"operationId":"inboxes_messages_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":["inboxes > messages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}},{"name":"labels","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Labels"}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Before"}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/After"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending"}},{"name":"include_spam","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeSpam"}},{"name":"include_blocked","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeBlocked"}},{"name":"include_unauthenticated","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeUnauthenticated"}},{"name":"include_trash","in":"query","required":false,"schema":{"$ref":"#/components/schemas/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"}}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messages_ListMessagesResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/messages/search":{"get":{"operationId":"inboxes_messages_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":["inboxes > messages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"q","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Query"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Before"}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/After"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messages_SearchMessagesResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/messages/{message_id}":{"get":{"operationId":"inboxes_messages_get","summary":"Get Message","description":"**CLI:**\n```bash\nagentmail inboxes messages get --inbox-id <inbox_id> --message-id <message_id>\n```","tags":["inboxes > messages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/messages_MessageId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messages_Message"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]},"patch":{"operationId":"inboxes_messages_update","summary":"Update Message","description":"**CLI:**\n```bash\nagentmail inboxes messages update --inbox-id <inbox_id> --message-id <message_id> --add-labels read --remove-labels unread\n```","tags":["inboxes > messages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/messages_MessageId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messages_UpdateMessageResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/messages_UpdateMessageRequest"}}}},"security":[{"Bearer":[]}]},"delete":{"operationId":"inboxes_messages_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":["inboxes > messages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/messages_MessageId"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/messages/{message_id}/agent-armor/feedback":{"post":{"operationId":"inboxes_messages_createAgentArmorFeedback","summary":"Create Agent Armor Feedback","description":"Tell us whether Agent Armor's verdict on a message was right. The message needs a completed result. A message\naccepts up to 20 pieces of feedback. Requires permission to read the message.","tags":["inboxes > messages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/messages_MessageId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agentArmor_AgentArmorFeedback"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/agentArmor_CreateAgentArmorFeedbackRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/messages/{message_id}/agent-armor/release":{"post":{"operationId":"inboxes_messages_releaseAgentArmorMessage","summary":"Release Agent Armor Message","description":"Release a message Agent Armor held for review in hold mode: your agents are sent its `message.received`\nevent, `message.security.override` is sent too, in either order, and its `agent-armor-held` label is removed.\nOnly a message whose verdict is `review` and that is still held can be released; anything else answers `409`.\nRepeating a release with the same reason and the same API key returns the first release; any other repeat\nanswers `409`.\n\nRequires the opt-in `agent_armor_release` permission and permission to read the message. An organization\nadmin can also release from the console.","tags":["inboxes > messages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/messages_MessageId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agentArmor_ReleaseAgentArmorMessageResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/agentArmor_ReleaseAgentArmorMessageRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/messages/batch-get":{"post":{"operationId":"inboxes_messages_batchGet","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-ids <id1> --message-ids <id2>\n```","tags":["inboxes > messages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messages_BatchGetMessagesResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/messages_BatchGetMessagesRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/messages/batch-update":{"post":{"operationId":"inboxes_messages_batchUpdate","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-ids <id1> --message-ids <id2> --add-labels read --remove-labels unread\n```","tags":["inboxes > messages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messages_BatchUpdateMessagesResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/messages_BatchUpdateMessagesRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/messages/{message_id}/attachments/{attachment_id}":{"get":{"operationId":"inboxes_messages_getAttachment","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":["inboxes > messages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/messages_MessageId"}},{"name":"attachment_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/attachments_AttachmentId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/attachments_AttachmentResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/messages/{message_id}/raw":{"get":{"operationId":"inboxes_messages_getRaw","summary":"Get Raw Message","description":"**CLI:**\n```bash\nagentmail inboxes messages get-raw --inbox-id <inbox_id> --message-id <message_id>\n```","tags":["inboxes > messages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/messages_MessageId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messages_RawMessageResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/messages/send":{"post":{"operationId":"inboxes_messages_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":["inboxes > messages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messages_SendMessageResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/messages_SendMessageRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/messages/{message_id}/reply":{"post":{"operationId":"inboxes_messages_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":["inboxes > messages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/messages_MessageId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messages_SendMessageResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/messages_ReplyToMessageRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/messages/{message_id}/reply-all":{"post":{"operationId":"inboxes_messages_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":["inboxes > messages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/messages_MessageId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messages_SendMessageResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/messages_ReplyAllMessageRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/messages/{message_id}/forward":{"post":{"operationId":"inboxes_messages_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":["inboxes > messages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/messages_MessageId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messages_SendMessageResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/messages_SendMessageRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/drafts":{"get":{"operationId":"inboxes_drafts_list","summary":"List Drafts","description":"**CLI:**\n```bash\nagentmail inboxes drafts list --inbox-id <inbox_id>\n```","tags":["inboxes > drafts"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}},{"name":"labels","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Labels"}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Before"}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/After"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/drafts_ListDraftsResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]},"post":{"operationId":"inboxes_drafts_create","summary":"Create Draft","description":"Create a draft. Supply `in_reply_to` to create a reply draft (with\n`reply_all` to address the whole thread), whose recipients, subject, and\nthreading are derived from the referenced message, or `forward_of` to\ncreate a forward draft, which derives the subject, threading, and\nforwarded content from the source but keeps recipients caller-supplied.\n\n**CLI:**\n```bash\nagentmail inboxes drafts create --inbox-id <inbox_id> --to recipient@example.com --subject \"Draft subject\" --text \"Draft body\"\n```","tags":["inboxes > drafts"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/drafts_Draft"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/drafts_CreateDraftRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/drafts/{draft_id}":{"get":{"operationId":"inboxes_drafts_get","summary":"Get Draft","description":"**CLI:**\n```bash\nagentmail inboxes drafts get --inbox-id <inbox_id> --draft-id <draft_id>\n```","tags":["inboxes > drafts"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/drafts_DraftId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/drafts_Draft"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]},"patch":{"operationId":"inboxes_drafts_update","summary":"Update Draft","description":"Edit fields on an existing draft. Passing `null` clears a field (or `[]`\nfor a recipient field); `send_at: null` un-schedules a scheduled draft.\nA draft that is already being sent cannot be edited.\n\n**CLI:**\n```bash\nagentmail inboxes drafts update --inbox-id <inbox_id> --draft-id <draft_id> --subject \"Updated subject\"\n```","tags":["inboxes > drafts"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/drafts_DraftId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/drafts_Draft"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/drafts_UpdateDraftRequest"}}}},"security":[{"Bearer":[]}]},"delete":{"operationId":"inboxes_drafts_delete","summary":"Delete Draft","description":"**CLI:**\n```bash\nagentmail inboxes drafts delete --inbox-id <inbox_id> --draft-id <draft_id>\n```","tags":["inboxes > drafts"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/drafts_DraftId"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/drafts/{draft_id}/attachments/{attachment_id}":{"get":{"operationId":"inboxes_drafts_getAttachment","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":["inboxes > drafts"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/drafts_DraftId"}},{"name":"attachment_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/attachments_AttachmentId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/attachments_AttachmentResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/drafts/{draft_id}/send":{"post":{"operationId":"inboxes_drafts_send","summary":"Send Draft","description":"**CLI:**\n```bash\nagentmail inboxes drafts send --inbox-id <inbox_id> --draft-id <draft_id>\n```","tags":["inboxes > drafts"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/drafts_DraftId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/messages_SendMessageResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Error response with status 403","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/messages_UpdateMessageRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/webhooks":{"get":{"operationId":"inboxes_webhooks_list","summary":"List Webhooks","description":"**CLI:**\n```bash\nagentmail inboxes webhooks list --inbox-id <inbox_id>\n```","tags":["inboxes > webhooks"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_ListWebhooksResponse"}}}}},"security":[{"Bearer":[]}]},"post":{"operationId":"inboxes_webhooks_create","summary":"Create Webhook","description":"Create a webhook scoped to this inbox.\n\n**CLI:**\n```bash\nagentmail inboxes webhooks create --inbox-id <inbox_id> --url https://example.com/webhook --event-types message.received\n```","tags":["inboxes > webhooks"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_Webhook"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_CreateInboxWebhookRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/webhooks/{webhook_id}":{"get":{"operationId":"inboxes_webhooks_get","summary":"Get Webhook","description":"**CLI:**\n```bash\nagentmail inboxes webhooks get --inbox-id <inbox_id> --webhook-id <webhook_id>\n```","tags":["inboxes > webhooks"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooks_WebhookId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_Webhook"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]},"patch":{"operationId":"inboxes_webhooks_update","summary":"Update Webhook","description":"**CLI:**\n```bash\nagentmail inboxes webhooks update --inbox-id <inbox_id> --webhook-id <webhook_id> --event-types message.received\n```","tags":["inboxes > webhooks"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooks_WebhookId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_Webhook"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_UpdateInboxWebhookRequest"}}}},"security":[{"Bearer":[]}]},"delete":{"operationId":"inboxes_webhooks_delete","summary":"Delete Webhook","description":"**CLI:**\n```bash\nagentmail inboxes webhooks delete --inbox-id <inbox_id> --webhook-id <webhook_id>\n```","tags":["inboxes > webhooks"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooks_WebhookId"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/webhooks/{webhook_id}/headers":{"get":{"operationId":"inboxes_webhooks_getHeaders","summary":"Get Webhook Headers","description":"List the names of custom HTTP headers included with deliveries to this inbox-scoped webhook.\nHeader values are write-only and are never returned.","tags":["inboxes > webhooks"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooks_WebhookId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_WebhookHeaderNamesResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]},"patch":{"operationId":"inboxes_webhooks_updateHeaders","summary":"Update Webhook Headers","description":"Atomically set, replace, or remove custom HTTP headers included with deliveries to this\ninbox-scoped webhook. Header values remain write-only.","tags":["inboxes > webhooks"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooks_WebhookId"}}],"responses":{"204":{"description":"Response with status 204","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_UpdateWebhookHeadersRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/webhooks/polling":{"get":{"operationId":"inboxes_webhooks_polling_list","summary":"List Polling Webhooks","description":"Lists the polling webhooks created through this inbox route.\n\n**CLI:**\n```bash\nagentmail inboxes webhooks polling list --inbox-id <inbox_id>\n```","tags":["inboxes > webhooks > polling"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_polling_ListPollingWebhooksResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"security":[{"Bearer":[]}]},"post":{"operationId":"inboxes_webhooks_polling_create","summary":"Create Polling Webhook","description":"Create a polling webhook scoped to this inbox and return the `token` that reads it.\n\n**CLI:**\n```bash\nagentmail inboxes webhooks polling create --inbox-id <inbox_id> --client-id my-agent --event-types message.received\n```","tags":["inboxes > webhooks > polling"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_polling_CreatePollingWebhookResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_polling_CreateInboxPollingWebhookRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/webhooks/polling/{webhook_id}":{"get":{"operationId":"inboxes_webhooks_polling_get","summary":"Get Polling Webhook","description":"**CLI:**\n```bash\nagentmail inboxes webhooks polling get --inbox-id <inbox_id> --webhook-id <webhook_id>\n```","tags":["inboxes > webhooks > polling"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooks_WebhookId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_polling_PollingWebhook"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]},"delete":{"operationId":"inboxes_webhooks_polling_delete","summary":"Delete Polling Webhook","description":"**CLI:**\n```bash\nagentmail inboxes webhooks polling delete --inbox-id <inbox_id> --webhook-id <webhook_id>\n```","tags":["inboxes > webhooks > polling"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooks_WebhookId"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/lists/{direction}/{type}":{"get":{"operationId":"inboxes_lists_list","summary":"List Entries","description":"**CLI:**\n```bash\nagentmail inboxes lists list --inbox-id <inbox_id> --direction <direction> --type <type>\n```","tags":["inboxes > lists"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/lists_Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/lists_ListType"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/lists_PodListListEntriesResponse"}}}}},"security":[{"Bearer":[]}]},"post":{"operationId":"inboxes_lists_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":["inboxes > lists"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/lists_Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/lists_ListType"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/lists_PodListEntry"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/lists_CreateListEntryRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/lists/{direction}/{type}/{entry}":{"get":{"operationId":"inboxes_lists_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":["inboxes > lists"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/lists_Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/lists_ListType"}},{"name":"entry","in":"path","description":"Email address or domain.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/lists_PodListEntry"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]},"delete":{"operationId":"inboxes_lists_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":["inboxes > lists"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/lists_Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/lists_ListType"}},{"name":"entry","in":"path","description":"Email address or domain.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/metrics/events":{"get":{"operationId":"inboxes_metrics_queryEvents","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-events --inbox-id <inbox_id>\n```","tags":["inboxes > metrics"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"event_types","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_MetricEventTypes"}},{"name":"start","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_Start"}},{"name":"end","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_End"}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_Period"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_MetricLimit"}},{"name":"descending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_Descending"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/metrics_QueryMetricsResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/metrics/usage":{"get":{"operationId":"inboxes_metrics_queryUsage","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":["inboxes > metrics"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"usage_types","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_UsageTypes"}},{"name":"start","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_Start"}},{"name":"end","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_End"}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_Period"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_MetricLimit"}},{"name":"descending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_Descending"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/metrics_QueryUsageResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/metrics/rates":{"get":{"operationId":"inboxes_metrics_queryRates","summary":"Query Rates","description":"Rolling bounce and complaint rates for the inbox. At each `period`\ngrid point, the bounced (or complained) messages over the preceding\n`window` divided by the messages sent over the same window, with the\nsend count alongside. Account moderation evaluates the organization-wide\nrate, so use the organization endpoint to see the number it acts on;\nthe inbox view shows which inboxes contribute. Defaults to the rolling\n24-hour rate sampled hourly over the last day; `start` must be within\nthe last 90 days, `window` must be a whole multiple of `period`, and\nthe range plus window divided by `period` must not exceed 1000\nbuckets.\n\n**CLI:**\n```bash\nagentmail inboxes metrics query-rates --inbox-id <inbox_id>\n```","tags":["inboxes > metrics"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"rate_types","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_RateTypes"}},{"name":"start","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_Start"}},{"name":"end","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_End"}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_RatePeriod"}},{"name":"window","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_Window"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_MetricLimit"}},{"name":"descending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_Descending"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/metrics_QueryRatesResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/events":{"get":{"operationId":"inboxes_events_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":["inboxes > events"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxEvents_ListInboxEventsResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/api-keys":{"get":{"operationId":"inboxes_apiKeys_list","summary":"List API Keys","description":"**CLI:**\n```bash\nagentmail inboxes api-keys list --inbox-id <inbox_id>\n```","tags":["inboxes > api-keys"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiKeys_ListApiKeysResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]},"post":{"operationId":"inboxes_apiKeys_create","summary":"Create API Key","description":"**CLI:**\n```bash\nagentmail inboxes api-keys create --inbox-id <inbox_id> --name \"My Key\"\n```","tags":["inboxes > api-keys"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiKeys_CreateApiKeyResult"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiKeys_CreateApiKeyRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/api-keys/{api_key_id}":{"patch":{"operationId":"inboxes_apiKeys_update","summary":"Update API Key","description":"**CLI:**\n```bash\nagentmail inboxes api-keys update --inbox-id <inbox_id> --api-key-id <api_key_id> --name \"Renamed\"\n```","tags":["inboxes > api-keys"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"api_key_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/apiKeys_ApiKeyId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiKeys_ApiKey"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiKeys_UpdateApiKeyRequest"}}}},"security":[{"Bearer":[]}]},"delete":{"operationId":"inboxes_apiKeys_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":["inboxes > api-keys"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"api_key_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/apiKeys_ApiKeyId"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/accounts":{"get":{"operationId":"inboxes_accounts_list","summary":"List Accounts","description":"Lists accounts held by the inbox, across all apps. Requires `inbox_read`.","tags":["inboxes > accounts"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounts_ListAccountsResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/accounts/{account_id}":{"get":{"operationId":"inboxes_accounts_get","summary":"Get Account","description":"Returns one account held by the inbox. An account elsewhere is a 404. Requires\n`inbox_read`.","tags":["inboxes > accounts"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"account_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/accounts_AccountId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounts_Account"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/calendar":{"get":{"operationId":"inboxes_calendar_get","summary":"Get Calendar","description":"Gets the inbox's calendar. Every inbox has one calendar, so this works before any event is\ncreated. Its `etag` (also the `ETag` response header) is the value to send in `If-Match` to\nmake an update conditional.\n\nRequires the `calendar_read` permission. Calendar is available in US production\n(`api.agentmail.to`) but not yet in EU production (`api.agentmail.eu`), which returns `403`.","tags":["inboxes > calendar"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"consistency","in":"query","required":false,"schema":{"$ref":"#/components/schemas/calendar_CalendarConsistency"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/calendar_Calendar"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Calendar isn't available in this region (EU production), or the API key lacks the required\ncalendar permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]},"patch":{"operationId":"inboxes_calendar_update","summary":"Update Calendar","description":"Updates the calendar's default time zone. Existing events keep their own `timezone`; only\nevents created later without a `timezone` use the new default.\n\nRequires the `calendar_update` permission. To make the update conditional, send the\ncalendar's current `etag` in `If-Match`: a stale value returns `412`. Without `If-Match` the\nupdate applies to the calendar as it is.\n\nCalendar is available in US production (`api.agentmail.to`) but not yet in EU production\n(`api.agentmail.eu`), which returns `403`.","tags":["inboxes > calendar"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"If-Match","in":"header","description":"The calendar's current `etag`, for example `\"rv-0\"`. Optional; makes the update conditional; `*` matches any current version.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/calendar_Calendar"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Calendar isn't available in this region (EU production), or the API key lacks the required\ncalendar permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"412":{"description":"The resource changed since the `If-Match` value was read. Fetch it again, reapply the change, and retry with the new `etag`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/calendar_PreconditionFailedErrorResponse"}}}},"413":{"description":"The request body is too large (8 KB for calendar settings, 128 KB for events).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"timezone":{"$ref":"#/components/schemas/calendar_IanaTimezone","description":"New default time zone for events created without a `timezone`."}},"required":["timezone"]}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/calendar/events":{"get":{"operationId":"inboxes_calendar_listEvents","summary":"List Events","description":"Lists the events stored on the calendar: one item per one-off or recurring event, plus one\nitem for each edited date of a recurring event (as that dated event, with\n`is_exception: true`). Ordered by most recently updated, and cancelled events are included.\nUse it to sync or manage what you created. To see what is on the calendar in a time window,\nuse Get Agenda.\n\nThe list is always read in the region that serves the request, so it can trail a change made\nmoments earlier by a few seconds. Requires the `calendar_event_read` permission.\n\nCalendar is available in US production (`api.agentmail.to`) but not yet in EU production\n(`api.agentmail.eu`), which returns `403`.","tags":["inboxes > calendar"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/calendar_CalendarLimit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/calendar_ListCalendarEventsResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Calendar isn't available in this region (EU production), or the API key lacks the required\ncalendar permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]},"post":{"operationId":"inboxes_calendar_createEvent","summary":"Create Event","description":"Creates a one-off or recurring event on the inbox's calendar. Times are wall-clock values in\n`timezone` (the calendar's default time zone if omitted); the response also gives each\nboundary as a UTC instant in `start_at` and `end_at`.\n\n`calendar.event.created` is sent once the event is stored, then `calendar.event.starting`\nand `calendar.event.ending` as each date begins and ends. With `send_invites: true` the\ninbox also emails an invitation to every attendee.\n\nPass `client_id` to make retries safe: repeating the request with the same `client_id` and\nbody returns the original event with status `200` instead of `201`, for as long as the event\nexists.\n\nWith `send_invites: true`, each attendee counts as one send against the organization, pod\nand inbox send limits, charged before the event is stored. An over-limit request returns\n`429` `rate_limit_exceeded` and creates nothing. A replay of an earlier create is not\ncharged again.\n\nThe event's `etag` is the value to send in `If-Match` to make a later update or delete\nconditional. Requires the `calendar_event_create` permission.\n\nCalendar is available in US production (`api.agentmail.to`) but not yet in EU production\n(`api.agentmail.eu`), which returns `403`.","tags":["inboxes > calendar"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}}],"responses":{"201":{"description":"Response with status 201","content":{"application/json":{"schema":{"$ref":"#/components/schemas/calendar_CalendarEventMutationResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Calendar isn't available in this region (EU production), or the API key lacks the required\ncalendar permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is too large (8 KB for calendar settings, 128 KB for events).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests, or the invitation emails this request would send exceed an organization,\npod or inbox send limit. Nothing was changed. Honor the `Retry-After` header when present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/calendar_CreateCalendarEventRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/calendar/agenda":{"get":{"operationId":"inboxes_calendar_getAgenda","summary":"Get Agenda","description":"Lists every date on the calendar in a time window, ordered by start time: one-off events,\nand recurring events expanded into their individual dates, with cancelled dates left out.\nUse it to answer \"what is on the calendar\".\n\nThe window defaults to now through 90 days from now and can be at most 366 days. Items omit\n`description`, `metadata` and `attendees`; get an event by ID for the full object. An item\nthe inbox is invited to still carries `response_status`, so `needs_action` marks an\ninvitation waiting for a reply. Dates of\nrecurring events appear only up to about 90 days from now; use List Event Instances for a\nrecurring event's later dates. While a recurring event's dates are being regenerated after a\nschedule change, which takes a few seconds, the agenda can briefly leave out some of them;\ndates that have already started or ended stay as they ran.\n\nThe agenda is read in the region that serves the request, so it can trail a change made\nmoments earlier by a few seconds. Pass `consistency=primary` to read your own change right\naway. Requires the `calendar_event_read` permission.\n\nCalendar is available in US production (`api.agentmail.to`) but not yet in EU production\n(`api.agentmail.eu`), which returns `403`.","tags":["inboxes > calendar"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"consistency","in":"query","required":false,"schema":{"$ref":"#/components/schemas/calendar_CalendarConsistency"}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/calendar_WindowAfter"}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/calendar_WindowBefore"}},{"name":"include_overlapping","in":"query","required":false,"schema":{"$ref":"#/components/schemas/calendar_IncludeOverlapping"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/calendar_CalendarLimit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/calendar_ListCalendarEventsResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Calendar isn't available in this region (EU production), or the API key lacks the required\ncalendar permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/calendar/events/{event_id}":{"get":{"operationId":"inboxes_calendar_getEvent","summary":"Get Event","description":"Gets an event by its UUID, or one date of a recurring event by its dated ID\n(`<uuid>_<slot>`). A dated ID returns the date as it currently stands, including any edit\nto it, with `kind: instance`.\n\nThe response's `etag` (also the `ETag` header) is the value to send in `If-Match` to make an\nupdate, delete or response to this event or date conditional. Treat it as opaque.\n\nReads can trail a change made moments earlier by a few seconds; pass `consistency=primary`\nto read the latest state of an event or a date. A date that has already started or ended\nreads back as it ran, even if a later change to the series no longer produces it. Requires\nthe `calendar_event_read` permission.\n\nCalendar is available in US production (`api.agentmail.to`) but not yet in EU production\n(`api.agentmail.eu`), which returns `403`.","tags":["inboxes > calendar"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"event_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/calendar_CalendarEventId"}},{"name":"consistency","in":"query","required":false,"schema":{"$ref":"#/components/schemas/calendar_CalendarConsistency"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/calendar_CalendarEvent"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Calendar isn't available in this region (EU production), or the API key lacks the required\ncalendar permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"The event's date is outside the retained history window and can no longer be read or changed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]},"patch":{"operationId":"inboxes_calendar_updateEvent","summary":"Update Event","description":"Updates an event. Send only the fields to change. To make the update conditional, send the\nevent's current `etag` in `If-Match`: a stale value returns `412`. Without `If-Match` the\nupdate applies to the event as it is; a change that lands while it runs returns `409`\n`race_condition`, so retry. Send `If-Match` when replacing `attendees`, so you don't\noverwrite a response that arrived in the meantime.\n\n- **One-off or series UUID:** changes the event itself. For a series, the change applies to\n  every date that has not been edited individually.\n- **Dated ID (`<uuid>_<slot>`):** changes one date (`mode=single`, the default) or that date\n  and every later date (`mode=future`). `all_day`, `timezone` and `recurrence` cannot be sent\n  for a dated ID.\n\nOnce a date has started, its start can no longer change (409 `event_already_started`), but\nits end and status can; for a one-off or series UUID, send the unchanged `start` with the new\n`end`. Once it has ended, only `title`, `description`, `location`,\n`metadata` and `attendees` can change. During the few seconds a date is starting, schedule\nchanges return 409 `event_starting`; retry shortly.\n\nSends `calendar.event.updated`. With `send_invites: true` the organizer inbox also emails the\nupdated invitation to every attendee. Requires the `calendar_event_update` permission.\n\nEmailing attendees counts one send per attendee against the organization, pod and inbox\nsend limits, charged before the change is saved; an over-limit request returns `429`\n`rate_limit_exceeded` and changes nothing.\n\nCalendar is available in US production (`api.agentmail.to`) but not yet in EU production\n(`api.agentmail.eu`), which returns `403`.","tags":["inboxes > calendar"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"event_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/calendar_CalendarEventId"}},{"name":"mode","in":"query","required":false,"schema":{"$ref":"#/components/schemas/calendar_InstanceMutationMode"}},{"name":"If-Match","in":"header","description":"The event's or date's current `etag`, from the latest read or write response. Optional; makes the update conditional; `*` matches any current version.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/calendar_CalendarEventMutationResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Calendar isn't available in this region (EU production), or the API key lacks the required\ncalendar permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"The event's date is outside the retained history window and can no longer be read or changed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"412":{"description":"The resource changed since the `If-Match` value was read. Fetch it again, reapply the change, and retry with the new `etag`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/calendar_PreconditionFailedErrorResponse"}}}},"413":{"description":"The request body is too large (8 KB for calendar settings, 128 KB for events).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests, or the invitation emails this request would send exceed an organization,\npod or inbox send limit. Nothing was changed. Honor the `Retry-After` header when present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":["string","null"],"description":"Set to `null` to clear."},"location":{"type":["string","null"],"description":"Set to `null` to clear."},"metadata":{"oneOf":[{"description":"Any type"},{"type":"null"}],"description":"Replaces the metadata (any JSON value, usually an object). Set to `null` to clear."},"status":{"$ref":"#/components/schemas/calendar_CalendarEventStatus"},"all_day":{"type":"boolean","description":"Changing `all_day` requires `start`, `end` and `timezone` in the same request. Not accepted for dated event IDs."},"start":{"$ref":"#/components/schemas/calendar_WallTime","description":"New start. For a one-off or series UUID, send it together with `end`. Not accepted with `mode=future`."},"end":{"$ref":"#/components/schemas/calendar_WallTime","description":"New end. For a one-off or series UUID, send it together with `start`. A dated ID accepts `end` alone."},"timezone":{"$ref":"#/components/schemas/calendar_IanaTimezone","description":"New time zone. Not accepted for dated event IDs."},"duration_mode":{"$ref":"#/components/schemas/calendar_DurationMode"},"recurrence":{"oneOf":[{"$ref":"#/components/schemas/calendar_RecurrenceInput"},{"type":"null"}],"description":"Replaces the recurrence. Set to `null` to turn a series into a one-off event (only when no\ndate of it has been edited). Not accepted for dated event IDs. A series ended with a\n`mode=future` delete stays ended: the new rule keeps its `truncate_before`."},"attendees":{"type":"array","items":{"$ref":"#/components/schemas/calendar_Attendee"},"description":"Replaces the attendee list."},"send_invites":{"type":"boolean","description":"When `true`, emails the updated invitation to every attendee. Only the organizer (an `api`\nevent) can send. Defaults to `false`."}}}}}},"security":[{"Bearer":[]}]},"delete":{"operationId":"inboxes_calendar_deleteEvent","summary":"Delete Event","description":"Deletes an event, or cancels dates of a recurring event.\n\n- **One-off or series UUID:** deletes the event and every date of it. The event disappears\n  from reads immediately and is removed in the background; the response is `202` with a\n  `deletion_id`. A retry returns the same `deletion_id` while removal runs (send the same\n  `Idempotency-Key`, or none and the same `send_invites`); once it has finished, the event\n  no longer exists and a retry returns `404`. No `calendar.event.starting` or\n  `calendar.event.ending` webhook is sent for the event after the delete is accepted.\n- **Dated ID (`<uuid>_<slot>`):** cancels that date (`mode=single`, the default) or that date\n  and every later date (`mode=future`). Returns `202` with the cancelled date. A `mode=future`\n  delete from the first date deletes the whole series and returns a `deletion_id` instead.\n  A date that is already running still gets its `calendar.event.ending`.\n\nDeleting a one-off or series event sends `calendar.event.deleted`. Cancelling dates sends\n`calendar.event.updated` with the cancelled date. With `send_invites=true` the organizer\ninbox also emails a cancellation to every attendee. Requires the `calendar_event_delete`\npermission. To make the delete conditional, send the current `etag` in `If-Match`.\n\nEmailing cancellations counts one send per attendee against the organization, pod and inbox\nsend limits, charged before the delete; an over-limit request returns `429`\n`rate_limit_exceeded` and deletes nothing.\n\nCalendar is available in US production (`api.agentmail.to`) but not yet in EU production\n(`api.agentmail.eu`), which returns `403`.","tags":["inboxes > calendar"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"event_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/calendar_CalendarEventId"}},{"name":"mode","in":"query","required":false,"schema":{"$ref":"#/components/schemas/calendar_InstanceMutationMode"}},{"name":"send_invites","in":"query","description":"When `true`, emails a cancellation (iCalendar `CANCEL`) to every attendee. Only the organizer can send. Defaults to `false`.","required":false,"schema":{"type":"boolean"}},{"name":"If-Match","in":"header","description":"The event's or date's current `etag`. Optional; makes the delete conditional; `*` matches any current version.","required":false,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"1 to 128 visible ASCII characters. Optional. Retrying a delete with the same key\nreturns the original result; without a key, retries of the same delete share one\nderived from the event and `send_invites`, so a keyless retry that changes\n`send_invites` is a different delete and returns `404` while removal runs. Keys are\nunique across your organization: reusing one to delete a different event returns\n`409` `idempotency_conflict`.","required":false,"schema":{"type":"string"}}],"responses":{"202":{"description":"Response with status 202","content":{"application/json":{"schema":{"$ref":"#/components/schemas/calendar_DeleteCalendarEventResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Calendar isn't available in this region (EU production), or the API key lacks the required\ncalendar permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"The event's date is outside the retained history window and can no longer be read or changed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"412":{"description":"The resource changed since the `If-Match` value was read. Fetch it again, reapply the change, and retry with the new `etag`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/calendar_PreconditionFailedErrorResponse"}}}},"429":{"description":"Too many requests, or the invitation emails this request would send exceed an organization,\npod or inbox send limit. Nothing was changed. Honor the `Retry-After` header when present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/calendar/events/{event_id}/instances":{"get":{"operationId":"inboxes_calendar_listEventInstances","summary":"List Event Instances","description":"Lists the dates of one recurring event in a time window, in start order, with each date's\nedits applied. Dates are computed from the rule, so this works for any window up to 366\ndays, including dates far in the future. Cancelled dates are left out.\n\nThe window defaults to now through 90 days from now. Items omit `description`, `metadata`\nand `attendees`; get a date by its ID for the full object. Like other reads, the list can\ntrail a change made moments earlier by a few seconds; pass `consistency=primary` to read\nyour own change right away. Requires the `calendar_event_read` permission.\n\nCalendar is available in US production (`api.agentmail.to`) but not yet in EU production\n(`api.agentmail.eu`), which returns `403`.","tags":["inboxes > calendar"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"event_id","in":"path","description":"UUID of the recurring event.","required":true,"schema":{"type":"string"}},{"name":"consistency","in":"query","required":false,"schema":{"$ref":"#/components/schemas/calendar_CalendarConsistency"}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/calendar_WindowAfter"}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/calendar_WindowBefore"}},{"name":"include_overlapping","in":"query","required":false,"schema":{"$ref":"#/components/schemas/calendar_IncludeOverlapping"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/calendar_CalendarLimit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/calendar_ListCalendarEventsResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Calendar isn't available in this region (EU production), or the API key lacks the required\ncalendar permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/inboxes/{inbox_id}/calendar/events/{event_id}/respond":{"post":{"operationId":"inboxes_calendar_respondToEvent","summary":"Respond to Event","description":"Accepts, declines or tentatively accepts an invitation the inbox received by email. Pass the\nevent's UUID to respond for every date, or a dated ID to respond for one date only.\n\nOnly works on `email` events where the inbox is an attendee; anything else returns 409\n`calendar_response_invalid`. Updates the inbox's attendee entry and sends\n`calendar.event.responded`. With `send_reply` (default `true`) the inbox emails the response\nto the organizer.\n\nRequires the `calendar_event_update` permission. To make the response conditional, send the\ncurrent `etag` in `If-Match`.\n\nA reply email counts as one send against the organization, pod and inbox send limits,\ncharged before the response is saved; an over-limit request returns `429`\n`rate_limit_exceeded` and changes nothing.\n\nCalendar is available in US production (`api.agentmail.to`) but not yet in EU production\n(`api.agentmail.eu`), which returns `403`.","tags":["inboxes > calendar"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}},{"name":"event_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/calendar_CalendarEventId"}},{"name":"If-Match","in":"header","description":"The event's or date's current `etag`. Optional; makes the response conditional; `*` matches any current version.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/calendar_CalendarEventMutationResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"Calendar isn't available in this region (EU production), or the API key lacks the required\ncalendar permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"The event's date is outside the retained history window and can no longer be read or changed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"412":{"description":"The resource changed since the `If-Match` value was read. Fetch it again, reapply the change, and retry with the new `etag`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/calendar_PreconditionFailedErrorResponse"}}}},"413":{"description":"The request body is too large (8 KB for calendar settings, 128 KB for events).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests, or the invitation emails this request would send exceed an organization,\npod or inbox send limit. Nothing was changed. Honor the `Retry-After` header when present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/calendar_RespondStatus"},"comment":{"type":"string","description":"Comment to include with the response. At most 4,096 UTF-8 bytes, with no control characters\nother than tab, line feed and carriage return; a longer comment returns `400`. It is stored\nas the inbox's attendee `comment`."},"send_reply":{"type":"boolean","description":"When `true` (default), emails the response (iCalendar `REPLY`) to the organizer."}},"required":["status"]}}}},"security":[{"Bearer":[]}]}},"/v0/threads":{"get":{"operationId":"threads_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":["threads"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}},{"name":"labels","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Labels"}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Before"}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/After"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending"}},{"name":"include_spam","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeSpam"}},{"name":"include_blocked","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeBlocked"}},{"name":"include_unauthenticated","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeUnauthenticated"}},{"name":"include_trash","in":"query","required":false,"schema":{"$ref":"#/components/schemas/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"}}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/threads_ListThreadsResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/threads/search":{"get":{"operationId":"threads_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":["threads"],"parameters":[{"name":"q","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Query"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Before"}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/After"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/threads_SearchThreadsResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/threads/{thread_id}":{"get":{"operationId":"threads_get","summary":"Get Thread","description":"**CLI:**\n```bash\nagentmail threads get --thread-id <thread_id>\n```","tags":["threads"],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/threads_ThreadId"}},{"name":"limit","in":"query","description":"Maximum number of messages to return. Cannot exceed 100.","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","description":"Token returned by the previous response for retrieving the next, older page.","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/threads_Thread"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]},"patch":{"operationId":"threads_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":["threads"],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/threads_ThreadId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/threads_UpdateThreadResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Error response with status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/threads_UpdateThreadRequest"}}}},"security":[{"Bearer":[]}]},"delete":{"operationId":"threads_delete","summary":"Delete Thread","description":"Permanently deletes a thread and all of its messages.\n\n**CLI:**\n```bash\nagentmail threads delete --thread-id <thread_id>\n```","tags":["threads"],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/threads_ThreadId"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/threads/{thread_id}/attachments/{attachment_id}":{"get":{"operationId":"threads_getAttachment","summary":"Get Attachment","description":"**CLI:**\n```bash\nagentmail threads get-attachment --thread-id <thread_id> --attachment-id <attachment_id>\n```","tags":["threads"],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/threads_ThreadId"}},{"name":"attachment_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/attachments_AttachmentId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/attachments_AttachmentResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/drafts":{"get":{"operationId":"drafts_list","summary":"List Drafts","description":"**CLI:**\n```bash\nagentmail drafts list\n```","tags":["drafts"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}},{"name":"labels","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Labels"}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Before"}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/After"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/drafts_ListDraftsResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/drafts/{draft_id}":{"get":{"operationId":"drafts_get","summary":"Get Draft","description":"**CLI:**\n```bash\nagentmail drafts get --draft-id <draft_id>\n```","tags":["drafts"],"parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/drafts_DraftId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/drafts_Draft"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/drafts/{draft_id}/attachments/{attachment_id}":{"get":{"operationId":"drafts_getAttachment","summary":"Get Attachment","description":"**CLI:**\n```bash\nagentmail drafts get-attachment --draft-id <draft_id> --attachment-id <attachment_id>\n```","tags":["drafts"],"parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/drafts_DraftId"}},{"name":"attachment_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/attachments_AttachmentId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/attachments_AttachmentResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/webhooks":{"get":{"operationId":"webhooks_list","summary":"List Webhooks","description":"**CLI:**\n```bash\nagentmail webhooks list\n```","tags":["webhooks"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_ListWebhooksResponse"}}}}},"security":[{"Bearer":[]}]},"post":{"operationId":"webhooks_create","summary":"Create Webhook","description":"**CLI:**\n```bash\nagentmail webhooks create --url https://example.com/webhook --event-types message.received\n```","tags":["webhooks"],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_Webhook"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_CreateWebhookRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/webhooks/{webhook_id}":{"get":{"operationId":"webhooks_get","summary":"Get Webhook","description":"**CLI:**\n```bash\nagentmail webhooks get --webhook-id <webhook_id>\n```","tags":["webhooks"],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooks_WebhookId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_Webhook"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]},"patch":{"operationId":"webhooks_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-ids <inbox_id>\n```","tags":["webhooks"],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooks_WebhookId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_Webhook"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_UpdateWebhookRequest"}}}},"security":[{"Bearer":[]}]},"delete":{"operationId":"webhooks_delete","summary":"Delete Webhook","description":"**CLI:**\n```bash\nagentmail webhooks delete --webhook-id <webhook_id>\n```","tags":["webhooks"],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooks_WebhookId"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/webhooks/{webhook_id}/headers":{"get":{"operationId":"webhooks_getHeaders","summary":"Get Webhook Headers","description":"List the names of custom HTTP headers included with deliveries to this webhook. Header values are\nwrite-only and are never returned.","tags":["webhooks"],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooks_WebhookId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_WebhookHeaderNamesResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]},"patch":{"operationId":"webhooks_updateHeaders","summary":"Update Webhook Headers","description":"Atomically set, replace, or remove custom HTTP headers included with deliveries to this webhook.\nHeader values remain write-only.","tags":["webhooks"],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooks_WebhookId"}}],"responses":{"204":{"description":"Response with status 204","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_UpdateWebhookHeadersRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/webhooks/polling":{"get":{"operationId":"webhooks_polling_list","summary":"List Polling Webhooks","description":"Lists the polling webhooks created through this route. `page_token` must come from this\nendpoint; a token from another list endpoint is rejected.\n\n**CLI:**\n```bash\nagentmail webhooks polling list\n```","tags":["webhooks > polling"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_polling_ListPollingWebhooksResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"security":[{"Bearer":[]}]},"post":{"operationId":"webhooks_polling_create","summary":"Create Polling Webhook","description":"Creates a subscription the agent polls for events, and returns the `token` that reads it. Each\norganization, pod, and inbox holds at most 10 polling webhooks; a repeat create with the same\n`client_id` re-issues the token of the existing one instead of counting against that limit.\n\n**CLI:**\n```bash\nagentmail webhooks polling create --client-id my-agent --event-types message.received\n```","tags":["webhooks > polling"],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_polling_CreatePollingWebhookResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_polling_CreatePollingWebhookRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/webhooks/polling/{webhook_id}":{"get":{"operationId":"webhooks_polling_get","summary":"Get Polling Webhook","description":"The `token` is never returned here: create again with the same `client_id` to get a new one.\n\n**CLI:**\n```bash\nagentmail webhooks polling get --webhook-id <webhook_id>\n```","tags":["webhooks > polling"],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooks_WebhookId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_polling_PollingWebhook"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]},"delete":{"operationId":"webhooks_polling_delete","summary":"Delete Polling Webhook","description":"Stops delivery and invalidates the subscription's token.\n\n**CLI:**\n```bash\nagentmail webhooks polling delete --webhook-id <webhook_id>\n```","tags":["webhooks > polling"],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooks_WebhookId"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/domains":{"get":{"operationId":"domains_list","summary":"List Domains","description":"**CLI:**\n```bash\nagentmail domains list\n```","tags":["domains"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/domains_ListDomainsResponse"}}}}},"security":[{"Bearer":[]}]},"post":{"operationId":"domains_create","summary":"Create Domain","description":"**CLI:**\n```bash\nagentmail domains create --domain example.com\n```","tags":["domains"],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/domains_Domain"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"422":{"description":"Error response with status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/domains_CreateDomainRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/domains/{domain_id}":{"get":{"operationId":"domains_get","summary":"Get Domain","description":"**CLI:**\n```bash\nagentmail domains get --domain-id <domain_id>\n```","tags":["domains"],"parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/domains_DomainId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/domains_Domain"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]},"patch":{"operationId":"domains_update","summary":"Update Domain","description":"**CLI:**\n```bash\nagentmail domains update --domain-id <domain_id>\n```","tags":["domains"],"parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/domains_DomainId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/domains_Domain"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/domains_UpdateDomainRequest"}}}},"security":[{"Bearer":[]}]},"delete":{"operationId":"domains_delete","summary":"Delete Domain","description":"**CLI:**\n```bash\nagentmail domains delete --domain-id <domain_id>\n```","tags":["domains"],"parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/domains_DomainId"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/domains/{domain_id}/zone-file":{"get":{"operationId":"domains_getZoneFile","summary":"Get Zone File","description":"**CLI:**\n```bash\nagentmail domains get-zone-file --domain-id <domain_id>\n```","tags":["domains"],"parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/domains_DomainId"}}],"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/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/domains/{domain_id}/verify":{"post":{"operationId":"domains_verify","summary":"Verify Domain","description":"**CLI:**\n```bash\nagentmail domains verify --domain-id <domain_id>\n```","tags":["domains"],"parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/domains_DomainId"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Error response with status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/domains/{domain_id}/setup-link":{"get":{"operationId":"domains_getSetupLink","summary":"Get Setup Link","description":"Build a one-click DNS setup link for the domain via the Domain Connect standard. When the domain's DNS provider supports Domain Connect and carries the AgentMail template, the response contains a signed URL: opening it lets the domain owner approve the required DNS records at their provider, which writes them automatically — no copy-paste. When the provider does not support it, `supported` is `false` and the domain's `records` should be added manually instead.","tags":["domains"],"parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/domains_DomainId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/domains_GetSetupLinkResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Error response with status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/lists/{direction}/{type}":{"get":{"operationId":"lists_list","summary":"List Entries","description":"**CLI:**\n```bash\nagentmail lists list --direction <direction> --type <type>\n```","tags":["lists"],"parameters":[{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/lists_Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/lists_ListType"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/lists_ListListEntriesResponse"}}}}},"security":[{"Bearer":[]}]},"post":{"operationId":"lists_create","summary":"Create List Entry","description":"**CLI:**\n```bash\nagentmail lists create --direction <direction> --type <type> --entry user@example.com\n```","tags":["lists"],"parameters":[{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/lists_Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/lists_ListType"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/lists_ListEntry"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/lists_CreateListEntryRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/lists/{direction}/{type}/{entry}":{"get":{"operationId":"lists_get","summary":"Get List Entry","description":"**CLI:**\n```bash\nagentmail lists get --direction <direction> --type <type> --entry <entry>\n```","tags":["lists"],"parameters":[{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/lists_Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/lists_ListType"}},{"name":"entry","in":"path","description":"Email address or domain.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/lists_ListEntry"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]},"delete":{"operationId":"lists_delete","summary":"Delete List Entry","description":"**CLI:**\n```bash\nagentmail lists delete --direction <direction> --type <type> --entry <entry>\n```","tags":["lists"],"parameters":[{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/lists_Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/lists_ListType"}},{"name":"entry","in":"path","description":"Email address or domain.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/metrics/events":{"get":{"operationId":"metrics_queryEvents","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 query-events\n```","tags":["metrics"],"parameters":[{"name":"event_types","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_MetricEventTypes"}},{"name":"start","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_Start"}},{"name":"end","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_End"}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_Period"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_MetricLimit"}},{"name":"descending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_Descending"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/metrics_QueryMetricsResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/metrics/usage":{"get":{"operationId":"metrics_queryUsage","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":["metrics"],"parameters":[{"name":"usage_types","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_UsageTypes"}},{"name":"start","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_Start"}},{"name":"end","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_End"}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_Period"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_MetricLimit"}},{"name":"descending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_Descending"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/metrics_QueryUsageResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/metrics/rates":{"get":{"operationId":"metrics_queryRates","summary":"Query Rates","description":"Rolling bounce and complaint rates for the organization. At each\n`period` grid point, the bounced (or complained) messages over the\npreceding `window` divided by the messages sent over the same window,\nwith the send count alongside so you can see the volume behind\nit. AgentMail weighs bounce and complaint signals when deciding\nwhether to suspend an account's sending, so keep both rates low.\nDefaults to the rolling 24-hour rate sampled hourly over the\nlast day; `start` must be within the last 90 days, `window` must be a\nwhole multiple of `period`, and the range plus window divided by\n`period` must not exceed 1000 buckets.\n\n**CLI:**\n```bash\nagentmail metrics query-rates\n```","tags":["metrics"],"parameters":[{"name":"rate_types","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_RateTypes"}},{"name":"start","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_Start"}},{"name":"end","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_End"}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_RatePeriod"}},{"name":"window","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_Window"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_MetricLimit"}},{"name":"descending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_Descending"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/metrics_QueryRatesResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/api-keys":{"get":{"operationId":"apiKeys_list","summary":"List API Keys","description":"Lists every credential, newest first. Filter one family with `type`.\nPage to token exhaustion: a page can be empty and still carry a\n`next_page_token`.\n\n**CLI:**\n```bash\nagentmail api-keys list\n```","tags":["api-keys"],"parameters":[{"name":"type","in":"query","description":"Restrict the list to one credential family. Omit for every family.","required":false,"schema":{"$ref":"#/components/schemas/apiKeys_ApiKeyType"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiKeys_ListApiKeysResponse"}}}}},"security":[{"Bearer":[]}]},"post":{"operationId":"apiKeys_create","summary":"Create API Key","description":"Creates a bearer key, or registers a public key when the body carries\n`public_key`. The route selects the scope. Bearer secrets are returned once.\n\n**CLI:**\n```bash\nagentmail api-keys create --name \"My Key\"\n```","tags":["api-keys"],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiKeys_CreateApiKeyResult"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiKeys_CreateApiKeyRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/api-keys/{api_key_id}":{"get":{"operationId":"apiKeys_get","summary":"Get API Key","description":"Returns one credential of any family. Public keys also resolve by\n`client_id`. Poll a sign-in key until `status` is `active`.","tags":["api-keys"],"parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/apiKeys_ApiKeyId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiKeys_ApiKey"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]},"patch":{"operationId":"apiKeys_update","summary":"Update API Key","description":"Renames a credential or changes its permissions. Public keys also resolve\nby `client_id`; a sign-in key accepts only `app_connect` and\n`app_share_owner`.","tags":["api-keys"],"parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/apiKeys_ApiKeyId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiKeys_ApiKey"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiKeys_UpdateApiKeyRequest"}}}},"security":[{"Bearer":[]}]},"delete":{"operationId":"apiKeys_delete","summary":"Delete API Key","description":"Deletes one credential of any family. A pending sign-in key is\ncancelled; an active one is revoked. Public keys also resolve by `client_id`.\n\n**CLI:**\n```bash\nagentmail api-keys delete --api-key-id <api_key_id>\n```","tags":["api-keys"],"parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/apiKeys_ApiKeyId"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/apps":{"get":{"operationId":"apps_list","summary":"List Apps","description":"Lists apps, most popular first.","tags":["apps"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}},{"name":"category","in":"query","description":"Only apps in this category. A filtered page can hold fewer than `limit` apps while more remain, so page until `next_page_token` is absent. A `page_token` works only with the `category` it was returned for.","required":false,"schema":{"$ref":"#/components/schemas/apps_AppCategory"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apps_ListAppsResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/apps/search":{"get":{"operationId":"apps_search","summary":"Search Apps","description":"Searches apps by name prefix.","tags":["apps"],"parameters":[{"name":"q","in":"query","description":"Name prefix to search for.","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apps_SearchAppsResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/apps/{app_id}":{"get":{"operationId":"apps_get","summary":"Get App","description":"Gets one app by ID or slug. A catalog app returns its full entry.\nA registered app that the catalog does not list returns its ID and\nname only, without `updated_at`, so anyone holding its ID can still look\nit up; a slug finds catalog apps only. List Apps and Search Apps show\ncatalog entries only.","tags":["apps"],"parameters":[{"name":"app_id","in":"path","description":"ID of app, or the `slug` of an app in the catalog. A slug ignores case, spaces and punctuation.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apps_App"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/apps/{app_id}/accounts":{"get":{"operationId":"apps_listAccounts","summary":"List App Accounts","description":"Lists accounts at one app, most recent sign-in first.","tags":["apps"],"parameters":[{"name":"app_id","in":"path","description":"ID of app, or the `slug` of an app in the catalog. A slug ignores case, spaces and punctuation.","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apps_ListAppAccountsResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/apps/{app_id}/connect":{"post":{"operationId":"apps_connect","summary":"Connect App","description":"Starts signing an inbox in to an app. Returns a single-use `magic_url`,\nvalid for five minutes, to open in the client that will hold the sign-in;\nthe client enrolls as the inbox and continues to the app.\nAn app in the catalog can be named by its `slug`, as in\n`POST /v0/apps/firecrawl/connect`.\nA `404` names the missing resource: `App` or `Inbox`.\nA `403` `AppSignupLimitError` means the app accepts no more sign-ups from\nyour organization; sign in with an inbox that already has an account there.","tags":["apps"],"parameters":[{"name":"app_id","in":"path","description":"ID of app, or the `slug` of an app in the catalog. A slug ignores case, spaces and punctuation.","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Response with status 202","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apps_ConnectAccepted"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"The app's sign-up limit for your organization is reached, or the app has paused new\nsign-ups. `code` is `limit_exceeded` and `fix` says which. Inboxes that already have an\naccount at the app can still sign in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/apps_ConnectAppBody"}}}},"security":[{"Bearer":[]}]}},"/v0/accounts":{"get":{"operationId":"accounts_list","summary":"List Accounts","description":"Lists accounts across all apps, scoped to the API key: an\norganization key sees every account, a pod key its pod's, an inbox key\nits inbox's. Requires `inbox_read`.","tags":["accounts"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounts_ListAccountsResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/accounts/{account_id}":{"get":{"operationId":"accounts_get","summary":"Get Account","description":"Returns one account by ID. An account outside the key's scope is a 404.\nRequires `inbox_read`.","tags":["accounts"],"parameters":[{"name":"account_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/accounts_AccountId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounts_Account"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/accounts/{account_id}/update":{"patch":{"operationId":"accounts_update","summary":"Update Account","description":"Updates one account. Set `status` to `disabled` to stop the inbox from\nsigning in at the app again, or to `enabled` to re-enable it.\nIdempotent: disabling an already disabled account keeps its original\n`disabled_at`, and enabling an enabled account is a no-op.\n\nFind the `account_id` with List Accounts. An account exists only after an\ninbox's first sign-in at an app, so it cannot be disabled in advance.\nA disable applies to that inbox at that app whichever sign-in key is\nused: the app's next authorization ends in `access_denied`, and a code\nissued earlier is refused with `invalid_grant`. Access tokens already\nissued stay valid until they expire, and the app's own session is\nunaffected.\n\nRequires `account_update`, which sign-in keys (`type: public_key`) cannot\nhold, so call this with a bearer API key. An account outside the key's\nscope is a 404. A 409 means the account changed during the write; read it\nagain and retry.","tags":["accounts"],"parameters":[{"name":"account_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/accounts_AccountId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounts_Account"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounts_UpdateAccountRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/pods":{"get":{"operationId":"pods_list","summary":"List Pods","description":"**CLI:**\n```bash\nagentmail pods list\n```","tags":["pods"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/pods_ListPodsResponse"}}}}},"security":[{"Bearer":[]}]},"post":{"operationId":"pods_create","summary":"Create Pod","description":"**CLI:**\n```bash\nagentmail pods create --client-id my-pod\n```","tags":["pods"],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/pods_Pod"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/pods_CreatePodRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/pods/{pod_id}":{"get":{"operationId":"pods_get","summary":"Get Pod","description":"**CLI:**\n```bash\nagentmail pods get --pod-id <pod_id>\n```","tags":["pods"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/pods_Pod"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]},"delete":{"operationId":"pods_delete","summary":"Delete Pod","description":"**CLI:**\n```bash\nagentmail pods delete --pod-id <pod_id>\n```","tags":["pods"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/pods/{pod_id}/inboxes":{"get":{"operationId":"pods_inboxes_list","summary":"List Inboxes","description":"**CLI:**\n```bash\nagentmail pods inboxes list --pod-id <pod_id>\n```","tags":["pods > inboxes"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxes_ListInboxesResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]},"post":{"operationId":"pods_inboxes_create","summary":"Create Inbox","description":"**CLI:**\n```bash\nagentmail pods inboxes create --pod-id <pod_id> --username myagent --domain example.com\n```","tags":["pods > inboxes"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxes_Inbox"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"422":{"description":"Error response with status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxes_CreateInboxRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/pods/{pod_id}/inboxes/search":{"get":{"operationId":"pods_inboxes_search","summary":"Search Inboxes","description":"Searches inboxes in the pod by address or display name, ranked by\nrelevance. Each word in the query matches the start of a word in the\naddress or display name, so `sup` matches `support@example.com` but\n`port` does not. An exact address match always ranks first. `limit`\ncannot exceed 100. A page can be empty and still carry a\n`next_page_token`; keep paging until the token is absent.","tags":["pods > inboxes"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"q","in":"query","description":"Address or display name to search for. Matches word prefixes. Must be 2 to 256 characters.","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxes_SearchInboxesResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/pods/{pod_id}/inboxes/{inbox_id}":{"get":{"operationId":"pods_inboxes_get","summary":"Get Inbox","description":"**CLI:**\n```bash\nagentmail pods inboxes get --pod-id <pod_id> --inbox-id <inbox_id>\n```","tags":["pods > inboxes"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxes_Inbox"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]},"patch":{"operationId":"pods_inboxes_update","summary":"Update Inbox","description":"**CLI:**\n```bash\nagentmail pods inboxes update --pod-id <pod_id> --inbox-id <inbox_id>\n```","tags":["pods > inboxes"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxes_Inbox"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxes_UpdateInboxRequest"}}}},"security":[{"Bearer":[]}]},"delete":{"operationId":"pods_inboxes_delete","summary":"Delete Inbox","description":"**CLI:**\n```bash\nagentmail pods inboxes delete --pod-id <pod_id> --inbox-id <inbox_id>\n```","tags":["pods > inboxes"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxes_InboxId"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/pods/{pod_id}/threads":{"get":{"operationId":"pods_threads_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":["pods > threads"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}},{"name":"labels","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Labels"}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Before"}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/After"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending"}},{"name":"include_spam","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeSpam"}},{"name":"include_blocked","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeBlocked"}},{"name":"include_unauthenticated","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeUnauthenticated"}},{"name":"include_trash","in":"query","required":false,"schema":{"$ref":"#/components/schemas/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"}}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/threads_ListThreadsResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/pods/{pod_id}/threads/search":{"get":{"operationId":"pods_threads_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":["pods > threads"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"q","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Query"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Before"}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/After"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/threads_SearchThreadsResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/pods/{pod_id}/threads/{thread_id}":{"get":{"operationId":"pods_threads_get","summary":"Get Thread","description":"**CLI:**\n```bash\nagentmail pods threads get --pod-id <pod_id> --thread-id <thread_id>\n```","tags":["pods > threads"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/threads_ThreadId"}},{"name":"limit","in":"query","description":"Maximum number of messages to return. Cannot exceed 100.","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","description":"Token returned by the previous response for retrieving the next, older page.","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/threads_Thread"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]},"patch":{"operationId":"pods_threads_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":["pods > threads"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/threads_ThreadId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/threads_UpdateThreadResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Error response with status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/threads_UpdateThreadRequest"}}}},"security":[{"Bearer":[]}]},"delete":{"operationId":"pods_threads_delete","summary":"Delete Thread","description":"Permanently deletes a thread and all of its messages.\n\n**CLI:**\n```bash\nagentmail pods threads delete --pod-id <pod_id> --thread-id <thread_id>\n```","tags":["pods > threads"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/threads_ThreadId"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/pods/{pod_id}/threads/{thread_id}/attachments/{attachment_id}":{"get":{"operationId":"pods_threads_getAttachment","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":["pods > threads"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/threads_ThreadId"}},{"name":"attachment_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/attachments_AttachmentId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/attachments_AttachmentResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/pods/{pod_id}/drafts":{"get":{"operationId":"pods_drafts_list","summary":"List Drafts","description":"**CLI:**\n```bash\nagentmail pods drafts list --pod-id <pod_id>\n```","tags":["pods > drafts"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}},{"name":"labels","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Labels"}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Before"}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/After"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/drafts_ListDraftsResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/pods/{pod_id}/drafts/{draft_id}":{"get":{"operationId":"pods_drafts_get","summary":"Get Draft","description":"**CLI:**\n```bash\nagentmail pods drafts get --pod-id <pod_id> --draft-id <draft_id>\n```","tags":["pods > drafts"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/drafts_DraftId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/drafts_Draft"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/pods/{pod_id}/drafts/{draft_id}/attachments/{attachment_id}":{"get":{"operationId":"pods_drafts_getAttachment","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":["pods > drafts"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/drafts_DraftId"}},{"name":"attachment_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/attachments_AttachmentId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/attachments_AttachmentResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/pods/{pod_id}/webhooks":{"get":{"operationId":"pods_webhooks_list","summary":"List Webhooks","description":"**CLI:**\n```bash\nagentmail pods webhooks list --pod-id <pod_id>\n```","tags":["pods > webhooks"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_ListWebhooksResponse"}}}}},"security":[{"Bearer":[]}]},"post":{"operationId":"pods_webhooks_create","summary":"Create Webhook","description":"Create a webhook scoped to this pod.\n\n**CLI:**\n```bash\nagentmail pods webhooks create --pod-id <pod_id> --url https://example.com/webhook --event-types message.received\n```","tags":["pods > webhooks"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_Webhook"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_CreatePodWebhookRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/pods/{pod_id}/webhooks/{webhook_id}":{"get":{"operationId":"pods_webhooks_get","summary":"Get Webhook","description":"**CLI:**\n```bash\nagentmail pods webhooks get --pod-id <pod_id> --webhook-id <webhook_id>\n```","tags":["pods > webhooks"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooks_WebhookId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_Webhook"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]},"patch":{"operationId":"pods_webhooks_update","summary":"Update Webhook","description":"**CLI:**\n```bash\nagentmail pods webhooks update --pod-id <pod_id> --webhook-id <webhook_id> --add-inbox-ids <inbox_id>\n```","tags":["pods > webhooks"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooks_WebhookId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_Webhook"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_UpdatePodWebhookRequest"}}}},"security":[{"Bearer":[]}]},"delete":{"operationId":"pods_webhooks_delete","summary":"Delete Webhook","description":"**CLI:**\n```bash\nagentmail pods webhooks delete --pod-id <pod_id> --webhook-id <webhook_id>\n```","tags":["pods > webhooks"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooks_WebhookId"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/pods/{pod_id}/webhooks/{webhook_id}/headers":{"get":{"operationId":"pods_webhooks_getHeaders","summary":"Get Webhook Headers","description":"List the names of custom HTTP headers included with deliveries to this pod-scoped webhook.\nHeader values are write-only and are never returned.","tags":["pods > webhooks"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooks_WebhookId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_WebhookHeaderNamesResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]},"patch":{"operationId":"pods_webhooks_updateHeaders","summary":"Update Webhook Headers","description":"Atomically set, replace, or remove custom HTTP headers included with deliveries to this\npod-scoped webhook. Header values remain write-only.","tags":["pods > webhooks"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooks_WebhookId"}}],"responses":{"204":{"description":"Response with status 204","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_UpdateWebhookHeadersRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/pods/{pod_id}/webhooks/polling":{"get":{"operationId":"pods_webhooks_polling_list","summary":"List Polling Webhooks","description":"Lists the polling webhooks created through this pod route.\n\n**CLI:**\n```bash\nagentmail pods webhooks polling list --pod-id <pod_id>\n```","tags":["pods > webhooks > polling"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_polling_ListPollingWebhooksResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"security":[{"Bearer":[]}]},"post":{"operationId":"pods_webhooks_polling_create","summary":"Create Polling Webhook","description":"Create a polling webhook scoped to this pod and return the `token` that reads it.\n\n**CLI:**\n```bash\nagentmail pods webhooks polling create --pod-id <pod_id> --client-id my-agent --event-types message.received\n```","tags":["pods > webhooks > polling"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_polling_CreatePollingWebhookResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_polling_CreatePodPollingWebhookRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/pods/{pod_id}/webhooks/polling/{webhook_id}":{"get":{"operationId":"pods_webhooks_polling_get","summary":"Get Polling Webhook","description":"**CLI:**\n```bash\nagentmail pods webhooks polling get --pod-id <pod_id> --webhook-id <webhook_id>\n```","tags":["pods > webhooks > polling"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooks_WebhookId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooks_polling_PollingWebhook"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]},"delete":{"operationId":"pods_webhooks_polling_delete","summary":"Delete Polling Webhook","description":"**CLI:**\n```bash\nagentmail pods webhooks polling delete --pod-id <pod_id> --webhook-id <webhook_id>\n```","tags":["pods > webhooks > polling"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooks_WebhookId"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/pods/{pod_id}/domains":{"get":{"operationId":"pods_domains_list","summary":"List Domains","description":"**CLI:**\n```bash\nagentmail pods domains list --pod-id <pod_id>\n```","tags":["pods > domains"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/domains_ListDomainsResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]},"post":{"operationId":"pods_domains_create","summary":"Create Domain","description":"**CLI:**\n```bash\nagentmail pods domains create --pod-id <pod_id> --domain example.com\n```","tags":["pods > domains"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/domains_Domain"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"422":{"description":"Error response with status 422","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/domains_CreateDomainRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/pods/{pod_id}/domains/{domain_id}":{"get":{"operationId":"pods_domains_get","summary":"Get Domain","description":"**CLI:**\n```bash\nagentmail pods domains get --pod-id <pod_id> --domain-id <domain_id>\n```","tags":["pods > domains"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/domains_DomainId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/domains_Domain"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]},"patch":{"operationId":"pods_domains_update","summary":"Update Domain","description":"**CLI:**\n```bash\nagentmail pods domains update --pod-id <pod_id> --domain-id <domain_id>\n```","tags":["pods > domains"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/domains_DomainId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/domains_Domain"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/domains_UpdateDomainRequest"}}}},"security":[{"Bearer":[]}]},"delete":{"operationId":"pods_domains_delete","summary":"Delete Domain","description":"**CLI:**\n```bash\nagentmail pods domains delete --pod-id <pod_id> --domain-id <domain_id>\n```","tags":["pods > domains"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/domains_DomainId"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/pods/{pod_id}/domains/{domain_id}/zone-file":{"get":{"operationId":"pods_domains_getZoneFile","summary":"Get Zone File","description":"**CLI:**\n```bash\nagentmail pods domains get-zone-file --pod-id <pod_id> --domain-id <domain_id>\n```","tags":["pods > domains"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/domains_DomainId"}}],"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/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/pods/{pod_id}/domains/{domain_id}/verify":{"post":{"operationId":"pods_domains_verify","summary":"Verify Domain","description":"**CLI:**\n```bash\nagentmail pods domains verify --pod-id <pod_id> --domain-id <domain_id>\n```","tags":["pods > domains"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/domains_DomainId"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/pods/{pod_id}/lists/{direction}/{type}":{"get":{"operationId":"pods_lists_list","summary":"List Entries","description":"**CLI:**\n```bash\nagentmail pods lists list --pod-id <pod_id> --direction <direction> --type <type>\n```","tags":["pods > lists"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/lists_Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/lists_ListType"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/lists_PodListListEntriesResponse"}}}}},"security":[{"Bearer":[]}]},"post":{"operationId":"pods_lists_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":["pods > lists"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/lists_Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/lists_ListType"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/lists_PodListEntry"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/lists_CreateListEntryRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/pods/{pod_id}/lists/{direction}/{type}/{entry}":{"get":{"operationId":"pods_lists_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":["pods > lists"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/lists_Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/lists_ListType"}},{"name":"entry","in":"path","description":"Email address or domain.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/lists_PodListEntry"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]},"delete":{"operationId":"pods_lists_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":["pods > lists"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/lists_Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/lists_ListType"}},{"name":"entry","in":"path","description":"Email address or domain.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/pods/{pod_id}/metrics/events":{"get":{"operationId":"pods_metrics_queryEvents","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-events --pod-id <pod_id>\n```","tags":["pods > metrics"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"event_types","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_MetricEventTypes"}},{"name":"start","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_Start"}},{"name":"end","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_End"}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_Period"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_MetricLimit"}},{"name":"descending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_Descending"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/metrics_QueryMetricsResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/pods/{pod_id}/metrics/usage":{"get":{"operationId":"pods_metrics_queryUsage","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":["pods > metrics"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"usage_types","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_UsageTypes"}},{"name":"start","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_Start"}},{"name":"end","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_End"}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_Period"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_MetricLimit"}},{"name":"descending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_Descending"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/metrics_QueryUsageResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/pods/{pod_id}/metrics/rates":{"get":{"operationId":"pods_metrics_queryRates","summary":"Query Rates","description":"Rolling bounce and complaint rates for the pod. At each `period` grid\npoint, the bounced (or complained) messages over the preceding\n`window` divided by the messages sent over the same window, with the\nsend count alongside. Account moderation evaluates the organization-wide\nrate, so use the organization endpoint to see the number it acts on;\nthe pod view shows which pods contribute. Defaults to the rolling\n24-hour rate sampled hourly over the last day; `start` must be within\nthe last 90 days, `window` must be a whole multiple of `period`, and\nthe range plus window divided by `period` must not exceed 1000\nbuckets.\n\n**CLI:**\n```bash\nagentmail pods metrics query-rates --pod-id <pod_id>\n```","tags":["pods > metrics"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"rate_types","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_RateTypes"}},{"name":"start","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_Start"}},{"name":"end","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_End"}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_RatePeriod"}},{"name":"window","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_Window"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_MetricLimit"}},{"name":"descending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/metrics_Descending"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/metrics_QueryRatesResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/pods/{pod_id}/api-keys":{"get":{"operationId":"pods_apiKeys_list","summary":"List API Keys","description":"**CLI:**\n```bash\nagentmail pods api-keys list --pod-id <pod_id>\n```","tags":["pods > api-keys"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiKeys_ListApiKeysResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]},"post":{"operationId":"pods_apiKeys_create","summary":"Create API Key","description":"**CLI:**\n```bash\nagentmail pods api-keys create --pod-id <pod_id> --name \"My Key\"\n```","tags":["pods > api-keys"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiKeys_CreateApiKeyResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiKeys_CreateApiKeyRequest"}}}},"security":[{"Bearer":[]}]}},"/v0/pods/{pod_id}/api-keys/{api_key_id}":{"patch":{"operationId":"pods_apiKeys_update","summary":"Update API Key","description":"**CLI:**\n```bash\nagentmail pods api-keys update --pod-id <pod_id> --api-key-id <api_key_id> --name \"Renamed\"\n```","tags":["pods > api-keys"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"api_key_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/apiKeys_ApiKeyId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiKeys_ApiKey"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/apiKeys_UpdateApiKeyRequest"}}}},"security":[{"Bearer":[]}]},"delete":{"operationId":"pods_apiKeys_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":["pods > api-keys"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"api_key_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/apiKeys_ApiKeyId"}}],"responses":{"200":{"description":"Successful response"},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/pods/{pod_id}/accounts":{"get":{"operationId":"pods_accounts_list","summary":"List Accounts","description":"Lists accounts held by inboxes in the pod, across all apps. Requires `inbox_read`.","tags":["pods > accounts"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit"}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken"}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounts_ListAccountsResponse"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/pods/{pod_id}/accounts/{account_id}":{"get":{"operationId":"pods_accounts_get","summary":"Get Account","description":"Returns one account held by inboxes in the pod. An account elsewhere is a 404. Requires\n`inbox_read`.","tags":["pods > accounts"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/pods_PodId"}},{"name":"account_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/accounts_AccountId"}}],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounts_Account"}}}},"404":{"description":"Error response with status 404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/organizations":{"get":{"operationId":"organizations_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":["organizations"],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/organizations_Organization"}}}}},"security":[{"Bearer":[]}]}},"/v0/organizations/labs":{"get":{"operationId":"organizations_getLabs","summary":"Get Labs","description":"Returns whether the organization is in AgentMail Labs, which turns on features that are still in preview, such as [Agent Armor](https://docs.agentmail.to/agent-armor). Requires an organization-scoped API key.\n\n**CLI:**\n```bash\nagentmail organizations get-labs\n```","tags":["organizations"],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/organizations_OrganizationLabs"}}}},"403":{"description":"The credential can't do this. For Get Labs, `code` is `missing_permission` when the API key\nis inbox- or pod-scoped. For Join Labs, `code` is `unrestricted_key_required` when the\ncredential isn't an organization-scoped API key with no permissions restriction. Other Join\nLabs refusals (an unverified or suspended organization, a deployment without Labs, or an\norganization whose content access policy keeps API keys from joining) have `code`\n`forbidden` or `account_suspended`. Every refusal except a deployment without Labs has a\n`fix` that says what to do.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]},"post":{"operationId":"organizations_joinLabs","summary":"Join Labs","description":"Joins AgentMail Labs for the whole organization, which turns on every feature in Labs for every inbox. Joining again has no effect. There is no leave on the API; an organization admin can leave in the console under [Settings, then Labs](https://console.agentmail.to/dashboard/settings/labs).\n\nJoin only when your organization has decided to. Get Labs reads the same for an organization that never joined and one whose admin left Labs on purpose, so don't join just because `enabled` is `false`.\n\nRequires an organization-scoped API key with no permissions restriction, and a verified organization. API keys see the change within five minutes. Where Labs isn't offered (`available` is `false` on Get Labs), joining returns `403`.\n\n**CLI:**\n```bash\nagentmail organizations join-labs\n```","tags":["organizations"],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/organizations_OrganizationLabs"}}}},"400":{"description":"Error response with status 400","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"The credential can't do this. For Get Labs, `code` is `missing_permission` when the API key\nis inbox- or pod-scoped. For Join Labs, `code` is `unrestricted_key_required` when the\ncredential isn't an organization-scoped API key with no permissions restriction. Other Join\nLabs refusals (an unverified or suspended organization, a deployment without Labs, or an\norganization whose content access policy keeps API keys from joining) have `code`\n`forbidden` or `account_suspended`. Every refusal except a deployment without Labs has a\n`fix` that says what to do.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Error response with status 409","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"Bearer":[]}]}},"/v0/auth/me":{"get":{"operationId":"auth_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":["auth"],"responses":{"200":{"description":"Response with status 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_Identity"}}}}},"security":[{"Bearer":[]}]}}},"tags":[{"name":"agent"},{"name":"inboxes > files"},{"name":"inboxes"},{"name":"inboxes > threads"},{"name":"inboxes > messages"},{"name":"inboxes > drafts"},{"name":"inboxes > webhooks"},{"name":"inboxes > webhooks > polling"},{"name":"inboxes > lists"},{"name":"inboxes > metrics"},{"name":"inboxes > events"},{"name":"inboxes > api-keys"},{"name":"inboxes > accounts"},{"name":"inboxes > calendar"},{"name":"threads"},{"name":"drafts"},{"name":"webhooks"},{"name":"webhooks > polling"},{"name":"domains"},{"name":"lists"},{"name":"metrics"},{"name":"api-keys"},{"name":"apps"},{"name":"accounts"},{"name":"pods"},{"name":"pods > inboxes"},{"name":"pods > threads"},{"name":"pods > drafts"},{"name":"pods > webhooks"},{"name":"pods > webhooks > polling"},{"name":"pods > domains"},{"name":"pods > lists"},{"name":"pods > metrics"},{"name":"pods > api-keys"},{"name":"pods > accounts"},{"name":"organizations"},{"name":"auth"}],"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":{"webhooks_events_messageReceived":{"post":{"operationId":"webhooks_events_messageReceived","summary":"Message Received","parameters":[{"name":"svix-id","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixId"}},{"name":"svix-signature","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixSignature"}},{"name":"svix-timestamp","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixTimestamp"}}],"responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/events_MessageReceivedEvent"}}}}}},"webhooks_events_messageSecurityCompleted":{"post":{"operationId":"webhooks_events_messageSecurityCompleted","summary":"Message Security Completed","parameters":[{"name":"svix-id","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixId"}},{"name":"svix-signature","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixSignature"}},{"name":"svix-timestamp","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixTimestamp"}}],"responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/events_MessageSecurityCompletedEvent"}}}}}},"webhooks_events_messageSecurityReview":{"post":{"operationId":"webhooks_events_messageSecurityReview","summary":"Message Security Review","parameters":[{"name":"svix-id","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixId"}},{"name":"svix-signature","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixSignature"}},{"name":"svix-timestamp","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixTimestamp"}}],"responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/events_MessageSecurityReviewEvent"}}}}}},"webhooks_events_messageSecurityOverride":{"post":{"operationId":"webhooks_events_messageSecurityOverride","summary":"Message Security Override","parameters":[{"name":"svix-id","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixId"}},{"name":"svix-signature","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixSignature"}},{"name":"svix-timestamp","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixTimestamp"}}],"responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/events_MessageSecurityOverrideEvent"}}}}}},"webhooks_events_messageSent":{"post":{"operationId":"webhooks_events_messageSent","summary":"Message Sent","parameters":[{"name":"svix-id","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixId"}},{"name":"svix-signature","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixSignature"}},{"name":"svix-timestamp","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixTimestamp"}}],"responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/events_MessageSentEvent"}}}}}},"webhooks_events_messageDelivered":{"post":{"operationId":"webhooks_events_messageDelivered","summary":"Message Delivered","parameters":[{"name":"svix-id","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixId"}},{"name":"svix-signature","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixSignature"}},{"name":"svix-timestamp","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixTimestamp"}}],"responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/events_MessageDeliveredEvent"}}}}}},"webhooks_events_messageBounced":{"post":{"operationId":"webhooks_events_messageBounced","summary":"Message Bounced","parameters":[{"name":"svix-id","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixId"}},{"name":"svix-signature","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixSignature"}},{"name":"svix-timestamp","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixTimestamp"}}],"responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/events_MessageBouncedEvent"}}}}}},"webhooks_events_messageComplained":{"post":{"operationId":"webhooks_events_messageComplained","summary":"Message Complained","parameters":[{"name":"svix-id","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixId"}},{"name":"svix-signature","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixSignature"}},{"name":"svix-timestamp","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixTimestamp"}}],"responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/events_MessageComplainedEvent"}}}}}},"webhooks_events_messageRejected":{"post":{"operationId":"webhooks_events_messageRejected","summary":"Message Rejected","parameters":[{"name":"svix-id","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixId"}},{"name":"svix-signature","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixSignature"}},{"name":"svix-timestamp","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixTimestamp"}}],"responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/events_MessageRejectedEvent"}}}}}},"webhooks_events_messageOpened":{"post":{"operationId":"webhooks_events_messageOpened","summary":"Message Opened","parameters":[{"name":"svix-id","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixId"}},{"name":"svix-signature","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixSignature"}},{"name":"svix-timestamp","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixTimestamp"}}],"responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/events_MessageOpenedEvent"}}}}}},"webhooks_events_domainVerified":{"post":{"operationId":"webhooks_events_domainVerified","summary":"Domain Verified","parameters":[{"name":"svix-id","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixId"}},{"name":"svix-signature","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixSignature"}},{"name":"svix-timestamp","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixTimestamp"}}],"responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/events_DomainVerifiedEvent"}}}}}},"webhooks_events_calendarEventCreated":{"post":{"operationId":"webhooks_events_calendarEventCreated","summary":"Calendar Event Created","parameters":[{"name":"svix-id","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixId"}},{"name":"svix-signature","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixSignature"}},{"name":"svix-timestamp","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixTimestamp"}}],"responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/events_CalendarEventCreatedEvent"}}}}}},"webhooks_events_calendarEventUpdated":{"post":{"operationId":"webhooks_events_calendarEventUpdated","summary":"Calendar Event Updated","parameters":[{"name":"svix-id","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixId"}},{"name":"svix-signature","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixSignature"}},{"name":"svix-timestamp","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixTimestamp"}}],"responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/events_CalendarEventUpdatedEvent"}}}}}},"webhooks_events_calendarEventDeleted":{"post":{"operationId":"webhooks_events_calendarEventDeleted","summary":"Calendar Event Deleted","parameters":[{"name":"svix-id","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixId"}},{"name":"svix-signature","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixSignature"}},{"name":"svix-timestamp","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixTimestamp"}}],"responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/events_CalendarEventDeletedEvent"}}}}}},"webhooks_events_calendarEventResponded":{"post":{"operationId":"webhooks_events_calendarEventResponded","summary":"Calendar Event Responded","parameters":[{"name":"svix-id","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixId"}},{"name":"svix-signature","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixSignature"}},{"name":"svix-timestamp","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixTimestamp"}}],"responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/events_CalendarEventRespondedEvent"}}}}}},"webhooks_events_calendarEventStarting":{"post":{"operationId":"webhooks_events_calendarEventStarting","summary":"Calendar Event Starting","parameters":[{"name":"svix-id","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixId"}},{"name":"svix-signature","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixSignature"}},{"name":"svix-timestamp","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixTimestamp"}}],"responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/events_CalendarEventStartingEvent"}}}}}},"webhooks_events_calendarEventEnding":{"post":{"operationId":"webhooks_events_calendarEventEnding","summary":"Calendar Event Ending","parameters":[{"name":"svix-id","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixId"}},{"name":"svix-signature","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixSignature"}},{"name":"svix-timestamp","in":"header","required":true,"schema":{"$ref":"#/components/schemas/webhooks_events_SvixTimestamp"}}],"responses":{"200":{"description":"Webhook received successfully"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/events_CalendarEventEndingEvent"}}}}}}},"components":{"schemas":{"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.\nOmit it to get a receive-only inbox: it can receive email but cannot send until a human is attached with the attach human endpoint."},"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":["username"],"description":"Request body to sign up an agent.","title":"AgentSignupRequest"},"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"},"ErrorName":{"type":"string","description":"Name of error.","title":"ErrorName"},"ErrorCode":{"type":"string","description":"Stable, machine-readable error code in snake_case (for example, not_found or missing_permission). Branch on this rather than the message text.","title":"ErrorCode"},"ErrorMessage":{"type":"string","description":"Error message.","title":"ErrorMessage"},"ErrorFix":{"type":"string","description":"The concrete next action that resolves the error.","title":"ErrorFix"},"ErrorDocs":{"type":"string","description":"Link to the error reference entry for this code.","title":"ErrorDocs"},"ValidationErrorResponse":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/ErrorName"},"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"$ref":"#/components/schemas/ErrorMessage"},"errors":{"description":"Validation errors. Each entry has a path and a message identifying the invalid field."},"fix":{"$ref":"#/components/schemas/ErrorFix"},"docs":{"$ref":"#/components/schemas/ErrorDocs"}},"required":["name","errors"],"title":"ValidationErrorResponse"},"agent_AgentAttachHumanRequest":{"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."}},"required":["human_email"],"description":"Request body to attach a human to an agent organization.","title":"AgentAttachHumanRequest"},"agent_AgentAttachHumanResponse":{"type":"object","properties":{"human_email":{"type":"string","description":"Email address of the attached human."},"instructions":{"type":"string","description":"Next steps for the agent, in plain text."}},"required":["human_email","instructions"],"description":"Response after attaching a human to an agent organization.","title":"AgentAttachHumanResponse"},"ErrorResponse":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/ErrorName"},"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"$ref":"#/components/schemas/ErrorMessage"},"fix":{"$ref":"#/components/schemas/ErrorFix"},"docs":{"$ref":"#/components/schemas/ErrorDocs"}},"required":["name","message"],"title":"ErrorResponse"},"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"},"agent_AgentVerifyResponse":{"type":"object","properties":{"verified":{"type":"boolean","description":"Whether the organization was verified."}},"required":["verified"],"description":"Response after successful agent verification.","title":"AgentVerifyResponse"},"inboxes_InboxId":{"type":"string","description":"The ID of the inbox.","title":"InboxId"},"files_FilePath":{"type":"string","description":"Where the file lives in its inbox's drive, such as `reports/q3.pdf`. Unique within the inbox. Segments are\nseparated by `/`, with no leading or trailing `/`, no empty, `.` or `..` segment, no `\\` and no control or\ninvisible characters. At most 1,024 bytes, and at most 255 bytes per segment. Stored in Unicode NFC, so two\nspellings of one name are one path. Case is kept.","title":"FilePath"},"files_FileSize":{"type":"integer","description":"Size of the file in bytes. At most 104,857,600 (100 MiB).","title":"FileSize"},"files_FileSha256":{"type":"string","description":"The base64 encoding of the file's 32-byte SHA-256 digest, as S3's `x-amz-checksum-sha256` takes it (44\ncharacters, ending in `=`). S3 refuses an upload whose bytes don't match.","title":"FileSha256"},"files_FileContentType":{"type":"string","description":"The file's MIME type, such as `application/pdf`. Defaults to `application/octet-stream`.","title":"FileContentType"},"files_FileExpiresAt":{"type":"string","format":"date-time","description":"When the file expires. After it, the file is gone from get and list and its path is free; its bytes are\ndeleted soon after. Absent for a file that never expires.","title":"FileExpiresAt"},"files_FileId":{"type":"string","description":"ID of the file. A UUID.","title":"FileId"},"inboxes_Email":{"type":"string","description":"Email address of the inbox.","title":"Email"},"files_FileName":{"type":"string","description":"The path's last segment. A download saves under this name.","title":"FileName"},"files_FileStatus":{"type":"string","enum":["pending","ready"],"description":"`pending` until its bytes are uploaded and the upload is completed, then `ready`. Only a `ready` file has a\ndownload URL. A pending file is deleted if it isn't completed within a day.","title":"FileStatus"},"files_FileUpload":{"type":"object","properties":{"method":{"type":"string","enum":["PUT"],"description":"Always `PUT`."},"url":{"type":"string","description":"The presigned S3 URL. No API key is needed to use it."},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"The headers to send with the `PUT`, exactly as given."},"expires_at":{"type":"string","format":"date-time","description":"When `url` stops working, at most an hour after it was issued. Send the identical create request again for a fresh one."}},"required":["method","url","headers","expires_at"],"description":"Where to upload a pending file's bytes: one HTTP `PUT` to `url` with exactly `headers` and the file's bytes as\nthe body. Every header is signed, so S3 refuses the upload if any is missing or different, and refuses bytes\nwhose size or SHA-256 doesn't match the file. Then call Complete File.","title":"FileUpload"},"files_CreateFileResponse":{"type":"object","properties":{"file_id":{"$ref":"#/components/schemas/files_FileId"},"inbox_id":{"$ref":"#/components/schemas/inboxes_InboxId"},"email":{"$ref":"#/components/schemas/inboxes_Email"},"path":{"$ref":"#/components/schemas/files_FilePath"},"name":{"$ref":"#/components/schemas/files_FileName"},"size":{"$ref":"#/components/schemas/files_FileSize"},"content_type":{"$ref":"#/components/schemas/files_FileContentType"},"sha256":{"$ref":"#/components/schemas/files_FileSha256"},"status":{"$ref":"#/components/schemas/files_FileStatus"},"created_at":{"type":"string","format":"date-time","description":"When the file was created."},"updated_at":{"type":"string","format":"date-time","description":"When the file last changed, such as when its upload was completed."},"expires_at":{"$ref":"#/components/schemas/files_FileExpiresAt"},"download_url":{"type":"string","description":"A signed URL that downloads the file's bytes, named by `name`. No API key is needed to use it, so treat it\nas a secret. It works until `download_expires_at`, at most an hour, even after the file is deleted. Get the\nfile again for a fresh one."},"download_expires_at":{"type":"string","format":"date-time","description":"When `download_url` stops working. Never after the file's own expiry."},"upload":{"$ref":"#/components/schemas/files_FileUpload"}},"required":["file_id","inbox_id","email","path","name","size","content_type","sha256","status","created_at","updated_at"],"description":"The created file. A pending file carries `upload`; a create that returns an existing `ready` file does not.","title":"CreateFileResponse"},"files_File":{"type":"object","properties":{"file_id":{"$ref":"#/components/schemas/files_FileId"},"inbox_id":{"$ref":"#/components/schemas/inboxes_InboxId"},"email":{"$ref":"#/components/schemas/inboxes_Email"},"path":{"$ref":"#/components/schemas/files_FilePath"},"name":{"$ref":"#/components/schemas/files_FileName"},"size":{"$ref":"#/components/schemas/files_FileSize"},"content_type":{"$ref":"#/components/schemas/files_FileContentType"},"sha256":{"$ref":"#/components/schemas/files_FileSha256"},"status":{"$ref":"#/components/schemas/files_FileStatus"},"created_at":{"type":"string","format":"date-time","description":"When the file was created."},"updated_at":{"type":"string","format":"date-time","description":"When the file last changed, such as when its upload was completed."},"expires_at":{"$ref":"#/components/schemas/files_FileExpiresAt"},"download_url":{"type":"string","description":"A signed URL that downloads the file's bytes, named by `name`. No API key is needed to use it, so treat it\nas a secret. It works until `download_expires_at`, at most an hour, even after the file is deleted. Get the\nfile again for a fresh one."},"download_expires_at":{"type":"string","format":"date-time","description":"When `download_url` stops working. Never after the file's own expiry."}},"required":["file_id","inbox_id","email","path","name","size","content_type","sha256","status","created_at","updated_at"],"description":"A file. A `ready` file returned to a caller with the `file_read` permission carries a signed `download_url`.","title":"File"},"Limit":{"type":"integer","description":"Limit of number of items returned.","title":"Limit"},"PageToken":{"type":"string","description":"Page token for pagination.","title":"PageToken"},"Count":{"type":"integer","description":"Number of items returned.","title":"Count"},"files_FileItem":{"type":"object","properties":{"file_id":{"$ref":"#/components/schemas/files_FileId"},"inbox_id":{"$ref":"#/components/schemas/inboxes_InboxId"},"email":{"$ref":"#/components/schemas/inboxes_Email"},"path":{"$ref":"#/components/schemas/files_FilePath"},"name":{"$ref":"#/components/schemas/files_FileName"},"size":{"$ref":"#/components/schemas/files_FileSize"},"content_type":{"$ref":"#/components/schemas/files_FileContentType"},"sha256":{"$ref":"#/components/schemas/files_FileSha256"},"status":{"$ref":"#/components/schemas/files_FileStatus"},"created_at":{"type":"string","format":"date-time","description":"When the file was created."},"updated_at":{"type":"string","format":"date-time","description":"When the file last changed, such as when its upload was completed."},"expires_at":{"$ref":"#/components/schemas/files_FileExpiresAt"}},"required":["file_id","inbox_id","email","path","name","size","content_type","sha256","status","created_at","updated_at"],"description":"A file, as a list returns it.","title":"FileItem"},"files_ListFilesResponse":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit"},"next_page_token":{"$ref":"#/components/schemas/PageToken"},"files":{"type":"array","items":{"$ref":"#/components/schemas/files_FileItem"},"description":"The inbox's files in path order. A list has no download URLs; get a file for one."}},"required":["count","limit","files"],"title":"ListFilesResponse"},"Ascending":{"type":"boolean","description":"Sort in ascending temporal order.","title":"Ascending"},"pods_PodId":{"type":"string","description":"ID of pod.","title":"PodId"},"inboxes_DisplayName":{"type":"string","description":"Display name: `Display Name <username@domain.com>`.","title":"DisplayName"},"inboxes_ClientId":{"type":"string","description":"Client ID of inbox.","title":"ClientId"},"inboxes_InboxStatus":{"type":"string","enum":["active","paused"],"description":"Whether the inbox sends and receives mail. `paused` stops both: sends\nreturn `403` with code `inbox_paused`, and incoming mail is not\ndelivered and not bounced, then or on resume. Mail already in the inbox,\nits drafts, and its API keys are kept. Set `active` to resume.","title":"InboxStatus"},"inboxes_PauseAt":{"type":"string","format":"date-time","description":"When the inbox pauses itself. Within about five minutes after this time,\nthe inbox becomes paused exactly as if `status` had been set to `paused`,\nand `pause_at` is cleared. Must be in the future; returned in UTC. A\nmanual pause or resume does not change it.","title":"PauseAt"},"inboxes_InboxSignature":{"type":"object","properties":{"text":{"type":"string","description":"Signature for the plain-text part. At most 1,000 characters."},"html":{"type":"string","description":"Signature for the HTML part. At most 4,000 characters, so link images\nby URL rather than embedding them. When omitted, the HTML part gets\n`text` with its line breaks."}},"required":["text"],"description":"A signature AgentMail adds to every message the inbox sends: send,\nreply, reply-all, forward, and drafts, including scheduled ones. It goes\nright after your content, above any quoted or forwarded message. It is\nnot added again when your body already contains it, and it is not added\nto Visa TAP messages.","title":"InboxSignature"},"inboxes_MetadataValue":{"oneOf":[{"type":"string"},{"type":"number","format":"double"},{"type":"boolean"}],"description":"A metadata value. May be a string, number, or boolean.","title":"MetadataValue"},"inboxes_Metadata":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/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"},"inboxes_Inbox":{"type":"object","properties":{"pod_id":{"$ref":"#/components/schemas/pods_PodId"},"inbox_id":{"$ref":"#/components/schemas/inboxes_InboxId"},"email":{"$ref":"#/components/schemas/inboxes_Email"},"display_name":{"$ref":"#/components/schemas/inboxes_DisplayName"},"client_id":{"$ref":"#/components/schemas/inboxes_ClientId"},"status":{"$ref":"#/components/schemas/inboxes_InboxStatus","description":"`paused` when the inbox is paused. Omitted when the inbox is active.\nTreat any value other than `paused` as an inbox that sends and\nreceives normally."},"pause_at":{"$ref":"#/components/schemas/inboxes_PauseAt","description":"When the inbox is scheduled to pause. Omitted when no pause is\nscheduled, and cleared once the pause happens."},"signature":{"$ref":"#/components/schemas/inboxes_InboxSignature","description":"The signature added to messages this inbox sends. Omitted when none is set."},"metadata":{"$ref":"#/components/schemas/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"},"inboxes_ListInboxesResponse":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit"},"next_page_token":{"$ref":"#/components/schemas/PageToken"},"inboxes":{"type":"array","items":{"$ref":"#/components/schemas/inboxes_Inbox"},"description":"Ordered by `created_at` descending."}},"required":["count","inboxes"],"title":"ListInboxesResponse"},"inboxes_SearchInboxesResponse":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit"},"next_page_token":{"$ref":"#/components/schemas/PageToken"},"inboxes":{"type":"array","items":{"$ref":"#/components/schemas/inboxes_Inbox"},"description":"Ordered by relevance, best match first."}},"required":["count","inboxes"],"title":"SearchInboxesResponse"},"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/inboxes_DisplayName"},"client_id":{"$ref":"#/components/schemas/inboxes_ClientId"},"status":{"$ref":"#/components/schemas/inboxes_InboxStatus","description":"Set `paused` to create the inbox paused."},"pause_at":{"$ref":"#/components/schemas/inboxes_PauseAt","description":"Schedule the inbox to pause at this time, for example when a fixed term ends."},"signature":{"$ref":"#/components/schemas/inboxes_InboxSignature","description":"Signature to add to every message the inbox sends."},"metadata":{"$ref":"#/components/schemas/inboxes_Metadata","description":"Custom metadata to attach to the inbox."}},"title":"CreateInboxRequest"},"inboxes_UpdateMetadata":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/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"},"inboxes_UpdateInboxRequest":{"type":"object","properties":{"display_name":{"$ref":"#/components/schemas/inboxes_DisplayName"},"status":{"$ref":"#/components/schemas/inboxes_InboxStatus","description":"`paused` stops the inbox sending and receiving mail; `active` resumes\nit. Mail that arrived while the inbox was paused is not delivered on\nresume."},"pause_at":{"oneOf":[{"$ref":"#/components/schemas/inboxes_PauseAt"},{"type":"null"}],"description":"Schedule a pause, or move one already scheduled. Send null to cancel\nit. Only an organization- or pod-scoped API key can change it; an\ninbox-scoped key gets `403`."},"signature":{"oneOf":[{"$ref":"#/components/schemas/inboxes_InboxSignature"},{"type":"null"}],"description":"Set or replace the inbox's signature. Send null to remove it."},"metadata":{"oneOf":[{"$ref":"#/components/schemas/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`,\n`status`, `pause_at`, `signature`, or `metadata`."}},"title":"UpdateInboxRequest"},"apiKeys_AuthToken":{"type":"string","pattern":"^[A-Za-z0-9_-]{22}$","minLength":22,"maxLength":22,"description":"Token identifying one pending AgentID sign-in, read from the sign-in action on exactly `https://auth.agentid.com`.","title":"AuthToken"},"apiKeys_AcceptDisclosure":{"type":"boolean","description":"Accept the app's disclosure on the agent's behalf, skipping the\nfirst-use disclosure page. Requires `app_share_owner` when owner\nscopes are involved.","title":"AcceptDisclosure"},"inboxes_AuthorizeInboxRequest":{"type":"object","properties":{"auth_token":{"$ref":"#/components/schemas/apiKeys_AuthToken"},"accept_disclosure":{"$ref":"#/components/schemas/apiKeys_AcceptDisclosure"}},"required":["auth_token"],"description":"Authorize one pending AgentID sign-in for the inbox in the path. The\ninbox is selected by the trusted path parameter, never by an AgentID\n`login_hint`.","title":"AuthorizeInboxRequest"},"apiKeys_ApiKeyId":{"type":"string","description":"ID of api key.","title":"ApiKeyId"},"inboxes_AuthorizeInboxResponse":{"type":"object","properties":{"api_key_id":{"$ref":"#/components/schemas/apiKeys_ApiKeyId","description":"ID of the public key the client will activate."},"instructions":{"type":"string","enum":["Authorization complete. Return to browser."],"description":"The agent's next step. Nothing further is required from the agent."}},"required":["api_key_id","instructions"],"description":"The authorized sign-in's key ID plus the agent's next step. The key itself\nis read with Get API Key.","title":"AuthorizeInboxResponse"},"Labels":{"type":"array","items":{"type":"string"},"description":"Labels to filter by.","title":"Labels"},"Before":{"type":"string","format":"date-time","description":"Timestamp before which to filter by.","title":"Before"},"After":{"type":"string","format":"date-time","description":"Timestamp after which to filter by.","title":"After"},"IncludeSpam":{"type":"boolean","description":"Include spam in results.","title":"IncludeSpam"},"IncludeBlocked":{"type":"boolean","description":"Include blocked in results.","title":"IncludeBlocked"},"IncludeUnauthenticated":{"type":"boolean","description":"Include unauthenticated in results.","title":"IncludeUnauthenticated"},"IncludeTrash":{"type":"boolean","description":"Include trash in results.","title":"IncludeTrash"},"threads_ThreadId":{"type":"string","description":"ID of thread.","title":"ThreadId"},"threads_ThreadLabels":{"type":"array","items":{"type":"string"},"description":"Labels of thread.","title":"ThreadLabels"},"threads_ThreadTimestamp":{"type":"string","format":"date-time","description":"Timestamp of last sent or received message.","title":"ThreadTimestamp"},"threads_ThreadReceivedTimestamp":{"type":"string","format":"date-time","description":"Timestamp of last received message.","title":"ThreadReceivedTimestamp"},"threads_ThreadSentTimestamp":{"type":"string","format":"date-time","description":"Timestamp of last sent message.","title":"ThreadSentTimestamp"},"threads_ThreadSenders":{"type":"array","items":{"type":"string"},"description":"Senders in thread. In format `username@domain.com` or `Display Name <username@domain.com>`.","title":"ThreadSenders"},"threads_ThreadRecipients":{"type":"array","items":{"type":"string"},"description":"Recipients in thread. In format `username@domain.com` or `Display Name <username@domain.com>`.","title":"ThreadRecipients"},"threads_ThreadSubject":{"type":"string","description":"Subject of thread.","title":"ThreadSubject"},"threads_ThreadPreview":{"type":"string","description":"Text preview of last message in thread.","title":"ThreadPreview"},"attachments_AttachmentId":{"type":"string","description":"ID of attachment.","title":"AttachmentId"},"attachments_AttachmentFilename":{"type":"string","description":"Filename of attachment.","title":"AttachmentFilename"},"attachments_AttachmentSize":{"type":"integer","description":"Size of attachment in bytes.","title":"AttachmentSize"},"attachments_AttachmentContentType":{"type":"string","description":"Content type of attachment.","title":"AttachmentContentType"},"attachments_AttachmentContentDisposition":{"type":"string","enum":["inline","attachment"],"description":"Content disposition of attachment.","title":"AttachmentContentDisposition"},"attachments_AttachmentContentId":{"type":"string","description":"Content ID of attachment.","title":"AttachmentContentId"},"attachments_Attachment":{"type":"object","properties":{"attachment_id":{"$ref":"#/components/schemas/attachments_AttachmentId"},"filename":{"$ref":"#/components/schemas/attachments_AttachmentFilename"},"size":{"$ref":"#/components/schemas/attachments_AttachmentSize"},"content_type":{"$ref":"#/components/schemas/attachments_AttachmentContentType"},"content_disposition":{"$ref":"#/components/schemas/attachments_AttachmentContentDisposition"},"content_id":{"$ref":"#/components/schemas/attachments_AttachmentContentId"}},"required":["attachment_id","size"],"title":"Attachment"},"threads_ThreadAttachments":{"type":"array","items":{"$ref":"#/components/schemas/attachments_Attachment"},"description":"Attachments in thread.","title":"ThreadAttachments"},"threads_ThreadLastMessageId":{"type":"string","description":"ID of last message in thread.","title":"ThreadLastMessageId"},"threads_ThreadMessageCount":{"type":"integer","description":"Number of messages in thread.","title":"ThreadMessageCount"},"threads_ThreadSize":{"type":"integer","description":"Size of thread in bytes.","title":"ThreadSize"},"threads_ThreadUpdatedAt":{"type":"string","format":"date-time","description":"Time at which thread was last updated.","title":"ThreadUpdatedAt"},"threads_ThreadCreatedAt":{"type":"string","format":"date-time","description":"Time at which thread was created.","title":"ThreadCreatedAt"},"threads_ThreadItem":{"type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxes_InboxId"},"thread_id":{"$ref":"#/components/schemas/threads_ThreadId"},"labels":{"$ref":"#/components/schemas/threads_ThreadLabels"},"timestamp":{"$ref":"#/components/schemas/threads_ThreadTimestamp"},"received_timestamp":{"$ref":"#/components/schemas/threads_ThreadReceivedTimestamp"},"sent_timestamp":{"$ref":"#/components/schemas/threads_ThreadSentTimestamp"},"senders":{"$ref":"#/components/schemas/threads_ThreadSenders"},"recipients":{"$ref":"#/components/schemas/threads_ThreadRecipients"},"subject":{"$ref":"#/components/schemas/threads_ThreadSubject"},"preview":{"$ref":"#/components/schemas/threads_ThreadPreview"},"attachments":{"$ref":"#/components/schemas/threads_ThreadAttachments"},"last_message_id":{"$ref":"#/components/schemas/threads_ThreadLastMessageId"},"message_count":{"$ref":"#/components/schemas/threads_ThreadMessageCount"},"size":{"$ref":"#/components/schemas/threads_ThreadSize"},"updated_at":{"$ref":"#/components/schemas/threads_ThreadUpdatedAt"},"created_at":{"$ref":"#/components/schemas/threads_ThreadCreatedAt"}},"required":["inbox_id","thread_id","labels","timestamp","senders","recipients","last_message_id","message_count","size","updated_at","created_at"],"title":"ThreadItem"},"threads_ListThreadsResponse":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit"},"next_page_token":{"$ref":"#/components/schemas/PageToken"},"threads":{"type":"array","items":{"$ref":"#/components/schemas/threads_ThreadItem"},"description":"Ordered by `timestamp` descending."}},"required":["count","threads"],"title":"ListThreadsResponse"},"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"},"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"},"threads_SearchThreadItem":{"type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxes_InboxId"},"thread_id":{"$ref":"#/components/schemas/threads_ThreadId"},"labels":{"$ref":"#/components/schemas/threads_ThreadLabels"},"timestamp":{"$ref":"#/components/schemas/threads_ThreadTimestamp"},"received_timestamp":{"$ref":"#/components/schemas/threads_ThreadReceivedTimestamp"},"sent_timestamp":{"$ref":"#/components/schemas/threads_ThreadSentTimestamp"},"senders":{"$ref":"#/components/schemas/threads_ThreadSenders"},"recipients":{"$ref":"#/components/schemas/threads_ThreadRecipients"},"subject":{"$ref":"#/components/schemas/threads_ThreadSubject"},"preview":{"$ref":"#/components/schemas/threads_ThreadPreview"},"attachments":{"$ref":"#/components/schemas/threads_ThreadAttachments"},"last_message_id":{"$ref":"#/components/schemas/threads_ThreadLastMessageId"},"message_count":{"$ref":"#/components/schemas/threads_ThreadMessageCount"},"size":{"$ref":"#/components/schemas/threads_ThreadSize"},"updated_at":{"$ref":"#/components/schemas/threads_ThreadUpdatedAt"},"created_at":{"$ref":"#/components/schemas/threads_ThreadCreatedAt"},"highlights":{"$ref":"#/components/schemas/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"},"threads_SearchThreadsResponse":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit"},"next_page_token":{"$ref":"#/components/schemas/PageToken"},"threads":{"type":"array","items":{"$ref":"#/components/schemas/threads_SearchThreadItem"},"description":"Ordered by relevance, best match first."}},"required":["count","threads"],"title":"SearchThreadsResponse"},"messages_MessageId":{"type":"string","description":"ID of message.","title":"MessageId"},"messages_MessageLabels":{"type":"array","items":{"type":"string"},"description":"Labels of message.","title":"MessageLabels"},"messages_MessageTimestamp":{"type":"string","format":"date-time","description":"Time at which message was sent or drafted.","title":"MessageTimestamp"},"messages_MessageFrom":{"type":"string","description":"Address of sender. In format `username@domain.com` or `Display Name <username@domain.com>`.","title":"MessageFrom"},"messages_MessageTo":{"type":"array","items":{"type":"string"},"description":"Addresses of recipients. In format `username@domain.com` or `Display Name <username@domain.com>`.","title":"MessageTo"},"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"},"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"},"messages_MessageSubject":{"type":"string","description":"Subject of message.","title":"MessageSubject"},"messages_MessagePreview":{"type":"string","description":"Text preview of message.","title":"MessagePreview"},"messages_MessageText":{"type":"string","description":"Plain text body of message.","title":"MessageText"},"messages_MessageHtml":{"type":"string","description":"HTML body of message.","title":"MessageHtml"},"messages_MessageAttachments":{"type":"array","items":{"$ref":"#/components/schemas/attachments_Attachment"},"description":"Attachments in message.","title":"MessageAttachments"},"messages_MessageInReplyTo":{"type":"string","description":"ID of message being replied to.","title":"MessageInReplyTo"},"messages_MessageCalendarEventId":{"type":"string","description":"The calendar event this email's invitation was applied to: set when the email's calendar\ninvitation, update, cancellation or attendee reply changed the inbox's calendar, a few seconds\nafter the email arrives. For an email about one date of a recurring event, it is that date's\nevent ID. Absent on other emails, and on invitations that were not imported. The\n`message.received` event for an email with a calendar attachment waits until this is set, at\nmost 20 seconds, so it usually arrives with it. Calendar is available in US production.","title":"MessageCalendarEventId"},"messages_MessageReferences":{"type":"array","items":{"type":"string"},"description":"IDs of previous messages in thread.","title":"MessageReferences"},"messages_MessageHeaders":{"type":"object","additionalProperties":{"type":"string"},"description":"Headers in message. `Authentication-Results` is never included, on received or sent\nmessages: the header is unsigned, so a sender can plant a forged copy. Read\n`authentication_results` for the verdicts instead. Get Raw Message still returns every copy\nof the header.","title":"MessageHeaders"},"messages_MessageAuthenticationVerdict":{"type":"string","enum":["pass","fail","none","neutral","softfail","temperror","permerror"],"description":"Result of one email authentication mechanism, in the vocabulary of the\n`Authentication-Results` header (RFC 8601). `none` means there was nothing to evaluate\n(Amazon SES calls this GRAY): no SPF record for the envelope MAIL FROM domain, no DKIM\nsignature to check, or no DMARC record for the From domain.","title":"MessageAuthenticationVerdict"},"messages_MessageAuthenticationDomain":{"type":"string","description":"The domain an authentication verdict is about, lowercase. Present only beside its verdict:\nwhen the verdict is withheld, so is the domain.","title":"MessageAuthenticationDomain"},"messages_MessageAuthenticationResults":{"type":"object","properties":{"spf":{"$ref":"#/components/schemas/messages_MessageAuthenticationVerdict"},"dkim":{"$ref":"#/components/schemas/messages_MessageAuthenticationVerdict"},"dmarc":{"$ref":"#/components/schemas/messages_MessageAuthenticationVerdict"},"spf_domain":{"$ref":"#/components/schemas/messages_MessageAuthenticationDomain","description":"Envelope MAIL FROM domain the `spf` verdict is about (`smtp.mailfrom`)."},"dkim_domain":{"$ref":"#/components/schemas/messages_MessageAuthenticationDomain","description":"Signing domain the `dkim` verdict is about (`header.d`). Present only when `dkim` is\n`pass` or `fail`."},"dmarc_domain":{"$ref":"#/components/schemas/messages_MessageAuthenticationDomain","description":"From domain the `dmarc` verdict is about (`header.from`)."},"arc_sealer":{"$ref":"#/components/schemas/messages_MessageAuthenticationDomain","description":"Domain of the trusted forwarder whose ARC seal the verdicts were taken from, such as\n`google.com`. Present only on forwarded mail, and only beside at least one verdict."}},"description":"Per-mechanism SPF, DKIM, and DMARC verdicts for a received message, each with the domain it\nis about, kept only where they speak for the sender's From identity. A verdict that could\nnot be computed is absent, so the field can be `{}`. The field is absent on sent messages\nand on messages received before 2026-09-09; the `*_domain` and `arc_sealer` keys appear on\nmessages received after they were introduced.\n\nThe verdicts are the ones Amazon SES computed when the message reached AgentMail, with one\nexception. Forwarded mail fails DMARC at the receiving hop by construction. When AgentMail\ndelivers a forwarded message as authenticated because a trusted forwarder (such as Google or\nMicrosoft) sealed a valid ARC chain vouching for the original, the field reports the\nverdicts that forwarder recorded for the original message, and `arc_sealer` names it.\n\n- `spf` is about the envelope MAIL FROM (Return-Path) domain, named in `spf_domain`. It is\n  present only when that domain is aligned with the sender's domain (the From mailbox, or\n  the Sender header when From spans domains), meaning the two share an organizational\n  domain: `mail.example.com` is aligned with `example.com`. An unaligned SPF result is\n  withheld whatever its value.\n- `dkim` is the DKIM verdict, and `dkim_domain` the signing domain (the `d=` tag). On\n  directly received mail the domain is named only when every DKIM signature on the message\n  is from the same domain; a message signed by more than one domain (a sender and its email\n  provider, for instance) keeps the verdict and omits the domain. `dkim_domain` is the\n  signing domain as written, so compare it with the From domain before relying on it.\n- `dmarc` is the DMARC verdict for the From domain, named in `dmarc_domain`.\n- `dkim` and `dmarc` are withheld when the From list spans more than one domain or could not\n  be fully parsed.\n- On forwarded mail each sealed verdict is reported only when the domain the forwarder\n  recorded it for matches the message's current From domain. If the forwarder rewrote From,\n  or vouched for nothing, the field is `{}`.\n\nThe `unauthenticated` label, not this field, is AgentMail's acceptance decision, and it uses\na looser rule, so the two can disagree: a single-From message whose only pass is an\nunaligned envelope SPF is delivered without the label while this field shows no pass. Use\nthe label to tell whether AgentMail accepted the message as legitimate, and this field to\nsee which domain each mechanism authenticated. Do not reject mail on `dmarc: fail` alone.","title":"MessageAuthenticationResults"},"agentArmor_AgentArmorVerdict":{"type":"string","enum":["clear","review"],"description":"What the scan concluded. `clear` means Agent Armor found no threat. It is advisory, not a guarantee that the\nmessage is safe. `review` means the message may try to manipulate an agent: inspect it before an agent acts on it.","title":"AgentArmorVerdict"},"agentArmor_AgentArmorReleaseActor":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["api_key"],"description":"Discriminator value: api_key"},"api_key_id":{"type":"string","description":"The API key that released it."}},"required":["kind","api_key_id"]},{"type":"object","properties":{"kind":{"type":"string","enum":["console"],"description":"Discriminator value: console"}},"required":["kind"]}],"discriminator":{"propertyName":"kind"},"description":"Who released the message.","title":"AgentArmorReleaseActor"},"agentArmor_AgentArmorManualOverride":{"type":"object","properties":{"override_id":{"type":"string","description":"ID of the release, and the `event_id` of its `message.security.override` event."},"actor":{"$ref":"#/components/schemas/agentArmor_AgentArmorReleaseActor"},"reason":{"type":"string","description":"Why it was released, as given by whoever released it."},"original_verdict":{"type":"string","enum":["review"],"description":"The verdict that held the message."},"released_at":{"type":"string","format":"date-time","description":"When it was released."}},"required":["override_id","actor","reason","original_verdict","released_at"],"description":"The record of a release of a message Agent Armor held for review.","title":"AgentArmorManualOverride"},"agentArmor_AgentArmorUnavailableReason":{"type":"string","enum":["unsupported_dsn","payload_too_large","no_scannable_content","enqueue_failed","scorer_failed","contract_error","deadline_exceeded"],"description":"Why no verdict is available.","title":"AgentArmorUnavailableReason"},"agentArmor_AgentArmorResult":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending"],"description":"Discriminator value: pending"},"started_at":{"type":"string","format":"date-time","description":"When the message was received. The deadline counts from here."},"deadline_at":{"type":"string","format":"date-time","description":"When the scan gives up. A result still pending then reads as `unavailable` with `deadline_exceeded`."}},"required":["status","started_at","deadline_at"]},{"type":"object","properties":{"status":{"type":"string","enum":["complete"],"description":"Discriminator value: complete"},"verdict":{"$ref":"#/components/schemas/agentArmor_AgentArmorVerdict"},"reason":{"type":"string","description":"A short explanation of the verdict."},"model":{"type":"string","description":"Identifies the Agent Armor release that produced the verdict. Opaque; it changes when Agent Armor is updated."},"completed_at":{"type":"string","format":"date-time","description":"When the scan finished."},"manual_override":{"$ref":"#/components/schemas/agentArmor_AgentArmorManualOverride","description":"Present on a `review` held in hold mode that someone released."}},"required":["status","verdict","reason","model","completed_at"]},{"type":"object","properties":{"status":{"type":"string","enum":["unavailable"],"description":"Discriminator value: unavailable"},"unavailable_reason":{"$ref":"#/components/schemas/agentArmor_AgentArmorUnavailableReason"}},"required":["status","unavailable_reason"]}],"discriminator":{"propertyName":"status"},"description":"Agent Armor's result for this message. Present only on messages received while Agent Armor was on for your\norganization. A scan starts `pending` and usually completes within seconds. `message.security.completed` is\nsent only for `complete` results, so a message still `pending` at `deadline_at` reads `unavailable` with no\nevent.","title":"AgentArmorResult"},"messages_MessageSize":{"type":"integer","description":"Size of message in bytes.","title":"MessageSize"},"messages_MessageUpdatedAt":{"type":"string","format":"date-time","description":"Time at which message was last updated.","title":"MessageUpdatedAt"},"messages_MessageCreatedAt":{"type":"string","format":"date-time","description":"Time at which message was created.","title":"MessageCreatedAt"},"messages_Message":{"type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxes_InboxId"},"thread_id":{"$ref":"#/components/schemas/threads_ThreadId"},"message_id":{"$ref":"#/components/schemas/messages_MessageId"},"labels":{"$ref":"#/components/schemas/messages_MessageLabels"},"timestamp":{"$ref":"#/components/schemas/messages_MessageTimestamp"},"from":{"$ref":"#/components/schemas/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/messages_MessageTo"},"cc":{"$ref":"#/components/schemas/messages_MessageCc"},"bcc":{"$ref":"#/components/schemas/messages_MessageBcc"},"subject":{"$ref":"#/components/schemas/messages_MessageSubject"},"preview":{"$ref":"#/components/schemas/messages_MessagePreview"},"text":{"$ref":"#/components/schemas/messages_MessageText"},"html":{"$ref":"#/components/schemas/messages_MessageHtml"},"extracted_text":{"type":"string","description":"Extracted new text content."},"extracted_html":{"type":"string","description":"Extracted new HTML content."},"attachments":{"$ref":"#/components/schemas/messages_MessageAttachments"},"in_reply_to":{"$ref":"#/components/schemas/messages_MessageInReplyTo"},"calendar_event_id":{"$ref":"#/components/schemas/messages_MessageCalendarEventId"},"references":{"$ref":"#/components/schemas/messages_MessageReferences"},"headers":{"$ref":"#/components/schemas/messages_MessageHeaders"},"authentication_results":{"$ref":"#/components/schemas/messages_MessageAuthenticationResults"},"agent_armor":{"$ref":"#/components/schemas/agentArmor_AgentArmorResult"},"size":{"$ref":"#/components/schemas/messages_MessageSize"},"updated_at":{"$ref":"#/components/schemas/messages_MessageUpdatedAt"},"created_at":{"$ref":"#/components/schemas/messages_MessageCreatedAt"}},"required":["inbox_id","thread_id","message_id","labels","timestamp","from","to","size","updated_at","created_at"],"title":"Message"},"threads_Thread":{"type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxes_InboxId"},"thread_id":{"$ref":"#/components/schemas/threads_ThreadId"},"labels":{"$ref":"#/components/schemas/threads_ThreadLabels"},"timestamp":{"$ref":"#/components/schemas/threads_ThreadTimestamp"},"received_timestamp":{"$ref":"#/components/schemas/threads_ThreadReceivedTimestamp"},"sent_timestamp":{"$ref":"#/components/schemas/threads_ThreadSentTimestamp"},"senders":{"$ref":"#/components/schemas/threads_ThreadSenders"},"recipients":{"$ref":"#/components/schemas/threads_ThreadRecipients"},"subject":{"$ref":"#/components/schemas/threads_ThreadSubject"},"preview":{"$ref":"#/components/schemas/threads_ThreadPreview"},"attachments":{"$ref":"#/components/schemas/threads_ThreadAttachments"},"last_message_id":{"$ref":"#/components/schemas/threads_ThreadLastMessageId"},"message_count":{"$ref":"#/components/schemas/threads_ThreadMessageCount"},"size":{"$ref":"#/components/schemas/threads_ThreadSize"},"updated_at":{"$ref":"#/components/schemas/threads_ThreadUpdatedAt"},"created_at":{"$ref":"#/components/schemas/threads_ThreadCreatedAt"},"count":{"$ref":"#/components/schemas/Count","description":"Number of messages in this response page."},"limit":{"$ref":"#/components/schemas/Limit","description":"Maximum number of messages requested for this page."},"next_page_token":{"$ref":"#/components/schemas/PageToken","description":"Token for the next, older page of messages. Omitted when this page completes the thread."},"messages":{"type":"array","items":{"$ref":"#/components/schemas/messages_Message"},"description":"Messages in this page, ordered by `timestamp` ascending. The first page contains the newest messages; follow `next_page_token` to retrieve older pages."}},"required":["inbox_id","thread_id","labels","timestamp","senders","recipients","last_message_id","message_count","size","updated_at","created_at","count","messages"],"title":"Thread"},"attachments_AttachmentResponse":{"type":"object","properties":{"attachment_id":{"$ref":"#/components/schemas/attachments_AttachmentId"},"filename":{"$ref":"#/components/schemas/attachments_AttachmentFilename"},"size":{"$ref":"#/components/schemas/attachments_AttachmentSize"},"content_type":{"$ref":"#/components/schemas/attachments_AttachmentContentType"},"content_disposition":{"$ref":"#/components/schemas/attachments_AttachmentContentDisposition"},"content_id":{"$ref":"#/components/schemas/attachments_AttachmentContentId"},"download_url":{"type":"string","description":"Signed HTTPS CDN URL to download the attachment bytes. Retrieve a fresh URL when needed rather than storing it permanently."},"text_url":{"type":"string","description":"Signed HTTPS CDN URL to download extracted plain text, when available. Omitted when no extracted text is available. Expires at the same time as download_url."},"expires_at":{"type":"string","format":"date-time","description":"Time at which download_url and text_url (when present) expire. Retrieve the attachment again to obtain fresh URLs."}},"required":["attachment_id","size","download_url","expires_at"],"title":"AttachmentResponse"},"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"},"threads_UpdateThreadResponse":{"type":"object","properties":{"thread_id":{"$ref":"#/components/schemas/threads_ThreadId"},"labels":{"$ref":"#/components/schemas/threads_ThreadLabels"}},"required":["thread_id","labels"],"title":"UpdateThreadResponse"},"messages_MessageItem":{"type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxes_InboxId"},"thread_id":{"$ref":"#/components/schemas/threads_ThreadId"},"message_id":{"$ref":"#/components/schemas/messages_MessageId"},"labels":{"$ref":"#/components/schemas/messages_MessageLabels"},"timestamp":{"$ref":"#/components/schemas/messages_MessageTimestamp"},"from":{"$ref":"#/components/schemas/messages_MessageFrom"},"to":{"$ref":"#/components/schemas/messages_MessageTo"},"cc":{"$ref":"#/components/schemas/messages_MessageCc"},"bcc":{"$ref":"#/components/schemas/messages_MessageBcc"},"subject":{"$ref":"#/components/schemas/messages_MessageSubject"},"preview":{"$ref":"#/components/schemas/messages_MessagePreview"},"attachments":{"$ref":"#/components/schemas/messages_MessageAttachments"},"in_reply_to":{"$ref":"#/components/schemas/messages_MessageInReplyTo"},"calendar_event_id":{"$ref":"#/components/schemas/messages_MessageCalendarEventId"},"references":{"$ref":"#/components/schemas/messages_MessageReferences"},"headers":{"$ref":"#/components/schemas/messages_MessageHeaders"},"authentication_results":{"$ref":"#/components/schemas/messages_MessageAuthenticationResults"},"agent_armor":{"$ref":"#/components/schemas/agentArmor_AgentArmorResult"},"size":{"$ref":"#/components/schemas/messages_MessageSize"},"updated_at":{"$ref":"#/components/schemas/messages_MessageUpdatedAt"},"created_at":{"$ref":"#/components/schemas/messages_MessageCreatedAt"}},"required":["inbox_id","thread_id","message_id","labels","timestamp","from","to","size","updated_at","created_at"],"title":"MessageItem"},"messages_ListMessagesResponse":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit"},"next_page_token":{"$ref":"#/components/schemas/PageToken"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/messages_MessageItem"},"description":"Ordered by `timestamp` descending."}},"required":["count","messages"],"title":"ListMessagesResponse"},"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"},"messages_SearchMessageItem":{"type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxes_InboxId"},"thread_id":{"$ref":"#/components/schemas/threads_ThreadId"},"message_id":{"$ref":"#/components/schemas/messages_MessageId"},"labels":{"$ref":"#/components/schemas/messages_MessageLabels"},"timestamp":{"$ref":"#/components/schemas/messages_MessageTimestamp"},"from":{"$ref":"#/components/schemas/messages_MessageFrom"},"to":{"$ref":"#/components/schemas/messages_MessageTo"},"cc":{"$ref":"#/components/schemas/messages_MessageCc"},"bcc":{"$ref":"#/components/schemas/messages_MessageBcc"},"subject":{"$ref":"#/components/schemas/messages_MessageSubject"},"preview":{"$ref":"#/components/schemas/messages_MessagePreview"},"attachments":{"$ref":"#/components/schemas/messages_MessageAttachments"},"in_reply_to":{"$ref":"#/components/schemas/messages_MessageInReplyTo"},"calendar_event_id":{"$ref":"#/components/schemas/messages_MessageCalendarEventId"},"references":{"$ref":"#/components/schemas/messages_MessageReferences"},"headers":{"$ref":"#/components/schemas/messages_MessageHeaders"},"authentication_results":{"$ref":"#/components/schemas/messages_MessageAuthenticationResults"},"agent_armor":{"$ref":"#/components/schemas/agentArmor_AgentArmorResult"},"size":{"$ref":"#/components/schemas/messages_MessageSize"},"updated_at":{"$ref":"#/components/schemas/messages_MessageUpdatedAt"},"created_at":{"$ref":"#/components/schemas/messages_MessageCreatedAt"},"highlights":{"$ref":"#/components/schemas/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"},"messages_SearchMessagesResponse":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit"},"next_page_token":{"$ref":"#/components/schemas/PageToken"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/messages_SearchMessageItem"},"description":"Ordered by relevance, best match first."}},"required":["count","messages"],"title":"SearchMessagesResponse"},"agentArmor_AgentArmorFeedbackValue":{"type":"string","enum":["correct_review","incorrect_review","missed_threat","legitimate_agent_instruction","spam_or_phishing"],"description":"Your assessment of a completed verdict.","title":"AgentArmorFeedbackValue"},"agentArmor_CreateAgentArmorFeedbackRequest":{"type":"object","properties":{"feedback":{"$ref":"#/components/schemas/agentArmor_AgentArmorFeedbackValue"},"notes":{"type":"string","description":"Anything else about the verdict, up to 2,048 characters."}},"required":["feedback"],"title":"CreateAgentArmorFeedbackRequest"},"agentArmor_AgentArmorFeedbackActor":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["api_key"],"description":"Discriminator value: api_key"},"api_key_id":{"type":"string","description":"The API key that sent it."}},"required":["kind","api_key_id"]},{"type":"object","properties":{"kind":{"type":"string","enum":["console"],"description":"Discriminator value: console"}},"required":["kind"]}],"discriminator":{"propertyName":"kind"},"description":"Who sent the feedback.","title":"AgentArmorFeedbackActor"},"agentArmor_AgentArmorFeedback":{"type":"object","properties":{"feedback_id":{"type":"string","description":"ID of the feedback."},"feedback":{"$ref":"#/components/schemas/agentArmor_AgentArmorFeedbackValue"},"notes":{"type":"string"},"actor":{"$ref":"#/components/schemas/agentArmor_AgentArmorFeedbackActor"},"original_verdict":{"$ref":"#/components/schemas/agentArmor_AgentArmorVerdict","description":"The verdict the feedback is about."},"model":{"type":"string","description":"The Agent Armor release that produced that verdict."},"created_at":{"type":"string","format":"date-time","description":"When the feedback was recorded."}},"required":["feedback_id","feedback","actor","original_verdict","model","created_at"],"title":"AgentArmorFeedback"},"agentArmor_ReleaseAgentArmorMessageRequest":{"type":"object","properties":{"reason":{"type":"string","description":"Why the message is safe to release, up to 2,048 characters and not blank. Recorded on the message."}},"required":["reason"],"title":"ReleaseAgentArmorMessageRequest"},"agentArmor_ReleaseAgentArmorMessageResponse":{"type":"object","properties":{"manual_override":{"$ref":"#/components/schemas/agentArmor_AgentArmorManualOverride"}},"required":["manual_override"],"title":"ReleaseAgentArmorMessageResponse"},"messages_BatchGetMessagesMessageIds":{"type":"array","items":{"$ref":"#/components/schemas/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"},"messages_BatchGetMessagesRequest":{"type":"object","properties":{"message_ids":{"$ref":"#/components/schemas/messages_BatchGetMessagesMessageIds"}},"required":["message_ids"],"title":"BatchGetMessagesRequest"},"messages_BatchGetMessagesResponse":{"type":"object","properties":{"limit":{"$ref":"#/components/schemas/Limit"},"count":{"$ref":"#/components/schemas/Count"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/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"},"messages_BatchUpdateMessagesMessageIds":{"type":"array","items":{"$ref":"#/components/schemas/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"},"messages_UpdateMessageLabels":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Label or list of labels.","title":"UpdateMessageLabels"},"messages_BatchUpdateMessagesRequest":{"type":"object","properties":{"message_ids":{"$ref":"#/components/schemas/messages_BatchUpdateMessagesMessageIds"},"add_labels":{"$ref":"#/components/schemas/messages_UpdateMessageLabels","description":"Label or labels to add to every message."},"remove_labels":{"$ref":"#/components/schemas/messages_UpdateMessageLabels","description":"Label or labels to remove from every message."}},"required":["message_ids"],"title":"BatchUpdateMessagesRequest"},"messages_UpdateMessageResponse":{"type":"object","properties":{"message_id":{"$ref":"#/components/schemas/messages_MessageId"},"labels":{"$ref":"#/components/schemas/messages_MessageLabels"}},"required":["message_id","labels"],"title":"UpdateMessageResponse"},"messages_BatchUpdateMessagesResponse":{"type":"object","properties":{"limit":{"$ref":"#/components/schemas/Limit"},"count":{"$ref":"#/components/schemas/Count"},"updates":{"type":"array","items":{"$ref":"#/components/schemas/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"},"messages_RawMessageResponse":{"type":"object","properties":{"message_id":{"$ref":"#/components/schemas/messages_MessageId","description":"ID of the message."},"size":{"$ref":"#/components/schemas/messages_MessageSize","description":"Size of the raw message in bytes."},"download_url":{"type":"string","description":"CloudFront signed 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":"CloudFront signed URL to download the raw .eml file.","title":"RawMessageResponse"},"messages_UpdateMessageRequest":{"type":"object","properties":{"add_labels":{"$ref":"#/components/schemas/messages_UpdateMessageLabels","description":"Label or labels to add to message."},"remove_labels":{"$ref":"#/components/schemas/messages_UpdateMessageLabels","description":"Label or labels to remove from message."}},"title":"UpdateMessageRequest"},"messages_Addresses":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"title":"Addresses"},"messages_SendMessageReplyTo":{"$ref":"#/components/schemas/messages_Addresses","description":"Reply-to address or addresses.","title":"SendMessageReplyTo"},"messages_SendMessageTo":{"$ref":"#/components/schemas/messages_Addresses","description":"Recipient address or addresses.","title":"SendMessageTo"},"messages_SendMessageCc":{"$ref":"#/components/schemas/messages_Addresses","description":"CC recipient address or addresses.","title":"SendMessageCc"},"messages_SendMessageBcc":{"$ref":"#/components/schemas/messages_Addresses","description":"BCC recipient address or addresses.","title":"SendMessageBcc"},"attachments_SendAttachment":{"type":"object","properties":{"filename":{"$ref":"#/components/schemas/attachments_AttachmentFilename"},"content_type":{"$ref":"#/components/schemas/attachments_AttachmentContentType"},"content_disposition":{"$ref":"#/components/schemas/attachments_AttachmentContentDisposition"},"content_id":{"$ref":"#/components/schemas/attachments_AttachmentContentId"},"content":{"type":"string","description":"Base64 encoded content of the attachment. The entire request, including the message body and all attachments, is limited to 6 MB."},"url":{"type":"string","description":"URL that AgentMail can download without custom authentication headers or cookies.\nRedirects and pre-signed URLs are supported, and the final response must be a\nsuccessful 2xx response. Keep URL-backed attachments around 30 MB total per message."}},"description":"Provide either `content` or `url` for each attachment.","title":"SendAttachment"},"messages_SendMessageAttachments":{"type":"array","items":{"$ref":"#/components/schemas/attachments_SendAttachment"},"description":"Attachments to include in message.","title":"SendMessageAttachments"},"messages_SendMessageHeaders":{"type":"object","additionalProperties":{"type":"string"},"description":"Headers to include in message.","title":"SendMessageHeaders"},"messages_TrackOpens":{"type":"boolean","description":"Track when this message is first opened. Requires a custom domain with tracking enabled and\nan HTML body. Opens surface as the `opened` label on the message and as a `message.opened`\nevent. One pixel is injected per message, not per recipient, so a message with several\nrecipients fires once when any of them opens it, and the event does not identify which one.","title":"TrackOpens"},"messages_SendMessageRequest":{"type":"object","properties":{"labels":{"$ref":"#/components/schemas/messages_MessageLabels"},"reply_to":{"$ref":"#/components/schemas/messages_SendMessageReplyTo"},"to":{"$ref":"#/components/schemas/messages_SendMessageTo"},"cc":{"$ref":"#/components/schemas/messages_SendMessageCc"},"bcc":{"$ref":"#/components/schemas/messages_SendMessageBcc"},"subject":{"$ref":"#/components/schemas/messages_MessageSubject"},"text":{"$ref":"#/components/schemas/messages_MessageText"},"html":{"$ref":"#/components/schemas/messages_MessageHtml"},"attachments":{"$ref":"#/components/schemas/messages_SendMessageAttachments"},"headers":{"$ref":"#/components/schemas/messages_SendMessageHeaders"},"track_opens":{"$ref":"#/components/schemas/messages_TrackOpens"}},"title":"SendMessageRequest"},"messages_SendMessageResponse":{"type":"object","properties":{"message_id":{"$ref":"#/components/schemas/messages_MessageId"},"thread_id":{"$ref":"#/components/schemas/threads_ThreadId"}},"required":["message_id","thread_id"],"title":"SendMessageResponse"},"messages_ReplyAll":{"type":"boolean","description":"Reply to all recipients of the original message.","title":"ReplyAll"},"messages_ReplyToMessageRequest":{"type":"object","properties":{"labels":{"$ref":"#/components/schemas/messages_MessageLabels"},"reply_to":{"$ref":"#/components/schemas/messages_SendMessageReplyTo"},"to":{"$ref":"#/components/schemas/messages_SendMessageTo"},"cc":{"$ref":"#/components/schemas/messages_SendMessageCc"},"bcc":{"$ref":"#/components/schemas/messages_SendMessageBcc"},"reply_all":{"$ref":"#/components/schemas/messages_ReplyAll"},"text":{"$ref":"#/components/schemas/messages_MessageText"},"html":{"$ref":"#/components/schemas/messages_MessageHtml"},"attachments":{"$ref":"#/components/schemas/messages_SendMessageAttachments"},"headers":{"$ref":"#/components/schemas/messages_SendMessageHeaders"},"track_opens":{"$ref":"#/components/schemas/messages_TrackOpens"}},"title":"ReplyToMessageRequest"},"messages_ReplyAllMessageRequest":{"type":"object","properties":{"labels":{"$ref":"#/components/schemas/messages_MessageLabels"},"reply_to":{"$ref":"#/components/schemas/messages_SendMessageReplyTo"},"text":{"$ref":"#/components/schemas/messages_MessageText"},"html":{"$ref":"#/components/schemas/messages_MessageHtml"},"attachments":{"$ref":"#/components/schemas/messages_SendMessageAttachments"},"headers":{"$ref":"#/components/schemas/messages_SendMessageHeaders"},"track_opens":{"$ref":"#/components/schemas/messages_TrackOpens"}},"title":"ReplyAllMessageRequest"},"drafts_DraftId":{"type":"string","description":"ID of draft.","title":"DraftId"},"drafts_DraftLabels":{"type":"array","items":{"type":"string"},"description":"Labels of draft.","title":"DraftLabels"},"drafts_DraftTo":{"type":"array","items":{"type":"string"},"description":"Addresses of recipients. In format `username@domain.com` or `Display Name <username@domain.com>`.","title":"DraftTo"},"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"},"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"},"drafts_DraftSubject":{"type":"string","description":"Subject of draft.","title":"DraftSubject"},"drafts_DraftPreview":{"type":"string","description":"Text preview of draft.","title":"DraftPreview"},"drafts_DraftAttachments":{"type":"array","items":{"$ref":"#/components/schemas/attachments_Attachment"},"description":"Attachments in draft.","title":"DraftAttachments"},"drafts_DraftInReplyTo":{"type":"string","description":"ID of message being replied to.","title":"DraftInReplyTo"},"drafts_DraftForwardOf":{"type":"string","description":"ID of message being forwarded.","title":"DraftForwardOf"},"drafts_DraftSendStatus":{"type":"string","enum":["scheduled","sending","failed"],"description":"Schedule send status of draft.","title":"DraftSendStatus"},"drafts_DraftSendAt":{"type":"string","format":"date-time","description":"Time at which to schedule send draft.","title":"DraftSendAt"},"drafts_DraftUpdatedAt":{"type":"string","format":"date-time","description":"Time at which draft was last updated.","title":"DraftUpdatedAt"},"drafts_DraftItem":{"type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxes_InboxId"},"draft_id":{"$ref":"#/components/schemas/drafts_DraftId"},"labels":{"$ref":"#/components/schemas/drafts_DraftLabels"},"to":{"$ref":"#/components/schemas/drafts_DraftTo"},"cc":{"$ref":"#/components/schemas/drafts_DraftCc"},"bcc":{"$ref":"#/components/schemas/drafts_DraftBcc"},"subject":{"$ref":"#/components/schemas/drafts_DraftSubject"},"preview":{"$ref":"#/components/schemas/drafts_DraftPreview"},"attachments":{"$ref":"#/components/schemas/drafts_DraftAttachments"},"in_reply_to":{"$ref":"#/components/schemas/drafts_DraftInReplyTo"},"forward_of":{"$ref":"#/components/schemas/drafts_DraftForwardOf"},"send_status":{"$ref":"#/components/schemas/drafts_DraftSendStatus"},"send_at":{"$ref":"#/components/schemas/drafts_DraftSendAt"},"updated_at":{"$ref":"#/components/schemas/drafts_DraftUpdatedAt"}},"required":["inbox_id","draft_id","labels","updated_at"],"title":"DraftItem"},"drafts_ListDraftsResponse":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit"},"next_page_token":{"$ref":"#/components/schemas/PageToken"},"drafts":{"type":"array","items":{"$ref":"#/components/schemas/drafts_DraftItem"},"description":"Ordered by `updated_at` descending."}},"required":["count","drafts"],"title":"ListDraftsResponse"},"drafts_DraftClientId":{"type":"string","description":"Client ID of draft.","title":"DraftClientId"},"drafts_DraftReplyTo":{"type":"array","items":{"type":"string"},"description":"Reply-to addresses. In format `username@domain.com` or `Display Name <username@domain.com>`.","title":"DraftReplyTo"},"drafts_DraftText":{"type":"string","description":"Plain text body of draft.","title":"DraftText"},"drafts_DraftHtml":{"type":"string","description":"HTML body of draft.","title":"DraftHtml"},"drafts_Draft":{"type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxes_InboxId"},"draft_id":{"$ref":"#/components/schemas/drafts_DraftId"},"client_id":{"$ref":"#/components/schemas/drafts_DraftClientId"},"labels":{"$ref":"#/components/schemas/drafts_DraftLabels"},"reply_to":{"$ref":"#/components/schemas/drafts_DraftReplyTo"},"to":{"$ref":"#/components/schemas/drafts_DraftTo"},"cc":{"$ref":"#/components/schemas/drafts_DraftCc"},"bcc":{"$ref":"#/components/schemas/drafts_DraftBcc"},"subject":{"$ref":"#/components/schemas/drafts_DraftSubject"},"preview":{"$ref":"#/components/schemas/drafts_DraftPreview"},"text":{"$ref":"#/components/schemas/drafts_DraftText"},"html":{"$ref":"#/components/schemas/drafts_DraftHtml"},"attachments":{"$ref":"#/components/schemas/drafts_DraftAttachments"},"in_reply_to":{"$ref":"#/components/schemas/drafts_DraftInReplyTo"},"forward_of":{"$ref":"#/components/schemas/drafts_DraftForwardOf"},"references":{"type":"array","items":{"type":"string"},"description":"IDs of previous messages in thread."},"send_status":{"$ref":"#/components/schemas/drafts_DraftSendStatus"},"send_at":{"$ref":"#/components/schemas/drafts_DraftSendAt"},"updated_at":{"$ref":"#/components/schemas/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"},"drafts_DraftReplyAll":{"type":"boolean","description":"Reply to all recipients of the original message.","title":"DraftReplyAll"},"drafts_CreateDraftRequest":{"type":"object","properties":{"labels":{"$ref":"#/components/schemas/drafts_DraftLabels"},"reply_to":{"$ref":"#/components/schemas/drafts_DraftReplyTo"},"to":{"$ref":"#/components/schemas/drafts_DraftTo"},"cc":{"$ref":"#/components/schemas/drafts_DraftCc"},"bcc":{"$ref":"#/components/schemas/drafts_DraftBcc"},"subject":{"$ref":"#/components/schemas/drafts_DraftSubject"},"text":{"$ref":"#/components/schemas/drafts_DraftText"},"html":{"$ref":"#/components/schemas/drafts_DraftHtml"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/attachments_SendAttachment"},"description":"Attachments to include in draft."},"in_reply_to":{"$ref":"#/components/schemas/drafts_DraftInReplyTo"},"forward_of":{"$ref":"#/components/schemas/drafts_DraftForwardOf"},"reply_all":{"$ref":"#/components/schemas/drafts_DraftReplyAll"},"send_at":{"$ref":"#/components/schemas/drafts_DraftSendAt"},"client_id":{"$ref":"#/components/schemas/drafts_DraftClientId"}},"description":"Body for creating a draft. Supports plain, reply, reply-all, and forward\ndrafts:\n\n- **Plain draft:** supply `to`, `subject`, `text`, etc.\n- **Reply:** set `in_reply_to` to a message ID. Recipients, subject, and\n  threading are derived from that message. Set `reply_all` to address the\n  whole thread (you then cannot also pass `to`, `cc`, or `bcc`).\n- **Forward:** set `forward_of` to a message ID. The subject and threading\n  are derived from the source message, whose body and attachments are\n  merged in at send time.\n\n`in_reply_to` and `forward_of` are mutually exclusive, and reading the\nreferenced message requires `message_read` permission.","title":"CreateDraftRequest"},"drafts_UpdateDraftRequest":{"type":"object","properties":{"reply_to":{"oneOf":[{"$ref":"#/components/schemas/drafts_DraftReplyTo"},{"type":"null"}]},"to":{"oneOf":[{"$ref":"#/components/schemas/drafts_DraftTo"},{"type":"null"}]},"cc":{"oneOf":[{"$ref":"#/components/schemas/drafts_DraftCc"},{"type":"null"}]},"bcc":{"oneOf":[{"$ref":"#/components/schemas/drafts_DraftBcc"},{"type":"null"}]},"subject":{"oneOf":[{"$ref":"#/components/schemas/drafts_DraftSubject"},{"type":"null"}]},"text":{"oneOf":[{"$ref":"#/components/schemas/drafts_DraftText"},{"type":"null"}]},"html":{"oneOf":[{"$ref":"#/components/schemas/drafts_DraftHtml"},{"type":"null"}]},"add_attachments":{"type":"array","items":{"$ref":"#/components/schemas/attachments_SendAttachment"},"description":"Attachments to add to the draft."},"remove_attachments":{"type":"array","items":{"$ref":"#/components/schemas/attachments_AttachmentId"},"description":"IDs of attachments to remove from the draft."},"add_labels":{"$ref":"#/components/schemas/drafts_DraftLabels","description":"Label or labels to add to the draft."},"remove_labels":{"$ref":"#/components/schemas/drafts_DraftLabels","description":"Label or labels to remove from the draft."},"send_at":{"oneOf":[{"$ref":"#/components/schemas/drafts_DraftSendAt"},{"type":"null"}]}},"description":"Edit fields on an existing draft. A draft's kind (plain, reply, or forward)\nis fixed at creation and cannot be changed here. Omitting a field leaves it\nunchanged; passing `null` (or `[]` for a recipient field) clears it. Pass\n`send_at` to schedule or reschedule the draft, or `null` to un-schedule it.","title":"UpdateDraftRequest"},"webhooks_WebhookId":{"type":"string","description":"ID of webhook.","title":"WebhookId"},"webhooks_Url":{"type":"string","description":"URL of webhook endpoint.","title":"Url"},"events_EventType":{"type":"string","enum":["message.received","message.received.spam","message.received.blocked","message.received.unauthenticated","message.security.completed","message.security.review","message.security.override","message.sent","message.delivered","message.bounced","message.complained","message.rejected","message.opened","domain.verified","calendar.event.created","calendar.event.updated","calendar.event.deleted","calendar.event.responded","calendar.event.starting","calendar.event.ending"],"title":"EventType"},"events_EventTypes":{"type":"array","items":{"$ref":"#/components/schemas/events_EventType"},"description":"Event types for which to send events.","title":"EventTypes"},"events_PodIds":{"type":"array","items":{"type":"string"},"description":"Pods for which to send events.","title":"PodIds"},"events_InboxIds":{"type":"array","items":{"type":"string"},"description":"Inboxes for which to send events.","title":"InboxIds"},"webhooks_ClientId":{"type":"string","description":"Client ID of webhook.","title":"ClientId"},"webhooks_Webhook":{"type":"object","properties":{"webhook_id":{"$ref":"#/components/schemas/webhooks_WebhookId"},"url":{"$ref":"#/components/schemas/webhooks_Url"},"event_types":{"$ref":"#/components/schemas/events_EventTypes"},"pod_ids":{"$ref":"#/components/schemas/events_PodIds"},"inbox_ids":{"$ref":"#/components/schemas/events_InboxIds"},"pod_id":{"type":"string","description":"ID of the pod the webhook belongs to: the pod it was created in, or the pod of the inbox it\nbelongs to. Absent for an organization webhook and on some inbox webhooks. This is not the\nlist of pods it receives events for; see `pod_ids`."},"inbox_id":{"type":"string","description":"ID of the inbox the webhook belongs to, if it was created for an inbox. This is not the list\nof inboxes it receives events for; see `inbox_ids`."},"secret":{"type":"string","description":"Secret for webhook signature verification."},"enabled":{"type":"boolean","description":"Whether the webhook is enabled. It becomes false when you disable it, and also when deliveries to\nthe URL have failed for 5 days, in which case AgentMail sends no notification. Re-enable it with\nupdate and `enabled` set to true."},"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/webhooks_ClientId"}},"required":["webhook_id","url","secret","enabled","updated_at","created_at"],"title":"Webhook"},"webhooks_ListWebhooksResponse":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit"},"next_page_token":{"$ref":"#/components/schemas/PageToken"},"webhooks":{"type":"array","items":{"$ref":"#/components/schemas/webhooks_Webhook"},"description":"Ordered by `created_at` descending."}},"required":["count","webhooks"],"title":"ListWebhooksResponse"},"webhooks_WebhookHeaderNamesResponse":{"type":"object","properties":{"header_names":{"type":"array","items":{"type":"string"},"description":"Names of the custom delivery headers configured for this webhook. Header values are never returned."}},"required":["header_names"],"title":"WebhookHeaderNamesResponse"},"webhooks_CreateWebhookEventTypes":{"$ref":"#/components/schemas/events_EventTypes","description":"Full list of event types this webhook should receive. Required: omitting it or sending an empty array\nreturns a `400`, and there is no \"all events\" default. Send every type you want in this array (not\nincremental). See [Webhooks overview](https://docs.agentmail.to/webhooks-overview)\nfor spam, blocked, and unauthenticated events and required permissions.","title":"CreateWebhookEventTypes"},"webhooks_WebhookHeaders":{"type":"object","additionalProperties":{"type":"string"},"description":"Custom HTTP headers to include with every delivery to this webhook. Header values are write-only:\nAgentMail never returns them from webhook read endpoints. The map must contain at least one entry\nwhen provided, and every name and value must be a valid HTTP header.","title":"WebhookHeaders"},"webhooks_CreateInboxWebhookRequest":{"type":"object","properties":{"url":{"$ref":"#/components/schemas/webhooks_Url"},"event_types":{"$ref":"#/components/schemas/webhooks_CreateWebhookEventTypes"},"client_id":{"$ref":"#/components/schemas/webhooks_ClientId"},"headers":{"$ref":"#/components/schemas/webhooks_WebhookHeaders"}},"required":["url","event_types"],"description":"Create a webhook scoped to an inbox. The inbox comes from the path, so `inbox_ids` and `pod_ids`\nare not accepted.","title":"CreateInboxWebhookRequest"},"webhooks_UpdateWebhookEventTypes":{"$ref":"#/components/schemas/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 to leave event types unchanged. An empty array is rejected with a `400`: a webhook\nalways has at least one event type. Subscribing to `message.received.spam`, `message.received.blocked`, or\n`message.received.unauthenticated` requires the matching label permission on the API key.","title":"UpdateWebhookEventTypes"},"webhooks_UpdateInboxWebhookRequest":{"type":"object","properties":{"event_types":{"$ref":"#/components/schemas/webhooks_UpdateWebhookEventTypes"},"enabled":{"type":"boolean","description":"Set to true to re-enable a webhook that was disabled after repeated failed deliveries, or false\nto disable it. AgentMail does not notify you when a webhook is disabled automatically; check this\nfield when you get or list webhooks. Events that occurred while the webhook was disabled are not\nredelivered. Re-enabling requires the read permission for every restricted event type the webhook\nsubscribes to: `label_spam_read`, `label_blocked_read`, or `label_unauthenticated_read` for the\nreceived variants, `message_read` for `message.security.*`, and `calendar_event_read` for\n`calendar.event.*`. A webhook with no event type filter is checked against all of them."}},"description":"Update an inbox-scoped webhook. It is fixed to its inbox, so only `event_types` and `enabled` can\nchange.","title":"UpdateInboxWebhookRequest"},"webhooks_UpdateWebhookHeadersRequest":{"type":"object","properties":{"headers":{"$ref":"#/components/schemas/webhooks_WebhookHeaders"},"remove_headers":{"type":"array","items":{"type":"string"},"description":"Names of custom delivery headers to remove."}},"description":"Set, replace, or remove custom delivery headers. Provide at least one of `headers` or\n`remove_headers`. A header cannot be set and removed in the same request, regardless of casing.","title":"UpdateWebhookHeadersRequest"},"webhooks_polling_PollingClientId":{"$ref":"#/components/schemas/webhooks_ClientId","description":"Required. Idempotency key of the subscription: creating again with the same `client_id` through the\nsame route returns the existing subscription with a fresh token instead of a second subscription, so a\nrestarted agent resumes where it left off. Also accepted in place of `webhook_id` on get and delete.","title":"PollingClientId"},"webhooks_polling_PollingWebhook":{"type":"object","properties":{"webhook_id":{"$ref":"#/components/schemas/webhooks_WebhookId"},"client_id":{"$ref":"#/components/schemas/webhooks_polling_PollingClientId"},"event_types":{"$ref":"#/components/schemas/events_EventTypes"},"pod_ids":{"$ref":"#/components/schemas/events_PodIds"},"inbox_ids":{"$ref":"#/components/schemas/events_InboxIds"},"pod_id":{"type":"string","description":"ID of the pod the subscription belongs to: the pod it was created in, or the pod of the inbox it\nbelongs to. Absent for an organization subscription. This is not the list of pods it receives\nevents for; see `pod_ids`."},"inbox_id":{"type":"string","description":"ID of the inbox the subscription belongs to, if it was created for an inbox. This is not the\nlist of inboxes it receives events for; see `inbox_ids`."},"updated_at":{"type":"string","format":"date-time","description":"Time at which the subscription was last updated."},"created_at":{"type":"string","format":"date-time","description":"Time at which the subscription was created."}},"required":["webhook_id","client_id","event_types","updated_at","created_at"],"description":"A subscription the agent polls for events instead of receiving them at a URL. Same event types,\nchannels (pods and inboxes) and permissions as a webhook; no public endpoint is needed.","title":"PollingWebhook"},"webhooks_polling_ListPollingWebhooksResponse":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit"},"next_page_token":{"$ref":"#/components/schemas/PageToken"},"polling_webhooks":{"type":"array","items":{"$ref":"#/components/schemas/webhooks_polling_PollingWebhook"},"description":"Ordered by `created_at` descending. Lists the subscriptions created through this route\n(organization, pod, or inbox); subscriptions created through a pod or inbox route are listed\nthrough that route."}},"required":["count","polling_webhooks"],"title":"ListPollingWebhooksResponse"},"webhooks_polling_CreateInboxPollingWebhookRequest":{"type":"object","properties":{"client_id":{"$ref":"#/components/schemas/webhooks_polling_PollingClientId"},"event_types":{"$ref":"#/components/schemas/webhooks_CreateWebhookEventTypes"}},"required":["client_id","event_types"],"description":"Create a polling webhook scoped to an inbox. The inbox comes from the path, so `inbox_ids` and\n`pod_ids` are not accepted.","title":"CreateInboxPollingWebhookRequest"},"webhooks_polling_PollingToken":{"type":"string","description":"Credential for reading this subscription's events. Hand it to the Svix AutoConfig consumer\n(`AutoConfigConsumer` in the `svix` package for TypeScript and Python): `receive` returns the events\nqueued since your last commit, `commit` marks them as processed. Returned by create only and never\nreadable afterward. Create again with the same `client_id` to get a new token; the previous one stops\nworking immediately.","title":"PollingToken"},"webhooks_polling_CreatePollingWebhookResponse":{"type":"object","properties":{"webhook_id":{"$ref":"#/components/schemas/webhooks_WebhookId"},"client_id":{"$ref":"#/components/schemas/webhooks_polling_PollingClientId"},"event_types":{"$ref":"#/components/schemas/events_EventTypes"},"pod_ids":{"$ref":"#/components/schemas/events_PodIds"},"inbox_ids":{"$ref":"#/components/schemas/events_InboxIds"},"pod_id":{"type":"string","description":"ID of the pod the subscription belongs to: the pod it was created in, or the pod of the inbox it\nbelongs to. Absent for an organization subscription. This is not the list of pods it receives\nevents for; see `pod_ids`."},"inbox_id":{"type":"string","description":"ID of the inbox the subscription belongs to, if it was created for an inbox. This is not the\nlist of inboxes it receives events for; see `inbox_ids`."},"updated_at":{"type":"string","format":"date-time","description":"Time at which the subscription was last updated."},"created_at":{"type":"string","format":"date-time","description":"Time at which the subscription was created."},"token":{"$ref":"#/components/schemas/webhooks_polling_PollingToken"}},"required":["webhook_id","client_id","event_types","updated_at","created_at","token"],"description":"The subscription plus the one-time `token` that reads it.","title":"CreatePollingWebhookResponse"},"lists_Direction":{"type":"string","enum":["send","receive","reply"],"description":"Direction of list entry.","title":"Direction"},"lists_ListType":{"type":"string","enum":["allow","block"],"description":"Type of list entry.","title":"ListType"},"OrganizationId":{"type":"string","description":"ID of organization.","title":"OrganizationId"},"lists_EntryType":{"type":"string","enum":["email","domain"],"description":"Whether the entry is an email address or domain.","title":"EntryType"},"lists_PodListEntry":{"type":"object","properties":{"entry":{"type":"string","description":"Email address or domain of list entry."},"organization_id":{"$ref":"#/components/schemas/OrganizationId"},"reason":{"type":"string","description":"Reason for adding the entry."},"direction":{"$ref":"#/components/schemas/lists_Direction"},"list_type":{"$ref":"#/components/schemas/lists_ListType"},"entry_type":{"$ref":"#/components/schemas/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"},"lists_PodListListEntriesResponse":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit"},"next_page_token":{"$ref":"#/components/schemas/PageToken"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/lists_PodListEntry"},"description":"Ordered by entry ascending."}},"required":["count","entries"],"title":"PodListListEntriesResponse"},"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"},"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"},"metrics_MetricEventTypes":{"type":"array","items":{"$ref":"#/components/schemas/metrics_MetricEventType"},"description":"List of metric event types to query.","title":"MetricEventTypes"},"metrics_Start":{"type":"string","format":"date-time","description":"Start timestamp for the query.","title":"Start"},"metrics_End":{"type":"string","format":"date-time","description":"End timestamp for the query.","title":"End"},"metrics_Period":{"type":"integer","description":"Size of each time bucket as a whole number of seconds, between 1 and 86400.","title":"Period"},"metrics_MetricLimit":{"type":"integer","description":"Limit on number of buckets to return.","title":"MetricLimit"},"metrics_Descending":{"type":"boolean","description":"Sort in descending order.","title":"Descending"},"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"},"metrics_QueryMetricsResponse":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/metrics_MetricBucket"}},"description":"Metrics grouped by event type.","title":"QueryMetricsResponse"},"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"},"metrics_UsageTypes":{"type":"array","items":{"$ref":"#/components/schemas/metrics_UsageType"},"description":"List of usage metric types to query. Omit to query every type valid for the scope.","title":"UsageTypes"},"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"},"metrics_QueryUsageResponse":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/metrics_UsagePoint"}},"description":"Cumulative usage series grouped by usage type.","title":"QueryUsageResponse"},"metrics_RateType":{"type":"string","enum":["bounce","complaint"],"description":"Type of rate. `bounce` is bounced messages divided by messages sent,\ncounting permanent and transient bounces; `complaint` is spam complaints\ndivided by messages sent.","title":"RateType"},"metrics_RateTypes":{"type":"array","items":{"$ref":"#/components/schemas/metrics_RateType"},"description":"List of rate types to query. Omit to query both.","title":"RateTypes"},"metrics_RatePeriod":{"type":"integer","description":"How often a point is sampled, as a whole number of seconds between 60\nand 86400. Defaults to 3600 (one point per hour).","title":"RatePeriod"},"metrics_Window":{"type":"integer","description":"How far back each point looks, as a whole number of seconds. Must be a\nwhole multiple of `period`, at most 30 days (2592000). Defaults to 86400\n(a rolling 24-hour rate).","title":"Window"},"metrics_RatePoint":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"End of the window the point covers; the window is the `window` seconds before it."},"rate":{"type":"number","format":"double","description":"Bounced or complained messages divided by messages sent over the\nwindow, as a fraction (0.05 is 5%). Null when nothing was sent in\nthe window."},"sent":{"type":"integer","description":"Messages sent in the window, counted per recipient."}},"required":["timestamp","sent"],"title":"RatePoint"},"metrics_QueryRatesResponse":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/metrics_RatePoint"}},"description":"Rate series grouped by rate type.","title":"QueryRatesResponse"},"inboxEvents_InboxEventId":{"type":"string","description":"ID of event.","title":"InboxEventId"},"inboxEvents_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"},"inboxEvents_InboxEvent":{"type":"object","properties":{"organization_id":{"$ref":"#/components/schemas/OrganizationId"},"pod_id":{"type":"string","description":"ID of pod."},"inbox_id":{"$ref":"#/components/schemas/inboxes_InboxId"},"event_id":{"$ref":"#/components/schemas/inboxEvents_InboxEventId"},"event_type":{"$ref":"#/components/schemas/inboxEvents_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"},"inboxEvents_ListInboxEventsResponse":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit"},"next_page_token":{"$ref":"#/components/schemas/PageToken"},"events":{"type":"array","items":{"$ref":"#/components/schemas/inboxEvents_InboxEvent"},"description":"Ordered by `event_id` descending."}},"required":["count","events"],"title":"ListInboxEventsResponse"},"apiKeys_Prefix":{"type":"string","description":"Prefix of api key.","title":"Prefix"},"apiKeys_Name":{"type":"string","description":"Name of api key.","title":"Name"},"apiKeys_PodScopeId":{"type":"string","description":"Pod ID the api key is scoped to. If set, the key can only access resources within this pod.","title":"PodScopeId"},"apiKeys_InboxScopeId":{"type":"string","description":"Inbox ID the api key is scoped to. If set, the key can only access resources within this inbox.","title":"InboxScopeId"},"apiKeys_UsedAt":{"type":"string","format":"date-time","description":"Time at which api key was last used.","title":"UsedAt"},"apiKeys_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."},"message_read":{"type":"boolean","description":"Read messages. Also required to read threads."},"message_reply":{"type":"boolean","description":"Reply and reply-all when the request is signed with a registered public key. Bearer keys reply with `message_send`."},"message_send":{"type":"boolean","description":"Send messages."},"message_update":{"type":"boolean","description":"Update message labels. Also required to update threads."},"message_delete":{"type":"boolean","description":"Delete messages. Also required to delete threads."},"agent_armor_release":{"type":"boolean","description":"Release mail Agent Armor holds for review. Opt-in: no key has it unless it was granted explicitly, even one\nwithout a `permissions` object. See [Permissions](/permissions#agent-armor)."},"label_spam_read":{"type":"boolean","description":"Access messages labeled spam."},"label_blocked_read":{"type":"boolean","description":"Access messages labeled blocked."},"label_unauthenticated_read":{"type":"boolean","description":"Access messages labeled unauthenticated."},"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_update":{"type":"boolean","description":"Update API keys."},"api_key_delete":{"type":"boolean","description":"Delete API keys."},"app_connect":{"type":"boolean","description":"Sign in to apps as an inbox: connect an app, authorize an inbox, and mint the\nsign-in keys. Omitted on a new bearer key means false, whatever else the key holds."},"app_share_owner":{"type":"boolean","description":"Share the organization owner's name and email with apps at sign-in. One permission\nfor both values."},"account_update":{"type":"boolean","description":"Update accounts: disable or re-enable an inbox's sign-in at an app. Reading accounts\nneeds only `inbox_read`."},"pod_read":{"type":"boolean","description":"Read pods."},"pod_create":{"type":"boolean","description":"Create pods."},"pod_update":{"type":"boolean","description":"Update pods."},"pod_delete":{"type":"boolean","description":"Delete pods."},"calendar_read":{"type":"boolean","description":"Read inbox calendar settings."},"calendar_update":{"type":"boolean","description":"Update inbox calendar settings."},"calendar_event_read":{"type":"boolean","description":"Read calendar events, and receive `calendar.event.*` webhook and WebSocket events."},"calendar_event_create":{"type":"boolean","description":"Create calendar events."},"calendar_event_update":{"type":"boolean","description":"Update calendar events and respond to invitations."},"calendar_event_delete":{"type":"boolean","description":"Delete calendar events."},"file_read":{"type":"boolean","description":"Reserved; not released yet."},"file_create":{"type":"boolean","description":"Reserved; not released yet."},"file_update":{"type":"boolean","description":"Reserved; not released yet."},"file_delete":{"type":"boolean","description":"Reserved; not released yet."}},"description":"Granular permissions for the API key. When ommitted all permissions are granted. Otherwise, only permissions set to true are granted.","title":"ApiKeyPermissions"},"apiKeys_CreatedAt":{"type":"string","format":"date-time","description":"Time at which api key was created.","title":"CreatedAt"},"apiKeys_UpdatedAt":{"type":"string","format":"date-time","description":"Time at which api key was last updated.","title":"UpdatedAt"},"apiKeys_ExpiresAt":{"type":"string","format":"date-time","description":"Time at which api key expires. Omitted when it does not expire.","title":"ExpiresAt"},"apiKeys_BearerApiKey":{"type":"object","properties":{"type":{"type":"string","enum":["bearer"]},"api_key_id":{"$ref":"#/components/schemas/apiKeys_ApiKeyId"},"prefix":{"$ref":"#/components/schemas/apiKeys_Prefix"},"name":{"$ref":"#/components/schemas/apiKeys_Name"},"pod_id":{"$ref":"#/components/schemas/apiKeys_PodScopeId"},"inbox_id":{"$ref":"#/components/schemas/apiKeys_InboxScopeId"},"used_at":{"$ref":"#/components/schemas/apiKeys_UsedAt"},"permissions":{"$ref":"#/components/schemas/apiKeys_ApiKeyPermissions"},"created_at":{"$ref":"#/components/schemas/apiKeys_CreatedAt"},"updated_at":{"$ref":"#/components/schemas/apiKeys_UpdatedAt"},"expires_at":{"$ref":"#/components/schemas/apiKeys_ExpiresAt"}},"required":["type","api_key_id","prefix","name","created_at","updated_at"],"description":"An API key presented as a bearer token in the `Authorization` header.","title":"BearerApiKey"},"apiKeys_PublicKeyClientId":{"type":"string","description":"Caller-chosen alias for a public key, unique within the organization and\nreusable after deletion. Accepted in place of `api_key_id` on get, update,\nand delete. Registration is idempotent on it: the same alias returns the\nexisting key, a conflicting one returns `409`. URL-safe; no slash or `@`.","title":"PublicKeyClientId"},"apiKeys_PublicJwkCoordinate":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$","minLength":43,"maxLength":43,"description":"A 32-byte P-256 coordinate encoded as unpadded base64url.","title":"PublicJwkCoordinate"},"apiKeys_PublicJwk":{"type":"object","properties":{"kty":{"type":"string","enum":["EC"]},"crv":{"type":"string","enum":["P-256"]},"x":{"$ref":"#/components/schemas/apiKeys_PublicJwkCoordinate"},"y":{"$ref":"#/components/schemas/apiKeys_PublicJwkCoordinate"}},"required":["kty","crv","x","y"],"description":"A public P-256 JWK. The object accepts exactly `kty`, `crv`, `x`, and `y`.\nPrivate key material such as `d`, embedded key IDs, and all other members\nare rejected. The server also rejects coordinates that are not a point on\nP-256.","title":"PublicJwk"},"apiKeys_PublicKeyMaterial":{"type":"object","properties":{"jwk":{"$ref":"#/components/schemas/apiKeys_PublicJwk"},"fingerprint":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$","minLength":43,"maxLength":43,"description":"RFC 7638 SHA-256 JWK thumbprint encoded as unpadded base64url."}},"required":["jwk","fingerprint"],"description":"Registered public key material and its server-computed RFC 7638 thumbprint.","title":"PublicKeyMaterial"},"apiKeys_PublicKeyStatus":{"type":"string","enum":["pending","active"],"description":"Lifecycle of a sign-in key: `pending` until the client finishes\ncreating it on the AgentID page, `active` once it can sign in as the\ninbox. Absent on a registered key.","title":"PublicKeyStatus"},"apiKeys_ApiKeyCreator":{"type":"object","properties":{"api_key_id":{"$ref":"#/components/schemas/apiKeys_ApiKeyId"}},"required":["api_key_id"],"description":"The bearer API key that created the credential. Provenance only; the credential outlives it.","title":"ApiKeyCreator"},"apiKeys_PublicKeyCredential":{"type":"object","properties":{"type":{"type":"string","enum":["public_key"]},"api_key_id":{"$ref":"#/components/schemas/apiKeys_ApiKeyId"},"client_id":{"$ref":"#/components/schemas/apiKeys_PublicKeyClientId"},"name":{"$ref":"#/components/schemas/apiKeys_Name"},"public_key":{"$ref":"#/components/schemas/apiKeys_PublicKeyMaterial"},"pod_id":{"$ref":"#/components/schemas/apiKeys_PodScopeId"},"inbox_id":{"$ref":"#/components/schemas/apiKeys_InboxScopeId"},"status":{"$ref":"#/components/schemas/apiKeys_PublicKeyStatus"},"used_at":{"$ref":"#/components/schemas/apiKeys_UsedAt"},"permissions":{"$ref":"#/components/schemas/apiKeys_ApiKeyPermissions"},"created_by":{"$ref":"#/components/schemas/apiKeys_ApiKeyCreator"},"created_at":{"$ref":"#/components/schemas/apiKeys_CreatedAt"},"updated_at":{"$ref":"#/components/schemas/apiKeys_UpdatedAt"},"expires_at":{"$ref":"#/components/schemas/apiKeys_ExpiresAt"}},"required":["type","api_key_id","name","permissions","created_by","created_at","updated_at"],"description":"An AgentID sign-in credential, scoped like a bearer key; `api_key_id` is\nthe JWS `kid`. A sign-in key carries `status`, gains `public_key` once\nthe client has proved it, expires 30 days after\nactivation, and carries exactly `app_connect` and\n`app_share_owner`, snapshotted from the bearer key that created it\nand enforced from the key itself.","title":"PublicKeyCredential"},"apiKeys_ApiKey":{"oneOf":[{"$ref":"#/components/schemas/apiKeys_BearerApiKey"},{"$ref":"#/components/schemas/apiKeys_PublicKeyCredential"}],"description":"One credential of any family. `type` is `bearer` or `public_key`. A\npublic key carrying `status` is a sign-in key; one without it is a\nregistered signing key.","title":"ApiKey"},"apiKeys_ListApiKeysResponse":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"next_page_token":{"$ref":"#/components/schemas/PageToken"},"api_keys":{"type":"array","items":{"$ref":"#/components/schemas/apiKeys_ApiKey"},"description":"Every credential family, ordered by `created_at`. `type` restricts\nto one family."}},"required":["count","api_keys"],"title":"ListApiKeysResponse"},"apiKeys_CreateBearerApiKeyRequest":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/apiKeys_Name"},"permissions":{"$ref":"#/components/schemas/apiKeys_ApiKeyPermissions"},"expires_at":{"$ref":"#/components/schemas/apiKeys_ExpiresAt"}},"description":"`expires_at` must be in the future and is immutable once the key exists.\nOmitted, the new key inherits the authenticating key's expiry, and never\nexpires only when that key never does. A key cannot create one that\noutlives it: an `expires_at` later than the authenticating key's own\nreturns `403`.","title":"CreateBearerApiKeyRequest"},"apiKeys_CreatePublicKeyRequest":{"type":"object","properties":{"public_key":{"$ref":"#/components/schemas/apiKeys_PublicJwk"},"client_id":{"$ref":"#/components/schemas/apiKeys_PublicKeyClientId"},"name":{"$ref":"#/components/schemas/apiKeys_Name"},"permissions":{"$ref":"#/components/schemas/apiKeys_ApiKeyPermissions"},"expires_at":{"$ref":"#/components/schemas/apiKeys_ExpiresAt"}},"required":["public_key"],"description":"Registers a public P-256 JWK at the route's scope. `type` and\n`api_key_id` are server-owned. `name` defaults to\n`AgentID key {first eight fingerprint characters}`; `permissions`\ndefaults to the registering key's, and only grants it holds may be\ntrue; `expires_at` defaults to the registering key's expiry and is\nindependent of that key afterward.","title":"CreatePublicKeyRequest"},"apiKeys_CreateApiKeyRequest":{"oneOf":[{"$ref":"#/components/schemas/apiKeys_CreateBearerApiKeyRequest"},{"$ref":"#/components/schemas/apiKeys_CreatePublicKeyRequest"}],"description":"A body with `public_key` registers a public-key credential; any other\nbody mints a bearer key.","title":"CreateApiKeyRequest"},"apiKeys_CreateApiKeyResponse":{"type":"object","properties":{"api_key_id":{"$ref":"#/components/schemas/apiKeys_ApiKeyId"},"api_key":{"type":"string","description":"API key."},"prefix":{"$ref":"#/components/schemas/apiKeys_Prefix"},"name":{"$ref":"#/components/schemas/apiKeys_Name"},"pod_id":{"$ref":"#/components/schemas/apiKeys_PodScopeId"},"inbox_id":{"$ref":"#/components/schemas/apiKeys_InboxScopeId"},"permissions":{"$ref":"#/components/schemas/apiKeys_ApiKeyPermissions"},"created_at":{"$ref":"#/components/schemas/apiKeys_CreatedAt"},"expires_at":{"$ref":"#/components/schemas/apiKeys_ExpiresAt"}},"required":["api_key_id","api_key","prefix","name","created_at"],"title":"CreateApiKeyResponse"},"apiKeys_CreateApiKeyResult":{"oneOf":[{"$ref":"#/components/schemas/apiKeys_CreateApiKeyResponse"},{"$ref":"#/components/schemas/apiKeys_PublicKeyCredential"}],"description":"The secret-bearing bearer key, or the registered public key without any secret.","title":"CreateApiKeyResult"},"apiKeys_UpdateApiKeyRequest":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/apiKeys_Name"},"permissions":{"$ref":"#/components/schemas/apiKeys_ApiKeyPermissions"}},"description":"Rename a credential or change its permissions. Key material, type,\nscope, and expiry are immutable.","title":"UpdateApiKeyRequest"},"accounts_AccountId":{"type":"string","format":"uuid","description":"ID of account.","title":"AccountId"},"apps_AppId":{"type":"string","format":"uuid","description":"ID of app.","title":"AppId"},"accounts_AccountStatus":{"type":"string","enum":["disabled"],"description":"`disabled` refuses every new sign-in for the account until it is\nre-enabled. Access tokens already issued are not revoked.","title":"AccountStatus"},"accounts_Account":{"type":"object","properties":{"account_id":{"$ref":"#/components/schemas/accounts_AccountId"},"app_id":{"$ref":"#/components/schemas/apps_AppId"},"app_name":{"type":"string","description":"Display name of app."},"inbox_id":{"$ref":"#/components/schemas/inboxes_InboxId"},"pod_id":{"$ref":"#/components/schemas/pods_PodId"},"organization_id":{"$ref":"#/components/schemas/OrganizationId"},"first_signed_in_at":{"type":"string","format":"date-time","description":"Time of first sign-in at app."},"last_signed_in_at":{"type":"string","format":"date-time","description":"Time of most recent sign-in at app."},"sign_in_count":{"type":"integer","description":"Number of sign-ins at app."},"status":{"$ref":"#/components/schemas/accounts_AccountStatus","description":"Present only while the account is disabled. Absent means the inbox may sign in."},"disabled_at":{"type":"string","format":"date-time","description":"Time at which the account was disabled. Present only while `status` is `disabled`."}},"required":["account_id","app_id","inbox_id","pod_id","organization_id","first_signed_in_at","last_signed_in_at","sign_in_count"],"description":"One inbox signed in at one app.","title":"Account"},"accounts_ListAccountsResponse":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit"},"next_page_token":{"$ref":"#/components/schemas/PageToken"},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/accounts_Account"}}},"required":["count","limit","accounts"],"title":"ListAccountsResponse"},"calendar_CalendarConsistency":{"type":"string","enum":["eventual","primary"],"description":"Read consistency. `eventual` (default) reads from the region that serves your request and may\nlag a write made moments earlier by up to a few seconds. `primary` reads from the primary region\nand always reflects every completed write.","title":"CalendarConsistency"},"calendar_IanaTimezone":{"type":"string","description":"IANA time zone name, for example `America/New_York`, `Europe/London` or `UTC`. Requests accept\nany capitalization and IANA aliases such as `US/Eastern`. The calendar stores and returns the\ncanonical name, which for some zones is an older spelling: `Asia/Kolkata` is returned as\n`Asia/Calcutta`. Abbreviations such as `PST` and Windows names such as `Pacific Standard Time`\nare rejected.","title":"IanaTimezone"},"calendar_Calendar":{"type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxes_InboxId"},"timezone":{"$ref":"#/components/schemas/calendar_IanaTimezone","description":"Default time zone for events created without a `timezone`. Defaults to `UTC`. Changing it\ndoes not move existing events."},"event_count":{"type":"integer","description":"Number of one-off and recurring events on the calendar. Each recurring event counts once."},"created_at":{"type":"string","format":"date-time","description":"Time at which the calendar was created. The calendar exists from the moment the inbox does, so this is the inbox's creation time."},"updated_at":{"type":"string","format":"date-time","description":"Time at which the calendar was last updated."},"etag":{"type":"string","description":"The calendar's current version, also sent as the `ETag` response header. Send it in\n`If-Match` to make an update conditional."}},"required":["inbox_id","timezone","event_count","created_at","updated_at","etag"],"description":"An inbox's calendar. Every inbox has exactly one calendar; it exists from the moment the inbox\ndoes and is deleted with it.","title":"Calendar"},"calendar_PreconditionFailedErrorResponse":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/ErrorName"},"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"$ref":"#/components/schemas/ErrorMessage"},"current_revision":{"type":"integer","description":"The resource's current revision."},"fix":{"$ref":"#/components/schemas/ErrorFix"},"docs":{"$ref":"#/components/schemas/ErrorDocs"}},"required":["name","message"],"title":"PreconditionFailedErrorResponse"},"calendar_CalendarLimit":{"type":"integer","description":"Maximum number of events to return, from 1 to 100. Defaults to 50.","title":"CalendarLimit"},"calendar_CalendarEventId":{"type":"string","description":"ID of a calendar event. A one-off or recurring event is addressed by its UUID. One date of a\nrecurring event is addressed by a dated ID, `<uuid>_<slot>`: `<uuid>_t20261015T090000` for a\ntimed date (the original wall-clock start in the event's time zone) or `<uuid>_d20261015` for an\nall-day date. Dated IDs are stable: moving a date keeps its original ID.","title":"CalendarEventId"},"calendar_CalendarEventKind":{"type":"string","enum":["single","series","instance"],"description":"What the event object represents.\n\n- `single`: a one-off event, addressed by its UUID.\n- `series`: the definition of a recurring event, addressed by its UUID. It carries\n  `recurrence`; `start` and `end` describe its first date.\n- `instance`: one date of a recurring event, addressed by its dated ID. It carries `series_id`,\n  `original_start` and `is_exception`.","title":"CalendarEventKind"},"calendar_WallTime":{"type":"string","description":"A local wall-clock time without an offset, interpreted in the event's `timezone`.\nTimed events use `YYYY-MM-DDTHH:mm:ss` (for example `2026-10-15T09:00:00`). All-day events use\n`YYYY-MM-DD`. Years must be between 1900 and 9999.","title":"WallTime"},"calendar_CalendarEventStatus":{"type":"string","enum":["confirmed","tentative","cancelled"],"description":"Status of the event. A `cancelled` event or date stays readable but sends no\n`calendar.event.starting` or `calendar.event.ending` webhooks (cancelling a date that is\nalready running still sends its `calendar.event.ending`). A date cancelled by deleting its\ndated ID is removed from the series instead, so reading it can return `404` or `410`.","title":"CalendarEventStatus"},"calendar_DurationMode":{"type":"string","enum":["nominal","exact"],"description":"How the event's length is kept when a date crosses a daylight-saving change.\n\n- `exact`: the event lasts the same elapsed time. Default for one-off timed events.\n- `nominal`: the event keeps its wall-clock end time (a 09:00 to 10:00 meeting stays 09:00 to\n  10:00 local time). Default for recurring timed events.\n\nAll-day events are always `nominal`.","title":"DurationMode"},"calendar_RecurrencePeriod":{"type":"object","properties":{"start":{"$ref":"#/components/schemas/calendar_WallTime"},"end":{"$ref":"#/components/schemas/calendar_WallTime"},"duration":{"type":"string","description":"ISO 8601 duration, for example `PT30M`."}},"required":["start"],"description":"An extra date (RDATE) given as a period. Specify exactly one of `end` or `duration`.","title":"RecurrencePeriod"},"calendar_RecurrenceDate":{"oneOf":[{"$ref":"#/components/schemas/calendar_WallTime"},{"$ref":"#/components/schemas/calendar_RecurrencePeriod"}],"description":"A wall-clock date or date-time, or (timed events only) a period.","title":"RecurrenceDate"},"calendar_Recurrence":{"type":"object","properties":{"rule":{"type":"string","description":"Normalized RRULE body, without the `RRULE:` prefix."},"exdates":{"type":"array","items":{"$ref":"#/components/schemas/calendar_WallTime"}},"rdates":{"type":"array","items":{"$ref":"#/components/schemas/calendar_RecurrenceDate"}},"truncate_before":{"$ref":"#/components/schemas/calendar_WallTime","description":"Set when the series was ended with a `mode=future` delete: no date starting at or after\nthis wall-clock time occurs."}},"required":["rule"],"description":"The recurrence of a series, as stored.","title":"Recurrence"},"calendar_AttendeeStatus":{"type":"string","enum":["needs_action","accepted","declined","tentative"],"description":"The attendee's response to the invitation.","title":"AttendeeStatus"},"calendar_AttendeeRole":{"type":"string","enum":["required","optional"],"description":"Whether the attendee's presence is required.","title":"AttendeeRole"},"calendar_Attendee":{"type":"object","properties":{"email":{"type":"string","description":"Email address of the attendee. Stored in lowercase. Must be unique within the event."},"name":{"type":"string","description":"Display name of the attendee. At most 256 characters."},"status":{"$ref":"#/components/schemas/calendar_AttendeeStatus","description":"Response status. Defaults to `needs_action`."},"role":{"$ref":"#/components/schemas/calendar_AttendeeRole","description":"Defaults to `required`."},"comment":{"type":"string","description":"Comment the attendee sent with their response. At most 4,096 UTF-8 bytes; on create or\nupdate, a longer comment is dropped rather than rejected."},"responded_at":{"type":"string","format":"date-time","description":"Time at which the attendee last responded."}},"required":["email"],"title":"Attendee"},"calendar_CalendarEventSource":{"type":"string","enum":["api","email"],"description":"Where the event came from. `api` events were created through this API and the inbox is their\norganizer. `email` events were created from a calendar invitation (iMIP) received by the inbox;\ntheir organizer is the sender of the invitation.","title":"CalendarEventSource"},"calendar_ResourceRevision":{"type":"integer","description":"Revision of the resource. It increases on every change. The resource's `etag` is\n`\"rv-<resource_revision>\"`.","title":"ResourceRevision"},"calendar_CalendarEvent":{"type":"object","properties":{"event_id":{"$ref":"#/components/schemas/calendar_CalendarEventId"},"kind":{"$ref":"#/components/schemas/calendar_CalendarEventKind"},"series_id":{"type":"string","description":"For `instance` events, the UUID of the series this date belongs to."},"original_start":{"$ref":"#/components/schemas/calendar_WallTime","description":"For `instance` events, the date's start as the series rule generated it, before any edit."},"original_start_at":{"type":"string","format":"date-time","description":"For `instance` events, `original_start` as a UTC instant."},"is_exception":{"type":"boolean","description":"For `instance` events, `true` when this date was edited or moved, individually or by a `mode=future` change."},"title":{"type":"string","description":"Title of the event."},"description":{"type":"string","description":"Description of the event. Omitted from agenda and instance list items."},"location":{"type":"string","description":"Location of the event."},"metadata":{"description":"Your own JSON value for the event, usually an object. Never sent to attendees. Omitted from agenda and instance list items."},"status":{"$ref":"#/components/schemas/calendar_CalendarEventStatus"},"all_day":{"type":"boolean","description":"Whether this is an all-day event."},"start":{"$ref":"#/components/schemas/calendar_WallTime","description":"Local start time in `timezone`. For all-day events, the first day."},"end":{"$ref":"#/components/schemas/calendar_WallTime","description":"Local end time in `timezone`. For all-day events, the last day (inclusive)."},"timezone":{"$ref":"#/components/schemas/calendar_IanaTimezone"},"duration_mode":{"$ref":"#/components/schemas/calendar_DurationMode"},"duration_value":{"type":"integer","description":"Length of the event, in milliseconds for timed events and in days for all-day events."},"start_at":{"type":"string","format":"date-time","description":"Start as a UTC instant. This is when `calendar.event.starting` is due."},"end_at":{"type":"string","format":"date-time","description":"End as a UTC instant. This is when `calendar.event.ending` is due."},"recurrence":{"$ref":"#/components/schemas/calendar_Recurrence","description":"For `series` events, the recurrence."},"attendees":{"type":"array","items":{"$ref":"#/components/schemas/calendar_Attendee"},"description":"Attendees of the event. Omitted from agenda and instance list items; `attendee_count` is always present."},"attendee_count":{"type":"integer","description":"Number of attendees."},"response_status":{"$ref":"#/components/schemas/calendar_AttendeeStatus","description":"The inbox's own response: the `status` of its entry in `attendees`. Present only on events\nthe inbox can respond to: `email` events with an `organizer_email` and an\n`origin_message_id` that list the inbox as an attendee. Included on agenda and instance list\nitems, which omit `attendees`. `needs_action` means the invitation is waiting for a reply."},"uid":{"type":"string","description":"iCalendar UID of the event. Invitations about this event carry the same UID."},"sequence":{"type":"integer","description":"iCalendar SEQUENCE number. It increases when a change to a one-off or series event affects\nwhat attendees see (time, status, title, description, location, recurrence or attendees).\nA change to a dated event increases it only when the change is sent with `send_invites`."},"source":{"$ref":"#/components/schemas/calendar_CalendarEventSource"},"organizer_email":{"type":"string","description":"Email address of the organizer. For `api` events, the inbox."},"origin_message_id":{"type":"string","description":"For `email` events, the ID of the message whose invitation last created or updated the event."},"resource_revision":{"$ref":"#/components/schemas/calendar_ResourceRevision","description":"Present on `single` and `series` events, except agenda items and\n`calendar.event.starting` and `calendar.event.ending` payloads, which omit it."},"created_at":{"type":"string","format":"date-time","description":"Time at which the event (or, for a date, the definition governing it) was created."},"updated_at":{"type":"string","format":"date-time","description":"Time at which the event (or, for a date, the definition governing it) was last updated."},"etag":{"type":"string","description":"The event's or date's current version, also sent as the `ETag` response header. Send it in\n`If-Match` to make an update, delete or response conditional. Present on Get, Create,\nUpdate, Delete and Respond responses; list items and webhooks omit it. Treat it as opaque:\na dated event's `etag` (`\"occ-...\"`) is not derived from `resource_revision`."}},"required":["event_id","kind","title","status","all_day","start","end","timezone","duration_mode","duration_value","start_at","end_at","attendee_count","uid","sequence","source","created_at","updated_at"],"description":"A calendar event. The same shape is used by every response, list item and webhook. `kind` says\nwhether it is a one-off event, the definition of a recurring series, or one date of a series.","title":"CalendarEvent"},"calendar_ListCalendarEventsResponse":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit"},"next_page_token":{"$ref":"#/components/schemas/PageToken"},"events":{"type":"array","items":{"$ref":"#/components/schemas/calendar_CalendarEvent"},"description":"On List Events, ordered by `updated_at` descending. On Get Agenda and List Event Instances,\nordered by `start_at` ascending."}},"required":["count","limit","events"],"title":"ListCalendarEventsResponse"},"calendar_WindowAfter":{"type":"string","format":"date-time","description":"Start of the window, as a UTC timestamp ending in `Z` (an offset such as `-04:00` is\nrejected). Defaults to now. The window between `after` and `before` can be at most 366 days.","title":"WindowAfter"},"calendar_WindowBefore":{"type":"string","format":"date-time","description":"End of the window, as a UTC timestamp ending in `Z` (an offset such as `-04:00` is rejected).\nDefaults to 90 days after `after`. The window between `after` and `before` can be at most 366\ndays.","title":"WindowBefore"},"calendar_IncludeOverlapping":{"type":"boolean","description":"When `true` (default), include events that started before `after` but are still running at\n`after`. When `false`, include only events that start inside the window.","title":"IncludeOverlapping"},"calendar_RecurrenceInput":{"type":"object","properties":{"rule":{"type":"string","description":"RFC 5545 RRULE body, with or without the `RRULE:` prefix, for example\n`FREQ=WEEKLY;BYDAY=MO,WE,FR` or `FREQ=MONTHLY;BYDAY=-1FR;COUNT=12`. Supported parts: `FREQ`,\n`INTERVAL` (1 to 366), `COUNT` (1 to 10,000), `UNTIL` (`YYYYMMDD` for all-day events,\n`YYYYMMDDTHHMMSSZ` for timed events),\n`WKST`, `BYMONTH`, `BYWEEKNO`, `BYYEARDAY`, `BYMONTHDAY`, `BYDAY`, `BYHOUR`, `BYMINUTE`,\n`BYSECOND` and `BYSETPOS`. `COUNT` and `UNTIL` are mutually exclusive. The rule is stored in\na normalized form, so a response can differ textually from what you sent. At most 512\ncharacters after normalization."},"exdates":{"type":"array","items":{"$ref":"#/components/schemas/calendar_WallTime"},"description":"Dates to skip, matching the original start of a date: `YYYY-MM-DDTHH:mm:ss` for timed events,\n`YYYY-MM-DD` for all-day events. At most 366."},"rdates":{"type":"array","items":{"$ref":"#/components/schemas/calendar_RecurrenceDate"},"description":"Extra dates to add. Timed events take date-times or periods; all-day events take dates. At\nmost 100."}},"required":["rule"],"description":"Repeats the event. `rule` is an RFC 5545 RRULE, evaluated in the event's `timezone` from the\nevent's `start`. Each date keeps its wall-clock time across daylight-saving changes.","title":"RecurrenceInput"},"calendar_CreateCalendarEventRequest":{"type":"object","properties":{"client_id":{"type":"string","description":"Your idempotency key for this create. Retrying with the same `client_id` and the same body\nreturns the original event with `200` instead of creating a second one, for as long as the\nevent exists (`404` once it has been deleted). Reusing it with a different body is a `409`\n`idempotency_conflict`."},"title":{"type":"string","description":"Title of the event. 1 to 1,000 characters."},"description":{"type":"string","description":"Description of the event. At most 65,536 bytes."},"location":{"type":"string","description":"Location of the event. At most 1,024 characters."},"metadata":{"description":"Your own JSON value (usually an object), returned on reads and in webhooks (except agenda and instance list items, and the webhook for a date cancelled with `DELETE`). Never sent to attendees. At most 16,384 bytes serialized."},"status":{"$ref":"#/components/schemas/calendar_CalendarEventStatus","description":"Defaults to `confirmed`."},"all_day":{"type":"boolean","description":"Set to `true` for an all-day event. Defaults to `false`."},"start":{"$ref":"#/components/schemas/calendar_WallTime","description":"Local start time in `timezone`: `YYYY-MM-DDTHH:mm:ss` for timed events, `YYYY-MM-DD` for\nall-day events. For a recurring event, this is the first date."},"end":{"$ref":"#/components/schemas/calendar_WallTime","description":"Local end time in `timezone`, in the same format as `start`. For timed events it must be\nafter `start`; for all-day events it is the last day (inclusive) and can equal `start`.\nOne-off events can last up to 366 days; each date of a recurring event up to 31 days."},"timezone":{"$ref":"#/components/schemas/calendar_IanaTimezone","description":"Time zone of `start` and `end`. Defaults to the calendar's `timezone`."},"duration_mode":{"$ref":"#/components/schemas/calendar_DurationMode","description":"Timed events only. Defaults to `exact` for one-off events and `nominal` for recurring events."},"recurrence":{"$ref":"#/components/schemas/calendar_RecurrenceInput","description":"Makes this a recurring event."},"attendees":{"type":"array","items":{"$ref":"#/components/schemas/calendar_Attendee"},"description":"Attendees of the event. At most 100."},"send_invites":{"type":"boolean","description":"When `true`, the inbox emails an invitation (iCalendar `REQUEST`) to every attendee. Defaults\nto `false`."}},"required":["title","start","end"],"title":"CreateCalendarEventRequest"},"calendar_OperationId":{"type":"string","description":"ID of the change this request made. The `calendar.event.created`, `calendar.event.updated`,\n`calendar.event.deleted` or `calendar.event.responded` webhook for the change carries the same\nvalue as its `event_id`, so you can match webhooks to your own requests.","title":"OperationId"},"calendar_CalendarEventMutationResponse":{"type":"object","properties":{"event":{"$ref":"#/components/schemas/calendar_CalendarEvent"},"operation_id":{"$ref":"#/components/schemas/calendar_OperationId"}},"required":["event","operation_id"],"title":"CalendarEventMutationResponse"},"calendar_InstanceMutationMode":{"type":"string","enum":["single","future"],"description":"Which dates a change to a dated event applies to. `single` (default) changes only this date.\n`future` changes this date and every later date of the series. Applies only to dated event IDs;\nsending `mode` with a one-off or series UUID is a `400`.","title":"InstanceMutationMode"},"calendar_DeletionId":{"type":"string","description":"ID of an accepted deletion. While the event is being removed, retrying the same delete (with the\nsame `Idempotency-Key`, or none and the same `send_invites`) returns it again. Once removal has\nfinished, a retry returns `404`.","title":"DeletionId"},"calendar_DeleteCalendarEventResponse":{"type":"object","properties":{"deletion_id":{"$ref":"#/components/schemas/calendar_DeletionId"},"event":{"$ref":"#/components/schemas/calendar_CalendarEvent"},"operation_id":{"$ref":"#/components/schemas/calendar_OperationId"}},"description":"Deleting a one-off or recurring event (or a `mode=future` delete that covers a whole series)\nreturns `deletion_id`. Deleting dates of a series returns the cancelled date as `event` with an\n`operation_id`.","title":"DeleteCalendarEventResponse"},"calendar_RespondStatus":{"type":"string","enum":["accepted","declined","tentative"],"description":"Your response to the invitation.","title":"RespondStatus"},"webhooks_CreateWebhookRequest":{"type":"object","properties":{"url":{"$ref":"#/components/schemas/webhooks_Url"},"event_types":{"$ref":"#/components/schemas/webhooks_CreateWebhookEventTypes"},"client_id":{"$ref":"#/components/schemas/webhooks_ClientId"},"headers":{"$ref":"#/components/schemas/webhooks_WebhookHeaders"},"inbox_ids":{"$ref":"#/components/schemas/events_InboxIds","description":"Inboxes for which to send events. A webhook can list at most 10 inboxes and pods combined;\nmore returns `403` with `limit_exceeded`."},"pod_ids":{"$ref":"#/components/schemas/events_PodIds","description":"Pods for which to send events. A webhook can list at most 10 pods and inboxes combined; more returns\n`403` with `limit_exceeded`. The webhook receives an event that matches any listed pod or inbox, so a\nlisted pod already covers every inbox in it."}},"required":["url","event_types"],"title":"CreateWebhookRequest"},"webhooks_UpdateWebhookRequest":{"type":"object","properties":{"event_types":{"$ref":"#/components/schemas/webhooks_UpdateWebhookEventTypes"},"enabled":{"type":"boolean","description":"Set to true to re-enable a webhook that was disabled after repeated failed deliveries, or false\nto disable it. AgentMail does not notify you when a webhook is disabled automatically; check this\nfield when you get or list webhooks. Events that occurred while the webhook was disabled are not\nredelivered. Re-enabling requires the read permission for every restricted event type the webhook\nsubscribes to: `label_spam_read`, `label_blocked_read`, or `label_unauthenticated_read` for the\nreceived variants, `message_read` for `message.security.*`, and `calendar_event_read` for\n`calendar.event.*`. A webhook with no event type filter is checked against all of them."},"add_inbox_ids":{"$ref":"#/components/schemas/events_InboxIds","description":"Inbox IDs to subscribe to the webhook. This only adds to what the webhook receives: on a webhook\nthat covers its whole pod, it changes nothing. To receive only specific inboxes, create a webhook\nwith `inbox_ids` instead. The webhook can list at most 10 inboxes and pods combined after the\nupdate."},"remove_inbox_ids":{"$ref":"#/components/schemas/events_InboxIds","description":"Inbox IDs to unsubscribe from the webhook."},"add_pod_ids":{"$ref":"#/components/schemas/events_PodIds","description":"Pod IDs to subscribe to the webhook. The webhook can list at most 10 pods and inboxes combined\nafter the update."},"remove_pod_ids":{"$ref":"#/components/schemas/events_PodIds","description":"Pod IDs to unsubscribe from the webhook."}},"title":"UpdateWebhookRequest"},"webhooks_polling_CreatePollingWebhookRequest":{"type":"object","properties":{"client_id":{"$ref":"#/components/schemas/webhooks_polling_PollingClientId"},"event_types":{"$ref":"#/components/schemas/webhooks_CreateWebhookEventTypes"},"inbox_ids":{"$ref":"#/components/schemas/events_InboxIds"},"pod_ids":{"$ref":"#/components/schemas/events_PodIds","description":"Pods for which to receive events. Maximum 10 channels (pods plus inboxes) per subscription. The\nsubscription receives an event that matches any listed pod or inbox, so a listed pod already\ncovers every inbox in it."}},"required":["client_id","event_types"],"title":"CreatePollingWebhookRequest"},"domains_DomainId":{"type":"string","description":"The ID of the domain.","title":"DomainId"},"domains_DomainName":{"type":"string","description":"The name of the domain (e.g., `example.com`).","title":"DomainName"},"domains_FeedbackEnabled":{"type":"boolean","description":"Bounce and complaint notifications are sent to your inboxes.","title":"FeedbackEnabled"},"domains_InboundEnabled":{"type":"boolean","description":"Receive email for this domain. Defaults to `true`. Set `false` for a send-only\ndomain: the apex MX record is not required and is omitted from `records`, so the\ndomain's existing email provider keeps receiving its mail. Inboxes on a send-only\ndomain can still send.","title":"InboundEnabled"},"domains_SubdomainsEnabled":{"type":"boolean","description":"Allow inboxes on any subdomain of this domain. Adds a required wildcard MX\nrecord (`*.<domain>`) to `records`.","title":"SubdomainsEnabled"},"domains_TrackingEnabled":{"type":"boolean","description":"Serve open tracking pixels from this domain. Adds a `link.<domain>` CNAME\nrecord to `records`. Open tracking reports its readiness in `tracking_status`\nand never changes the domain's `status`. Sends with `track_opens` are accepted\nonce `tracking_status` is `VERIFIED`.","title":"TrackingEnabled"},"domains_ClientId":{"type":"string","description":"Client ID of domain.","title":"ClientId"},"domains_DomainItem":{"type":"object","properties":{"pod_id":{"$ref":"#/components/schemas/pods_PodId"},"domain_id":{"$ref":"#/components/schemas/domains_DomainId"},"domain":{"$ref":"#/components/schemas/domains_DomainName"},"feedback_enabled":{"$ref":"#/components/schemas/domains_FeedbackEnabled"},"inbound_enabled":{"$ref":"#/components/schemas/domains_InboundEnabled","description":"Absent on domains created before this field existed; those receive email."},"subdomains_enabled":{"$ref":"#/components/schemas/domains_SubdomainsEnabled"},"tracking_enabled":{"$ref":"#/components/schemas/domains_TrackingEnabled"},"client_id":{"$ref":"#/components/schemas/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","tracking_enabled","updated_at","created_at"],"title":"DomainItem"},"domains_ListDomainsResponse":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit"},"next_page_token":{"$ref":"#/components/schemas/PageToken"},"domains":{"type":"array","items":{"$ref":"#/components/schemas/domains_DomainItem"},"description":"Ordered by `created_at` descending."}},"required":["count","domains"],"title":"ListDomainsResponse"},"domains_VerificationStatus":{"type":"string","enum":["NOT_STARTED","PENDING","INVALID","FAILED","VERIFYING","VERIFIED"],"title":"VerificationStatus"},"domains_Status":{"$ref":"#/components/schemas/domains_VerificationStatus","description":"The verification status of the domain.","title":"Status"},"domains_TrackingStatus":{"$ref":"#/components/schemas/domains_VerificationStatus","description":"Whether open tracking is ready on this domain, independent of the domain's\n`status`. `PENDING`: the `link.<domain>` CNAME is not published yet.\n`INVALID`: the CNAME is wrong, or the domain's CAA records do not allow\nAmazon to issue its certificate. `VERIFYING`: the certificate is being\nissued. `VERIFIED`: `track_opens` can be used. `FAILED`: the certificate was\nrefused; turn tracking off and back on to request a new one.","title":"TrackingStatus"},"domains_RecordType":{"type":"string","enum":["TXT","CNAME","MX","CAA"],"title":"RecordType"},"domains_RecordStatus":{"type":"string","enum":["MISSING","INVALID","VALID"],"title":"RecordStatus"},"domains_VerificationRecord":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/domains_RecordType","description":"The type of the DNS record. A `CAA` record is listed only when open tracking is on and the domain's CAA records restrict which certificate authorities may issue for it: add it next to the existing CAA records, not in place of them."},"name":{"type":"string","description":"The name or host of the record."},"value":{"type":"string","description":"The value of the record."},"status":{"$ref":"#/components/schemas/domains_RecordStatus","description":"The verification status of this specific record."},"priority":{"type":"integer","description":"The priority of the MX record."},"reason":{"type":"string","description":"Why the record is INVALID, when known. `duplicate_records` means the expected value is present but extra records coexist at the same name; `value_mismatch` means a record exists but does not match the expected value."}},"required":["type","name","value","status"],"title":"VerificationRecord"},"domains_Domain":{"type":"object","properties":{"pod_id":{"$ref":"#/components/schemas/pods_PodId"},"domain_id":{"$ref":"#/components/schemas/domains_DomainId"},"domain":{"$ref":"#/components/schemas/domains_DomainName"},"status":{"$ref":"#/components/schemas/domains_Status"},"reason":{"type":"string","description":"Why the domain is not (yet) VERIFIED, when known. `dns_records_missing` / `dns_records_invalid` point at the DNS records. The `ses_*` values mean the records look right and sending-infrastructure validation has not converged: `ses_dkim_pending` / `ses_mail_from_pending` (still checking), `ses_dkim_temporary_failure` / `ses_mail_from_temporary_failure` (a transient error the infrastructure keeps retrying on its own — usually resolves without changes), `ses_dkim_failed` / `ses_mail_from_failed` (a terminal verdict; re-verify after fixing), `ses_dkim_not_started` / `ses_mail_from_not_started` (the attribute was never configured on the identity — re-verify to push it), `ses_not_verified_for_sending`, and `tracking_certificate_failed` (the certificate for the open tracking `link.` subdomain was refused; fix CAA or DNS, then turn tracking off and back on). Absent when VERIFIED."},"feedback_enabled":{"$ref":"#/components/schemas/domains_FeedbackEnabled"},"inbound_enabled":{"$ref":"#/components/schemas/domains_InboundEnabled","description":"Absent on domains created before this field existed; those receive email."},"subdomains_enabled":{"$ref":"#/components/schemas/domains_SubdomainsEnabled"},"tracking_enabled":{"$ref":"#/components/schemas/domains_TrackingEnabled"},"tracking_status":{"$ref":"#/components/schemas/domains_TrackingStatus","description":"Present when `tracking_enabled` is true."},"tracking_reason":{"type":"string","description":"Why open tracking is not (yet) VERIFIED, when known. `dns_records_missing` / `dns_records_invalid` point at the `link.<domain>` CNAME. `caa_blocked` means the domain's CAA records leave Amazon out: add the `CAA` record listed in `records`, and AgentMail retries the certificate on its own within a few minutes. `certificate_failed` means the certificate was refused; fix the DNS, then turn tracking off and back on. Absent when `tracking_status` is VERIFIED."},"records":{"type":"array","items":{"$ref":"#/components/schemas/domains_VerificationRecord"},"description":"A list of DNS records for the domain. Includes the apex MX record unless\n`inbound_enabled` is false, and a wildcard MX record (`*.<domain>`) when\n`subdomains_enabled` is true. When `tracking_enabled` is true it also lists\nthe `link.<domain>` CNAME and, if the domain's CAA records restrict\nissuance, a `CAA` record. Those two are for open tracking only: they\nfeed `tracking_status` and do not affect `status`."},"client_id":{"$ref":"#/components/schemas/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","tracking_enabled","records","updated_at","created_at"],"title":"Domain"},"domains_CreateDomainRequest":{"type":"object","properties":{"domain":{"$ref":"#/components/schemas/domains_DomainName"},"allow_conflicting_provider":{"type":"boolean","description":"Allow registration when the domain already has Google Workspace MX records.\nDefaults to false; registration otherwise returns 422 when a conflicting\nprovider is detected.\nThis flag does not configure DNS or inbound routing. For shared Google\nWorkspace domains, follow the [Google Workspace guide](/google-workspace).\nOnly checked when `inbound_enabled` is true; a send-only domain skips the check."},"feedback_enabled":{"$ref":"#/components/schemas/domains_FeedbackEnabled"},"inbound_enabled":{"$ref":"#/components/schemas/domains_InboundEnabled"},"subdomains_enabled":{"$ref":"#/components/schemas/domains_SubdomainsEnabled"},"tracking_enabled":{"$ref":"#/components/schemas/domains_TrackingEnabled"}},"required":["domain"],"title":"CreateDomainRequest"},"domains_UpdateDomainRequest":{"type":"object","properties":{"feedback_enabled":{"$ref":"#/components/schemas/domains_FeedbackEnabled"},"inbound_enabled":{"$ref":"#/components/schemas/domains_InboundEnabled"},"subdomains_enabled":{"$ref":"#/components/schemas/domains_SubdomainsEnabled"},"tracking_enabled":{"$ref":"#/components/schemas/domains_TrackingEnabled"}},"description":"Provide at least one of `feedback_enabled`, `inbound_enabled`,\n`subdomains_enabled`, or `tracking_enabled`. Omitted fields are left\nunchanged; an empty body is rejected. Enabling `inbound_enabled` or\n`subdomains_enabled` on a verified domain returns it to `PENDING` until the\nnewly required MX record (the apex MX, or the wildcard `*.<domain>`) is\npublished and verified. Enabling `tracking_enabled` leaves `status` as it is\nand starts `tracking_status` at `PENDING`.","title":"UpdateDomainRequest"},"domains_GetSetupLinkResponse":{"type":"object","properties":{"supported":{"type":"boolean","description":"Whether one-click setup is available for this domain. `false` means the domain's DNS provider does not support Domain Connect (or does not carry the AgentMail template yet) — add the domain's `records` manually instead."},"provider_name":{"type":"string","description":"Display name of the domain's DNS provider, for the setup button label."},"url":{"type":"string","description":"The signed Domain Connect apply URL. Open it in a browser: the domain owner signs in at their DNS provider, reviews the records, and approves — the provider writes them."},"width":{"type":"integer","description":"Suggested popup width from the provider, in pixels."},"height":{"type":"integer","description":"Suggested popup height from the provider, in pixels."},"state":{"type":"string","description":"Opaque value echoed back on the provider's redirect. Store it before opening the URL and compare on return to tie the redirect to this request."},"conflicting_provider":{"type":"string","description":"Set when the domain currently has another email provider's MX records (for example Google Workspace). Applying the template would replace them — warn before proceeding."}},"required":["supported"],"title":"GetSetupLinkResponse"},"lists_ListEntry":{"type":"object","properties":{"entry":{"type":"string","description":"Email address or domain of list entry."},"organization_id":{"$ref":"#/components/schemas/OrganizationId"},"reason":{"type":"string","description":"Reason for adding the entry."},"direction":{"$ref":"#/components/schemas/lists_Direction"},"list_type":{"$ref":"#/components/schemas/lists_ListType"},"entry_type":{"$ref":"#/components/schemas/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"},"lists_ListListEntriesResponse":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit"},"next_page_token":{"$ref":"#/components/schemas/PageToken"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/lists_ListEntry"},"description":"Ordered by entry ascending."}},"required":["count","entries"],"title":"ListListEntriesResponse"},"apiKeys_ApiKeyType":{"type":"string","enum":["bearer","public_key"],"title":"ApiKeyType"},"apps_AppCategory":{"type":"string","enum":["ai","search","scraping","browser","data","developer-tools","communication","productivity","payments","finance","commerce","marketing","analytics","security","infrastructure","other"],"description":"Kind of app.","title":"AppCategory"},"apps_App":{"type":"object","properties":{"app_id":{"$ref":"#/components/schemas/apps_AppId"},"slug":{"type":"string","description":"Short name accepted in place of `app_id` by Get App, List App Accounts and Connect App. Set by AgentMail on apps in the catalog; renaming the app does not change it. Store `app_id`, the app's permanent ID."},"name":{"type":"string"},"updated_at":{"type":"string","format":"date-time","description":"Time at which app was last updated."},"description":{"type":"string"},"logo_url":{"type":"string"},"terms_url":{"type":"string"},"privacy_url":{"type":"string"},"categories":{"type":"array","items":{"$ref":"#/components/schemas/apps_AppCategory"},"description":"Kinds of app, up to 3. Omitted when the app sets none."},"owner_signup_limit":{"type":"integer","description":"Maximum number of accounts your organization may sign up at this app. Omitted when the app sets no limit. 0 means the app has paused new sign-ups; existing accounts keep signing in."}},"required":["app_id"],"description":"An app an inbox can sign in to.","title":"App"},"apps_ListAppsResponse":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit"},"next_page_token":{"$ref":"#/components/schemas/PageToken"},"apps":{"type":"array","items":{"$ref":"#/components/schemas/apps_App"}}},"required":["count","limit","apps"],"title":"ListAppsResponse"},"apps_SearchAppsResponse":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit"},"apps":{"type":"array","items":{"$ref":"#/components/schemas/apps_App"}}},"required":["count","limit","apps"],"title":"SearchAppsResponse"},"apps_ListAppAccountsResponse":{"type":"object","properties":{"app":{"$ref":"#/components/schemas/apps_App"},"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit"},"next_page_token":{"$ref":"#/components/schemas/PageToken"},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/accounts_Account"}}},"required":["count","limit","accounts"],"title":"ListAppAccountsResponse"},"apps_ConnectInboxId":{"$ref":"#/components/schemas/inboxes_InboxId","description":"Inbox to sign in as. Required unless the API key is scoped to an inbox.","title":"ConnectInboxId"},"apps_ConnectAppBody":{"type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/apps_ConnectInboxId"},"accept_disclosure":{"$ref":"#/components/schemas/apiKeys_AcceptDisclosure"}},"title":"ConnectAppBody"},"apps_MagicUrl":{"type":"string","description":"Single-use URL to open in the client that will hold the key.","title":"MagicUrl"},"apps_ConnectAccepted":{"type":"object","properties":{"api_key_id":{"$ref":"#/components/schemas/apiKeys_ApiKeyId"},"magic_url":{"$ref":"#/components/schemas/apps_MagicUrl"},"expires_at":{"$ref":"#/components/schemas/apiKeys_ExpiresAt"}},"required":["api_key_id","magic_url","expires_at"],"description":"The pending sign-in key the client will activate. Poll Get API Key with `api_key_id` for `status`.","title":"ConnectAccepted"},"accounts_UpdateAccountStatus":{"type":"string","enum":["enabled","disabled"],"description":"Status to set. `disabled` stops the inbox from signing in at the\napp; `enabled` re-enables it. An enabled account reads back with no\n`status`.","title":"UpdateAccountStatus"},"accounts_UpdateAccountRequest":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/accounts_UpdateAccountStatus"}},"description":"Fields to change on the account. Fields you omit are left unchanged and\nunknown fields are rejected. Expects at least one field; today that is\n`status`.","title":"UpdateAccountRequest"},"pods_Name":{"type":"string","description":"Name of pod.","title":"Name"},"pods_ClientId":{"type":"string","description":"Client ID of pod.","title":"ClientId"},"pods_Pod":{"type":"object","properties":{"pod_id":{"$ref":"#/components/schemas/pods_PodId"},"name":{"$ref":"#/components/schemas/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/pods_ClientId"}},"required":["pod_id","name","updated_at","created_at"],"title":"Pod"},"pods_ListPodsResponse":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit"},"next_page_token":{"$ref":"#/components/schemas/PageToken"},"pods":{"type":"array","items":{"$ref":"#/components/schemas/pods_Pod"},"description":"Ordered by `created_at` descending."}},"required":["count","pods"],"title":"ListPodsResponse"},"pods_CreatePodRequest":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/pods_Name"},"client_id":{"$ref":"#/components/schemas/pods_ClientId"}},"title":"CreatePodRequest"},"webhooks_CreatePodWebhookRequest":{"type":"object","properties":{"url":{"$ref":"#/components/schemas/webhooks_Url"},"event_types":{"$ref":"#/components/schemas/webhooks_CreateWebhookEventTypes"},"client_id":{"$ref":"#/components/schemas/webhooks_ClientId"},"headers":{"$ref":"#/components/schemas/webhooks_WebhookHeaders"},"inbox_ids":{"$ref":"#/components/schemas/events_InboxIds","description":"Inboxes for which to send events. A webhook can list at most 10 inboxes and pods combined;\nmore returns `403` with `limit_exceeded`."}},"required":["url","event_types"],"description":"Create a webhook scoped to a pod. The pod comes from the path, so `pod_ids` is not accepted.\nOptionally pass `inbox_ids` to narrow the webhook to specific inboxes within the pod; omit to\nreceive events for the whole pod.","title":"CreatePodWebhookRequest"},"webhooks_UpdatePodWebhookRequest":{"type":"object","properties":{"event_types":{"$ref":"#/components/schemas/webhooks_UpdateWebhookEventTypes"},"enabled":{"type":"boolean","description":"Set to true to re-enable a webhook that was disabled after repeated failed deliveries, or false\nto disable it. AgentMail does not notify you when a webhook is disabled automatically; check this\nfield when you get or list webhooks. Events that occurred while the webhook was disabled are not\nredelivered. Re-enabling requires the read permission for every restricted event type the webhook\nsubscribes to: `label_spam_read`, `label_blocked_read`, or `label_unauthenticated_read` for the\nreceived variants, `message_read` for `message.security.*`, and `calendar_event_read` for\n`calendar.event.*`. A webhook with no event type filter is checked against all of them."},"add_inbox_ids":{"$ref":"#/components/schemas/events_InboxIds","description":"Inbox IDs to subscribe to the webhook. This only adds to what the webhook receives: on a webhook\nthat covers its whole pod, it changes nothing. To receive only specific inboxes, create a webhook\nwith `inbox_ids` instead. The webhook can list at most 10 inboxes and pods combined after the\nupdate."},"remove_inbox_ids":{"$ref":"#/components/schemas/events_InboxIds","description":"Inbox IDs to unsubscribe from the webhook."}},"description":"Update a pod-scoped webhook. You can adjust which inboxes within the pod it listens to, replace\nits `event_types`, and set `enabled`, but not change the pod scope itself.","title":"UpdatePodWebhookRequest"},"webhooks_polling_CreatePodPollingWebhookRequest":{"type":"object","properties":{"client_id":{"$ref":"#/components/schemas/webhooks_polling_PollingClientId"},"event_types":{"$ref":"#/components/schemas/webhooks_CreateWebhookEventTypes"},"inbox_ids":{"$ref":"#/components/schemas/events_InboxIds"}},"required":["client_id","event_types"],"description":"Create a polling webhook scoped to a pod. The pod comes from the path, so `pod_ids` is not accepted.\nOptionally pass `inbox_ids` to narrow the subscription to specific inboxes within the pod; omit to\nreceive events for the whole pod.","title":"CreatePodPollingWebhookRequest"},"organizations_Organization":{"type":"object","properties":{"organization_id":{"$ref":"#/components/schemas/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."},"suspended_at":{"type":"string","format":"date-time","description":"Time at which the organization was suspended. Absent when it is not suspended. A suspended\norganization cannot send, but it still receives mail, its webhooks and WebSocket events still\nfire, and API reads keep working. See [account_suspended](https://docs.agentmail.to/errors#account_suspended)."},"suspended_reason":{"type":"string","description":"Why the organization is suspended, in a short machine-readable form such as `message.bounced`\nor `message.complained`. Absent when it is not suspended. Email support@agentmail.cc to resolve\na suspension."},"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"},"organizations_OrganizationLabs":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether the organization is in AgentMail Labs."},"enabled_at":{"type":["string","null"],"format":"date-time","description":"Time at which the organization joined Labs. `null` when it is not in Labs."},"available":{"type":"boolean","description":"Whether Labs is offered in this deployment. Labs is available in US production (`api.agentmail.to`), not yet in EU production (`api.agentmail.eu`)."}},"required":["enabled","enabled_at","available"],"description":"Whether the organization is in AgentMail Labs, and whether Labs is offered in this deployment.","title":"OrganizationLabs"},"auth_ScopeType":{"type":"string","enum":["organization","pod","inbox"],"description":"The scope tier the authenticated credential is bound to.","title":"ScopeType"},"auth_Identity":{"type":"object","properties":{"scope_type":{"$ref":"#/components/schemas/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/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"},"webhooks_events_SvixId":{"type":"string","description":"ID of webhook message.","title":"SvixId"},"webhooks_events_SvixSignature":{"type":"string","description":"Signature of webhook message.","title":"SvixSignature"},"webhooks_events_SvixTimestamp":{"type":"string","format":"date-time","description":"Timestamp of webhook message.","title":"SvixTimestamp"},"events_MessageReceivedEventType":{"type":"string","enum":["message.received","message.received.spam","message.received.blocked","message.received.unauthenticated"],"title":"MessageReceivedEventType"},"events_EventId":{"type":"string","description":"ID of the event. It is the same on every retry and redelivery of the event and on every webhook\nor WebSocket subscription that receives it, so use it to deduplicate. The format varies by event\ntype; treat it as an opaque string.","title":"EventId"},"events_ReceivedMessage":{"type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxes_InboxId"},"thread_id":{"$ref":"#/components/schemas/threads_ThreadId"},"message_id":{"$ref":"#/components/schemas/messages_MessageId"},"labels":{"$ref":"#/components/schemas/messages_MessageLabels"},"timestamp":{"$ref":"#/components/schemas/messages_MessageTimestamp"},"from":{"$ref":"#/components/schemas/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/messages_MessageTo"},"cc":{"$ref":"#/components/schemas/messages_MessageCc"},"bcc":{"$ref":"#/components/schemas/messages_MessageBcc"},"subject":{"$ref":"#/components/schemas/messages_MessageSubject"},"preview":{"$ref":"#/components/schemas/messages_MessagePreview"},"text":{"$ref":"#/components/schemas/messages_MessageText"},"html":{"$ref":"#/components/schemas/messages_MessageHtml"},"extracted_text":{"type":"string","description":"Extracted new text content."},"extracted_html":{"type":"string","description":"Extracted new HTML content."},"attachments":{"$ref":"#/components/schemas/messages_MessageAttachments"},"in_reply_to":{"$ref":"#/components/schemas/messages_MessageInReplyTo"},"calendar_event_id":{"$ref":"#/components/schemas/messages_MessageCalendarEventId"},"references":{"$ref":"#/components/schemas/messages_MessageReferences"},"headers":{"$ref":"#/components/schemas/messages_MessageHeaders"},"authentication_results":{"$ref":"#/components/schemas/messages_MessageAuthenticationResults"},"agent_armor":{"$ref":"#/components/schemas/agentArmor_AgentArmorResult"},"size":{"$ref":"#/components/schemas/messages_MessageSize"},"updated_at":{"$ref":"#/components/schemas/messages_MessageUpdatedAt"},"created_at":{"$ref":"#/components/schemas/messages_MessageCreatedAt"},"body_url":{"type":"string","description":"Pre-signed URL that downloads the stored body as a JSON object including `text`, `html`,\n`extracted_text`, and `extracted_html`. Present only when the body is omitted from the event.\nValid until `body_expires_at`, one hour after the event was built. The body stays available\nthrough the get message endpoint after the URL expires."},"body_expires_at":{"type":"string","format":"date-time","description":"Time at which `body_url` expires. Present only with `body_url`."}},"required":["inbox_id","thread_id","message_id","labels","timestamp","from","to","size","updated_at","created_at"],"description":"The received message. The body (`text`, `html`, `extracted_text`, and `extracted_html`) is included\ninline only when it is small enough. Webhooks omit it when the stored body is larger than 64 KiB;\nWebSocket events also omit it when the serialized event would be larger than 30 KiB. When the body\nis omitted, `body_url` and `body_expires_at` are set instead.","title":"ReceivedMessage"},"events_MessageReceivedEvent":{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"event_type":{"$ref":"#/components/schemas/events_MessageReceivedEventType"},"event_id":{"$ref":"#/components/schemas/events_EventId"},"message":{"$ref":"#/components/schemas/events_ReceivedMessage"},"thread":{"$ref":"#/components/schemas/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"},"agentArmor_AgentArmorCompletedEventResult":{"type":"object","properties":{"verdict":{"$ref":"#/components/schemas/agentArmor_AgentArmorVerdict"},"reason":{"type":"string","description":"A short explanation of the verdict."},"model":{"type":"string","description":"Identifies the Agent Armor release that produced the verdict. Opaque; it changes when Agent Armor is updated."},"completed_at":{"type":"string","format":"date-time","description":"When the scan finished."},"manual_override":{"$ref":"#/components/schemas/agentArmor_AgentArmorManualOverride","description":"Present on a `review` held in hold mode that someone released."},"status":{"type":"string","enum":["complete"]}},"required":["verdict","reason","model","completed_at","status"],"description":"The result in a `message.security.completed` or `message.security.review` event, which is always `complete`.","title":"AgentArmorCompletedEventResult"},"events_MessageSecurity":{"type":"object","properties":{"organization_id":{"$ref":"#/components/schemas/OrganizationId"},"inbox_id":{"$ref":"#/components/schemas/inboxes_InboxId"},"message_id":{"$ref":"#/components/schemas/messages_MessageId"},"agent_armor":{"$ref":"#/components/schemas/agentArmor_AgentArmorCompletedEventResult"}},"required":["organization_id","inbox_id","message_id","agent_armor"],"description":"The message an Agent Armor result is for. Fetch the message for its content.","title":"MessageSecurity"},"events_MessageSecurityCompletedEvent":{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"event_type":{"type":"string","enum":["message.security.completed"]},"event_id":{"$ref":"#/components/schemas/events_EventId"},"message":{"$ref":"#/components/schemas/events_MessageSecurity"}},"required":["type","event_type","event_id","message"],"description":"Agent Armor reached a verdict on a received message. Sent only in monitor mode, and only for `complete` results:\nan `unavailable` result sends no event. Sent once per message and inbox; `event_id` is stable, so use it to\ndeduplicate. Not sent for messages labeled `spam`, `blocked`, `unauthenticated`, or `trash`: read those through\nthe API.","title":"MessageSecurityCompletedEvent"},"events_MessageSecurityReviewEvent":{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"event_type":{"type":"string","enum":["message.security.review"]},"event_id":{"$ref":"#/components/schemas/events_EventId"},"message":{"$ref":"#/components/schemas/events_MessageSecurity"}},"required":["type","event_type","event_id","message"],"description":"In hold mode, Agent Armor held a received message for review: your agents are not sent its `message.received`\nuntil someone releases it. The message carries the `agent-armor-held` label until then. Sent once per message and\ninbox; `event_id` is stable. Not sent for messages labeled `spam`, `blocked`, `unauthenticated`, or `trash`: list\nheld mail by the `agent-armor-held` label instead.","title":"MessageSecurityReviewEvent"},"events_MessageSecurityOverride":{"type":"object","properties":{"organization_id":{"$ref":"#/components/schemas/OrganizationId"},"inbox_id":{"$ref":"#/components/schemas/inboxes_InboxId"},"message_id":{"$ref":"#/components/schemas/messages_MessageId"},"manual_override":{"$ref":"#/components/schemas/agentArmor_AgentArmorManualOverride"}},"required":["organization_id","inbox_id","message_id","manual_override"],"description":"The message someone released, and the record of the release. Fetch the message for its content.","title":"MessageSecurityOverride"},"events_MessageSecurityOverrideEvent":{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"event_type":{"type":"string","enum":["message.security.override"]},"event_id":{"$ref":"#/components/schemas/events_EventId"},"message":{"$ref":"#/components/schemas/events_MessageSecurityOverride"}},"required":["type","event_type","event_id","message"],"description":"Someone released a message Agent Armor held for review. Its `message.received` is sent to your agents as well,\nand the two can arrive in either order.\nSent once per message and inbox; `event_id` is stable. Not sent for messages labeled `spam`, `blocked`,\n`unauthenticated`, or `trash`.","title":"MessageSecurityOverrideEvent"},"events_Timestamp":{"type":"string","format":"date-time","description":"Timestamp of event.","title":"Timestamp"},"events_Send":{"type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxes_InboxId"},"thread_id":{"$ref":"#/components/schemas/threads_ThreadId"},"message_id":{"$ref":"#/components/schemas/messages_MessageId"},"timestamp":{"$ref":"#/components/schemas/events_Timestamp"},"recipients":{"type":"array","items":{"type":"string"},"description":"Sent recipients."}},"required":["inbox_id","thread_id","message_id","timestamp","recipients"],"title":"Send"},"events_MessageSentEvent":{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"event_type":{"type":"string","enum":["message.sent"]},"event_id":{"$ref":"#/components/schemas/events_EventId"},"send":{"$ref":"#/components/schemas/events_Send"}},"required":["type","event_type","event_id","send"],"title":"MessageSentEvent"},"events_Delivery":{"type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxes_InboxId"},"thread_id":{"$ref":"#/components/schemas/threads_ThreadId"},"message_id":{"$ref":"#/components/schemas/messages_MessageId"},"timestamp":{"$ref":"#/components/schemas/events_Timestamp"},"recipients":{"type":"array","items":{"type":"string"},"description":"Delivered recipients."}},"required":["inbox_id","thread_id","message_id","timestamp","recipients"],"title":"Delivery"},"events_MessageDeliveredEvent":{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"event_type":{"type":"string","enum":["message.delivered"]},"event_id":{"$ref":"#/components/schemas/events_EventId"},"delivery":{"$ref":"#/components/schemas/events_Delivery"}},"required":["type","event_type","event_id","delivery"],"title":"MessageDeliveredEvent"},"events_Recipient":{"type":"object","properties":{"address":{"type":"string","description":"Recipient address."},"status":{"type":"string","description":"Recipient status."}},"required":["address","status"],"title":"Recipient"},"events_Bounce":{"type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxes_InboxId"},"thread_id":{"$ref":"#/components/schemas/threads_ThreadId"},"message_id":{"$ref":"#/components/schemas/messages_MessageId"},"timestamp":{"$ref":"#/components/schemas/events_Timestamp"},"type":{"type":"string","description":"Bounce type."},"sub_type":{"type":"string","description":"Bounce sub-type."},"recipients":{"type":"array","items":{"$ref":"#/components/schemas/events_Recipient"},"description":"Bounced recipients."}},"required":["inbox_id","thread_id","message_id","timestamp","type","sub_type","recipients"],"title":"Bounce"},"events_MessageBouncedEvent":{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"event_type":{"type":"string","enum":["message.bounced"]},"event_id":{"$ref":"#/components/schemas/events_EventId"},"bounce":{"$ref":"#/components/schemas/events_Bounce"}},"required":["type","event_type","event_id","bounce"],"title":"MessageBouncedEvent"},"events_Complaint":{"type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxes_InboxId"},"thread_id":{"$ref":"#/components/schemas/threads_ThreadId"},"message_id":{"$ref":"#/components/schemas/messages_MessageId"},"timestamp":{"$ref":"#/components/schemas/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"},"events_MessageComplainedEvent":{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"event_type":{"type":"string","enum":["message.complained"]},"event_id":{"$ref":"#/components/schemas/events_EventId"},"complaint":{"$ref":"#/components/schemas/events_Complaint"}},"required":["type","event_type","event_id","complaint"],"title":"MessageComplainedEvent"},"events_Reject":{"type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxes_InboxId"},"thread_id":{"$ref":"#/components/schemas/threads_ThreadId"},"message_id":{"$ref":"#/components/schemas/messages_MessageId"},"timestamp":{"$ref":"#/components/schemas/events_Timestamp"},"reason":{"type":"string","description":"Reject reason."}},"required":["inbox_id","thread_id","message_id","timestamp","reason"],"title":"Reject"},"events_MessageRejectedEvent":{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"event_type":{"type":"string","enum":["message.rejected"]},"event_id":{"$ref":"#/components/schemas/events_EventId"},"reject":{"$ref":"#/components/schemas/events_Reject"}},"required":["type","event_type","event_id","reject"],"title":"MessageRejectedEvent"},"events_Open":{"type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxes_InboxId"},"thread_id":{"$ref":"#/components/schemas/threads_ThreadId"},"message_id":{"$ref":"#/components/schemas/messages_MessageId"},"timestamp":{"$ref":"#/components/schemas/events_Timestamp"}},"required":["inbox_id","thread_id","message_id","timestamp"],"title":"Open"},"events_MessageOpenedEvent":{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"event_type":{"type":"string","enum":["message.opened"]},"event_id":{"$ref":"#/components/schemas/events_EventId"},"open":{"$ref":"#/components/schemas/events_Open"}},"required":["type","event_type","event_id","open"],"description":"A tracked message was opened for the first time. Sent once per message: repeat opens do not\nresend it.","title":"MessageOpenedEvent"},"events_DomainVerifiedEvent":{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"event_type":{"type":"string","enum":["domain.verified"]},"event_id":{"$ref":"#/components/schemas/events_EventId"},"domain":{"$ref":"#/components/schemas/domains_Domain"}},"required":["type","event_type","event_id","domain"],"title":"DomainVerifiedEvent"},"events_CalendarEventCreatedEvent":{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"event_type":{"type":"string","enum":["calendar.event.created"]},"event_id":{"$ref":"#/components/schemas/events_EventId","description":"Equals the `operation_id` returned by the request that made the change."},"inbox_id":{"$ref":"#/components/schemas/inboxes_InboxId"},"calendar_event":{"$ref":"#/components/schemas/calendar_CalendarEvent"}},"required":["type","event_type","event_id","inbox_id","calendar_event"],"description":"An event was created, through the API or from an invitation the inbox received. Also sent when\none date of a recurring event is edited for the first time; `calendar_event` is then that date.","title":"CalendarEventCreatedEvent"},"events_CalendarEventPrevious":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"location":{"type":"string"},"metadata":{"description":"Any type"},"status":{"$ref":"#/components/schemas/calendar_CalendarEventStatus"},"all_day":{"type":"boolean"},"start":{"$ref":"#/components/schemas/calendar_WallTime"},"end":{"$ref":"#/components/schemas/calendar_WallTime"},"timezone":{"$ref":"#/components/schemas/calendar_IanaTimezone"},"duration_mode":{"$ref":"#/components/schemas/calendar_DurationMode"},"recurrence":{"$ref":"#/components/schemas/calendar_Recurrence"},"attendees":{"type":"array","items":{"$ref":"#/components/schemas/calendar_Attendee"}}},"description":"The values that a `calendar.event.updated` change replaced, for the fields it changed. Only\nchanged fields appear; a field that had no value before the change is absent.","title":"CalendarEventPrevious"},"events_CalendarEventUpdatedEvent":{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"event_type":{"type":"string","enum":["calendar.event.updated"]},"event_id":{"$ref":"#/components/schemas/events_EventId","description":"Equals the `operation_id` returned by the request that made the change."},"inbox_id":{"$ref":"#/components/schemas/inboxes_InboxId"},"calendar_event":{"$ref":"#/components/schemas/calendar_CalendarEvent"},"previous":{"$ref":"#/components/schemas/events_CalendarEventPrevious","description":"For changes to a one-off or series event, the prior values of the fields that changed."}},"required":["type","event_type","event_id","inbox_id","calendar_event"],"description":"An event, or one or more dates of a recurring event, changed. `calendar_event` is the event\n(or the date) after the change. Cancelling dates with a delete on a dated ID also sends this\nevent, with the cancelled date as `calendar_event`.","title":"CalendarEventUpdatedEvent"},"events_CalendarEventDeletedEvent":{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"event_type":{"type":"string","enum":["calendar.event.deleted"]},"event_id":{"$ref":"#/components/schemas/events_EventId","description":"Equals the `deletion_id` returned by the request that made the change."},"inbox_id":{"$ref":"#/components/schemas/inboxes_InboxId"},"calendar_event":{"$ref":"#/components/schemas/calendar_CalendarEvent"}},"required":["type","event_type","event_id","inbox_id","calendar_event"],"description":"A one-off or recurring event was deleted. `calendar_event` is the event as it was. Cancelling\ndates of a recurring event sends `calendar.event.updated` instead.","title":"CalendarEventDeletedEvent"},"events_CalendarEventRespondedEvent":{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"event_type":{"type":"string","enum":["calendar.event.responded"]},"event_id":{"$ref":"#/components/schemas/events_EventId"},"inbox_id":{"$ref":"#/components/schemas/inboxes_InboxId"},"calendar_event":{"$ref":"#/components/schemas/calendar_CalendarEvent"}},"required":["type","event_type","event_id","inbox_id","calendar_event"],"description":"An attendee's response changed: the inbox responded with the respond endpoint, or an attendee\nreplied by email to an invitation the inbox sent. `calendar_event.attendees` holds the new\nstatuses.","title":"CalendarEventRespondedEvent"},"events_CalendarEventStartingEvent":{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"event_type":{"type":"string","enum":["calendar.event.starting"]},"event_id":{"$ref":"#/components/schemas/events_EventId","description":"Stable for this date and boundary. Use it to deduplicate deliveries."},"inbox_id":{"$ref":"#/components/schemas/inboxes_InboxId"},"calendar_event":{"$ref":"#/components/schemas/calendar_CalendarEvent","description":"The event or date as it stood when the boundary was first processed."},"scheduled_at":{"type":"string","format":"date-time","description":"The start this webhook is for (the event's `start_at`)."}},"required":["type","event_type","event_id","inbox_id","calendar_event","scheduled_at"],"description":"An event, or one date of a recurring event, has started. Usually sent within a minute after\n`scheduled_at`. If a date is first picked up after it has already ended and more than 5\nminutes after its start (for example, an event created entirely in the past), neither its\n`calendar.event.starting` nor its `calendar.event.ending` is sent. Retries carry the same\n`event_id` and an identical body.","title":"CalendarEventStartingEvent"},"events_CalendarEventEndingEvent":{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"event_type":{"type":"string","enum":["calendar.event.ending"]},"event_id":{"$ref":"#/components/schemas/events_EventId","description":"Stable for this date and boundary. Use it to deduplicate deliveries."},"inbox_id":{"$ref":"#/components/schemas/inboxes_InboxId"},"calendar_event":{"$ref":"#/components/schemas/calendar_CalendarEvent","description":"The event or date as it stood when the boundary was first processed."},"scheduled_at":{"type":"string","format":"date-time","description":"The end this webhook is for (the event's `end_at`)."}},"required":["type","event_type","event_id","inbox_id","calendar_event","scheduled_at"],"description":"An event, or one date of a recurring event, has ended. Usually sent within a minute after\n`scheduled_at`. Retries carry the same `event_id` and an identical body.","title":"CalendarEventEndingEvent"}},"securitySchemes":{"Bearer":{"type":"http","scheme":"bearer"}}}}