From 13f0b97a82ce692fea7d019e8c54fdd73caf1fcd Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Mon, 31 Aug 2026 23:27:59 +0000 Subject: [PATCH 1/3] [fern-generated] Update SDK Generated by Fern CLI Version: unknown Generators: - fernapi/fern-cli-generator: 0.38.10 --- .agents/skills/custom-commands/SKILL.md | 1 - .github/workflows/ci.yml | 13 +- Cargo.lock | 150 +-- Cargo.toml | 2 +- README.md | 1 - .../src/api/resources/domains/domains.rs | 44 + agentmail-types/src/types/domain.rs | 10 + .../src/types/get_setup_link_response.rs | 98 ++ agentmail-types/src/types/mod.rs | 4 +- .../src/types/verification_record.rs | 10 + cli/agentmail/main.rs | 1 - cli/agentmail/openapi0.json | 2 +- reference.md | 10 + src/openapi/commands.rs | 142 ++- src/openapi/discovery.rs | 21 + src/openapi/executor.rs | 1039 ++++++++++++++++- src/openapi/help.rs | 303 ++++- src/openapi/parser.rs | 383 ++++++ 18 files changed, 2100 insertions(+), 134 deletions(-) create mode 100644 agentmail-types/src/types/get_setup_link_response.rs diff --git a/.agents/skills/custom-commands/SKILL.md b/.agents/skills/custom-commands/SKILL.md index f6b4e61..aeada71 100644 --- a/.agents/skills/custom-commands/SKILL.md +++ b/.agents/skills/custom-commands/SKILL.md @@ -120,7 +120,6 @@ Custom commands automatically inherit the CLI's authentication. The following auth schemes are configured: - **BearerAuth** (bearer): env `AGENTMAIL_API_KEY` -- **TokenAuth** (bearer): env `AGENTMAIL_TOKEN` No manual auth wiring is needed in custom command handlers. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 00c5679..8a25fbb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -112,6 +112,9 @@ jobs: - rust-target: aarch64-apple-darwin runner: macos-latest npm-platform-suffix: darwin-arm64 + - rust-target: x86_64-pc-windows-msvc + runner: windows-latest + npm-platform-suffix: win32-x64 steps: - name: Checkout repo uses: actions/checkout@v6 @@ -254,7 +257,8 @@ jobs: OPTIONAL_DEPS="${OPTIONAL_DEPS}\"agentmail-cli-linux-x64\": \"${VERSION}\"," OPTIONAL_DEPS="${OPTIONAL_DEPS}\"agentmail-cli-linux-arm64\": \"${VERSION}\"," OPTIONAL_DEPS="${OPTIONAL_DEPS}\"agentmail-cli-darwin-x64\": \"${VERSION}\"," - OPTIONAL_DEPS="${OPTIONAL_DEPS}\"agentmail-cli-darwin-arm64\": \"${VERSION}\"" + OPTIONAL_DEPS="${OPTIONAL_DEPS}\"agentmail-cli-darwin-arm64\": \"${VERSION}\"," + OPTIONAL_DEPS="${OPTIONAL_DEPS}\"agentmail-cli-win32-x64\": \"${VERSION}\"" cat > "${PKG_DIR}/package.json" <", "repository": { "type": "git", "url": "https://github.com/agentmail-to/agentmail-cli" @@ -274,7 +279,7 @@ jobs: "optionalDependencies": { ${OPTIONAL_DEPS} }, - "files": ["bin/", "README.md"] + "files": ["bin/"] } PKGJSON @@ -292,6 +297,7 @@ jobs: "linux-arm64": "agentmail-cli-linux-arm64", "darwin-x64": "agentmail-cli-darwin-x64", "darwin-arm64": "agentmail-cli-darwin-arm64", + "win32-x64": "agentmail-cli-win32-x64", }; const platformKey = os.platform() + "-" + os.arch(); @@ -322,7 +328,6 @@ jobs: } LAUNCHER - cp README.md "${PKG_DIR}/README.md" cd "${PKG_DIR}" # Pre-release detection. ANY SemVer pre-release (a "-" after the # version core) must get a non-latest dist-tag: matching only diff --git a/Cargo.lock b/Cargo.lock index dc894f9..8bf16d0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,81 +8,6 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" -[[package]] -name = "agentmail-cli" -version = "1.1.1" -dependencies = [ - "agentmail_sdk", - "anyhow", - "base64", - "bytes", - "chrono", - "clap", - "clap_complete", - "clap_mangen", - "dotenvy", - "form_urlencoded", - "futures-util", - "hmac", - "httpdate", - "jmespath", - "keyring", - "libc", - "num-bigint", - "ordered-float", - "percent-encoding", - "pin-project", - "rand 0.8.6", - "reqwest", - "reqwest-sse", - "secrecy", - "serde", - "serde_json", - "serde_json_path", - "serde_qs", - "serde_yaml", - "serial_test", - "sha2", - "tempfile", - "thiserror 2.0.18", - "tokio", - "tokio-tungstenite", - "tokio-util", - "tracing", - "tracing-appender", - "tracing-subscriber", - "unicode-normalization", - "webbrowser", - "wiremock", -] - -[[package]] -name = "agentmail_sdk" -version = "0.1.0" -dependencies = [ - "agentmail_types", - "bytes", - "chrono", - "futures", - "reqwest", - "serde", - "serde_json", - "thiserror 1.0.69", - "tokio", -] - -[[package]] -name = "agentmail_types" -version = "0.0.0" -dependencies = [ - "base64", - "chrono", - "num-bigint", - "ordered-float", - "serde", - "serde_json", -] - [[package]] name = "aho-corasick" version = "1.1.4" @@ -567,6 +492,54 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" +[[package]] +name = "agentmail-cli" +version = "1.2.0" +dependencies = [ + "agentmail_sdk", + "anyhow", + "base64", + "bytes", + "chrono", + "clap_complete", + "clap_mangen", + "clap", + "dotenvy", + "form_urlencoded", + "futures-util", + "hmac", + "httpdate", + "jmespath", + "keyring", + "libc", + "num-bigint", + "ordered-float", + "percent-encoding", + "pin-project", + "rand 0.8.6", + "reqwest-sse", + "reqwest", + "secrecy", + "serde_json_path", + "serde_json", + "serde_qs", + "serde_yaml", + "serde", + "serial_test", + "sha2", + "tempfile", + "thiserror 2.0.18", + "tokio-tungstenite", + "tokio-util", + "tokio", + "tracing-appender", + "tracing-subscriber", + "tracing", + "unicode-normalization", + "webbrowser", + "wiremock", +] + [[package]] name = "find-msvc-tools" version = "0.1.9" @@ -3291,3 +3264,30 @@ name = "zmij" version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" + +[[package]] +name = "agentmail_types" +version = "0.0.0" +dependencies = [ + "base64", + "chrono", + "num-bigint", + "ordered-float", + "serde", + "serde_json", +] + +[[package]] +name = "agentmail_sdk" +version = "0.1.0" +dependencies = [ + "agentmail_types", + "bytes", + "chrono", + "futures", + "reqwest", + "serde", + "serde_json", + "thiserror 1.0.69", + "tokio", +] diff --git a/Cargo.toml b/Cargo.toml index b98b0ac..21f241d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "agentmail-cli" -version = "1.1.1" +version = "1.2.0" edition = "2021" description = "Command-line interface for the AgentMail API. Send, receive, reply, and manage threaded email conversations from your terminal." license = "MIT" diff --git a/README.md b/README.md index c91097d..1efa620 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,6 @@ Set the following environment variable(s) before using the CLI: ```bash export AGENTMAIL_API_KEY="" -export AGENTMAIL_TOKEN="" ``` A `.env` file in the working directory is also supported — the CLI auto-loads it on startup. diff --git a/agentmail-sdk/src/api/resources/domains/domains.rs b/agentmail-sdk/src/api/resources/domains/domains.rs index 37532bc..d35c3da 100644 --- a/agentmail-sdk/src/api/resources/domains/domains.rs +++ b/agentmail-sdk/src/api/resources/domains/domains.rs @@ -363,4 +363,48 @@ impl DomainsClient { ) .await } + + /// 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. + /// + /// # Arguments + /// + /// * `options` - Additional request options such as headers, timeout, etc. + /// + /// # Returns + /// + /// JSON response from the API + /// + /// # Examples + /// + /// ```no_run + /// use agentmail_sdk::prelude::*; + /// + /// #[tokio::main] + /// async fn main() { + /// let config = ClientConfig { + /// token: Some("".to_string()), + /// ..Default::default() + /// }; + /// let client = AgentmailClient::new(config).expect("Failed to build client"); + /// client + /// .domains + /// .get_setup_link(&DomainID("domain_id".to_string()), None) + /// .await; + /// } + /// ``` + pub async fn get_setup_link( + &self, + domain_id: &DomainId, + options: Option, + ) -> Result { + self.http_client + .execute_request( + Method::GET, + &format!("v0/domains/{}/setup-link", domain_id.0), + None, + None, + options, + ) + .await + } } diff --git a/agentmail-types/src/types/domain.rs b/agentmail-types/src/types/domain.rs index 426a589..7124edd 100644 --- a/agentmail-types/src/types/domain.rs +++ b/agentmail-types/src/types/domain.rs @@ -11,6 +11,9 @@ pub struct Domain { #[serde(default)] pub domain: DomainName, pub status: Status, + /// 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), and `ses_not_verified_for_sending`. Absent when VERIFIED. + #[serde(skip_serializing_if = "Option::is_none")] + pub reason: Option, #[serde(default)] pub feedback_enabled: FeedbackEnabled, #[serde(default)] @@ -46,6 +49,7 @@ pub struct DomainBuilder { domain_id: Option, domain: Option, status: Option, + reason: Option, feedback_enabled: Option, subdomains_enabled: Option, tracking_enabled: Option, @@ -76,6 +80,11 @@ impl DomainBuilder { self } + pub fn reason(mut self, value: impl Into) -> Self { + self.reason = Some(value.into()); + self + } + pub fn feedback_enabled(mut self, value: FeedbackEnabled) -> Self { self.feedback_enabled = Some(value); self @@ -128,6 +137,7 @@ impl DomainBuilder { domain_id: self.domain_id.ok_or_else(|| BuildError::missing_field("domain_id"))?, domain: self.domain.ok_or_else(|| BuildError::missing_field("domain"))?, status: self.status.ok_or_else(|| BuildError::missing_field("status"))?, + reason: self.reason, feedback_enabled: self.feedback_enabled.ok_or_else(|| BuildError::missing_field("feedback_enabled"))?, subdomains_enabled: self.subdomains_enabled.ok_or_else(|| BuildError::missing_field("subdomains_enabled"))?, tracking_enabled: self.tracking_enabled.ok_or_else(|| BuildError::missing_field("tracking_enabled"))?, diff --git a/agentmail-types/src/types/get_setup_link_response.rs b/agentmail-types/src/types/get_setup_link_response.rs new file mode 100644 index 0000000..a6285b1 --- /dev/null +++ b/agentmail-types/src/types/get_setup_link_response.rs @@ -0,0 +1,98 @@ +pub use crate::prelude::*; +#[allow(unused_imports)] +use super::*; + +#[derive(Debug, Clone, Serialize, Deserialize, Default, PartialEq, Eq, Hash)] +pub struct GetSetupLinkResponse { + /// 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. + #[serde(default)] + pub supported: bool, + /// Display name of the domain's DNS provider, for the setup button label. + #[serde(skip_serializing_if = "Option::is_none")] + pub provider_name: Option, + /// 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. + #[serde(skip_serializing_if = "Option::is_none")] + pub url: Option, + /// Suggested popup width from the provider, in pixels. + #[serde(skip_serializing_if = "Option::is_none")] + pub width: Option, + /// Suggested popup height from the provider, in pixels. + #[serde(skip_serializing_if = "Option::is_none")] + pub height: Option, + /// 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. + #[serde(skip_serializing_if = "Option::is_none")] + pub state: Option, + /// 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. + #[serde(skip_serializing_if = "Option::is_none")] + pub conflicting_provider: Option, +} + +impl GetSetupLinkResponse { + pub fn builder() -> GetSetupLinkResponseBuilder { + ::default() + } +} + +#[derive(Clone, PartialEq, Default, Debug)] +#[non_exhaustive] +pub struct GetSetupLinkResponseBuilder { + supported: Option, + provider_name: Option, + url: Option, + width: Option, + height: Option, + state: Option, + conflicting_provider: Option, +} + +impl GetSetupLinkResponseBuilder { + pub fn supported(mut self, value: bool) -> Self { + self.supported = Some(value); + self + } + + pub fn provider_name(mut self, value: impl Into) -> Self { + self.provider_name = Some(value.into()); + self + } + + pub fn url(mut self, value: impl Into) -> Self { + self.url = Some(value.into()); + self + } + + pub fn width(mut self, value: i64) -> Self { + self.width = Some(value); + self + } + + pub fn height(mut self, value: i64) -> Self { + self.height = Some(value); + self + } + + pub fn state(mut self, value: impl Into) -> Self { + self.state = Some(value.into()); + self + } + + pub fn conflicting_provider(mut self, value: impl Into) -> Self { + self.conflicting_provider = Some(value.into()); + self + } + + /// Consumes the builder and constructs a [`GetSetupLinkResponse`]. + /// This method will fail if any of the following fields are not set: + /// - [`supported`](GetSetupLinkResponseBuilder::supported) + pub fn build(self) -> Result { + Ok(GetSetupLinkResponse { + supported: self.supported.ok_or_else(|| BuildError::missing_field("supported"))?, + provider_name: self.provider_name, + url: self.url, + width: self.width, + height: self.height, + state: self.state, + conflicting_provider: self.conflicting_provider, + }) + } +} diff --git a/agentmail-types/src/types/mod.rs b/agentmail-types/src/types/mod.rs index 683a899..28c6928 100644 --- a/agentmail-types/src/types/mod.rs +++ b/agentmail-types/src/types/mod.rs @@ -5,7 +5,7 @@ //! //! ## Type Categories //! -//! - **Request/Response Types**: 97 types for API operations +//! - **Request/Response Types**: 98 types for API operations //! - **Model Types**: 245 types for data representation pub mod limit; @@ -138,6 +138,7 @@ pub mod client_id; pub mod domain; pub mod domain_item; pub mod list_domains_response; +pub mod get_setup_link_response; pub mod create_domain_request; pub mod update_domain_request; pub mod draft_id; @@ -481,6 +482,7 @@ pub use client_id::ClientId; pub use domain::Domain; pub use domain_item::DomainItem; pub use list_domains_response::ListDomainsResponse; +pub use get_setup_link_response::GetSetupLinkResponse; pub use create_domain_request::CreateDomainRequest; pub use update_domain_request::UpdateDomainRequest; pub use draft_id::DraftId; diff --git a/agentmail-types/src/types/verification_record.rs b/agentmail-types/src/types/verification_record.rs index cfe0197..807ca4e 100644 --- a/agentmail-types/src/types/verification_record.rs +++ b/agentmail-types/src/types/verification_record.rs @@ -17,6 +17,9 @@ pub struct VerificationRecord { /// The priority of the MX record. #[serde(skip_serializing_if = "Option::is_none")] pub priority: Option, + /// 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. + #[serde(skip_serializing_if = "Option::is_none")] + pub reason: Option, } impl VerificationRecord { @@ -33,6 +36,7 @@ pub struct VerificationRecordBuilder { value: Option, status: Option, priority: Option, + reason: Option, } impl VerificationRecordBuilder { @@ -61,6 +65,11 @@ impl VerificationRecordBuilder { self } + pub fn reason(mut self, value: impl Into) -> Self { + self.reason = Some(value.into()); + self + } + /// Consumes the builder and constructs a [`VerificationRecord`]. /// This method will fail if any of the following fields are not set: /// - [`r#type`](VerificationRecordBuilder::r#type) @@ -74,6 +83,7 @@ impl VerificationRecordBuilder { value: self.value.ok_or_else(|| BuildError::missing_field("value"))?, status: self.status.ok_or_else(|| BuildError::missing_field("status"))?, priority: self.priority, + reason: self.reason, }) } } diff --git a/cli/agentmail/main.rs b/cli/agentmail/main.rs index e05184b..d8dcaed 100644 --- a/cli/agentmail/main.rs +++ b/cli/agentmail/main.rs @@ -11,7 +11,6 @@ use fern_cli_sdk::auth::{BearerAuth}; fn main() { let app = CliApp::new("agentmail") .auth(BearerAuth::new("BearerAuth").env("AGENTMAIL_API_KEY")) - .auth(BearerAuth::new("TokenAuth").env("AGENTMAIL_TOKEN")) .binding( OpenApiBinding::new() .spec(include_str!("openapi0.json")) diff --git a/cli/agentmail/openapi0.json b/cli/agentmail/openapi0.json index 300a893..7485436 100644 --- a/cli/agentmail/openapi0.json +++ b/cli/agentmail/openapi0.json @@ -1 +1 @@ -{"openapi":"3.0.1","info":{"title":"AgentMail","version":""},"paths":{"/v0/inboxes":{"get":{"description":"**CLI:**\n```bash\nagentmail inboxes list\n```","operationId":"inboxes_list","tags":["Inboxes"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxesListInboxesResponse"}}}}},"summary":"List Inboxes","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["inboxes"],"x-fern-sdk-method-name":"list"},"post":{"description":"**CLI:**\n```bash\nagentmail inboxes create --display-name \"My Agent\" --username myagent --domain agentmail.to\n```","operationId":"inboxes_create","tags":["Inboxes"],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxesInbox"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"422":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Create Inbox","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxesCreateInboxRequest","nullable":true}}}},"x-fern-sdk-group-name":["inboxes"],"x-fern-sdk-method-name":"create"}},"/v0/inboxes/{inbox_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail inboxes get --inbox-id \n```","operationId":"inboxes_get","tags":["Inboxes"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxesInbox"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Inbox","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["inboxes"],"x-fern-sdk-method-name":"get"},"patch":{"description":"**CLI:**\n```bash\nagentmail inboxes update --inbox-id --display-name \"Updated Name\"\n```","operationId":"inboxes_update","tags":["Inboxes"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxesInbox"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Update Inbox","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"description":"Expects an object; provide at least one of `display_name` or `metadata`.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxesUpdateInboxRequest"}}}},"x-fern-sdk-group-name":["inboxes"],"x-fern-sdk-method-name":"update"},"delete":{"description":"**CLI:**\n```bash\nagentmail inboxes delete --inbox-id \n```","operationId":"inboxes_delete","tags":["Inboxes"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete Inbox","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["inboxes"],"x-fern-sdk-method-name":"delete"}},"/v0/pods":{"get":{"description":"**CLI:**\n```bash\nagentmail pods list\n```","operationId":"pods_list","tags":["Pods"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/podsListPodsResponse"}}}}},"summary":"List Pods","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["pods"],"x-fern-sdk-method-name":"list"},"post":{"description":"**CLI:**\n```bash\nagentmail pods create --client-id my-pod\n```","operationId":"pods_create","tags":["Pods"],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/podsPod"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Create Pod","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/podsCreatePodRequest"}}}},"x-fern-sdk-group-name":["pods"],"x-fern-sdk-method-name":"create"}},"/v0/pods/{pod_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail pods get --pod-id \n```","operationId":"pods_get","tags":["Pods"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/podsPod"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Pod","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["pods"],"x-fern-sdk-method-name":"get"},"delete":{"description":"**CLI:**\n```bash\nagentmail pods delete --pod-id \n```","operationId":"pods_delete","tags":["Pods"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete Pod","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["pods"],"x-fern-sdk-method-name":"delete"}},"/v0/webhooks":{"get":{"description":"**CLI:**\n```bash\nagentmail webhooks list\n```","operationId":"webhooks_list","tags":["Webhooks"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksListWebhooksResponse"}}}}},"summary":"List Webhooks","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["webhooks"],"x-fern-sdk-method-name":"list"},"post":{"description":"**CLI:**\n```bash\nagentmail webhooks create --url https://example.com/webhook --event-types message.received\n```","operationId":"webhooks_create","tags":["Webhooks"],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksWebhook"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Create Webhook","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksCreateWebhookRequest"}}}},"x-fern-sdk-group-name":["webhooks"],"x-fern-sdk-method-name":"create"}},"/v0/webhooks/{webhook_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail webhooks get --webhook-id \n```","operationId":"webhooks_get","tags":["Webhooks"],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooksWebhookId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksWebhook"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Webhook","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["webhooks"],"x-fern-sdk-method-name":"get"},"patch":{"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 --add-inbox-ids \n```","operationId":"webhooks_update","tags":["Webhooks"],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooksWebhookId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksWebhook"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Update Webhook","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksUpdateWebhookRequest"}}}},"x-fern-sdk-group-name":["webhooks"],"x-fern-sdk-method-name":"update"},"delete":{"description":"**CLI:**\n```bash\nagentmail webhooks delete --webhook-id \n```","operationId":"webhooks_delete","tags":["Webhooks"],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooksWebhookId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete Webhook","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["webhooks"],"x-fern-sdk-method-name":"delete"}},"/v0/webhooks/{webhook_id}/headers":{"get":{"description":"List the names of custom HTTP headers included with deliveries to this webhook. Header values are\nwrite-only and are never returned.","operationId":"webhooks_getHeaders","tags":["Webhooks"],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooksWebhookId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksWebhookHeaderNamesResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Webhook Headers","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["webhooks"],"x-fern-sdk-method-name":"get-headers"},"patch":{"description":"Atomically set, replace, or remove custom HTTP headers included with deliveries to this webhook.\nHeader values remain write-only.","operationId":"webhooks_updateHeaders","tags":["Webhooks"],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooksWebhookId"}}],"responses":{"204":{"description":""},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Update Webhook Headers","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksUpdateWebhookHeadersRequest"}}}},"x-fern-sdk-group-name":["webhooks"],"x-fern-sdk-method-name":"update-headers"}},"/v0/agent/sign-up":{"post":{"description":"Create a new agent organization with an inbox and API key. This endpoint is for signing up for the first time. If you've already signed up, you're all set — just use your existing API key.\n\nA 6-digit OTP is sent to the human's email for verification.\n\nThis endpoint is idempotent. Calling it again with the same `human_email` will rotate the API key and resend the OTP if expired.\n\nThe returned API key has limited permissions until the organization is verified via the verify endpoint.\n\n**CLI:**\n```bash\nagentmail agent sign-up --human-email user@example.com --username my-agent\n```","operationId":"agent_signUp","tags":["Agent"],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSignupResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Sign Up","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSignupRequest"}}}},"x-fern-sdk-group-name":["agent"],"x-fern-sdk-method-name":"sign-up"}},"/v0/agent/verify":{"post":{"description":"Verify an agent organization using the 6-digit OTP sent to the human's email during sign-up.\n\nOn success, the organization is upgraded from `agent_unverified` to `agent_verified`, the send allowlist is removed, and free plan entitlements are applied.\n\nThe OTP expires after 24 hours and allows a maximum of 10 attempts. If you run into any difficulties receiving the OTP code, you can also create an account on [console.agentmail.to](https://console.agentmail.to) using the human email address you provided to verify your account.\n\n**CLI:**\n```bash\nagentmail agent verify --otp-code 123456\n```","operationId":"agent_verify","tags":["Agent"],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentVerifyResponse"}}}}},"summary":"Verify","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentVerifyRequest"}}}},"x-fern-sdk-group-name":["agent"],"x-fern-sdk-method-name":"verify"}},"/v0/api-keys":{"get":{"description":"**CLI:**\n```bash\nagentmail api-keys list\n```","operationId":"apiKeys_list","tags":["ApiKeys"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListApiKeysResponse"}}}}},"summary":"List API Keys","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["apiKeys"],"x-fern-sdk-method-name":"list"},"post":{"description":"**CLI:**\n```bash\nagentmail api-keys create --name \"My Key\"\n```","operationId":"apiKeys_create","tags":["ApiKeys"],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Create API Key","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}}},"x-fern-sdk-group-name":["apiKeys"],"x-fern-sdk-method-name":"create"}},"/v0/api-keys/{api_key_id}":{"delete":{"description":"**CLI:**\n```bash\nagentmail api-keys delete --api-key-id \n```","operationId":"apiKeys_delete","tags":["ApiKeys"],"parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ApiKeyId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete API Key","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["apiKeys"],"x-fern-sdk-method-name":"delete"}},"/v0/api-keys/public-keys":{"get":{"description":"List only public-key credentials visible to the bearer caller's scope.\nBearer credentials are never returned, even though both credential types\nshare storage and pagination indexes. Requires `api_key_read`.","operationId":"apiKeys_listPublicKeys","tags":["ApiKeys"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListPublicKeysResponse"}}}}},"summary":"List Public-Key Credentials","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["apiKeys"],"x-fern-sdk-method-name":"list-public-keys"},"post":{"description":"Register a public P-256 JWK using an existing AgentMail bearer API key\nwith `api_key_create`. Re-registering the same JWK creates a new\ncredential ID; it does not replace or recover an earlier credential.\nThe private key must never be sent to AgentMail.","operationId":"apiKeys_createPublicKey","tags":["ApiKeys"],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicKeyCredential"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Register Public-Key Credential","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePublicKeyRequest"}}}},"x-fern-sdk-group-name":["apiKeys"],"x-fern-sdk-method-name":"create-public-key"}},"/v0/api-keys/public-keys/{api_key_id}":{"patch":{"description":"Rename the credential. All security-relevant fields are immutable.\nRequires `api_key_update`.","operationId":"apiKeys_updatePublicKeyName","tags":["ApiKeys"],"parameters":[{"name":"api_key_id","in":"path","description":"Public-key credential ID returned by registration.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicKeyCredential"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Rename Public-Key Credential","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePublicKeyNameRequest"}}}},"x-fern-sdk-group-name":["apiKeys"],"x-fern-sdk-method-name":"update-public-key-name"},"delete":{"description":"Permanently revoke one public-key credential. This hard-deletes the\ncredential; repeating the request returns not found. Requires\n`api_key_delete`.","operationId":"apiKeys_revokePublicKey","tags":["ApiKeys"],"parameters":[{"name":"api_key_id","in":"path","description":"Public-key credential ID returned by registration.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Revoke Public-Key Credential","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["apiKeys"],"x-fern-sdk-method-name":"revoke-public-key"}},"/v0/api-keys/public-keys/agentid-sign-in/revoke-all":{"post":{"description":"Invalidate every current public-key credential in the caller's\norganization by advancing its AgentID key generation. The caller must be\norganization-scoped and either have `api_key_delete` or, for a verified\nself-serve agent organization, use an unrestricted unmanaged bearer\ncredential. No request body is accepted.\n\n`Idempotency-Key` is required and must be a UUID. Reusing the same UUID\nreturns the original permanent receipt without advancing the generation\nagain. A new UUID performs a new generation advance.","operationId":"apiKeys_revokeAllAgentIdSignInKeys","tags":["ApiKeys"],"parameters":[{"name":"Idempotency-Key","in":"header","description":"Required UUID identifying this revoke-all operation permanently.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeAllAgentIdSignInKeysResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Revoke All AgentID Sign-In Keys","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["apiKeys"],"x-fern-sdk-method-name":"revoke-all-agent-id-sign-in-keys"}},"/v0/api-keys/browser-credentials":{"get":{"description":"List active browser credentials visible to the caller's scope. Requires `api_key_read`.","operationId":"apiKeys_listBrowserCredentials","tags":["ApiKeys"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/BrowserAuthorizationListLimit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListBrowserCredentialsResponse"}}}}},"summary":"List Browser Credentials","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["apiKeys"],"x-fern-sdk-method-name":"list-browser-credentials"}},"/v0/api-keys/browser-credentials/events":{"get":{"description":"List owner-facing browser credential and consent lifecycle events. Requires `api_key_read`.","operationId":"apiKeys_listBrowserCredentialEvents","tags":["ApiKeys"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/BrowserAuthorizationListLimit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListBrowserLifecycleEventsResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List Browser Credential Events","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["apiKeys"],"x-fern-sdk-method-name":"list-browser-credential-events"}},"/v0/api-keys/browser-credentials/{credential_id}":{"delete":{"description":"Permanently revoke one active browser credential. Requires `api_key_delete`.","operationId":"apiKeys_deleteBrowserCredential","tags":["ApiKeys"],"parameters":[{"name":"credential_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete Browser Credential","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["apiKeys"],"x-fern-sdk-method-name":"delete-browser-credential"}},"/v0/api-keys/browser-credentials/enrollments/{enrollment_id}":{"delete":{"description":"Cancel one pending, unexpired browser enrollment intent. Requires `api_key_delete`.","operationId":"apiKeys_cancelBrowserEnrollment","tags":["ApiKeys"],"parameters":[{"name":"enrollment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Cancel Browser Enrollment","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["apiKeys"],"x-fern-sdk-method-name":"cancel-browser-enrollment"}},"/v0/api-keys/browser-consents":{"get":{"description":"List remembered AgentID client approvals for one live inbox. Requires `api_key_read`.","operationId":"apiKeys_listBrowserConsents","tags":["ApiKeys"],"parameters":[{"name":"inbox_id","in":"query","required":true,"schema":{"type":"string","format":"email","maxLength":254}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/BrowserAuthorizationListLimit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListBrowserConsentsResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List Browser Consents","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["apiKeys"],"x-fern-sdk-method-name":"list-browser-consents"}},"/v0/api-keys/browser-consents/{consent_id}":{"delete":{"description":"Revoke one remembered AgentID client approval. Requires `api_key_delete`.","operationId":"apiKeys_deleteBrowserConsent","tags":["ApiKeys"],"parameters":[{"name":"consent_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete Browser Consent","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["apiKeys"],"x-fern-sdk-method-name":"delete-browser-consent"}},"/v0/auth/me":{"get":{"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```","operationId":"auth_me","tags":["Auth"],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Identity"}}}}},"summary":"Who Am I","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["auth"],"x-fern-sdk-method-name":"me"}},"/v0/domains":{"get":{"description":"**CLI:**\n```bash\nagentmail domains list\n```","operationId":"domains_list","tags":["Domains"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDomainsResponse"}}}}},"summary":"List Domains","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["domains"],"x-fern-sdk-method-name":"list"},"post":{"description":"**CLI:**\n```bash\nagentmail domains create --domain example.com\n```","operationId":"domains_create","tags":["Domains"],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Create Domain","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDomainRequest"}}}},"x-fern-sdk-group-name":["domains"],"x-fern-sdk-method-name":"create"}},"/v0/domains/{domain_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail domains get --domain-id \n```","operationId":"domains_get","tags":["Domains"],"parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DomainId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Domain","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["domains"],"x-fern-sdk-method-name":"get"},"patch":{"description":"**CLI:**\n```bash\nagentmail domains update --domain-id \n```","operationId":"domains_update","tags":["Domains"],"parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DomainId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Update Domain","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDomainRequest"}}}},"x-fern-sdk-group-name":["domains"],"x-fern-sdk-method-name":"update"},"delete":{"description":"**CLI:**\n```bash\nagentmail domains delete --domain-id \n```","operationId":"domains_delete","tags":["Domains"],"parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DomainId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete Domain","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["domains"],"x-fern-sdk-method-name":"delete"}},"/v0/domains/{domain_id}/zone-file":{"get":{"description":"**CLI:**\n```bash\nagentmail domains get-zone-file --domain-id \n```","operationId":"domains_getZoneFile","tags":["Domains"],"parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DomainId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Zone File","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["domains"],"x-fern-sdk-method-name":"get-zone-file"}},"/v0/domains/{domain_id}/verify":{"post":{"description":"**CLI:**\n```bash\nagentmail domains verify --domain-id \n```","operationId":"domains_verify","tags":["Domains"],"parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DomainId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Verify Domain","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["domains"],"x-fern-sdk-method-name":"verify"}},"/v0/drafts":{"get":{"description":"**CLI:**\n```bash\nagentmail drafts list\n```","operationId":"drafts_list","tags":["Drafts"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"labels","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Labels","nullable":true}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Before","nullable":true}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/After","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDraftsResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List Drafts","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["drafts"],"x-fern-sdk-method-name":"list"}},"/v0/drafts/{draft_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail drafts get --draft-id \n```","operationId":"drafts_get","tags":["Drafts"],"parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DraftId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Draft","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["drafts"],"x-fern-sdk-method-name":"get"}},"/v0/drafts/{draft_id}/attachments/{attachment_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail drafts get-attachment --draft-id --attachment-id \n```","operationId":"drafts_getAttachment","tags":["Drafts"],"parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DraftId"}},{"name":"attachment_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/AttachmentId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Attachment","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["drafts"],"x-fern-sdk-method-name":"get-attachment"}},"/v0/inboxes/{inbox_id}/api-keys":{"get":{"description":"**CLI:**\n```bash\nagentmail inboxes api-keys list --inbox-id \n```","operationId":"inboxes_apiKeys_list","tags":["InboxesApiKeys"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListApiKeysResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List API Keys","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["inboxes","apiKeys"],"x-fern-sdk-method-name":"list"},"post":{"description":"**CLI:**\n```bash\nagentmail inboxes api-keys create --inbox-id --name \"My Key\"\n```","operationId":"inboxes_apiKeys_create","tags":["InboxesApiKeys"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Create API Key","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}}},"x-fern-sdk-group-name":["inboxes","apiKeys"],"x-fern-sdk-method-name":"create"}},"/v0/inboxes/{inbox_id}/api-keys/{api_key_id}":{"delete":{"description":"**CLI:**\n```bash\nagentmail inboxes api-keys delete --inbox-id --api-key-id \n```","operationId":"inboxes_apiKeys_delete","tags":["InboxesApiKeys"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"api_key_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ApiKeyId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete API Key","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["inboxes","apiKeys"],"x-fern-sdk-method-name":"delete"}},"/v0/inboxes/{inbox_id}/browser-credentials/enrollments":{"post":{"description":"Attach a browser enrollment intent to the inbox. Requires\n`api_key_create`. Before submitting `transaction_jti`, independently\nverify that the browser page's final origin is exactly\n`https://auth.agentid.com`.\n\nThis endpoint is available to every organization using US production.\nIt is not available in EU production.\n\nSelect `inbox_id` from trusted AgentMail configuration. An AgentID\n`login_hint` is not authoritative for selecting the inbox; when the\ntransaction includes one, it must match the path inbox.\n\n**AgentMail API keys are sent only to `https://api.agentmail.to`; AgentID never requests them.**\n\nA new intent returns `202`; an idempotent retry for the same pending\ntransaction, inbox, and bearer key returns `200` with the same receipt.\nAn intent lasts at most five minutes. An activated credential lasts at\nmost 30 days and cannot outlive its authorizing bearer API key.\n\nCreation is limited to 20 intents per bearer API key per hour, 100 per\norganization per hour, and five live unused intents per bearer API key.\nBrowser activation is separately limited to 20 activations per\nauthorizing bearer API key per UTC day. Either kind of limit can return\n`429`; honor the `Retry-After` header. Cancelling an enrollment releases\nits live-intent slot but does not reset the daily activation counter.","operationId":"inboxes_browserCredentials_createEnrollment","tags":["InboxesBrowserCredentials"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}}],"responses":{"202":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserEnrollmentAccepted"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Create Browser Enrollment","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBrowserEnrollmentRequest"}}}},"x-fern-sdk-group-name":["inboxes","browserCredentials"],"x-fern-sdk-method-name":"create-enrollment"}},"/v0/inboxes/{inbox_id}/drafts":{"get":{"description":"**CLI:**\n```bash\nagentmail inboxes drafts list --inbox-id \n```","operationId":"inboxes_drafts_list","tags":["InboxesDrafts"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"labels","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Labels","nullable":true}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Before","nullable":true}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/After","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDraftsResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List Drafts","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["inboxes","drafts"],"x-fern-sdk-method-name":"list"},"post":{"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 --to recipient@example.com --subject \"Draft subject\" --text \"Draft body\"\n```","operationId":"inboxes_drafts_create","tags":["InboxesDrafts"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Create Draft","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDraftRequest"}}}},"x-fern-sdk-group-name":["inboxes","drafts"],"x-fern-sdk-method-name":"create"}},"/v0/inboxes/{inbox_id}/drafts/{draft_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail inboxes drafts get --inbox-id --draft-id \n```","operationId":"inboxes_drafts_get","tags":["InboxesDrafts"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DraftId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Draft","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["inboxes","drafts"],"x-fern-sdk-method-name":"get"},"patch":{"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 --draft-id --subject \"Updated subject\"\n```","operationId":"inboxes_drafts_update","tags":["InboxesDrafts"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DraftId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Update Draft","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDraftRequest"}}}},"x-fern-sdk-group-name":["inboxes","drafts"],"x-fern-sdk-method-name":"update"},"delete":{"description":"**CLI:**\n```bash\nagentmail inboxes drafts delete --inbox-id --draft-id \n```","operationId":"inboxes_drafts_delete","tags":["InboxesDrafts"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DraftId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete Draft","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["inboxes","drafts"],"x-fern-sdk-method-name":"delete"}},"/v0/inboxes/{inbox_id}/drafts/{draft_id}/attachments/{attachment_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail inboxes drafts get-attachment --inbox-id --draft-id --attachment-id \n```","operationId":"inboxes_drafts_getAttachment","tags":["InboxesDrafts"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DraftId"}},{"name":"attachment_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/AttachmentId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Attachment","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["inboxes","drafts"],"x-fern-sdk-method-name":"get-attachment"}},"/v0/inboxes/{inbox_id}/drafts/{draft_id}/send":{"post":{"description":"**CLI:**\n```bash\nagentmail inboxes drafts send --inbox-id --draft-id \n```","operationId":"inboxes_drafts_send","tags":["InboxesDrafts"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DraftId"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key that makes a send idempotent. A retry carrying the same key returns the original message instead of sending a second email; reusing a key with a different request returns a 409 conflict. Keys expire 24 hours after the send completes.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Send Draft","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMessageRequest"}}}},"x-fern-idempotent":true,"x-fern-sdk-group-name":["inboxes","drafts"],"x-fern-sdk-method-name":"send"}},"/v0/inboxes/{inbox_id}/events":{"get":{"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 \n```","operationId":"inboxes_events_list","tags":["InboxesEvents"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListInboxEventsResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List Inbox Events","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["inboxes","events"],"x-fern-sdk-method-name":"list"}},"/v0/inboxes/{inbox_id}/lists/{direction}/{type}":{"get":{"description":"**CLI:**\n```bash\nagentmail inboxes lists list --inbox-id --direction --type \n```","operationId":"inboxes_lists_list","tags":["InboxesLists"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ListType"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PodListListEntriesResponse"}}}}},"summary":"List Entries","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["inboxes","lists"],"x-fern-sdk-method-name":"list"},"post":{"description":"**CLI:**\n```bash\nagentmail inboxes lists create --inbox-id --direction --type --entry user@example.com\n```","operationId":"inboxes_lists_create","tags":["InboxesLists"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ListType"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PodListEntry"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Create List Entry","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateListEntryRequest"}}}},"x-fern-sdk-group-name":["inboxes","lists"],"x-fern-sdk-method-name":"create"}},"/v0/inboxes/{inbox_id}/lists/{direction}/{type}/{entry}":{"get":{"description":"**CLI:**\n```bash\nagentmail inboxes lists get --inbox-id --direction --type --entry \n```","operationId":"inboxes_lists_get","tags":["InboxesLists"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ListType"}},{"name":"entry","in":"path","description":"Email address or domain.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PodListEntry"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get List Entry","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["inboxes","lists"],"x-fern-sdk-method-name":"get"},"delete":{"description":"**CLI:**\n```bash\nagentmail inboxes lists delete --inbox-id --direction --type --entry \n```","operationId":"inboxes_lists_delete","tags":["InboxesLists"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ListType"}},{"name":"entry","in":"path","description":"Email address or domain.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete List Entry","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["inboxes","lists"],"x-fern-sdk-method-name":"delete"}},"/v0/inboxes/{inbox_id}/messages":{"get":{"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 \n```","operationId":"inboxes_messages_list","tags":["InboxesMessages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"labels","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Labels","nullable":true}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Before","nullable":true}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/After","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}},{"name":"include_spam","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeSpam","nullable":true}},{"name":"include_blocked","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeBlocked","nullable":true}},{"name":"include_unauthenticated","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeUnauthenticated","nullable":true}},{"name":"include_trash","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeTrash","nullable":true}},{"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"},"nullable":true}},{"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"},"nullable":true}},{"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"},"nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMessagesResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List Messages","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["inboxes","messages"],"x-fern-sdk-method-name":"list"}},"/v0/inboxes/{inbox_id}/messages/search":{"get":{"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.","operationId":"inboxes_messages_search","tags":["InboxesMessages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"q","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Query"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Before","nullable":true}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/After","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchMessagesResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Search Messages","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["inboxes","messages"],"x-fern-sdk-method-name":"search"}},"/v0/inboxes/{inbox_id}/messages/{message_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail inboxes messages get --inbox-id --message-id \n```","operationId":"inboxes_messages_get","tags":["InboxesMessages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/MessageId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Message","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["inboxes","messages"],"x-fern-sdk-method-name":"get"},"patch":{"description":"**CLI:**\n```bash\nagentmail inboxes messages update --inbox-id --message-id --add-labels read --remove-labels unread\n```","operationId":"inboxes_messages_update","tags":["InboxesMessages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/MessageId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMessageResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Update Message","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMessageRequest"}}}},"x-fern-sdk-group-name":["inboxes","messages"],"x-fern-sdk-method-name":"update"},"delete":{"description":"Permanently deletes a message.\n\n**CLI:**\n```bash\nagentmail inboxes messages delete --inbox-id --message-id \n```","operationId":"inboxes_messages_delete","tags":["InboxesMessages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/MessageId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete Message","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["inboxes","messages"],"x-fern-sdk-method-name":"delete"}},"/v0/inboxes/{inbox_id}/messages/batch-get":{"post":{"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 --message-ids --message-ids \n```","operationId":"inboxes_messages_batchGet","tags":["InboxesMessages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchGetMessagesResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Batch Get Messages","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchGetMessagesRequest"}}}},"x-fern-sdk-group-name":["inboxes","messages"],"x-fern-sdk-method-name":"batch-get"}},"/v0/inboxes/{inbox_id}/messages/batch-update":{"post":{"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 --message-ids --message-ids --add-labels read --remove-labels unread\n```","operationId":"inboxes_messages_batchUpdate","tags":["InboxesMessages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchUpdateMessagesResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Batch Update Messages","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchUpdateMessagesRequest"}}}},"x-fern-sdk-group-name":["inboxes","messages"],"x-fern-sdk-method-name":"batch-update"}},"/v0/inboxes/{inbox_id}/messages/{message_id}/attachments/{attachment_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail inboxes messages get-attachment --inbox-id --message-id --attachment-id \n```","operationId":"inboxes_messages_getAttachment","tags":["InboxesMessages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/MessageId"}},{"name":"attachment_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/AttachmentId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Attachment","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["inboxes","messages"],"x-fern-sdk-method-name":"get-attachment"}},"/v0/inboxes/{inbox_id}/messages/{message_id}/raw":{"get":{"description":"**CLI:**\n```bash\nagentmail inboxes messages get-raw --inbox-id --message-id \n```","operationId":"inboxes_messages_getRaw","tags":["InboxesMessages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/MessageId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RawMessageResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Raw Message","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["inboxes","messages"],"x-fern-sdk-method-name":"get-raw"}},"/v0/inboxes/{inbox_id}/messages/send":{"post":{"description":"**CLI:**\n```bash\nagentmail inboxes messages send --inbox-id --to recipient@example.com --subject \"Hello\" --text \"Body\"\n```","operationId":"inboxes_messages_send","tags":["InboxesMessages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key that makes a send idempotent. A retry carrying the same key returns the original message instead of sending a second email; reusing a key with a different request returns a 409 conflict. Keys expire 24 hours after the send completes.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Send Message","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageRequest"}}}},"x-fern-idempotent":true,"x-fern-sdk-group-name":["inboxes","messages"],"x-fern-sdk-method-name":"send"}},"/v0/inboxes/{inbox_id}/messages/{message_id}/reply":{"post":{"description":"**CLI:**\n```bash\nagentmail inboxes messages reply --inbox-id --message-id --text \"Reply text\"\n```","operationId":"inboxes_messages_reply","tags":["InboxesMessages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/MessageId"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key that makes a send idempotent. A retry carrying the same key returns the original message instead of sending a second email; reusing a key with a different request returns a 409 conflict. Keys expire 24 hours after the send completes.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Reply To Message","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyToMessageRequest"}}}},"x-fern-idempotent":true,"x-fern-sdk-group-name":["inboxes","messages"],"x-fern-sdk-method-name":"reply"}},"/v0/inboxes/{inbox_id}/messages/{message_id}/reply-all":{"post":{"description":"**CLI:**\n```bash\nagentmail inboxes messages reply-all --inbox-id --message-id --text \"Reply text\"\n```","operationId":"inboxes_messages_reply-all","tags":["InboxesMessages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/MessageId"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key that makes a send idempotent. A retry carrying the same key returns the original message instead of sending a second email; reusing a key with a different request returns a 409 conflict. Keys expire 24 hours after the send completes.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Reply All Message","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyAllMessageRequest"}}}},"x-fern-idempotent":true,"x-fern-sdk-group-name":["inboxes","messages"],"x-fern-sdk-method-name":"reply-all"}},"/v0/inboxes/{inbox_id}/messages/{message_id}/forward":{"post":{"description":"**CLI:**\n```bash\nagentmail inboxes messages forward --inbox-id --message-id --to recipient@example.com\n```","operationId":"inboxes_messages_forward","tags":["InboxesMessages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/MessageId"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key that makes a send idempotent. A retry carrying the same key returns the original message instead of sending a second email; reusing a key with a different request returns a 409 conflict. Keys expire 24 hours after the send completes.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Forward Message","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageRequest"}}}},"x-fern-idempotent":true,"x-fern-sdk-group-name":["inboxes","messages"],"x-fern-sdk-method-name":"forward"}},"/v0/inboxes/{inbox_id}/metrics/events":{"get":{"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 \n```","operationId":"inboxes_metrics_queryEvents","tags":["InboxesMetrics"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"event_types","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MetricEventTypes","nullable":true}},{"name":"start","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Start","nullable":true}},{"name":"end","in":"query","required":false,"schema":{"$ref":"#/components/schemas/End","nullable":true}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Period","nullable":true}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MetricLimit","nullable":true}},{"name":"descending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Descending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryMetricsResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Query Events","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["inboxes","metrics"],"x-fern-sdk-method-name":"query-events"}},"/v0/inboxes/{inbox_id}/metrics/usage":{"get":{"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.","operationId":"inboxes_metrics_queryUsage","tags":["InboxesMetrics"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"usage_types","in":"query","required":false,"schema":{"$ref":"#/components/schemas/UsageTypes","nullable":true}},{"name":"start","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Start","nullable":true}},{"name":"end","in":"query","required":false,"schema":{"$ref":"#/components/schemas/End","nullable":true}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Period","nullable":true}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MetricLimit","nullable":true}},{"name":"descending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Descending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryUsageResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Query Usage","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["inboxes","metrics"],"x-fern-sdk-method-name":"query-usage"}},"/v0/inboxes/{inbox_id}/threads":{"get":{"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 \n```","operationId":"inboxes_threads_list","tags":["InboxesThreads"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"labels","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Labels","nullable":true}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Before","nullable":true}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/After","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}},{"name":"include_spam","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeSpam","nullable":true}},{"name":"include_blocked","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeBlocked","nullable":true}},{"name":"include_unauthenticated","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeUnauthenticated","nullable":true}},{"name":"include_trash","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeTrash","nullable":true}},{"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"},"nullable":true}},{"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"},"nullable":true}},{"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"},"nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListThreadsResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List Threads","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["inboxes","threads"],"x-fern-sdk-method-name":"list"}},"/v0/inboxes/{inbox_id}/threads/search":{"get":{"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.","operationId":"inboxes_threads_search","tags":["InboxesThreads"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"q","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Query"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Before","nullable":true}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/After","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchThreadsResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Search Threads","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["inboxes","threads"],"x-fern-sdk-method-name":"search"}},"/v0/inboxes/{inbox_id}/threads/{thread_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail inboxes threads get --inbox-id --thread-id \n```","operationId":"inboxes_threads_get","tags":["InboxesThreads"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ThreadId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Thread"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Thread","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["inboxes","threads"],"x-fern-sdk-method-name":"get"},"patch":{"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.","operationId":"inboxes_threads_update","tags":["InboxesThreads"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ThreadId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateThreadResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Update Thread","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateThreadRequest"}}}},"x-fern-sdk-group-name":["inboxes","threads"],"x-fern-sdk-method-name":"update"},"delete":{"description":"Permanently deletes a thread and all of its messages.\n\n**CLI:**\n```bash\nagentmail inboxes threads delete --inbox-id --thread-id \n```","operationId":"inboxes_threads_delete","tags":["InboxesThreads"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ThreadId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete Thread","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["inboxes","threads"],"x-fern-sdk-method-name":"delete"}},"/v0/inboxes/{inbox_id}/threads/{thread_id}/attachments/{attachment_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail inboxes threads get-attachment --inbox-id --thread-id --attachment-id \n```","operationId":"inboxes_threads_getAttachment","tags":["InboxesThreads"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ThreadId"}},{"name":"attachment_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/AttachmentId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Attachment","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["inboxes","threads"],"x-fern-sdk-method-name":"get-attachment"}},"/v0/inboxes/{inbox_id}/webhooks":{"get":{"description":"**CLI:**\n```bash\nagentmail inboxes webhooks list --inbox-id \n```","operationId":"inboxes_webhooks_list","tags":["InboxesWebhooks"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksListWebhooksResponse"}}}}},"summary":"List Webhooks","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["inboxes","webhooks"],"x-fern-sdk-method-name":"list"},"post":{"description":"Create a webhook scoped to this inbox.\n\n**CLI:**\n```bash\nagentmail inboxes webhooks create --inbox-id --url https://example.com/webhook --event-types message.received\n```","operationId":"inboxes_webhooks_create","tags":["InboxesWebhooks"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksWebhook"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Create Webhook","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksCreateInboxWebhookRequest"}}}},"x-fern-sdk-group-name":["inboxes","webhooks"],"x-fern-sdk-method-name":"create"}},"/v0/inboxes/{inbox_id}/webhooks/{webhook_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail inboxes webhooks get --inbox-id --webhook-id \n```","operationId":"inboxes_webhooks_get","tags":["InboxesWebhooks"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooksWebhookId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksWebhook"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Webhook","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["inboxes","webhooks"],"x-fern-sdk-method-name":"get"},"patch":{"description":"**CLI:**\n```bash\nagentmail inboxes webhooks update --inbox-id --webhook-id --event-types message.received\n```","operationId":"inboxes_webhooks_update","tags":["InboxesWebhooks"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooksWebhookId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksWebhook"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Update Webhook","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksUpdateInboxWebhookRequest"}}}},"x-fern-sdk-group-name":["inboxes","webhooks"],"x-fern-sdk-method-name":"update"},"delete":{"description":"**CLI:**\n```bash\nagentmail inboxes webhooks delete --inbox-id --webhook-id \n```","operationId":"inboxes_webhooks_delete","tags":["InboxesWebhooks"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooksWebhookId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete Webhook","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["inboxes","webhooks"],"x-fern-sdk-method-name":"delete"}},"/v0/inboxes/{inbox_id}/webhooks/{webhook_id}/headers":{"get":{"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.","operationId":"inboxes_webhooks_getHeaders","tags":["InboxesWebhooks"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooksWebhookId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksWebhookHeaderNamesResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Webhook Headers","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["inboxes","webhooks"],"x-fern-sdk-method-name":"get-headers"},"patch":{"description":"Atomically set, replace, or remove custom HTTP headers included with deliveries to this\ninbox-scoped webhook. Header values remain write-only.","operationId":"inboxes_webhooks_updateHeaders","tags":["InboxesWebhooks"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooksWebhookId"}}],"responses":{"204":{"description":""},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Update Webhook Headers","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksUpdateWebhookHeadersRequest"}}}},"x-fern-sdk-group-name":["inboxes","webhooks"],"x-fern-sdk-method-name":"update-headers"}},"/v0/lists/{direction}/{type}":{"get":{"description":"**CLI:**\n```bash\nagentmail lists list --direction --type \n```","operationId":"lists_list","tags":["Lists"],"parameters":[{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ListType"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListListEntriesResponse"}}}}},"summary":"List Entries","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["lists"],"x-fern-sdk-method-name":"list"},"post":{"description":"**CLI:**\n```bash\nagentmail lists create --direction --type --entry user@example.com\n```","operationId":"lists_create","tags":["Lists"],"parameters":[{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ListType"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEntry"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Create List Entry","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateListEntryRequest"}}}},"x-fern-sdk-group-name":["lists"],"x-fern-sdk-method-name":"create"}},"/v0/lists/{direction}/{type}/{entry}":{"get":{"description":"**CLI:**\n```bash\nagentmail lists get --direction --type --entry \n```","operationId":"lists_get","tags":["Lists"],"parameters":[{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ListType"}},{"name":"entry","in":"path","description":"Email address or domain.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEntry"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get List Entry","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["lists"],"x-fern-sdk-method-name":"get"},"delete":{"description":"**CLI:**\n```bash\nagentmail lists delete --direction --type --entry \n```","operationId":"lists_delete","tags":["Lists"],"parameters":[{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ListType"}},{"name":"entry","in":"path","description":"Email address or domain.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete List Entry","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["lists"],"x-fern-sdk-method-name":"delete"}},"/v0/metrics/events":{"get":{"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```","operationId":"metrics_queryEvents","tags":["Metrics"],"parameters":[{"name":"event_types","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MetricEventTypes","nullable":true}},{"name":"start","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Start","nullable":true}},{"name":"end","in":"query","required":false,"schema":{"$ref":"#/components/schemas/End","nullable":true}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Period","nullable":true}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MetricLimit","nullable":true}},{"name":"descending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Descending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryMetricsResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Query Events","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["metrics"],"x-fern-sdk-method-name":"query-events"}},"/v0/metrics/usage":{"get":{"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.","operationId":"metrics_queryUsage","tags":["Metrics"],"parameters":[{"name":"usage_types","in":"query","required":false,"schema":{"$ref":"#/components/schemas/UsageTypes","nullable":true}},{"name":"start","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Start","nullable":true}},{"name":"end","in":"query","required":false,"schema":{"$ref":"#/components/schemas/End","nullable":true}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Period","nullable":true}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MetricLimit","nullable":true}},{"name":"descending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Descending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryUsageResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Query Usage","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["metrics"],"x-fern-sdk-method-name":"query-usage"}},"/v0/organizations":{"get":{"description":"Returns the organization for the authenticated API key (usage limits, counts, and billing metadata).\n\n**CLI:**\n```bash\nagentmail organizations get\n```","operationId":"organizations_get","tags":["Organizations"],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}}},"summary":"Get Organization","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["organizations"],"x-fern-sdk-method-name":"get"}},"/v0/pods/{pod_id}/api-keys":{"get":{"description":"**CLI:**\n```bash\nagentmail pods api-keys list --pod-id \n```","operationId":"pods_apiKeys_list","tags":["PodsApiKeys"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListApiKeysResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List API Keys","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["pods","apiKeys"],"x-fern-sdk-method-name":"list"},"post":{"description":"**CLI:**\n```bash\nagentmail pods api-keys create --pod-id --name \"My Key\"\n```","operationId":"pods_apiKeys_create","tags":["PodsApiKeys"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Create API Key","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}}},"x-fern-sdk-group-name":["pods","apiKeys"],"x-fern-sdk-method-name":"create"}},"/v0/pods/{pod_id}/api-keys/{api_key_id}":{"delete":{"description":"**CLI:**\n```bash\nagentmail pods api-keys delete --pod-id --api-key-id \n```","operationId":"pods_apiKeys_delete","tags":["PodsApiKeys"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"api_key_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ApiKeyId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete API Key","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["pods","apiKeys"],"x-fern-sdk-method-name":"delete"}},"/v0/pods/{pod_id}/domains":{"get":{"description":"**CLI:**\n```bash\nagentmail pods domains list --pod-id \n```","operationId":"pods_domains_list","tags":["PodsDomains"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDomainsResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List Domains","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["pods","domains"],"x-fern-sdk-method-name":"list"},"post":{"description":"**CLI:**\n```bash\nagentmail pods domains create --pod-id --domain example.com\n```","operationId":"pods_domains_create","tags":["PodsDomains"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Create Domain","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDomainRequest"}}}},"x-fern-sdk-group-name":["pods","domains"],"x-fern-sdk-method-name":"create"}},"/v0/pods/{pod_id}/domains/{domain_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail pods domains get --pod-id --domain-id \n```","operationId":"pods_domains_get","tags":["PodsDomains"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DomainId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Domain","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["pods","domains"],"x-fern-sdk-method-name":"get"},"patch":{"description":"**CLI:**\n```bash\nagentmail pods domains update --pod-id --domain-id \n```","operationId":"pods_domains_update","tags":["PodsDomains"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DomainId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Update Domain","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDomainRequest"}}}},"x-fern-sdk-group-name":["pods","domains"],"x-fern-sdk-method-name":"update"},"delete":{"description":"**CLI:**\n```bash\nagentmail pods domains delete --pod-id --domain-id \n```","operationId":"pods_domains_delete","tags":["PodsDomains"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DomainId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete Domain","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["pods","domains"],"x-fern-sdk-method-name":"delete"}},"/v0/pods/{pod_id}/domains/{domain_id}/zone-file":{"get":{"description":"**CLI:**\n```bash\nagentmail pods domains get-zone-file --pod-id --domain-id \n```","operationId":"pods_domains_getZoneFile","tags":["PodsDomains"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DomainId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Zone File","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["pods","domains"],"x-fern-sdk-method-name":"get-zone-file"}},"/v0/pods/{pod_id}/domains/{domain_id}/verify":{"post":{"description":"**CLI:**\n```bash\nagentmail pods domains verify --pod-id --domain-id \n```","operationId":"pods_domains_verify","tags":["PodsDomains"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DomainId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Verify Domain","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["pods","domains"],"x-fern-sdk-method-name":"verify"}},"/v0/pods/{pod_id}/drafts":{"get":{"description":"**CLI:**\n```bash\nagentmail pods drafts list --pod-id \n```","operationId":"pods_drafts_list","tags":["PodsDrafts"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"labels","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Labels","nullable":true}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Before","nullable":true}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/After","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDraftsResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List Drafts","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["pods","drafts"],"x-fern-sdk-method-name":"list"}},"/v0/pods/{pod_id}/drafts/{draft_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail pods drafts get --pod-id --draft-id \n```","operationId":"pods_drafts_get","tags":["PodsDrafts"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DraftId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Draft","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["pods","drafts"],"x-fern-sdk-method-name":"get"}},"/v0/pods/{pod_id}/drafts/{draft_id}/attachments/{attachment_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail pods drafts get-attachment --pod-id --draft-id --attachment-id \n```","operationId":"pods_drafts_getAttachment","tags":["PodsDrafts"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DraftId"}},{"name":"attachment_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/AttachmentId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Attachment","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["pods","drafts"],"x-fern-sdk-method-name":"get-attachment"}},"/v0/pods/{pod_id}/inboxes":{"get":{"description":"**CLI:**\n```bash\nagentmail pods inboxes list --pod-id \n```","operationId":"pods_inboxes_list","tags":["PodsInboxes"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxesListInboxesResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List Inboxes","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["pods","inboxes"],"x-fern-sdk-method-name":"list"},"post":{"description":"**CLI:**\n```bash\nagentmail pods inboxes create --pod-id --username myagent --domain example.com\n```","operationId":"pods_inboxes_create","tags":["PodsInboxes"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxesInbox"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"422":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Create Inbox","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxesCreateInboxRequest"}}}},"x-fern-sdk-group-name":["pods","inboxes"],"x-fern-sdk-method-name":"create"}},"/v0/pods/{pod_id}/inboxes/{inbox_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail pods inboxes get --pod-id --inbox-id \n```","operationId":"pods_inboxes_get","tags":["PodsInboxes"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxesInbox"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Inbox","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["pods","inboxes"],"x-fern-sdk-method-name":"get"},"patch":{"description":"**CLI:**\n```bash\nagentmail pods inboxes update --pod-id --inbox-id \n```","operationId":"pods_inboxes_update","tags":["PodsInboxes"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxesInbox"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Update Inbox","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxesUpdateInboxRequest"}}}},"x-fern-sdk-group-name":["pods","inboxes"],"x-fern-sdk-method-name":"update"},"delete":{"description":"**CLI:**\n```bash\nagentmail pods inboxes delete --pod-id --inbox-id \n```","operationId":"pods_inboxes_delete","tags":["PodsInboxes"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete Inbox","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["pods","inboxes"],"x-fern-sdk-method-name":"delete"}},"/v0/pods/{pod_id}/lists/{direction}/{type}":{"get":{"description":"**CLI:**\n```bash\nagentmail pods lists list --pod-id --direction --type \n```","operationId":"pods_lists_list","tags":["PodsLists"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ListType"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PodListListEntriesResponse"}}}}},"summary":"List Entries","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["pods","lists"],"x-fern-sdk-method-name":"list"},"post":{"description":"**CLI:**\n```bash\nagentmail pods lists create --pod-id --direction --type --entry user@example.com\n```","operationId":"pods_lists_create","tags":["PodsLists"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ListType"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PodListEntry"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Create List Entry","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateListEntryRequest"}}}},"x-fern-sdk-group-name":["pods","lists"],"x-fern-sdk-method-name":"create"}},"/v0/pods/{pod_id}/lists/{direction}/{type}/{entry}":{"get":{"description":"**CLI:**\n```bash\nagentmail pods lists get --pod-id --direction --type --entry \n```","operationId":"pods_lists_get","tags":["PodsLists"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ListType"}},{"name":"entry","in":"path","description":"Email address or domain.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PodListEntry"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get List Entry","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["pods","lists"],"x-fern-sdk-method-name":"get"},"delete":{"description":"**CLI:**\n```bash\nagentmail pods lists delete --pod-id --direction --type --entry \n```","operationId":"pods_lists_delete","tags":["PodsLists"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ListType"}},{"name":"entry","in":"path","description":"Email address or domain.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete List Entry","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["pods","lists"],"x-fern-sdk-method-name":"delete"}},"/v0/pods/{pod_id}/metrics/events":{"get":{"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 \n```","operationId":"pods_metrics_queryEvents","tags":["PodsMetrics"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"event_types","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MetricEventTypes","nullable":true}},{"name":"start","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Start","nullable":true}},{"name":"end","in":"query","required":false,"schema":{"$ref":"#/components/schemas/End","nullable":true}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Period","nullable":true}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MetricLimit","nullable":true}},{"name":"descending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Descending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryMetricsResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Query Events","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["pods","metrics"],"x-fern-sdk-method-name":"query-events"}},"/v0/pods/{pod_id}/metrics/usage":{"get":{"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.","operationId":"pods_metrics_queryUsage","tags":["PodsMetrics"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"usage_types","in":"query","required":false,"schema":{"$ref":"#/components/schemas/UsageTypes","nullable":true}},{"name":"start","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Start","nullable":true}},{"name":"end","in":"query","required":false,"schema":{"$ref":"#/components/schemas/End","nullable":true}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Period","nullable":true}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MetricLimit","nullable":true}},{"name":"descending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Descending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryUsageResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Query Usage","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["pods","metrics"],"x-fern-sdk-method-name":"query-usage"}},"/v0/pods/{pod_id}/threads":{"get":{"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 \n```","operationId":"pods_threads_list","tags":["PodsThreads"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"labels","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Labels","nullable":true}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Before","nullable":true}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/After","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}},{"name":"include_spam","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeSpam","nullable":true}},{"name":"include_blocked","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeBlocked","nullable":true}},{"name":"include_unauthenticated","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeUnauthenticated","nullable":true}},{"name":"include_trash","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeTrash","nullable":true}},{"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"},"nullable":true}},{"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"},"nullable":true}},{"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"},"nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListThreadsResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List Threads","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["pods","threads"],"x-fern-sdk-method-name":"list"}},"/v0/pods/{pod_id}/threads/search":{"get":{"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.","operationId":"pods_threads_search","tags":["PodsThreads"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"q","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Query"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Before","nullable":true}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/After","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchThreadsResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Search Threads","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["pods","threads"],"x-fern-sdk-method-name":"search"}},"/v0/pods/{pod_id}/threads/{thread_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail pods threads get --pod-id --thread-id \n```","operationId":"pods_threads_get","tags":["PodsThreads"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ThreadId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Thread"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Thread","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["pods","threads"],"x-fern-sdk-method-name":"get"},"patch":{"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.","operationId":"pods_threads_update","tags":["PodsThreads"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ThreadId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateThreadResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Update Thread","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateThreadRequest"}}}},"x-fern-sdk-group-name":["pods","threads"],"x-fern-sdk-method-name":"update"},"delete":{"description":"Permanently deletes a thread and all of its messages.\n\n**CLI:**\n```bash\nagentmail pods threads delete --pod-id --thread-id \n```","operationId":"pods_threads_delete","tags":["PodsThreads"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ThreadId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete Thread","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["pods","threads"],"x-fern-sdk-method-name":"delete"}},"/v0/pods/{pod_id}/threads/{thread_id}/attachments/{attachment_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail pods threads get-attachment --pod-id --thread-id --attachment-id \n```","operationId":"pods_threads_getAttachment","tags":["PodsThreads"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ThreadId"}},{"name":"attachment_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/AttachmentId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Attachment","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["pods","threads"],"x-fern-sdk-method-name":"get-attachment"}},"/v0/pods/{pod_id}/webhooks":{"get":{"description":"**CLI:**\n```bash\nagentmail pods webhooks list --pod-id \n```","operationId":"pods_webhooks_list","tags":["PodsWebhooks"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksListWebhooksResponse"}}}}},"summary":"List Webhooks","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["pods","webhooks"],"x-fern-sdk-method-name":"list"},"post":{"description":"Create a webhook scoped to this pod.\n\n**CLI:**\n```bash\nagentmail pods webhooks create --pod-id --url https://example.com/webhook --event-types message.received\n```","operationId":"pods_webhooks_create","tags":["PodsWebhooks"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksWebhook"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Create Webhook","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksCreatePodWebhookRequest"}}}},"x-fern-sdk-group-name":["pods","webhooks"],"x-fern-sdk-method-name":"create"}},"/v0/pods/{pod_id}/webhooks/{webhook_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail pods webhooks get --pod-id --webhook-id \n```","operationId":"pods_webhooks_get","tags":["PodsWebhooks"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooksWebhookId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksWebhook"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Webhook","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["pods","webhooks"],"x-fern-sdk-method-name":"get"},"patch":{"description":"**CLI:**\n```bash\nagentmail pods webhooks update --pod-id --webhook-id --add-inbox-ids \n```","operationId":"pods_webhooks_update","tags":["PodsWebhooks"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooksWebhookId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksWebhook"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Update Webhook","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksUpdatePodWebhookRequest"}}}},"x-fern-sdk-group-name":["pods","webhooks"],"x-fern-sdk-method-name":"update"},"delete":{"description":"**CLI:**\n```bash\nagentmail pods webhooks delete --pod-id --webhook-id \n```","operationId":"pods_webhooks_delete","tags":["PodsWebhooks"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooksWebhookId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete Webhook","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["pods","webhooks"],"x-fern-sdk-method-name":"delete"}},"/v0/pods/{pod_id}/webhooks/{webhook_id}/headers":{"get":{"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.","operationId":"pods_webhooks_getHeaders","tags":["PodsWebhooks"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooksWebhookId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksWebhookHeaderNamesResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Webhook Headers","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["pods","webhooks"],"x-fern-sdk-method-name":"get-headers"},"patch":{"description":"Atomically set, replace, or remove custom HTTP headers included with deliveries to this\npod-scoped webhook. Header values remain write-only.","operationId":"pods_webhooks_updateHeaders","tags":["PodsWebhooks"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooksWebhookId"}}],"responses":{"204":{"description":""},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Update Webhook Headers","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksUpdateWebhookHeadersRequest"}}}},"x-fern-sdk-group-name":["pods","webhooks"],"x-fern-sdk-method-name":"update-headers"}},"/v0/threads":{"get":{"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```","operationId":"threads_list","tags":["Threads"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"labels","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Labels","nullable":true}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Before","nullable":true}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/After","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}},{"name":"include_spam","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeSpam","nullable":true}},{"name":"include_blocked","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeBlocked","nullable":true}},{"name":"include_unauthenticated","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeUnauthenticated","nullable":true}},{"name":"include_trash","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeTrash","nullable":true}},{"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"},"nullable":true}},{"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"},"nullable":true}},{"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"},"nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListThreadsResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List Threads","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["threads"],"x-fern-sdk-method-name":"list"}},"/v0/threads/search":{"get":{"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.","operationId":"threads_search","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","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Before","nullable":true}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/After","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchThreadsResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Search Threads","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["threads"],"x-fern-sdk-method-name":"search"}},"/v0/threads/{thread_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail threads get --thread-id \n```","operationId":"threads_get","tags":["Threads"],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ThreadId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Thread"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Thread","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["threads"],"x-fern-sdk-method-name":"get"},"patch":{"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.","operationId":"threads_update","tags":["Threads"],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ThreadId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateThreadResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Update Thread","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateThreadRequest"}}}},"x-fern-sdk-group-name":["threads"],"x-fern-sdk-method-name":"update"},"delete":{"description":"Permanently deletes a thread and all of its messages.\n\n**CLI:**\n```bash\nagentmail threads delete --thread-id \n```","operationId":"threads_delete","tags":["Threads"],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ThreadId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete Thread","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["threads"],"x-fern-sdk-method-name":"delete"}},"/v0/threads/{thread_id}/attachments/{attachment_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail threads get-attachment --thread-id --attachment-id \n```","operationId":"threads_getAttachment","tags":["Threads"],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ThreadId"}},{"name":"attachment_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/AttachmentId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Attachment","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]},{"TokenAuth":[]}],"x-fern-sdk-group-name":["threads"],"x-fern-sdk-method-name":"get-attachment"}}},"components":{"schemas":{"Limit":{"title":"Limit","type":"integer","description":"Limit of number of items returned."},"Count":{"title":"Count","type":"integer","description":"Number of items returned."},"PageToken":{"title":"PageToken","type":"string","description":"Page token for pagination."},"Labels":{"title":"Labels","type":"array","items":{"type":"string"},"description":"Labels to filter by."},"Before":{"title":"Before","type":"string","format":"date-time","description":"Timestamp before which to filter by."},"After":{"title":"After","type":"string","format":"date-time","description":"Timestamp after which to filter by."},"Ascending":{"title":"Ascending","type":"boolean","description":"Sort in ascending temporal order."},"IncludeSpam":{"title":"IncludeSpam","type":"boolean","description":"Include spam in results."},"IncludeBlocked":{"title":"IncludeBlocked","type":"boolean","description":"Include blocked in results."},"IncludeUnauthenticated":{"title":"IncludeUnauthenticated","type":"boolean","description":"Include unauthenticated in results."},"IncludeTrash":{"title":"IncludeTrash","type":"boolean","description":"Include trash in results."},"OrganizationId":{"title":"OrganizationId","type":"string","description":"ID of organization."},"Query":{"title":"Query","type":"string","description":"Full-text search query. Matched against the sender, recipients, and\nsubject (substring) and the message body (tokenized full text)."},"ErrorName":{"title":"ErrorName","type":"string","description":"Name of error."},"ErrorMessage":{"title":"ErrorMessage","type":"string","description":"Error message."},"ErrorCode":{"title":"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."},"ErrorFix":{"title":"ErrorFix","type":"string","description":"The concrete next action that resolves the error."},"ErrorDocs":{"title":"ErrorDocs","type":"string","description":"Link to the error reference entry for this code."},"ErrorResponse":{"title":"ErrorResponse","type":"object","properties":{"name":{"$ref":"#/components/schemas/ErrorName"},"code":{"$ref":"#/components/schemas/ErrorCode","nullable":true},"message":{"$ref":"#/components/schemas/ErrorMessage"},"fix":{"$ref":"#/components/schemas/ErrorFix","nullable":true},"docs":{"$ref":"#/components/schemas/ErrorDocs","nullable":true}},"required":["name","message"]},"ValidationErrorResponse":{"title":"ValidationErrorResponse","type":"object","properties":{"name":{"$ref":"#/components/schemas/ErrorName"},"code":{"$ref":"#/components/schemas/ErrorCode","nullable":true},"message":{"$ref":"#/components/schemas/ErrorMessage","nullable":true},"errors":{"description":"Validation errors. Each entry has a path and a message identifying the invalid field."},"fix":{"$ref":"#/components/schemas/ErrorFix","nullable":true},"docs":{"$ref":"#/components/schemas/ErrorDocs","nullable":true}},"required":["name","errors"]},"inboxesInboxId":{"title":"inboxesInboxId","type":"string","description":"The ID of the inbox."},"inboxesEmail":{"title":"inboxesEmail","type":"string","description":"Email address of the inbox."},"inboxesDisplayName":{"title":"inboxesDisplayName","type":"string","description":"Display name: `Display Name `."},"inboxesClientId":{"title":"inboxesClientId","type":"string","description":"Client ID of inbox."},"inboxesMetadataValue":{"title":"inboxesMetadataValue","oneOf":[{"type":"string"},{"type":"number","format":"double"},{"type":"boolean"}],"description":"A metadata value. May be a string, number, or boolean."},"inboxesMetadata":{"title":"inboxesMetadata","type":"object","additionalProperties":{"$ref":"#/components/schemas/inboxesMetadataValue"},"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."},"inboxesUpdateMetadata":{"title":"inboxesUpdateMetadata","type":"object","additionalProperties":{"$ref":"#/components/schemas/inboxesMetadataValue","nullable":true},"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."},"inboxesInbox":{"title":"inboxesInbox","type":"object","properties":{"pod_id":{"$ref":"#/components/schemas/podsPodId"},"inbox_id":{"$ref":"#/components/schemas/inboxesInboxId"},"email":{"$ref":"#/components/schemas/inboxesEmail"},"display_name":{"$ref":"#/components/schemas/inboxesDisplayName","nullable":true},"client_id":{"$ref":"#/components/schemas/inboxesClientId","nullable":true},"metadata":{"$ref":"#/components/schemas/inboxesMetadata","nullable":true,"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"]},"inboxesListInboxesResponse":{"title":"inboxesListInboxesResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit","nullable":true},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"inboxes":{"type":"array","items":{"$ref":"#/components/schemas/inboxesInbox"},"description":"Ordered by `created_at` descending."}},"required":["count","inboxes"]},"inboxesCreateInboxRequest":{"title":"inboxesCreateInboxRequest","type":"object","properties":{"username":{"type":"string","nullable":true,"description":"Username of address. Randomly generated if not specified."},"domain":{"type":"string","nullable":true,"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/inboxesDisplayName","nullable":true},"client_id":{"$ref":"#/components/schemas/inboxesClientId","nullable":true},"metadata":{"$ref":"#/components/schemas/inboxesMetadata","nullable":true,"description":"Custom metadata to attach to the inbox."}}},"inboxesUpdateInboxRequest":{"title":"inboxesUpdateInboxRequest","type":"object","properties":{"display_name":{"$ref":"#/components/schemas/inboxesDisplayName","nullable":true},"metadata":{"$ref":"#/components/schemas/inboxesUpdateMetadata","nullable":true,"description":"Metadata to merge into the inbox's existing metadata. Keys you include\nare added or overwritten; keys you omit are left unchanged. To remove a\nsingle key, send it with a null value. To clear all metadata, send\n`metadata` as null. Sending an empty object is rejected; use null to\nclear. Each update must include at least one of `display_name` or\n`metadata`."}}},"podsPodId":{"title":"podsPodId","type":"string","description":"ID of pod."},"podsName":{"title":"podsName","type":"string","description":"Name of pod."},"podsClientId":{"title":"podsClientId","type":"string","description":"Client ID of pod."},"podsPod":{"title":"podsPod","type":"object","properties":{"pod_id":{"$ref":"#/components/schemas/podsPodId"},"name":{"$ref":"#/components/schemas/podsName"},"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/podsClientId","nullable":true}},"required":["pod_id","name","updated_at","created_at"]},"podsListPodsResponse":{"title":"podsListPodsResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit","nullable":true},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"pods":{"type":"array","items":{"$ref":"#/components/schemas/podsPod"},"description":"Ordered by `created_at` descending."}},"required":["count","pods"]},"podsCreatePodRequest":{"title":"podsCreatePodRequest","type":"object","properties":{"name":{"$ref":"#/components/schemas/podsName","nullable":true},"client_id":{"$ref":"#/components/schemas/podsClientId","nullable":true}}},"webhooksWebhookId":{"title":"webhooksWebhookId","type":"string","description":"ID of webhook."},"webhooksClientId":{"title":"webhooksClientId","type":"string","description":"Client ID of webhook."},"webhooksUrl":{"title":"webhooksUrl","type":"string","description":"URL of webhook endpoint."},"webhooksWebhookHeaders":{"title":"webhooksWebhookHeaders","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."},"webhooksWebhookHeaderNamesResponse":{"title":"webhooksWebhookHeaderNamesResponse","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"]},"webhooksWebhook":{"title":"webhooksWebhook","type":"object","properties":{"webhook_id":{"$ref":"#/components/schemas/webhooksWebhookId"},"url":{"$ref":"#/components/schemas/webhooksUrl"},"event_types":{"$ref":"#/components/schemas/EventTypes","nullable":true},"pod_ids":{"$ref":"#/components/schemas/PodIds","nullable":true},"inbox_ids":{"$ref":"#/components/schemas/InboxIds","nullable":true},"secret":{"type":"string","description":"Secret for webhook signature verification."},"enabled":{"type":"boolean","description":"Webhook is enabled."},"updated_at":{"type":"string","format":"date-time","description":"Time at which webhook was last updated."},"created_at":{"type":"string","format":"date-time","description":"Time at which webhook was created."},"client_id":{"$ref":"#/components/schemas/webhooksClientId","nullable":true}},"required":["webhook_id","url","secret","enabled","updated_at","created_at"]},"webhooksListWebhooksResponse":{"title":"webhooksListWebhooksResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit","nullable":true},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"webhooks":{"type":"array","items":{"$ref":"#/components/schemas/webhooksWebhook"},"description":"Ordered by `created_at` descending."}},"required":["count","webhooks"]},"webhooksCreateWebhookEventTypes":{"title":"webhooksCreateWebhookEventTypes","$ref":"#/components/schemas/EventTypes","description":"Full list of event types this webhook should receive. At least one type is required. Send every type you\nwant in this array (not incremental). See [Webhooks overview](https://docs.agentmail.to/webhooks-overview)\nfor spam, blocked, and unauthenticated events and required permissions."},"webhooksUpdateWebhookEventTypes":{"title":"webhooksUpdateWebhookEventTypes","$ref":"#/components/schemas/EventTypes","description":"When you send a non-empty list, it replaces the webhook's subscribed event types in full (the same\n\"set the list\" behavior as create). It is not a merge or diff: include every event type you want after\nthe update. Sending a one-element array means the webhook will only receive that one type afterward.\nOmit this field or send an empty array to leave event types unchanged. Clearing all types with an empty\nlist is not supported. Subscribing to `message.received.spam`, `message.received.blocked`, or\n`message.received.unauthenticated` requires the matching label permission on the API key."},"webhooksCreateInboxWebhookRequest":{"title":"webhooksCreateInboxWebhookRequest","type":"object","description":"Create a webhook scoped to an inbox. The inbox comes from the path, so `inbox_ids` and `pod_ids`\nare not accepted.","properties":{"url":{"$ref":"#/components/schemas/webhooksUrl"},"event_types":{"$ref":"#/components/schemas/webhooksCreateWebhookEventTypes"},"client_id":{"$ref":"#/components/schemas/webhooksClientId","nullable":true},"headers":{"$ref":"#/components/schemas/webhooksWebhookHeaders","nullable":true}},"required":["url","event_types"]},"webhooksCreatePodWebhookRequest":{"title":"webhooksCreatePodWebhookRequest","type":"object","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.","properties":{"inbox_ids":{"$ref":"#/components/schemas/InboxIds","nullable":true}},"allOf":[{"$ref":"#/components/schemas/webhooksCreateInboxWebhookRequest"}]},"webhooksCreateWebhookRequest":{"title":"webhooksCreateWebhookRequest","type":"object","properties":{"pod_ids":{"$ref":"#/components/schemas/PodIds","nullable":true}},"allOf":[{"$ref":"#/components/schemas/webhooksCreatePodWebhookRequest"}]},"webhooksUpdateInboxWebhookRequest":{"title":"webhooksUpdateInboxWebhookRequest","type":"object","description":"Update an inbox-scoped webhook. It is fixed to its inbox, so only `event_types` can change.","properties":{"event_types":{"$ref":"#/components/schemas/webhooksUpdateWebhookEventTypes","nullable":true}}},"webhooksUpdatePodWebhookRequest":{"title":"webhooksUpdatePodWebhookRequest","type":"object","description":"Update a pod-scoped webhook. You can adjust which inboxes within the pod it listens to and replace\nits `event_types`, but not the pod scope itself.","properties":{"add_inbox_ids":{"$ref":"#/components/schemas/InboxIds","nullable":true,"description":"Inbox IDs to subscribe to the webhook."},"remove_inbox_ids":{"$ref":"#/components/schemas/InboxIds","nullable":true,"description":"Inbox IDs to unsubscribe from the webhook."}},"allOf":[{"$ref":"#/components/schemas/webhooksUpdateInboxWebhookRequest"}]},"webhooksUpdateWebhookRequest":{"title":"webhooksUpdateWebhookRequest","type":"object","properties":{"add_pod_ids":{"$ref":"#/components/schemas/PodIds","nullable":true,"description":"Pod IDs to subscribe to the webhook."},"remove_pod_ids":{"$ref":"#/components/schemas/PodIds","nullable":true,"description":"Pod IDs to unsubscribe from the webhook."}},"allOf":[{"$ref":"#/components/schemas/webhooksUpdatePodWebhookRequest"}]},"webhooksUpdateWebhookHeadersRequest":{"title":"webhooksUpdateWebhookHeadersRequest","type":"object","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.","properties":{"headers":{"$ref":"#/components/schemas/webhooksWebhookHeaders","nullable":true},"remove_headers":{"type":"array","items":{"type":"string"},"nullable":true,"description":"Names of custom delivery headers to remove."}}},"AgentSignupRequest":{"title":"AgentSignupRequest","type":"object","description":"Request body to sign up an agent.","properties":{"human_email":{"type":"string","description":"Email address of the human who owns the agent. A 6-digit OTP will be sent to this address."},"username":{"type":"string","description":"Username for the auto-created inbox (e.g. \"my-agent\" creates my-agent@agentmail.to)."},"source":{"type":"string","nullable":true,"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","nullable":true,"description":"The channel that drove this sign-up — where the agent or its developer discovered AgentMail\n(e.g. `agent.email`, a partner URL, a campaign tag). Answers \"where did this sign-up come from\".\nMax 2048 characters."}},"required":["human_email","username"]},"AgentSignupResponse":{"title":"AgentSignupResponse","type":"object","description":"Response after successful agent sign-up.","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"]},"AgentVerifyRequest":{"title":"AgentVerifyRequest","type":"object","description":"Request body to verify an agent with an OTP code.","properties":{"otp_code":{"type":"string","description":"6-digit verification code sent to the human's email address."}},"required":["otp_code"]},"AgentVerifyResponse":{"title":"AgentVerifyResponse","type":"object","description":"Response after successful agent verification.","properties":{"verified":{"type":"boolean","description":"Whether the organization was verified."}},"required":["verified"]},"ApiKeyId":{"title":"ApiKeyId","type":"string","description":"ID of api key."},"Prefix":{"title":"Prefix","type":"string","description":"Prefix of api key."},"Name":{"title":"Name","type":"string","description":"Name of api key."},"CreatedAt":{"title":"CreatedAt","type":"string","format":"date-time","description":"Time at which api key was created."},"PublicJwkCoordinate":{"title":"PublicJwkCoordinate","type":"string","pattern":"^[A-Za-z0-9_-]{43}$","minLength":43,"maxLength":43,"description":"A 32-byte P-256 coordinate encoded as unpadded base64url."},"PublicJwk":{"title":"PublicJwk","type":"object","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.","properties":{"kty":{"type":"string","const":"EC"},"crv":{"type":"string","const":"P-256"},"x":{"$ref":"#/components/schemas/PublicJwkCoordinate"},"y":{"$ref":"#/components/schemas/PublicJwkCoordinate"}},"required":["kty","crv","x","y"]},"OrganizationPublicKeyScope":{"title":"OrganizationPublicKeyScope","type":"object","description":"Organization-wide authority.","properties":{}},"PodPublicKeyScope":{"title":"PodPublicKeyScope","type":"object","description":"Authority over one live pod and its inboxes.","properties":{"id":{"type":"string","format":"uuid","description":"ID of the pod."}},"required":["id"]},"InboxPublicKeyScope":{"title":"InboxPublicKeyScope","type":"object","description":"Authority over one live inbox incarnation.","properties":{"id":{"type":"string","format":"email","maxLength":254,"description":"ID of the inbox."}},"required":["id"]},"PublicKeyScope":{"title":"PublicKeyScope","oneOf":[{"type":"object","allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["organization"]}}},{"$ref":"#/components/schemas/OrganizationPublicKeyScope"}],"required":["type"]},{"type":"object","allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["pod"]}}},{"$ref":"#/components/schemas/PodPublicKeyScope"}],"required":["type"]},{"type":"object","allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["inbox"]}}},{"$ref":"#/components/schemas/InboxPublicKeyScope"}],"required":["type"]}],"description":"The immutable scope in which a public-key credential can approve AgentID sign-in."},"PublicKeyMaterial":{"title":"PublicKeyMaterial","type":"object","description":"Registered public key material and its server-computed RFC 7638 thumbprint.","properties":{"jwk":{"$ref":"#/components/schemas/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"]},"PublicKeyCredential":{"title":"PublicKeyCredential","type":"object","description":"An AgentID sign-in credential. `type` and `api_key_id` are server-owned;\nuse `api_key_id` as the JWS `kid`. This response never contains a bearer\nsecret or private key.","properties":{"api_key_id":{"type":"string","format":"uuid","description":"Server-generated credential ID. Store this value as the signing key's `kid`."},"type":{"type":"string","const":"public_key","description":"Server-owned credential discriminator. Callers cannot select or update it."},"name":{"$ref":"#/components/schemas/Name","description":"Human-readable credential name."},"public_key":{"$ref":"#/components/schemas/PublicKeyMaterial"},"scope":{"$ref":"#/components/schemas/PublicKeyScope"},"expires_at":{"type":"string","format":"date-time","nullable":true,"description":"Immutable absolute expiry. Omitted when the credential does not expire."},"revoked_at":{"type":"string","format":"date-time","nullable":true,"description":"Present when organization-wide revoke-all invalidated this credential generation."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["api_key_id","type","name","public_key","scope","created_at","updated_at"]},"CreatePublicKeyRequest":{"title":"CreatePublicKeyRequest","type":"object","description":"Register only a public P-256 JWK. Credential type, `api_key_id`, sign-in\neligibility, permissions, and generation are server-owned and are not\nrequest properties.","properties":{"public_key":{"$ref":"#/components/schemas/PublicJwk"},"name":{"type":"string","minLength":1,"maxLength":256,"nullable":true,"description":"Defaults to `AgentID key {first eight fingerprint characters}`."},"scope":{"$ref":"#/components/schemas/PublicKeyScope","nullable":true,"description":"Omit to inherit the registering bearer key's exact scope. An explicit\nscope must be the caller's scope or a live descendant."},"expires_at":{"type":"string","format":"date-time","nullable":true,"description":"Future absolute expiry. Omit to inherit the registering bearer key's\nexpiry. A child credential cannot outlive its creator."}},"required":["public_key"]},"UpdatePublicKeyNameRequest":{"title":"UpdatePublicKeyNameRequest","type":"object","description":"Rename a public-key credential. Key material, ID, type, scope, sign-in\neligibility, permissions, generation, and expiry are immutable.","properties":{"name":{"type":"string","minLength":1,"maxLength":256}},"required":["name"]},"ListPublicKeysResponse":{"title":"ListPublicKeysResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"public_keys":{"type":"array","items":{"$ref":"#/components/schemas/PublicKeyCredential"},"description":"Public-key credentials only, ordered by creation time descending by default."}},"required":["count","public_keys"]},"RevokeAllAgentIdSignInKeysResponse":{"title":"RevokeAllAgentIdSignInKeysResponse","type":"object","description":"Permanent idempotency receipt for an organization-wide AgentID sign-in key revocation.","properties":{"previous_generation":{"type":"integer","minimum":0},"current_generation":{"type":"integer","minimum":1},"revoked_at":{"type":"string","format":"date-time"}},"required":["previous_generation","current_generation","revoked_at"]},"BrowserEnrollmentTransactionJti":{"title":"BrowserEnrollmentTransactionJti","type":"string","pattern":"^[A-Za-z0-9_-]{22}$","minLength":22,"maxLength":22,"description":"Transaction identifier read from an enrollment action on exactly `https://auth.agentid.com`."},"CreateBrowserEnrollmentRequest":{"title":"CreateBrowserEnrollmentRequest","type":"object","description":"Attach a browser enrollment intent to one pending AgentID authorization\ntransaction. The inbox is selected by the trusted path parameter, not an\nAgentID `login_hint`.","properties":{"transaction_jti":{"$ref":"#/components/schemas/BrowserEnrollmentTransactionJti"}},"required":["transaction_jti"]},"BrowserEnrollmentAccepted":{"title":"BrowserEnrollmentAccepted","type":"object","description":"Pending enrollment receipt. The browser completes key creation and proof\non the existing AgentID page. This response contains no URL, token, or\nnavigation instruction.","properties":{"status":{"type":"string","const":"pending"},"enrollment_id":{"type":"string","format":"uuid"},"expires_at":{"type":"integer","minimum":1,"description":"Unix timestamp after which the pending enrollment cannot be activated."}},"required":["status","enrollment_id","expires_at"]},"BrowserCredentialCreator":{"title":"BrowserCredentialCreator","type":"object","properties":{"kind":{"type":"string","const":"bearer_api_key"},"api_key_id":{"type":"string","format":"uuid","description":"Bearer API key that authorized creation of the browser credential."},"created_at":{"type":"string","format":"date-time","description":"Incarnation timestamp of the authorizing bearer API key."}},"required":["kind","api_key_id","created_at"]},"BrowserCredential":{"title":"BrowserCredential","type":"object","description":"Owner-facing metadata for an active browser credential. Private key material never leaves the browser.","properties":{"credential_id":{"type":"string","format":"uuid"},"public_key_fingerprint_prefix":{"type":"string","pattern":"^[A-Za-z0-9_-]{8}$","minLength":8,"maxLength":8},"organization_id":{"type":"string","format":"uuid"},"pod_id":{"type":"string","format":"uuid"},"inbox_id":{"type":"string","format":"email","maxLength":254},"created_by":{"$ref":"#/components/schemas/BrowserCredentialCreator"},"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"}},"required":["credential_id","public_key_fingerprint_prefix","organization_id","pod_id","inbox_id","created_by","created_at","expires_at"]},"BrowserConsent":{"title":"BrowserConsent","type":"object","description":"Remembered approval for one closed AgentID client and inbox.","properties":{"consent_id":{"type":"string","pattern":"^brc1_[A-Za-z0-9_-]{43}$","minLength":48,"maxLength":48},"inbox_id":{"type":"string","format":"email","maxLength":254},"client_type":{"type":"string","const":"closed"},"client_id":{"type":"string","minLength":1,"maxLength":2048},"client_url":{"type":"string","nullable":true,"description":"Registered client URL, when one is available."},"approved_scopes":{"type":"array","items":{"type":"string"},"description":"At least one non-empty scope approved for this client."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"}},"required":["consent_id","inbox_id","client_type","client_id","approved_scopes","created_at","updated_at","expires_at"]},"BrowserLifecycleApiKeyActor":{"title":"BrowserLifecycleApiKeyActor","type":"object","properties":{"api_key_id":{"type":"string","format":"uuid"}},"required":["api_key_id"]},"BrowserLifecycleCredentialActor":{"title":"BrowserLifecycleCredentialActor","type":"object","properties":{"credential_id":{"type":"string","format":"uuid"},"authorizing_api_key_id":{"type":"string","format":"uuid"}},"required":["credential_id","authorizing_api_key_id"]},"BrowserLifecycleActor":{"title":"BrowserLifecycleActor","oneOf":[{"type":"object","allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["api_key"]}}},{"$ref":"#/components/schemas/BrowserLifecycleApiKeyActor"}],"required":["type"]},{"type":"object","allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["browser_credential"]}}},{"$ref":"#/components/schemas/BrowserLifecycleCredentialActor"}],"required":["type"]}]},"BrowserEnrollmentLifecycleEventType":{"title":"BrowserEnrollmentLifecycleEventType","type":"string","enum":["browser_enrollment_intent_created","browser_credential_activated","browser_enrollment_cancelled","browser_credential_deleted"]},"BrowserConsentLifecycleEventType":{"title":"BrowserConsentLifecycleEventType","type":"string","enum":["browser_consent_created","browser_consent_updated","browser_consent_reused","browser_consent_revoked"]},"BrowserEnrollmentLifecycleEvent":{"title":"BrowserEnrollmentLifecycleEvent","type":"object","properties":{"type":{"$ref":"#/components/schemas/BrowserEnrollmentLifecycleEventType"},"trace_id":{"type":"string","format":"uuid"},"event_id":{"type":"string","format":"uuid"},"occurred_at":{"type":"string","format":"date-time"},"organization_id":{"type":"string","format":"uuid"},"pod_id":{"type":"string","format":"uuid"},"actor":{"$ref":"#/components/schemas/BrowserLifecycleActor"},"enrollment_id":{"type":"string","format":"uuid"},"credential_id":{"type":"string","format":"uuid"}},"required":["type","trace_id","event_id","occurred_at","organization_id","pod_id","actor","enrollment_id","credential_id"]},"BrowserConsentLifecycleEvent":{"title":"BrowserConsentLifecycleEvent","type":"object","properties":{"type":{"$ref":"#/components/schemas/BrowserConsentLifecycleEventType"},"trace_id":{"type":"string","format":"uuid"},"event_id":{"type":"string","format":"uuid"},"occurred_at":{"type":"string","format":"date-time"},"organization_id":{"type":"string","format":"uuid"},"pod_id":{"type":"string","format":"uuid"},"actor":{"$ref":"#/components/schemas/BrowserLifecycleActor"},"consent_id":{"type":"string","pattern":"^brc1_[A-Za-z0-9_-]{43}$","minLength":48,"maxLength":48},"client_type":{"type":"string","const":"closed"},"client_id":{"type":"string","minLength":1,"maxLength":2048}},"required":["type","trace_id","event_id","occurred_at","organization_id","pod_id","actor","consent_id","client_type","client_id"]},"BrowserLifecycleEvent":{"title":"BrowserLifecycleEvent","oneOf":[{"$ref":"#/components/schemas/BrowserEnrollmentLifecycleEvent"},{"$ref":"#/components/schemas/BrowserConsentLifecycleEvent"}]},"BrowserAuthorizationListLimit":{"title":"BrowserAuthorizationListLimit","type":"integer","minimum":1,"maximum":100},"ListBrowserCredentialsResponse":{"title":"ListBrowserCredentialsResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/BrowserAuthorizationListLimit"},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"credentials":{"type":"array","items":{"$ref":"#/components/schemas/BrowserCredential"}}},"required":["count","limit","credentials"]},"ListBrowserConsentsResponse":{"title":"ListBrowserConsentsResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/BrowserAuthorizationListLimit"},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"consents":{"type":"array","items":{"$ref":"#/components/schemas/BrowserConsent"}}},"required":["count","limit","consents"]},"ListBrowserLifecycleEventsResponse":{"title":"ListBrowserLifecycleEventsResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/BrowserAuthorizationListLimit"},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"events":{"type":"array","items":{"$ref":"#/components/schemas/BrowserLifecycleEvent"}}},"required":["count","limit","events"]},"ApiKeyPermissions":{"title":"ApiKeyPermissions","type":"object","description":"Granular permissions for the API key. When ommitted all permissions are granted. Otherwise, only permissions set to true are granted.","properties":{"inbox_read":{"type":"boolean","nullable":true,"description":"Read inbox details."},"inbox_create":{"type":"boolean","nullable":true,"description":"Create new inboxes."},"inbox_update":{"type":"boolean","nullable":true,"description":"Update inbox settings."},"inbox_delete":{"type":"boolean","nullable":true,"description":"Delete inboxes."},"message_read":{"type":"boolean","nullable":true,"description":"Read messages. Also required to read threads."},"message_send":{"type":"boolean","nullable":true,"description":"Send messages."},"message_update":{"type":"boolean","nullable":true,"description":"Update message labels. Also required to update threads."},"message_delete":{"type":"boolean","nullable":true,"description":"Delete messages. Also required to delete threads."},"label_spam_read":{"type":"boolean","nullable":true,"description":"Access messages labeled spam."},"label_blocked_read":{"type":"boolean","nullable":true,"description":"Access messages labeled blocked."},"label_unauthenticated_read":{"type":"boolean","nullable":true,"description":"Access messages labeled unauthenticated."},"label_trash_read":{"type":"boolean","nullable":true,"description":"Access messages labeled trash."},"draft_read":{"type":"boolean","nullable":true,"description":"Read drafts."},"draft_create":{"type":"boolean","nullable":true,"description":"Create drafts."},"draft_update":{"type":"boolean","nullable":true,"description":"Update drafts."},"draft_delete":{"type":"boolean","nullable":true,"description":"Delete drafts."},"draft_send":{"type":"boolean","nullable":true,"description":"Send drafts."},"webhook_read":{"type":"boolean","nullable":true,"description":"Read webhook configurations."},"webhook_create":{"type":"boolean","nullable":true,"description":"Create webhooks."},"webhook_update":{"type":"boolean","nullable":true,"description":"Update webhooks."},"webhook_delete":{"type":"boolean","nullable":true,"description":"Delete webhooks."},"domain_read":{"type":"boolean","nullable":true,"description":"Read domain details."},"domain_create":{"type":"boolean","nullable":true,"description":"Create domains."},"domain_update":{"type":"boolean","nullable":true,"description":"Update domains."},"domain_delete":{"type":"boolean","nullable":true,"description":"Delete domains."},"list_entry_read":{"type":"boolean","nullable":true,"description":"Read list entries."},"list_entry_create":{"type":"boolean","nullable":true,"description":"Create list entries."},"list_entry_delete":{"type":"boolean","nullable":true,"description":"Delete list entries."},"metrics_read":{"type":"boolean","nullable":true,"description":"Read metrics."},"api_key_read":{"type":"boolean","nullable":true,"description":"Read API keys."},"api_key_create":{"type":"boolean","nullable":true,"description":"Create API keys."},"api_key_update":{"type":"boolean","nullable":true,"description":"Update API keys."},"api_key_delete":{"type":"boolean","nullable":true,"description":"Delete API keys."},"pod_read":{"type":"boolean","nullable":true,"description":"Read pods."},"pod_create":{"type":"boolean","nullable":true,"description":"Create pods."},"pod_delete":{"type":"boolean","nullable":true,"description":"Delete pods."}}},"ApiKey":{"title":"ApiKey","type":"object","properties":{"api_key_id":{"$ref":"#/components/schemas/ApiKeyId"},"prefix":{"$ref":"#/components/schemas/Prefix"},"name":{"$ref":"#/components/schemas/Name"},"pod_id":{"type":"string","nullable":true,"description":"Pod ID the api key is scoped to. If set, the key can only access resources within this pod."},"inbox_id":{"type":"string","nullable":true,"description":"Inbox ID the api key is scoped to. If set, the key can only access resources within this inbox."},"used_at":{"type":"string","format":"date-time","nullable":true,"description":"Time at which api key was last used."},"permissions":{"$ref":"#/components/schemas/ApiKeyPermissions","nullable":true},"created_at":{"$ref":"#/components/schemas/CreatedAt"}},"required":["api_key_id","prefix","name","created_at"]},"CreateApiKeyResponse":{"title":"CreateApiKeyResponse","type":"object","properties":{"api_key_id":{"$ref":"#/components/schemas/ApiKeyId"},"api_key":{"type":"string","description":"API key."},"prefix":{"$ref":"#/components/schemas/Prefix"},"name":{"$ref":"#/components/schemas/Name"},"pod_id":{"type":"string","nullable":true,"description":"Pod ID the api key is scoped to."},"inbox_id":{"type":"string","nullable":true,"description":"Inbox ID the api key is scoped to."},"permissions":{"$ref":"#/components/schemas/ApiKeyPermissions","nullable":true},"created_at":{"$ref":"#/components/schemas/CreatedAt"}},"required":["api_key_id","api_key","prefix","name","created_at"]},"ListApiKeysResponse":{"title":"ListApiKeysResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"api_keys":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"},"description":"Ordered by `created_at` descending."}},"required":["count","api_keys"]},"CreateApiKeyRequest":{"title":"CreateApiKeyRequest","type":"object","properties":{"name":{"$ref":"#/components/schemas/Name","nullable":true},"permissions":{"$ref":"#/components/schemas/ApiKeyPermissions","nullable":true}}},"AttachmentId":{"title":"AttachmentId","type":"string","description":"ID of attachment."},"AttachmentFilename":{"title":"AttachmentFilename","type":"string","description":"Filename of attachment."},"AttachmentSize":{"title":"AttachmentSize","type":"integer","description":"Size of attachment in bytes."},"AttachmentContentType":{"title":"AttachmentContentType","type":"string","description":"Content type of attachment."},"AttachmentContentDisposition":{"title":"AttachmentContentDisposition","type":"string","enum":["inline","attachment"],"description":"Content disposition of attachment."},"AttachmentContentId":{"title":"AttachmentContentId","type":"string","description":"Content ID of attachment."},"Attachment":{"title":"Attachment","type":"object","properties":{"attachment_id":{"$ref":"#/components/schemas/AttachmentId"},"filename":{"$ref":"#/components/schemas/AttachmentFilename","nullable":true},"size":{"$ref":"#/components/schemas/AttachmentSize"},"content_type":{"$ref":"#/components/schemas/AttachmentContentType","nullable":true},"content_disposition":{"$ref":"#/components/schemas/AttachmentContentDisposition","nullable":true},"content_id":{"$ref":"#/components/schemas/AttachmentContentId","nullable":true}},"required":["attachment_id","size"]},"AttachmentResponse":{"title":"AttachmentResponse","type":"object","properties":{"attachment_id":{"$ref":"#/components/schemas/AttachmentId"},"filename":{"$ref":"#/components/schemas/AttachmentFilename","nullable":true},"size":{"$ref":"#/components/schemas/AttachmentSize"},"content_type":{"$ref":"#/components/schemas/AttachmentContentType","nullable":true},"content_disposition":{"$ref":"#/components/schemas/AttachmentContentDisposition","nullable":true},"content_id":{"$ref":"#/components/schemas/AttachmentContentId","nullable":true},"download_url":{"type":"string","description":"URL to download the attachment."},"expires_at":{"type":"string","format":"date-time","description":"Time at which the download URL expires."}},"required":["attachment_id","size","download_url","expires_at"]},"SendAttachment":{"title":"SendAttachment","type":"object","description":"Provide either `content` or `url` for each attachment.","properties":{"filename":{"$ref":"#/components/schemas/AttachmentFilename","nullable":true},"content_type":{"$ref":"#/components/schemas/AttachmentContentType","nullable":true},"content_disposition":{"$ref":"#/components/schemas/AttachmentContentDisposition","nullable":true},"content_id":{"$ref":"#/components/schemas/AttachmentContentId","nullable":true},"content":{"type":"string","nullable":true,"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","nullable":true,"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."}}},"ScopeType":{"title":"ScopeType","type":"string","enum":["organization","pod","inbox"],"description":"The scope tier the authenticated credential is bound to."},"Identity":{"title":"Identity","type":"object","description":"Identity and scope of the authenticated credential.","properties":{"scope_type":{"$ref":"#/components/schemas/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","nullable":true,"description":"ID of the pod the credential is scoped to. Present when scope_type is pod or inbox."},"inbox_id":{"type":"string","nullable":true,"description":"ID of the inbox the credential is scoped to. Present when scope_type is inbox."},"api_key_id":{"type":"string","nullable":true,"description":"ID of the API key used to authenticate. Absent for JWT and proxy credentials."}},"required":["scope_type","scope_id","organization_id"]},"DomainId":{"title":"DomainId","type":"string","description":"The ID of the domain."},"DomainName":{"title":"DomainName","type":"string","description":"The name of the domain (e.g., `example.com`)."},"RecordType":{"title":"RecordType","type":"string","enum":["TXT","CNAME","MX"]},"VerificationStatus":{"title":"VerificationStatus","type":"string","enum":["NOT_STARTED","PENDING","INVALID","FAILED","VERIFYING","VERIFIED"]},"RecordStatus":{"title":"RecordStatus","type":"string","enum":["MISSING","INVALID","VALID"]},"VerificationRecord":{"title":"VerificationRecord","type":"object","properties":{"type":{"$ref":"#/components/schemas/RecordType","description":"The type of the DNS record."},"name":{"type":"string","description":"The name or host of the record."},"value":{"type":"string","description":"The value of the record."},"status":{"$ref":"#/components/schemas/RecordStatus","description":"The verification status of this specific record."},"priority":{"type":"integer","nullable":true,"description":"The priority of the MX record."}},"required":["type","name","value","status"]},"Status":{"title":"Status","$ref":"#/components/schemas/VerificationStatus","description":"The verification status of the domain."},"FeedbackEnabled":{"title":"FeedbackEnabled","type":"boolean","description":"Bounce and complaint notifications are sent to your inboxes."},"SubdomainsEnabled":{"title":"SubdomainsEnabled","type":"boolean","description":"Allow inboxes on any subdomain of this domain. Adds a required wildcard MX\nrecord (`*.`) to `records`."},"TrackingEnabled":{"title":"TrackingEnabled","type":"boolean","description":"Serve open tracking pixels from this domain. Adds a required `link.`\nCNAME record to `records`, which must be published and verified before\n`track_opens` can be used on a send."},"ClientId":{"title":"ClientId","type":"string","description":"Client ID of domain."},"Domain":{"title":"Domain","type":"object","properties":{"pod_id":{"$ref":"#/components/schemas/podsPodId","nullable":true},"domain_id":{"$ref":"#/components/schemas/DomainId"},"domain":{"$ref":"#/components/schemas/DomainName"},"status":{"$ref":"#/components/schemas/Status"},"feedback_enabled":{"$ref":"#/components/schemas/FeedbackEnabled"},"subdomains_enabled":{"$ref":"#/components/schemas/SubdomainsEnabled"},"tracking_enabled":{"$ref":"#/components/schemas/TrackingEnabled"},"records":{"type":"array","items":{"$ref":"#/components/schemas/VerificationRecord"},"description":"A list of DNS records required to verify the domain. Includes a\nwildcard MX record (`*.`) when `subdomains_enabled` is true."},"client_id":{"$ref":"#/components/schemas/ClientId","nullable":true},"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"]},"DomainItem":{"title":"DomainItem","type":"object","properties":{"pod_id":{"$ref":"#/components/schemas/podsPodId","nullable":true},"domain_id":{"$ref":"#/components/schemas/DomainId"},"domain":{"$ref":"#/components/schemas/DomainName"},"feedback_enabled":{"$ref":"#/components/schemas/FeedbackEnabled"},"subdomains_enabled":{"$ref":"#/components/schemas/SubdomainsEnabled"},"tracking_enabled":{"$ref":"#/components/schemas/TrackingEnabled"},"client_id":{"$ref":"#/components/schemas/ClientId","nullable":true},"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"]},"ListDomainsResponse":{"title":"ListDomainsResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit","nullable":true},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"domains":{"type":"array","items":{"$ref":"#/components/schemas/DomainItem"},"description":"Ordered by `created_at` descending."}},"required":["count","domains"]},"CreateDomainRequest":{"title":"CreateDomainRequest","type":"object","properties":{"domain":{"$ref":"#/components/schemas/DomainName"},"feedback_enabled":{"$ref":"#/components/schemas/FeedbackEnabled","nullable":true},"subdomains_enabled":{"$ref":"#/components/schemas/SubdomainsEnabled","nullable":true},"tracking_enabled":{"$ref":"#/components/schemas/TrackingEnabled","nullable":true}},"required":["domain"]},"UpdateDomainRequest":{"title":"UpdateDomainRequest","type":"object","description":"Provide at least one of `feedback_enabled`, `subdomains_enabled`, or\n`tracking_enabled`. Omitted\nfields are left unchanged; an empty body is rejected. Enabling\n`subdomains_enabled` on a verified domain returns it to `PENDING` until the\nnewly-required wildcard MX record (`*.`) is published and verified.","properties":{"feedback_enabled":{"$ref":"#/components/schemas/FeedbackEnabled","nullable":true},"subdomains_enabled":{"$ref":"#/components/schemas/SubdomainsEnabled","nullable":true},"tracking_enabled":{"$ref":"#/components/schemas/TrackingEnabled","nullable":true}}},"DraftId":{"title":"DraftId","type":"string","description":"ID of draft."},"DraftClientId":{"title":"DraftClientId","type":"string","description":"Client ID of draft."},"DraftLabels":{"title":"DraftLabels","type":"array","items":{"type":"string"},"description":"Labels of draft."},"DraftReplyTo":{"title":"DraftReplyTo","type":"array","items":{"type":"string"},"description":"Reply-to addresses. In format `username@domain.com` or `Display Name `."},"DraftTo":{"title":"DraftTo","type":"array","items":{"type":"string"},"description":"Addresses of recipients. In format `username@domain.com` or `Display Name `."},"DraftCc":{"title":"DraftCc","type":"array","items":{"type":"string"},"description":"Addresses of CC recipients. In format `username@domain.com` or `Display Name `."},"DraftBcc":{"title":"DraftBcc","type":"array","items":{"type":"string"},"description":"Addresses of BCC recipients. In format `username@domain.com` or `Display Name `."},"DraftSubject":{"title":"DraftSubject","type":"string","description":"Subject of draft."},"DraftPreview":{"title":"DraftPreview","type":"string","description":"Text preview of draft."},"DraftText":{"title":"DraftText","type":"string","description":"Plain text body of draft."},"DraftHtml":{"title":"DraftHtml","type":"string","description":"HTML body of draft."},"DraftAttachments":{"title":"DraftAttachments","type":"array","items":{"$ref":"#/components/schemas/Attachment"},"description":"Attachments in draft."},"DraftInReplyTo":{"title":"DraftInReplyTo","type":"string","description":"ID of message being replied to."},"DraftForwardOf":{"title":"DraftForwardOf","type":"string","description":"ID of message being forwarded."},"DraftReplyAll":{"title":"DraftReplyAll","type":"boolean","description":"Reply to all recipients of the original message."},"DraftSendStatus":{"title":"DraftSendStatus","type":"string","enum":["scheduled","sending","failed"],"description":"Schedule send status of draft."},"DraftSendAt":{"title":"DraftSendAt","type":"string","format":"date-time","description":"Time at which to schedule send draft."},"DraftUpdatedAt":{"title":"DraftUpdatedAt","type":"string","format":"date-time","description":"Time at which draft was last updated."},"DraftItem":{"title":"DraftItem","type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxesInboxId"},"draft_id":{"$ref":"#/components/schemas/DraftId"},"labels":{"$ref":"#/components/schemas/DraftLabels"},"to":{"$ref":"#/components/schemas/DraftTo","nullable":true},"cc":{"$ref":"#/components/schemas/DraftCc","nullable":true},"bcc":{"$ref":"#/components/schemas/DraftBcc","nullable":true},"subject":{"$ref":"#/components/schemas/DraftSubject","nullable":true},"preview":{"$ref":"#/components/schemas/DraftPreview","nullable":true},"attachments":{"$ref":"#/components/schemas/DraftAttachments","nullable":true},"in_reply_to":{"$ref":"#/components/schemas/DraftInReplyTo","nullable":true},"forward_of":{"$ref":"#/components/schemas/DraftForwardOf","nullable":true},"send_status":{"$ref":"#/components/schemas/DraftSendStatus","nullable":true},"send_at":{"$ref":"#/components/schemas/DraftSendAt","nullable":true},"updated_at":{"$ref":"#/components/schemas/DraftUpdatedAt"}},"required":["inbox_id","draft_id","labels","updated_at"]},"Draft":{"title":"Draft","type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxesInboxId"},"draft_id":{"$ref":"#/components/schemas/DraftId"},"client_id":{"$ref":"#/components/schemas/DraftClientId","nullable":true},"labels":{"$ref":"#/components/schemas/DraftLabels"},"reply_to":{"$ref":"#/components/schemas/DraftReplyTo","nullable":true},"to":{"$ref":"#/components/schemas/DraftTo","nullable":true},"cc":{"$ref":"#/components/schemas/DraftCc","nullable":true},"bcc":{"$ref":"#/components/schemas/DraftBcc","nullable":true},"subject":{"$ref":"#/components/schemas/DraftSubject","nullable":true},"preview":{"$ref":"#/components/schemas/DraftPreview","nullable":true},"text":{"$ref":"#/components/schemas/DraftText","nullable":true},"html":{"$ref":"#/components/schemas/DraftHtml","nullable":true},"attachments":{"$ref":"#/components/schemas/DraftAttachments","nullable":true},"in_reply_to":{"$ref":"#/components/schemas/DraftInReplyTo","nullable":true},"forward_of":{"$ref":"#/components/schemas/DraftForwardOf","nullable":true},"references":{"type":"array","items":{"type":"string"},"nullable":true,"description":"IDs of previous messages in thread."},"send_status":{"$ref":"#/components/schemas/DraftSendStatus","nullable":true},"send_at":{"$ref":"#/components/schemas/DraftSendAt","nullable":true},"updated_at":{"$ref":"#/components/schemas/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"]},"ListDraftsResponse":{"title":"ListDraftsResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit","nullable":true},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"drafts":{"type":"array","items":{"$ref":"#/components/schemas/DraftItem"},"description":"Ordered by `updated_at` descending."}},"required":["count","drafts"]},"CreateDraftRequest":{"title":"CreateDraftRequest","type":"object","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.","properties":{"labels":{"$ref":"#/components/schemas/DraftLabels","nullable":true},"reply_to":{"$ref":"#/components/schemas/DraftReplyTo","nullable":true},"to":{"$ref":"#/components/schemas/DraftTo","nullable":true},"cc":{"$ref":"#/components/schemas/DraftCc","nullable":true},"bcc":{"$ref":"#/components/schemas/DraftBcc","nullable":true},"subject":{"$ref":"#/components/schemas/DraftSubject","nullable":true},"text":{"$ref":"#/components/schemas/DraftText","nullable":true},"html":{"$ref":"#/components/schemas/DraftHtml","nullable":true},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/SendAttachment"},"nullable":true,"description":"Attachments to include in draft."},"in_reply_to":{"$ref":"#/components/schemas/DraftInReplyTo","nullable":true},"forward_of":{"$ref":"#/components/schemas/DraftForwardOf","nullable":true},"reply_all":{"$ref":"#/components/schemas/DraftReplyAll","nullable":true},"send_at":{"$ref":"#/components/schemas/DraftSendAt","nullable":true},"client_id":{"$ref":"#/components/schemas/DraftClientId","nullable":true}}},"UpdateDraftRequest":{"title":"UpdateDraftRequest","type":"object","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.","properties":{"reply_to":{"$ref":"#/components/schemas/DraftReplyTo","nullable":true},"to":{"$ref":"#/components/schemas/DraftTo","nullable":true},"cc":{"$ref":"#/components/schemas/DraftCc","nullable":true},"bcc":{"$ref":"#/components/schemas/DraftBcc","nullable":true},"subject":{"$ref":"#/components/schemas/DraftSubject","nullable":true},"text":{"$ref":"#/components/schemas/DraftText","nullable":true},"html":{"$ref":"#/components/schemas/DraftHtml","nullable":true},"add_attachments":{"type":"array","items":{"$ref":"#/components/schemas/SendAttachment"},"nullable":true,"description":"Attachments to add to the draft."},"remove_attachments":{"type":"array","items":{"$ref":"#/components/schemas/AttachmentId"},"nullable":true,"description":"IDs of attachments to remove from the draft."},"add_labels":{"$ref":"#/components/schemas/DraftLabels","nullable":true,"description":"Label or labels to add to the draft."},"remove_labels":{"$ref":"#/components/schemas/DraftLabels","nullable":true,"description":"Label or labels to remove from the draft."},"send_at":{"$ref":"#/components/schemas/DraftSendAt","nullable":true}}},"EventType":{"title":"EventType","type":"string","enum":["message.received","message.received.spam","message.received.blocked","message.received.unauthenticated","message.sent","message.delivered","message.bounced","message.complained","message.rejected","message.opened","domain.verified"]},"EventTypes":{"title":"EventTypes","type":"array","items":{"$ref":"#/components/schemas/EventType"},"description":"Event types for which to send events."},"MessageReceivedEventType":{"title":"MessageReceivedEventType","type":"string","enum":["message.received","message.received.spam","message.received.blocked","message.received.unauthenticated"]},"PodIds":{"title":"PodIds","type":"array","items":{"type":"string"},"description":"Pods for which to send events. Maximum 10 per webhook."},"InboxIds":{"title":"InboxIds","type":"array","items":{"type":"string"},"description":"Inboxes for which to send events. Maximum 10 per webhook."},"EventId":{"title":"EventId","type":"string","description":"ID of event."},"Timestamp":{"title":"Timestamp","type":"string","format":"date-time","description":"Timestamp of event."},"Recipient":{"title":"Recipient","type":"object","properties":{"address":{"type":"string","description":"Recipient address."},"status":{"type":"string","description":"Recipient status."}},"required":["address","status"]},"Send":{"title":"Send","type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxesInboxId"},"thread_id":{"$ref":"#/components/schemas/ThreadId"},"message_id":{"$ref":"#/components/schemas/MessageId"},"timestamp":{"$ref":"#/components/schemas/Timestamp"},"recipients":{"type":"array","items":{"type":"string"},"description":"Sent recipients."}},"required":["inbox_id","thread_id","message_id","timestamp","recipients"],"x-fern-type-name":"SendEvent"},"Delivery":{"title":"Delivery","type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxesInboxId"},"thread_id":{"$ref":"#/components/schemas/ThreadId"},"message_id":{"$ref":"#/components/schemas/MessageId"},"timestamp":{"$ref":"#/components/schemas/Timestamp"},"recipients":{"type":"array","items":{"type":"string"},"description":"Delivered recipients."}},"required":["inbox_id","thread_id","message_id","timestamp","recipients"]},"Bounce":{"title":"Bounce","type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxesInboxId"},"thread_id":{"$ref":"#/components/schemas/ThreadId"},"message_id":{"$ref":"#/components/schemas/MessageId"},"timestamp":{"$ref":"#/components/schemas/Timestamp"},"type":{"type":"string","description":"Bounce type."},"sub_type":{"type":"string","description":"Bounce sub-type."},"recipients":{"type":"array","items":{"$ref":"#/components/schemas/Recipient"},"description":"Bounced recipients."}},"required":["inbox_id","thread_id","message_id","timestamp","type","sub_type","recipients"]},"Complaint":{"title":"Complaint","type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxesInboxId"},"thread_id":{"$ref":"#/components/schemas/ThreadId"},"message_id":{"$ref":"#/components/schemas/MessageId"},"timestamp":{"$ref":"#/components/schemas/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"]},"Reject":{"title":"Reject","type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxesInboxId"},"thread_id":{"$ref":"#/components/schemas/ThreadId"},"message_id":{"$ref":"#/components/schemas/MessageId"},"timestamp":{"$ref":"#/components/schemas/Timestamp"},"reason":{"type":"string","description":"Reject reason."}},"required":["inbox_id","thread_id","message_id","timestamp","reason"]},"Open":{"title":"Open","type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxesInboxId"},"thread_id":{"$ref":"#/components/schemas/ThreadId"},"message_id":{"$ref":"#/components/schemas/MessageId"},"timestamp":{"$ref":"#/components/schemas/Timestamp"}},"required":["inbox_id","thread_id","message_id","timestamp"]},"MessageReceivedEvent":{"title":"MessageReceivedEvent","type":"object","description":"A message was received. Spam, blocked, and unauthenticated received-message events use the same payload shape with different `event_type` values.","properties":{"type":{"type":"string","const":"event"},"event_type":{"$ref":"#/components/schemas/MessageReceivedEventType"},"event_id":{"$ref":"#/components/schemas/EventId"},"message":{"$ref":"#/components/schemas/Message"},"thread":{"$ref":"#/components/schemas/ThreadItem"}},"required":["type","event_type","event_id","message","thread"]},"MessageSentEvent":{"title":"MessageSentEvent","type":"object","properties":{"type":{"type":"string","const":"event"},"event_type":{"type":"string","const":"message.sent"},"event_id":{"$ref":"#/components/schemas/EventId"},"send":{"$ref":"#/components/schemas/Send"}},"required":["type","event_type","event_id","send"]},"MessageDeliveredEvent":{"title":"MessageDeliveredEvent","type":"object","properties":{"type":{"type":"string","const":"event"},"event_type":{"type":"string","const":"message.delivered"},"event_id":{"$ref":"#/components/schemas/EventId"},"delivery":{"$ref":"#/components/schemas/Delivery"}},"required":["type","event_type","event_id","delivery"]},"MessageBouncedEvent":{"title":"MessageBouncedEvent","type":"object","properties":{"type":{"type":"string","const":"event"},"event_type":{"type":"string","const":"message.bounced"},"event_id":{"$ref":"#/components/schemas/EventId"},"bounce":{"$ref":"#/components/schemas/Bounce"}},"required":["type","event_type","event_id","bounce"]},"MessageComplainedEvent":{"title":"MessageComplainedEvent","type":"object","properties":{"type":{"type":"string","const":"event"},"event_type":{"type":"string","const":"message.complained"},"event_id":{"$ref":"#/components/schemas/EventId"},"complaint":{"$ref":"#/components/schemas/Complaint"}},"required":["type","event_type","event_id","complaint"]},"MessageRejectedEvent":{"title":"MessageRejectedEvent","type":"object","properties":{"type":{"type":"string","const":"event"},"event_type":{"type":"string","const":"message.rejected"},"event_id":{"$ref":"#/components/schemas/EventId"},"reject":{"$ref":"#/components/schemas/Reject"}},"required":["type","event_type","event_id","reject"]},"MessageOpenedEvent":{"title":"MessageOpenedEvent","type":"object","description":"A tracked message was opened for the first time. Sent once per message: repeat opens do not\nresend it.","properties":{"type":{"type":"string","const":"event"},"event_type":{"type":"string","const":"message.opened"},"event_id":{"$ref":"#/components/schemas/EventId"},"open":{"$ref":"#/components/schemas/Open"}},"required":["type","event_type","event_id","open"]},"DomainVerifiedEvent":{"title":"DomainVerifiedEvent","type":"object","properties":{"type":{"type":"string","const":"event"},"event_type":{"type":"string","const":"domain.verified"},"event_id":{"$ref":"#/components/schemas/EventId"},"domain":{"$ref":"#/components/schemas/Domain"}},"required":["type","event_type","event_id","domain"]},"InboxEventId":{"title":"InboxEventId","type":"string","description":"ID of event."},"InboxEventType":{"title":"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."},"InboxEvent":{"title":"InboxEvent","type":"object","properties":{"organization_id":{"$ref":"#/components/schemas/OrganizationId"},"pod_id":{"type":"string","description":"ID of pod."},"inbox_id":{"$ref":"#/components/schemas/inboxesInboxId"},"event_id":{"$ref":"#/components/schemas/InboxEventId"},"event_type":{"$ref":"#/components/schemas/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"]},"ListInboxEventsResponse":{"title":"ListInboxEventsResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit","nullable":true},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"events":{"type":"array","items":{"$ref":"#/components/schemas/InboxEvent"},"description":"Ordered by `event_id` descending."}},"required":["count","events"]},"Direction":{"title":"Direction","type":"string","enum":["send","receive","reply"],"description":"Direction of list entry."},"ListType":{"title":"ListType","type":"string","enum":["allow","block"],"description":"Type of list entry."},"EntryType":{"title":"EntryType","type":"string","enum":["email","domain"],"description":"Whether the entry is an email address or domain."},"ListEntryBase":{"title":"ListEntryBase","type":"object","properties":{"entry":{"type":"string","description":"Email address or domain of list entry."},"organization_id":{"$ref":"#/components/schemas/OrganizationId"},"reason":{"type":"string","nullable":true,"description":"Reason for adding the entry."},"direction":{"$ref":"#/components/schemas/Direction"},"list_type":{"$ref":"#/components/schemas/ListType"},"entry_type":{"$ref":"#/components/schemas/EntryType"},"created_at":{"type":"string","format":"date-time","description":"Time at which entry was created."},"read_only":{"type":"boolean","nullable":true,"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"]},"ListEntry":{"title":"ListEntry","type":"object","properties":{},"allOf":[{"$ref":"#/components/schemas/ListEntryBase"}]},"PodListEntry":{"title":"PodListEntry","type":"object","properties":{"pod_id":{"type":"string","description":"ID of pod."},"inbox_id":{"type":"string","nullable":true,"description":"ID of inbox, if entry is inbox-scoped."}},"required":["pod_id"],"allOf":[{"$ref":"#/components/schemas/ListEntryBase"}]},"PodListListEntriesResponse":{"title":"PodListListEntriesResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit","nullable":true},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"entries":{"type":"array","items":{"$ref":"#/components/schemas/PodListEntry"},"description":"Ordered by entry ascending."}},"required":["count","entries"]},"ListListEntriesResponse":{"title":"ListListEntriesResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit","nullable":true},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"entries":{"type":"array","items":{"$ref":"#/components/schemas/ListEntry"},"description":"Ordered by entry ascending."}},"required":["count","entries"]},"CreateListEntryRequest":{"title":"CreateListEntryRequest","type":"object","properties":{"entry":{"type":"string","description":"Email address or domain to add."},"reason":{"type":"string","nullable":true,"description":"Reason for adding the entry."}},"required":["entry"]},"MessageId":{"title":"MessageId","type":"string","description":"ID of message."},"MessageLabels":{"title":"MessageLabels","type":"array","items":{"type":"string"},"description":"Labels of message."},"MessageTimestamp":{"title":"MessageTimestamp","type":"string","format":"date-time","description":"Time at which message was sent or drafted."},"MessageFrom":{"title":"MessageFrom","type":"string","description":"Address of sender. In format `username@domain.com` or `Display Name `."},"MessageReplyTo":{"title":"MessageReplyTo","type":"array","items":{"type":"string"},"description":"Addresses of reply-to recipients. In format `username@domain.com` or `Display Name `."},"MessageTo":{"title":"MessageTo","type":"array","items":{"type":"string"},"description":"Addresses of recipients. In format `username@domain.com` or `Display Name `."},"MessageCc":{"title":"MessageCc","type":"array","items":{"type":"string"},"description":"Addresses of CC recipients. In format `username@domain.com` or `Display Name `."},"MessageBcc":{"title":"MessageBcc","type":"array","items":{"type":"string"},"description":"Addresses of BCC recipients. In format `username@domain.com` or `Display Name `."},"MessageSubject":{"title":"MessageSubject","type":"string","description":"Subject of message."},"MessagePreview":{"title":"MessagePreview","type":"string","description":"Text preview of message."},"MessageText":{"title":"MessageText","type":"string","description":"Plain text body of message."},"MessageHtml":{"title":"MessageHtml","type":"string","description":"HTML body of message."},"MessageAttachments":{"title":"MessageAttachments","type":"array","items":{"$ref":"#/components/schemas/Attachment"},"description":"Attachments in message."},"MessageInReplyTo":{"title":"MessageInReplyTo","type":"string","description":"ID of message being replied to."},"MessageReferences":{"title":"MessageReferences","type":"array","items":{"type":"string"},"description":"IDs of previous messages in thread."},"MessageHeaders":{"title":"MessageHeaders","type":"object","additionalProperties":{"type":"string"},"description":"Headers in message."},"MessageSize":{"title":"MessageSize","type":"integer","description":"Size of message in bytes."},"MessageUpdatedAt":{"title":"MessageUpdatedAt","type":"string","format":"date-time","description":"Time at which message was last updated."},"MessageCreatedAt":{"title":"MessageCreatedAt","type":"string","format":"date-time","description":"Time at which message was created."},"MessageItem":{"title":"MessageItem","type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxesInboxId"},"thread_id":{"$ref":"#/components/schemas/ThreadId"},"message_id":{"$ref":"#/components/schemas/MessageId"},"labels":{"$ref":"#/components/schemas/MessageLabels"},"timestamp":{"$ref":"#/components/schemas/MessageTimestamp"},"from":{"$ref":"#/components/schemas/MessageFrom"},"to":{"$ref":"#/components/schemas/MessageTo"},"cc":{"$ref":"#/components/schemas/MessageCc","nullable":true},"bcc":{"$ref":"#/components/schemas/MessageBcc","nullable":true},"subject":{"$ref":"#/components/schemas/MessageSubject","nullable":true},"preview":{"$ref":"#/components/schemas/MessagePreview","nullable":true},"attachments":{"$ref":"#/components/schemas/MessageAttachments","nullable":true},"in_reply_to":{"$ref":"#/components/schemas/MessageInReplyTo","nullable":true},"references":{"$ref":"#/components/schemas/MessageReferences","nullable":true},"headers":{"$ref":"#/components/schemas/MessageHeaders","nullable":true},"size":{"$ref":"#/components/schemas/MessageSize"},"updated_at":{"$ref":"#/components/schemas/MessageUpdatedAt"},"created_at":{"$ref":"#/components/schemas/MessageCreatedAt"}},"required":["inbox_id","thread_id","message_id","labels","timestamp","from","to","size","updated_at","created_at"]},"Message":{"title":"Message","type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxesInboxId"},"thread_id":{"$ref":"#/components/schemas/ThreadId"},"message_id":{"$ref":"#/components/schemas/MessageId"},"labels":{"$ref":"#/components/schemas/MessageLabels"},"timestamp":{"$ref":"#/components/schemas/MessageTimestamp"},"from":{"$ref":"#/components/schemas/MessageFrom"},"reply_to":{"type":"array","items":{"type":"string"},"nullable":true,"description":"Reply-to addresses. In format `username@domain.com` or `Display Name `."},"to":{"$ref":"#/components/schemas/MessageTo"},"cc":{"$ref":"#/components/schemas/MessageCc","nullable":true},"bcc":{"$ref":"#/components/schemas/MessageBcc","nullable":true},"subject":{"$ref":"#/components/schemas/MessageSubject","nullable":true},"preview":{"$ref":"#/components/schemas/MessagePreview","nullable":true},"text":{"$ref":"#/components/schemas/MessageText","nullable":true},"html":{"$ref":"#/components/schemas/MessageHtml","nullable":true},"extracted_text":{"type":"string","nullable":true,"description":"Extracted new text content."},"extracted_html":{"type":"string","nullable":true,"description":"Extracted new HTML content."},"attachments":{"$ref":"#/components/schemas/MessageAttachments","nullable":true},"in_reply_to":{"$ref":"#/components/schemas/MessageInReplyTo","nullable":true},"references":{"$ref":"#/components/schemas/MessageReferences","nullable":true},"headers":{"$ref":"#/components/schemas/MessageHeaders","nullable":true},"size":{"$ref":"#/components/schemas/MessageSize"},"updated_at":{"$ref":"#/components/schemas/MessageUpdatedAt"},"created_at":{"$ref":"#/components/schemas/MessageCreatedAt"}},"required":["inbox_id","thread_id","message_id","labels","timestamp","from","to","size","updated_at","created_at"]},"ListMessagesResponse":{"title":"ListMessagesResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit","nullable":true},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"messages":{"type":"array","items":{"$ref":"#/components/schemas/MessageItem"},"description":"Ordered by `timestamp` descending."}},"required":["count","messages"]},"SearchMessageHighlights":{"title":"SearchMessageHighlights","type":"object","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.","properties":{"from":{"type":"array","items":{"type":"string"},"nullable":true,"description":"Matched fragments from the sender address."},"recipients":{"type":"array","items":{"type":"string"},"nullable":true,"description":"Matched fragments from the recipient addresses (to, cc, or bcc)."},"subject":{"type":"array","items":{"type":"string"},"nullable":true,"description":"Matched fragments from the subject."},"text":{"type":"array","items":{"type":"string"},"nullable":true,"description":"Matched fragments from the message body."}}},"SearchMessageItem":{"title":"SearchMessageItem","type":"object","properties":{"highlights":{"$ref":"#/components/schemas/SearchMessageHighlights","nullable":true,"description":"Matched fragments per field. Present only when the query matched an indexed field."}},"allOf":[{"$ref":"#/components/schemas/MessageItem"}]},"SearchMessagesResponse":{"title":"SearchMessagesResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit","nullable":true},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"messages":{"type":"array","items":{"$ref":"#/components/schemas/SearchMessageItem"},"description":"Ordered by relevance, best match first."}},"required":["count","messages"]},"BatchGetMessagesMessageIds":{"title":"BatchGetMessagesMessageIds","type":"array","items":{"$ref":"#/components/schemas/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`."},"BatchGetMessagesRequest":{"title":"BatchGetMessagesRequest","type":"object","properties":{"message_ids":{"$ref":"#/components/schemas/BatchGetMessagesMessageIds"}},"required":["message_ids"]},"BatchGetMessagesResponse":{"title":"BatchGetMessagesResponse","type":"object","properties":{"limit":{"$ref":"#/components/schemas/Limit"},"count":{"$ref":"#/components/schemas/Count"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/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"]},"BatchUpdateMessagesMessageIds":{"title":"BatchUpdateMessagesMessageIds","type":"array","items":{"$ref":"#/components/schemas/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`."},"BatchUpdateMessagesRequest":{"title":"BatchUpdateMessagesRequest","type":"object","properties":{"message_ids":{"$ref":"#/components/schemas/BatchUpdateMessagesMessageIds"},"add_labels":{"$ref":"#/components/schemas/UpdateMessageLabels","nullable":true,"description":"Label or labels to add to every message."},"remove_labels":{"$ref":"#/components/schemas/UpdateMessageLabels","nullable":true,"description":"Label or labels to remove from every message."}},"required":["message_ids"]},"BatchUpdateMessagesResponse":{"title":"BatchUpdateMessagesResponse","type":"object","properties":{"limit":{"$ref":"#/components/schemas/Limit"},"count":{"$ref":"#/components/schemas/Count"},"updates":{"type":"array","items":{"$ref":"#/components/schemas/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"]},"RawMessageResponse":{"title":"RawMessageResponse","type":"object","description":"S3 presigned URL to download the raw .eml file.","properties":{"message_id":{"$ref":"#/components/schemas/MessageId","description":"ID of the message."},"size":{"$ref":"#/components/schemas/MessageSize","description":"Size of the raw message in bytes."},"download_url":{"type":"string","description":"S3 presigned URL to download the raw message. Expires at expires_at."},"expires_at":{"type":"string","format":"date-time","description":"Time at which the download URL expires."}},"required":["message_id","size","download_url","expires_at"]},"Addresses":{"title":"Addresses","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"SendMessageReplyTo":{"title":"SendMessageReplyTo","$ref":"#/components/schemas/Addresses","description":"Reply-to address or addresses."},"SendMessageTo":{"title":"SendMessageTo","$ref":"#/components/schemas/Addresses","description":"Recipient address or addresses."},"SendMessageCc":{"title":"SendMessageCc","$ref":"#/components/schemas/Addresses","description":"CC recipient address or addresses."},"SendMessageBcc":{"title":"SendMessageBcc","$ref":"#/components/schemas/Addresses","description":"BCC recipient address or addresses."},"SendMessageAttachments":{"title":"SendMessageAttachments","type":"array","items":{"$ref":"#/components/schemas/SendAttachment"},"description":"Attachments to include in message."},"SendMessageHeaders":{"title":"SendMessageHeaders","type":"object","additionalProperties":{"type":"string"},"description":"Headers to include in message."},"TrackOpens":{"title":"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."},"SendMessageRequest":{"title":"SendMessageRequest","type":"object","properties":{"labels":{"$ref":"#/components/schemas/MessageLabels","nullable":true},"reply_to":{"$ref":"#/components/schemas/SendMessageReplyTo","nullable":true},"to":{"$ref":"#/components/schemas/SendMessageTo","nullable":true},"cc":{"$ref":"#/components/schemas/SendMessageCc","nullable":true},"bcc":{"$ref":"#/components/schemas/SendMessageBcc","nullable":true},"subject":{"$ref":"#/components/schemas/MessageSubject","nullable":true},"text":{"$ref":"#/components/schemas/MessageText","nullable":true},"html":{"$ref":"#/components/schemas/MessageHtml","nullable":true},"attachments":{"$ref":"#/components/schemas/SendMessageAttachments","nullable":true},"headers":{"$ref":"#/components/schemas/SendMessageHeaders","nullable":true},"track_opens":{"$ref":"#/components/schemas/TrackOpens","nullable":true}}},"SendMessageResponse":{"title":"SendMessageResponse","type":"object","properties":{"message_id":{"$ref":"#/components/schemas/MessageId"},"thread_id":{"$ref":"#/components/schemas/ThreadId"}},"required":["message_id","thread_id"]},"UpdateMessageResponse":{"title":"UpdateMessageResponse","type":"object","properties":{"message_id":{"$ref":"#/components/schemas/MessageId"},"labels":{"$ref":"#/components/schemas/MessageLabels"}},"required":["message_id","labels"]},"ReplyAll":{"title":"ReplyAll","type":"boolean","description":"Reply to all recipients of the original message."},"ReplyToMessageRequest":{"title":"ReplyToMessageRequest","type":"object","properties":{"labels":{"$ref":"#/components/schemas/MessageLabels","nullable":true},"reply_to":{"$ref":"#/components/schemas/SendMessageReplyTo","nullable":true},"to":{"$ref":"#/components/schemas/SendMessageTo","nullable":true},"cc":{"$ref":"#/components/schemas/SendMessageCc","nullable":true},"bcc":{"$ref":"#/components/schemas/SendMessageBcc","nullable":true},"reply_all":{"$ref":"#/components/schemas/ReplyAll","nullable":true},"text":{"$ref":"#/components/schemas/MessageText","nullable":true},"html":{"$ref":"#/components/schemas/MessageHtml","nullable":true},"attachments":{"$ref":"#/components/schemas/SendMessageAttachments","nullable":true},"headers":{"$ref":"#/components/schemas/SendMessageHeaders","nullable":true},"track_opens":{"$ref":"#/components/schemas/TrackOpens","nullable":true}}},"ReplyAllMessageRequest":{"title":"ReplyAllMessageRequest","type":"object","properties":{"labels":{"$ref":"#/components/schemas/MessageLabels","nullable":true},"reply_to":{"$ref":"#/components/schemas/SendMessageReplyTo","nullable":true},"text":{"$ref":"#/components/schemas/MessageText","nullable":true},"html":{"$ref":"#/components/schemas/MessageHtml","nullable":true},"attachments":{"$ref":"#/components/schemas/SendMessageAttachments","nullable":true},"headers":{"$ref":"#/components/schemas/SendMessageHeaders","nullable":true},"track_opens":{"$ref":"#/components/schemas/TrackOpens","nullable":true}}},"UpdateMessageLabels":{"title":"UpdateMessageLabels","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Label or list of labels."},"UpdateMessageRequest":{"title":"UpdateMessageRequest","type":"object","properties":{"add_labels":{"$ref":"#/components/schemas/UpdateMessageLabels","nullable":true,"description":"Label or labels to add to message."},"remove_labels":{"$ref":"#/components/schemas/UpdateMessageLabels","nullable":true,"description":"Label or labels to remove from message."}}},"MetricEventType":{"title":"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."},"MetricEventTypes":{"title":"MetricEventTypes","type":"array","items":{"$ref":"#/components/schemas/MetricEventType"},"description":"List of metric event types to query."},"Start":{"title":"Start","type":"string","format":"date-time","description":"Start timestamp for the query."},"End":{"title":"End","type":"string","format":"date-time","description":"End timestamp for the query."},"Period":{"title":"Period","type":"integer","description":"Size of each time bucket as a whole number of seconds, between 1 and 86400."},"MetricLimit":{"title":"MetricLimit","type":"integer","description":"Limit on number of buckets to return."},"Descending":{"title":"Descending","type":"boolean","description":"Sort in descending order."},"MetricBucket":{"title":"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"]},"QueryMetricsResponse":{"title":"QueryMetricsResponse","type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/MetricBucket"}},"description":"Metrics grouped by event type."},"UsageType":{"title":"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`."},"UsageTypes":{"title":"UsageTypes","type":"array","items":{"$ref":"#/components/schemas/UsageType"},"description":"List of usage metric types to query. Omit to query every type valid for the scope."},"UsagePoint":{"title":"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"]},"QueryUsageResponse":{"title":"QueryUsageResponse","type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/UsagePoint"}},"description":"Cumulative usage series grouped by usage type."},"Organization":{"title":"Organization","type":"object","description":"Organization details with usage limits and counts.","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","nullable":true,"description":"Maximum number of inboxes allowed."},"domain_limit":{"type":"integer","nullable":true,"description":"Maximum number of domains allowed."},"billing_id":{"type":"string","nullable":true,"description":"Provider-agnostic billing customer ID."},"billing_type":{"type":"string","nullable":true,"description":"Billing provider type (e.g. \"stripe\")."},"billing_subscription_id":{"type":"string","nullable":true,"description":"Active billing subscription ID."},"authentication_id":{"type":"string","nullable":true,"description":"Provider-agnostic authentication ID."},"authentication_type":{"type":"string","nullable":true,"description":"Authentication provider type."},"updated_at":{"type":"string","format":"date-time","description":"Time at which organization was last updated."},"created_at":{"type":"string","format":"date-time","description":"Time at which organization was created."}},"required":["organization_id","inbox_count","domain_count","updated_at","created_at"]},"ThreadId":{"title":"ThreadId","type":"string","description":"ID of thread."},"ThreadLabels":{"title":"ThreadLabels","type":"array","items":{"type":"string"},"description":"Labels of thread."},"ThreadTimestamp":{"title":"ThreadTimestamp","type":"string","format":"date-time","description":"Timestamp of last sent or received message."},"ThreadReceivedTimestamp":{"title":"ThreadReceivedTimestamp","type":"string","format":"date-time","description":"Timestamp of last received message."},"ThreadSentTimestamp":{"title":"ThreadSentTimestamp","type":"string","format":"date-time","description":"Timestamp of last sent message."},"ThreadSenders":{"title":"ThreadSenders","type":"array","items":{"type":"string"},"description":"Senders in thread. In format `username@domain.com` or `Display Name `."},"ThreadRecipients":{"title":"ThreadRecipients","type":"array","items":{"type":"string"},"description":"Recipients in thread. In format `username@domain.com` or `Display Name `."},"ThreadSubject":{"title":"ThreadSubject","type":"string","description":"Subject of thread."},"ThreadPreview":{"title":"ThreadPreview","type":"string","description":"Text preview of last message in thread."},"ThreadAttachments":{"title":"ThreadAttachments","type":"array","items":{"$ref":"#/components/schemas/Attachment"},"description":"Attachments in thread."},"ThreadLastMessageId":{"title":"ThreadLastMessageId","type":"string","description":"ID of last message in thread."},"ThreadMessageCount":{"title":"ThreadMessageCount","type":"integer","description":"Number of messages in thread."},"ThreadSize":{"title":"ThreadSize","type":"integer","description":"Size of thread in bytes."},"ThreadUpdatedAt":{"title":"ThreadUpdatedAt","type":"string","format":"date-time","description":"Time at which thread was last updated."},"ThreadCreatedAt":{"title":"ThreadCreatedAt","type":"string","format":"date-time","description":"Time at which thread was created."},"ThreadItem":{"title":"ThreadItem","type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxesInboxId"},"thread_id":{"$ref":"#/components/schemas/ThreadId"},"labels":{"$ref":"#/components/schemas/ThreadLabels"},"timestamp":{"$ref":"#/components/schemas/ThreadTimestamp"},"received_timestamp":{"$ref":"#/components/schemas/ThreadReceivedTimestamp","nullable":true},"sent_timestamp":{"$ref":"#/components/schemas/ThreadSentTimestamp","nullable":true},"senders":{"$ref":"#/components/schemas/ThreadSenders"},"recipients":{"$ref":"#/components/schemas/ThreadRecipients"},"subject":{"$ref":"#/components/schemas/ThreadSubject","nullable":true},"preview":{"$ref":"#/components/schemas/ThreadPreview","nullable":true},"attachments":{"$ref":"#/components/schemas/ThreadAttachments","nullable":true},"last_message_id":{"$ref":"#/components/schemas/ThreadLastMessageId"},"message_count":{"$ref":"#/components/schemas/ThreadMessageCount"},"size":{"$ref":"#/components/schemas/ThreadSize"},"updated_at":{"$ref":"#/components/schemas/ThreadUpdatedAt"},"created_at":{"$ref":"#/components/schemas/ThreadCreatedAt"}},"required":["inbox_id","thread_id","labels","timestamp","senders","recipients","last_message_id","message_count","size","updated_at","created_at"]},"Thread":{"title":"Thread","type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxesInboxId"},"thread_id":{"$ref":"#/components/schemas/ThreadId"},"labels":{"$ref":"#/components/schemas/ThreadLabels"},"timestamp":{"$ref":"#/components/schemas/ThreadTimestamp"},"received_timestamp":{"$ref":"#/components/schemas/ThreadReceivedTimestamp","nullable":true},"sent_timestamp":{"$ref":"#/components/schemas/ThreadSentTimestamp","nullable":true},"senders":{"$ref":"#/components/schemas/ThreadSenders"},"recipients":{"$ref":"#/components/schemas/ThreadRecipients"},"subject":{"$ref":"#/components/schemas/ThreadSubject","nullable":true},"preview":{"$ref":"#/components/schemas/ThreadPreview","nullable":true},"attachments":{"$ref":"#/components/schemas/ThreadAttachments","nullable":true},"last_message_id":{"$ref":"#/components/schemas/ThreadLastMessageId"},"message_count":{"$ref":"#/components/schemas/ThreadMessageCount"},"size":{"$ref":"#/components/schemas/ThreadSize"},"updated_at":{"$ref":"#/components/schemas/ThreadUpdatedAt"},"created_at":{"$ref":"#/components/schemas/ThreadCreatedAt"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/Message"},"description":"Messages in thread. Ordered by `timestamp` ascending."}},"required":["inbox_id","thread_id","labels","timestamp","senders","recipients","last_message_id","message_count","size","updated_at","created_at","messages"]},"UpdateThreadRequest":{"title":"UpdateThreadRequest","type":"object","properties":{"add_labels":{"type":"array","items":{"type":"string"},"nullable":true,"description":"Labels to add to thread. Cannot be system labels."},"remove_labels":{"type":"array","items":{"type":"string"},"nullable":true,"description":"Labels to remove from thread. Cannot be system labels. Takes priority over `add_labels` (in the event of duplicate labels passed in)."}}},"UpdateThreadResponse":{"title":"UpdateThreadResponse","type":"object","properties":{"thread_id":{"$ref":"#/components/schemas/ThreadId"},"labels":{"$ref":"#/components/schemas/ThreadLabels"}},"required":["thread_id","labels"]},"ListThreadsResponse":{"title":"ListThreadsResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit","nullable":true},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"threads":{"type":"array","items":{"$ref":"#/components/schemas/ThreadItem"},"description":"Ordered by `timestamp` descending."}},"required":["count","threads"]},"SearchThreadHighlights":{"title":"SearchThreadHighlights","type":"object","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.","properties":{"from":{"type":"array","items":{"type":"string"},"nullable":true,"description":"Matched fragments from a sender address in the thread."},"recipients":{"type":"array","items":{"type":"string"},"nullable":true,"description":"Matched fragments from a recipient address in the thread (to, cc, or bcc)."},"subject":{"type":"array","items":{"type":"string"},"nullable":true,"description":"Matched fragments from the subject."},"text":{"type":"array","items":{"type":"string"},"nullable":true,"description":"Matched fragments from a message body in the thread."}}},"SearchThreadItem":{"title":"SearchThreadItem","type":"object","properties":{"highlights":{"$ref":"#/components/schemas/SearchThreadHighlights","nullable":true,"description":"Matched fragments per field. Present only when the query matched an indexed field."}},"allOf":[{"$ref":"#/components/schemas/ThreadItem"}]},"SearchThreadsResponse":{"title":"SearchThreadsResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit","nullable":true},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"threads":{"type":"array","items":{"$ref":"#/components/schemas/SearchThreadItem"},"description":"Ordered by relevance, best match first."}},"required":["count","threads"]},"webhooksSvixId":{"title":"webhooksSvixId","type":"string","description":"ID of webhook message."},"webhooksSvixTimestamp":{"title":"webhooksSvixTimestamp","type":"string","format":"date-time","description":"Timestamp of webhook message."},"webhooksSvixSignature":{"title":"webhooksSvixSignature","type":"string","description":"Signature of webhook message."},"Subscribe":{"title":"Subscribe","type":"object","properties":{"type":{"type":"string","const":"subscribe"},"event_types":{"$ref":"#/components/schemas/EventTypes","nullable":true},"inbox_ids":{"$ref":"#/components/schemas/InboxIds","nullable":true},"pod_ids":{"$ref":"#/components/schemas/PodIds","nullable":true}},"required":["type"]},"Subscribed":{"title":"Subscribed","type":"object","properties":{"type":{"type":"string","const":"subscribed"},"event_types":{"$ref":"#/components/schemas/EventTypes","nullable":true},"inbox_ids":{"$ref":"#/components/schemas/InboxIds","nullable":true},"pod_ids":{"$ref":"#/components/schemas/PodIds","nullable":true}},"required":["type"]},"Error":{"title":"Error","type":"object","properties":{"type":{"type":"string","const":"error"},"name":{"$ref":"#/components/schemas/ErrorName"},"message":{"$ref":"#/components/schemas/ErrorMessage"}},"required":["type","name","message"]}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"},"TokenAuth":{"type":"http","scheme":"bearer"}}}} \ No newline at end of file +{"openapi":"3.0.1","info":{"title":"AgentMail","version":""},"paths":{"/v0/inboxes":{"get":{"description":"**CLI:**\n```bash\nagentmail inboxes list\n```","operationId":"inboxes_list","tags":["Inboxes"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxesListInboxesResponse"}}}}},"summary":"List Inboxes","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["inboxes"],"x-fern-sdk-method-name":"list"},"post":{"description":"**CLI:**\n```bash\nagentmail inboxes create --display-name \"My Agent\" --username myagent --domain agentmail.to\n```","operationId":"inboxes_create","tags":["Inboxes"],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxesInbox"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"422":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Create Inbox","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxesCreateInboxRequest","nullable":true}}}},"x-fern-sdk-group-name":["inboxes"],"x-fern-sdk-method-name":"create"}},"/v0/inboxes/{inbox_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail inboxes get --inbox-id \n```","operationId":"inboxes_get","tags":["Inboxes"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxesInbox"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Inbox","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["inboxes"],"x-fern-sdk-method-name":"get"},"patch":{"description":"**CLI:**\n```bash\nagentmail inboxes update --inbox-id --display-name \"Updated Name\"\n```","operationId":"inboxes_update","tags":["Inboxes"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxesInbox"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Update Inbox","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"description":"Expects an object; provide at least one of `display_name` or `metadata`.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxesUpdateInboxRequest"}}}},"x-fern-sdk-group-name":["inboxes"],"x-fern-sdk-method-name":"update"},"delete":{"description":"**CLI:**\n```bash\nagentmail inboxes delete --inbox-id \n```","operationId":"inboxes_delete","tags":["Inboxes"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete Inbox","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["inboxes"],"x-fern-sdk-method-name":"delete"}},"/v0/pods":{"get":{"description":"**CLI:**\n```bash\nagentmail pods list\n```","operationId":"pods_list","tags":["Pods"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/podsListPodsResponse"}}}}},"summary":"List Pods","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["pods"],"x-fern-sdk-method-name":"list"},"post":{"description":"**CLI:**\n```bash\nagentmail pods create --client-id my-pod\n```","operationId":"pods_create","tags":["Pods"],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/podsPod"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Create Pod","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/podsCreatePodRequest"}}}},"x-fern-sdk-group-name":["pods"],"x-fern-sdk-method-name":"create"}},"/v0/pods/{pod_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail pods get --pod-id \n```","operationId":"pods_get","tags":["Pods"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/podsPod"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Pod","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["pods"],"x-fern-sdk-method-name":"get"},"delete":{"description":"**CLI:**\n```bash\nagentmail pods delete --pod-id \n```","operationId":"pods_delete","tags":["Pods"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete Pod","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["pods"],"x-fern-sdk-method-name":"delete"}},"/v0/webhooks":{"get":{"description":"**CLI:**\n```bash\nagentmail webhooks list\n```","operationId":"webhooks_list","tags":["Webhooks"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksListWebhooksResponse"}}}}},"summary":"List Webhooks","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["webhooks"],"x-fern-sdk-method-name":"list"},"post":{"description":"**CLI:**\n```bash\nagentmail webhooks create --url https://example.com/webhook --event-types message.received\n```","operationId":"webhooks_create","tags":["Webhooks"],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksWebhook"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Create Webhook","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksCreateWebhookRequest"}}}},"x-fern-sdk-group-name":["webhooks"],"x-fern-sdk-method-name":"create"}},"/v0/webhooks/{webhook_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail webhooks get --webhook-id \n```","operationId":"webhooks_get","tags":["Webhooks"],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooksWebhookId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksWebhook"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Webhook","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["webhooks"],"x-fern-sdk-method-name":"get"},"patch":{"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 --add-inbox-ids \n```","operationId":"webhooks_update","tags":["Webhooks"],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooksWebhookId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksWebhook"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Update Webhook","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksUpdateWebhookRequest"}}}},"x-fern-sdk-group-name":["webhooks"],"x-fern-sdk-method-name":"update"},"delete":{"description":"**CLI:**\n```bash\nagentmail webhooks delete --webhook-id \n```","operationId":"webhooks_delete","tags":["Webhooks"],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooksWebhookId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete Webhook","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["webhooks"],"x-fern-sdk-method-name":"delete"}},"/v0/webhooks/{webhook_id}/headers":{"get":{"description":"List the names of custom HTTP headers included with deliveries to this webhook. Header values are\nwrite-only and are never returned.","operationId":"webhooks_getHeaders","tags":["Webhooks"],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooksWebhookId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksWebhookHeaderNamesResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Webhook Headers","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["webhooks"],"x-fern-sdk-method-name":"get-headers"},"patch":{"description":"Atomically set, replace, or remove custom HTTP headers included with deliveries to this webhook.\nHeader values remain write-only.","operationId":"webhooks_updateHeaders","tags":["Webhooks"],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooksWebhookId"}}],"responses":{"204":{"description":""},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Update Webhook Headers","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksUpdateWebhookHeadersRequest"}}}},"x-fern-sdk-group-name":["webhooks"],"x-fern-sdk-method-name":"update-headers"}},"/v0/agent/sign-up":{"post":{"description":"Create a new agent organization with an inbox and API key. This endpoint is for signing up for the first time. If you've already signed up, you're all set — just use your existing API key.\n\nA 6-digit OTP is sent to the human's email for verification.\n\nThis endpoint is idempotent. Calling it again with the same `human_email` will rotate the API key and resend the OTP if expired.\n\nThe returned API key has limited permissions until the organization is verified via the verify endpoint.\n\n**CLI:**\n```bash\nagentmail agent sign-up --human-email user@example.com --username my-agent\n```","operationId":"agent_signUp","tags":["Agent"],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSignupResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Sign Up","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSignupRequest"}}}},"x-fern-sdk-group-name":["agent"],"x-fern-sdk-method-name":"sign-up"}},"/v0/agent/verify":{"post":{"description":"Verify an agent organization using the 6-digit OTP sent to the human's email during sign-up.\n\nOn success, the organization is upgraded from `agent_unverified` to `agent_verified`, the send allowlist is removed, and free plan entitlements are applied.\n\nThe OTP expires after 24 hours and allows a maximum of 10 attempts. If you run into any difficulties receiving the OTP code, you can also create an account on [console.agentmail.to](https://console.agentmail.to) using the human email address you provided to verify your account.\n\n**CLI:**\n```bash\nagentmail agent verify --otp-code 123456\n```","operationId":"agent_verify","tags":["Agent"],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentVerifyResponse"}}}}},"summary":"Verify","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentVerifyRequest"}}}},"x-fern-sdk-group-name":["agent"],"x-fern-sdk-method-name":"verify"}},"/v0/api-keys":{"get":{"description":"**CLI:**\n```bash\nagentmail api-keys list\n```","operationId":"apiKeys_list","tags":["ApiKeys"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListApiKeysResponse"}}}}},"summary":"List API Keys","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["apiKeys"],"x-fern-sdk-method-name":"list"},"post":{"description":"**CLI:**\n```bash\nagentmail api-keys create --name \"My Key\"\n```","operationId":"apiKeys_create","tags":["ApiKeys"],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Create API Key","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}}},"x-fern-sdk-group-name":["apiKeys"],"x-fern-sdk-method-name":"create"}},"/v0/api-keys/{api_key_id}":{"delete":{"description":"**CLI:**\n```bash\nagentmail api-keys delete --api-key-id \n```","operationId":"apiKeys_delete","tags":["ApiKeys"],"parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ApiKeyId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete API Key","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["apiKeys"],"x-fern-sdk-method-name":"delete"}},"/v0/api-keys/public-keys":{"get":{"description":"List only public-key credentials visible to the bearer caller's scope.\nBearer credentials are never returned, even though both credential types\nshare storage and pagination indexes. Requires `api_key_read`.","operationId":"apiKeys_listPublicKeys","tags":["ApiKeys"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListPublicKeysResponse"}}}}},"summary":"List Public-Key Credentials","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["apiKeys"],"x-fern-sdk-method-name":"list-public-keys"},"post":{"description":"Register a public P-256 JWK using an existing AgentMail bearer API key\nwith `api_key_create`. Re-registering the same JWK creates a new\ncredential ID; it does not replace or recover an earlier credential.\nThe private key must never be sent to AgentMail.","operationId":"apiKeys_createPublicKey","tags":["ApiKeys"],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicKeyCredential"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Register Public-Key Credential","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePublicKeyRequest"}}}},"x-fern-sdk-group-name":["apiKeys"],"x-fern-sdk-method-name":"create-public-key"}},"/v0/api-keys/public-keys/{api_key_id}":{"patch":{"description":"Rename the credential. All security-relevant fields are immutable.\nRequires `api_key_update`.","operationId":"apiKeys_updatePublicKeyName","tags":["ApiKeys"],"parameters":[{"name":"api_key_id","in":"path","description":"Public-key credential ID returned by registration.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicKeyCredential"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Rename Public-Key Credential","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePublicKeyNameRequest"}}}},"x-fern-sdk-group-name":["apiKeys"],"x-fern-sdk-method-name":"update-public-key-name"},"delete":{"description":"Permanently revoke one public-key credential. This hard-deletes the\ncredential; repeating the request returns not found. Requires\n`api_key_delete`.","operationId":"apiKeys_revokePublicKey","tags":["ApiKeys"],"parameters":[{"name":"api_key_id","in":"path","description":"Public-key credential ID returned by registration.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Revoke Public-Key Credential","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["apiKeys"],"x-fern-sdk-method-name":"revoke-public-key"}},"/v0/api-keys/public-keys/agentid-sign-in/revoke-all":{"post":{"description":"Invalidate every current public-key credential in the caller's\norganization by advancing its AgentID key generation. The caller must be\norganization-scoped and either have `api_key_delete` or, for a verified\nself-serve agent organization, use an unrestricted unmanaged bearer\ncredential. No request body is accepted.\n\n`Idempotency-Key` is required and must be a UUID. Reusing the same UUID\nreturns the original permanent receipt without advancing the generation\nagain. A new UUID performs a new generation advance.","operationId":"apiKeys_revokeAllAgentIdSignInKeys","tags":["ApiKeys"],"parameters":[{"name":"Idempotency-Key","in":"header","description":"Required UUID identifying this revoke-all operation permanently.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeAllAgentIdSignInKeysResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Revoke All AgentID Sign-In Keys","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["apiKeys"],"x-fern-sdk-method-name":"revoke-all-agent-id-sign-in-keys"}},"/v0/api-keys/browser-credentials":{"get":{"description":"List active browser credentials visible to the caller's scope. Requires `api_key_read`.","operationId":"apiKeys_listBrowserCredentials","tags":["ApiKeys"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/BrowserAuthorizationListLimit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListBrowserCredentialsResponse"}}}}},"summary":"List Browser Credentials","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["apiKeys"],"x-fern-sdk-method-name":"list-browser-credentials"}},"/v0/api-keys/browser-credentials/events":{"get":{"description":"List owner-facing browser credential and consent lifecycle events. Requires `api_key_read`.","operationId":"apiKeys_listBrowserCredentialEvents","tags":["ApiKeys"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/BrowserAuthorizationListLimit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListBrowserLifecycleEventsResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List Browser Credential Events","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["apiKeys"],"x-fern-sdk-method-name":"list-browser-credential-events"}},"/v0/api-keys/browser-credentials/{credential_id}":{"delete":{"description":"Permanently revoke one active browser credential. Requires `api_key_delete`.","operationId":"apiKeys_deleteBrowserCredential","tags":["ApiKeys"],"parameters":[{"name":"credential_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete Browser Credential","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["apiKeys"],"x-fern-sdk-method-name":"delete-browser-credential"}},"/v0/api-keys/browser-credentials/enrollments/{enrollment_id}":{"delete":{"description":"Cancel one pending, unexpired browser enrollment intent. Requires `api_key_delete`.","operationId":"apiKeys_cancelBrowserEnrollment","tags":["ApiKeys"],"parameters":[{"name":"enrollment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Cancel Browser Enrollment","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["apiKeys"],"x-fern-sdk-method-name":"cancel-browser-enrollment"}},"/v0/api-keys/browser-consents":{"get":{"description":"List remembered AgentID client approvals for one live inbox. Requires `api_key_read`.","operationId":"apiKeys_listBrowserConsents","tags":["ApiKeys"],"parameters":[{"name":"inbox_id","in":"query","required":true,"schema":{"type":"string","format":"email","maxLength":254}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/BrowserAuthorizationListLimit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListBrowserConsentsResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List Browser Consents","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["apiKeys"],"x-fern-sdk-method-name":"list-browser-consents"}},"/v0/api-keys/browser-consents/{consent_id}":{"delete":{"description":"Revoke one remembered AgentID client approval. Requires `api_key_delete`.","operationId":"apiKeys_deleteBrowserConsent","tags":["ApiKeys"],"parameters":[{"name":"consent_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete Browser Consent","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["apiKeys"],"x-fern-sdk-method-name":"delete-browser-consent"}},"/v0/auth/me":{"get":{"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```","operationId":"auth_me","tags":["Auth"],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Identity"}}}}},"summary":"Who Am I","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["auth"],"x-fern-sdk-method-name":"me"}},"/v0/domains":{"get":{"description":"**CLI:**\n```bash\nagentmail domains list\n```","operationId":"domains_list","tags":["Domains"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDomainsResponse"}}}}},"summary":"List Domains","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["domains"],"x-fern-sdk-method-name":"list"},"post":{"description":"**CLI:**\n```bash\nagentmail domains create --domain example.com\n```","operationId":"domains_create","tags":["Domains"],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Create Domain","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDomainRequest"}}}},"x-fern-sdk-group-name":["domains"],"x-fern-sdk-method-name":"create"}},"/v0/domains/{domain_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail domains get --domain-id \n```","operationId":"domains_get","tags":["Domains"],"parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DomainId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Domain","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["domains"],"x-fern-sdk-method-name":"get"},"patch":{"description":"**CLI:**\n```bash\nagentmail domains update --domain-id \n```","operationId":"domains_update","tags":["Domains"],"parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DomainId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Update Domain","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDomainRequest"}}}},"x-fern-sdk-group-name":["domains"],"x-fern-sdk-method-name":"update"},"delete":{"description":"**CLI:**\n```bash\nagentmail domains delete --domain-id \n```","operationId":"domains_delete","tags":["Domains"],"parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DomainId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete Domain","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["domains"],"x-fern-sdk-method-name":"delete"}},"/v0/domains/{domain_id}/zone-file":{"get":{"description":"**CLI:**\n```bash\nagentmail domains get-zone-file --domain-id \n```","operationId":"domains_getZoneFile","tags":["Domains"],"parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DomainId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Zone File","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["domains"],"x-fern-sdk-method-name":"get-zone-file"}},"/v0/domains/{domain_id}/verify":{"post":{"description":"**CLI:**\n```bash\nagentmail domains verify --domain-id \n```","operationId":"domains_verify","tags":["Domains"],"parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DomainId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Verify Domain","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["domains"],"x-fern-sdk-method-name":"verify"}},"/v0/domains/{domain_id}/setup-link":{"get":{"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.","operationId":"domains_getSetupLink","tags":["Domains"],"parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DomainId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSetupLinkResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Setup Link","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["domains"],"x-fern-sdk-method-name":"get-setup-link"}},"/v0/drafts":{"get":{"description":"**CLI:**\n```bash\nagentmail drafts list\n```","operationId":"drafts_list","tags":["Drafts"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"labels","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Labels","nullable":true}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Before","nullable":true}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/After","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDraftsResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List Drafts","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["drafts"],"x-fern-sdk-method-name":"list"}},"/v0/drafts/{draft_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail drafts get --draft-id \n```","operationId":"drafts_get","tags":["Drafts"],"parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DraftId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Draft","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["drafts"],"x-fern-sdk-method-name":"get"}},"/v0/drafts/{draft_id}/attachments/{attachment_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail drafts get-attachment --draft-id --attachment-id \n```","operationId":"drafts_getAttachment","tags":["Drafts"],"parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DraftId"}},{"name":"attachment_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/AttachmentId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Attachment","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["drafts"],"x-fern-sdk-method-name":"get-attachment"}},"/v0/inboxes/{inbox_id}/api-keys":{"get":{"description":"**CLI:**\n```bash\nagentmail inboxes api-keys list --inbox-id \n```","operationId":"inboxes_apiKeys_list","tags":["InboxesApiKeys"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListApiKeysResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List API Keys","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["inboxes","apiKeys"],"x-fern-sdk-method-name":"list"},"post":{"description":"**CLI:**\n```bash\nagentmail inboxes api-keys create --inbox-id --name \"My Key\"\n```","operationId":"inboxes_apiKeys_create","tags":["InboxesApiKeys"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Create API Key","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}}},"x-fern-sdk-group-name":["inboxes","apiKeys"],"x-fern-sdk-method-name":"create"}},"/v0/inboxes/{inbox_id}/api-keys/{api_key_id}":{"delete":{"description":"**CLI:**\n```bash\nagentmail inboxes api-keys delete --inbox-id --api-key-id \n```","operationId":"inboxes_apiKeys_delete","tags":["InboxesApiKeys"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"api_key_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ApiKeyId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete API Key","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["inboxes","apiKeys"],"x-fern-sdk-method-name":"delete"}},"/v0/inboxes/{inbox_id}/browser-credentials/enrollments":{"post":{"description":"Attach a browser enrollment intent to the inbox. Requires\n`api_key_create`. Before submitting `transaction_jti`, independently\nverify that the browser page's final origin is exactly\n`https://auth.agentid.com`.\n\nThis endpoint is available to every organization using US production.\nIt is not available in EU production.\n\nSelect `inbox_id` from trusted AgentMail configuration. An AgentID\n`login_hint` is not authoritative for selecting the inbox; when the\ntransaction includes one, it must match the path inbox.\n\n**AgentMail API keys are sent only to `https://api.agentmail.to`; AgentID never requests them.**\n\nA new intent returns `202`; an idempotent retry for the same pending\ntransaction, inbox, and bearer key returns `200` with the same receipt.\nAn intent lasts at most five minutes. An activated credential lasts at\nmost 30 days and cannot outlive its authorizing bearer API key.\n\nCreation is limited to 20 intents per bearer API key per hour, 100 per\norganization per hour, and five live unused intents per bearer API key.\nBrowser activation is separately limited to 20 activations per\nauthorizing bearer API key per UTC day. Either kind of limit can return\n`429`; honor the `Retry-After` header. Cancelling an enrollment releases\nits live-intent slot but does not reset the daily activation counter.","operationId":"inboxes_browserCredentials_createEnrollment","tags":["InboxesBrowserCredentials"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}}],"responses":{"202":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserEnrollmentAccepted"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Create Browser Enrollment","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBrowserEnrollmentRequest"}}}},"x-fern-sdk-group-name":["inboxes","browserCredentials"],"x-fern-sdk-method-name":"create-enrollment"}},"/v0/inboxes/{inbox_id}/drafts":{"get":{"description":"**CLI:**\n```bash\nagentmail inboxes drafts list --inbox-id \n```","operationId":"inboxes_drafts_list","tags":["InboxesDrafts"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"labels","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Labels","nullable":true}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Before","nullable":true}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/After","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDraftsResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List Drafts","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["inboxes","drafts"],"x-fern-sdk-method-name":"list"},"post":{"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 --to recipient@example.com --subject \"Draft subject\" --text \"Draft body\"\n```","operationId":"inboxes_drafts_create","tags":["InboxesDrafts"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Create Draft","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDraftRequest"}}}},"x-fern-sdk-group-name":["inboxes","drafts"],"x-fern-sdk-method-name":"create"}},"/v0/inboxes/{inbox_id}/drafts/{draft_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail inboxes drafts get --inbox-id --draft-id \n```","operationId":"inboxes_drafts_get","tags":["InboxesDrafts"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DraftId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Draft","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["inboxes","drafts"],"x-fern-sdk-method-name":"get"},"patch":{"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 --draft-id --subject \"Updated subject\"\n```","operationId":"inboxes_drafts_update","tags":["InboxesDrafts"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DraftId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Update Draft","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDraftRequest"}}}},"x-fern-sdk-group-name":["inboxes","drafts"],"x-fern-sdk-method-name":"update"},"delete":{"description":"**CLI:**\n```bash\nagentmail inboxes drafts delete --inbox-id --draft-id \n```","operationId":"inboxes_drafts_delete","tags":["InboxesDrafts"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DraftId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete Draft","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["inboxes","drafts"],"x-fern-sdk-method-name":"delete"}},"/v0/inboxes/{inbox_id}/drafts/{draft_id}/attachments/{attachment_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail inboxes drafts get-attachment --inbox-id --draft-id --attachment-id \n```","operationId":"inboxes_drafts_getAttachment","tags":["InboxesDrafts"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DraftId"}},{"name":"attachment_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/AttachmentId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Attachment","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["inboxes","drafts"],"x-fern-sdk-method-name":"get-attachment"}},"/v0/inboxes/{inbox_id}/drafts/{draft_id}/send":{"post":{"description":"**CLI:**\n```bash\nagentmail inboxes drafts send --inbox-id --draft-id \n```","operationId":"inboxes_drafts_send","tags":["InboxesDrafts"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DraftId"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key that makes a send idempotent. A retry carrying the same key returns the original message instead of sending a second email; reusing a key with a different request returns a 409 conflict. Keys expire 24 hours after the send completes.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Send Draft","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMessageRequest"}}}},"x-fern-idempotent":true,"x-fern-sdk-group-name":["inboxes","drafts"],"x-fern-sdk-method-name":"send"}},"/v0/inboxes/{inbox_id}/events":{"get":{"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 \n```","operationId":"inboxes_events_list","tags":["InboxesEvents"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListInboxEventsResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List Inbox Events","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["inboxes","events"],"x-fern-sdk-method-name":"list"}},"/v0/inboxes/{inbox_id}/lists/{direction}/{type}":{"get":{"description":"**CLI:**\n```bash\nagentmail inboxes lists list --inbox-id --direction --type \n```","operationId":"inboxes_lists_list","tags":["InboxesLists"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ListType"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PodListListEntriesResponse"}}}}},"summary":"List Entries","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["inboxes","lists"],"x-fern-sdk-method-name":"list"},"post":{"description":"**CLI:**\n```bash\nagentmail inboxes lists create --inbox-id --direction --type --entry user@example.com\n```","operationId":"inboxes_lists_create","tags":["InboxesLists"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ListType"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PodListEntry"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Create List Entry","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateListEntryRequest"}}}},"x-fern-sdk-group-name":["inboxes","lists"],"x-fern-sdk-method-name":"create"}},"/v0/inboxes/{inbox_id}/lists/{direction}/{type}/{entry}":{"get":{"description":"**CLI:**\n```bash\nagentmail inboxes lists get --inbox-id --direction --type --entry \n```","operationId":"inboxes_lists_get","tags":["InboxesLists"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ListType"}},{"name":"entry","in":"path","description":"Email address or domain.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PodListEntry"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get List Entry","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["inboxes","lists"],"x-fern-sdk-method-name":"get"},"delete":{"description":"**CLI:**\n```bash\nagentmail inboxes lists delete --inbox-id --direction --type --entry \n```","operationId":"inboxes_lists_delete","tags":["InboxesLists"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ListType"}},{"name":"entry","in":"path","description":"Email address or domain.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete List Entry","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["inboxes","lists"],"x-fern-sdk-method-name":"delete"}},"/v0/inboxes/{inbox_id}/messages":{"get":{"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 \n```","operationId":"inboxes_messages_list","tags":["InboxesMessages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"labels","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Labels","nullable":true}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Before","nullable":true}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/After","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}},{"name":"include_spam","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeSpam","nullable":true}},{"name":"include_blocked","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeBlocked","nullable":true}},{"name":"include_unauthenticated","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeUnauthenticated","nullable":true}},{"name":"include_trash","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeTrash","nullable":true}},{"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"},"nullable":true}},{"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"},"nullable":true}},{"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"},"nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMessagesResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List Messages","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["inboxes","messages"],"x-fern-sdk-method-name":"list"}},"/v0/inboxes/{inbox_id}/messages/search":{"get":{"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.","operationId":"inboxes_messages_search","tags":["InboxesMessages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"q","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Query"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Before","nullable":true}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/After","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchMessagesResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Search Messages","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["inboxes","messages"],"x-fern-sdk-method-name":"search"}},"/v0/inboxes/{inbox_id}/messages/{message_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail inboxes messages get --inbox-id --message-id \n```","operationId":"inboxes_messages_get","tags":["InboxesMessages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/MessageId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Message","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["inboxes","messages"],"x-fern-sdk-method-name":"get"},"patch":{"description":"**CLI:**\n```bash\nagentmail inboxes messages update --inbox-id --message-id --add-labels read --remove-labels unread\n```","operationId":"inboxes_messages_update","tags":["InboxesMessages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/MessageId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMessageResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Update Message","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMessageRequest"}}}},"x-fern-sdk-group-name":["inboxes","messages"],"x-fern-sdk-method-name":"update"},"delete":{"description":"Permanently deletes a message.\n\n**CLI:**\n```bash\nagentmail inboxes messages delete --inbox-id --message-id \n```","operationId":"inboxes_messages_delete","tags":["InboxesMessages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/MessageId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete Message","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["inboxes","messages"],"x-fern-sdk-method-name":"delete"}},"/v0/inboxes/{inbox_id}/messages/batch-get":{"post":{"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 --message-ids --message-ids \n```","operationId":"inboxes_messages_batchGet","tags":["InboxesMessages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchGetMessagesResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Batch Get Messages","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchGetMessagesRequest"}}}},"x-fern-sdk-group-name":["inboxes","messages"],"x-fern-sdk-method-name":"batch-get"}},"/v0/inboxes/{inbox_id}/messages/batch-update":{"post":{"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 --message-ids --message-ids --add-labels read --remove-labels unread\n```","operationId":"inboxes_messages_batchUpdate","tags":["InboxesMessages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchUpdateMessagesResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Batch Update Messages","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchUpdateMessagesRequest"}}}},"x-fern-sdk-group-name":["inboxes","messages"],"x-fern-sdk-method-name":"batch-update"}},"/v0/inboxes/{inbox_id}/messages/{message_id}/attachments/{attachment_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail inboxes messages get-attachment --inbox-id --message-id --attachment-id \n```","operationId":"inboxes_messages_getAttachment","tags":["InboxesMessages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/MessageId"}},{"name":"attachment_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/AttachmentId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Attachment","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["inboxes","messages"],"x-fern-sdk-method-name":"get-attachment"}},"/v0/inboxes/{inbox_id}/messages/{message_id}/raw":{"get":{"description":"**CLI:**\n```bash\nagentmail inboxes messages get-raw --inbox-id --message-id \n```","operationId":"inboxes_messages_getRaw","tags":["InboxesMessages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/MessageId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RawMessageResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Raw Message","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["inboxes","messages"],"x-fern-sdk-method-name":"get-raw"}},"/v0/inboxes/{inbox_id}/messages/send":{"post":{"description":"**CLI:**\n```bash\nagentmail inboxes messages send --inbox-id --to recipient@example.com --subject \"Hello\" --text \"Body\"\n```","operationId":"inboxes_messages_send","tags":["InboxesMessages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key that makes a send idempotent. A retry carrying the same key returns the original message instead of sending a second email; reusing a key with a different request returns a 409 conflict. Keys expire 24 hours after the send completes.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Send Message","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageRequest"}}}},"x-fern-idempotent":true,"x-fern-sdk-group-name":["inboxes","messages"],"x-fern-sdk-method-name":"send"}},"/v0/inboxes/{inbox_id}/messages/{message_id}/reply":{"post":{"description":"**CLI:**\n```bash\nagentmail inboxes messages reply --inbox-id --message-id --text \"Reply text\"\n```","operationId":"inboxes_messages_reply","tags":["InboxesMessages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/MessageId"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key that makes a send idempotent. A retry carrying the same key returns the original message instead of sending a second email; reusing a key with a different request returns a 409 conflict. Keys expire 24 hours after the send completes.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Reply To Message","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyToMessageRequest"}}}},"x-fern-idempotent":true,"x-fern-sdk-group-name":["inboxes","messages"],"x-fern-sdk-method-name":"reply"}},"/v0/inboxes/{inbox_id}/messages/{message_id}/reply-all":{"post":{"description":"**CLI:**\n```bash\nagentmail inboxes messages reply-all --inbox-id --message-id --text \"Reply text\"\n```","operationId":"inboxes_messages_reply-all","tags":["InboxesMessages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/MessageId"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key that makes a send idempotent. A retry carrying the same key returns the original message instead of sending a second email; reusing a key with a different request returns a 409 conflict. Keys expire 24 hours after the send completes.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Reply All Message","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyAllMessageRequest"}}}},"x-fern-idempotent":true,"x-fern-sdk-group-name":["inboxes","messages"],"x-fern-sdk-method-name":"reply-all"}},"/v0/inboxes/{inbox_id}/messages/{message_id}/forward":{"post":{"description":"**CLI:**\n```bash\nagentmail inboxes messages forward --inbox-id --message-id --to recipient@example.com\n```","operationId":"inboxes_messages_forward","tags":["InboxesMessages"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"message_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/MessageId"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key that makes a send idempotent. A retry carrying the same key returns the original message instead of sending a second email; reusing a key with a different request returns a 409 conflict. Keys expire 24 hours after the send completes.","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Forward Message","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageRequest"}}}},"x-fern-idempotent":true,"x-fern-sdk-group-name":["inboxes","messages"],"x-fern-sdk-method-name":"forward"}},"/v0/inboxes/{inbox_id}/metrics/events":{"get":{"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 \n```","operationId":"inboxes_metrics_queryEvents","tags":["InboxesMetrics"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"event_types","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MetricEventTypes","nullable":true}},{"name":"start","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Start","nullable":true}},{"name":"end","in":"query","required":false,"schema":{"$ref":"#/components/schemas/End","nullable":true}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Period","nullable":true}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MetricLimit","nullable":true}},{"name":"descending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Descending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryMetricsResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Query Events","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["inboxes","metrics"],"x-fern-sdk-method-name":"query-events"}},"/v0/inboxes/{inbox_id}/metrics/usage":{"get":{"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.","operationId":"inboxes_metrics_queryUsage","tags":["InboxesMetrics"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"usage_types","in":"query","required":false,"schema":{"$ref":"#/components/schemas/UsageTypes","nullable":true}},{"name":"start","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Start","nullable":true}},{"name":"end","in":"query","required":false,"schema":{"$ref":"#/components/schemas/End","nullable":true}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Period","nullable":true}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MetricLimit","nullable":true}},{"name":"descending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Descending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryUsageResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Query Usage","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["inboxes","metrics"],"x-fern-sdk-method-name":"query-usage"}},"/v0/inboxes/{inbox_id}/threads":{"get":{"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 \n```","operationId":"inboxes_threads_list","tags":["InboxesThreads"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"labels","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Labels","nullable":true}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Before","nullable":true}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/After","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}},{"name":"include_spam","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeSpam","nullable":true}},{"name":"include_blocked","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeBlocked","nullable":true}},{"name":"include_unauthenticated","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeUnauthenticated","nullable":true}},{"name":"include_trash","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeTrash","nullable":true}},{"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"},"nullable":true}},{"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"},"nullable":true}},{"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"},"nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListThreadsResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List Threads","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["inboxes","threads"],"x-fern-sdk-method-name":"list"}},"/v0/inboxes/{inbox_id}/threads/search":{"get":{"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.","operationId":"inboxes_threads_search","tags":["InboxesThreads"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"q","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Query"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Before","nullable":true}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/After","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchThreadsResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Search Threads","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["inboxes","threads"],"x-fern-sdk-method-name":"search"}},"/v0/inboxes/{inbox_id}/threads/{thread_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail inboxes threads get --inbox-id --thread-id \n```","operationId":"inboxes_threads_get","tags":["InboxesThreads"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ThreadId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Thread"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Thread","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["inboxes","threads"],"x-fern-sdk-method-name":"get"},"patch":{"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.","operationId":"inboxes_threads_update","tags":["InboxesThreads"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ThreadId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateThreadResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Update Thread","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateThreadRequest"}}}},"x-fern-sdk-group-name":["inboxes","threads"],"x-fern-sdk-method-name":"update"},"delete":{"description":"Permanently deletes a thread and all of its messages.\n\n**CLI:**\n```bash\nagentmail inboxes threads delete --inbox-id --thread-id \n```","operationId":"inboxes_threads_delete","tags":["InboxesThreads"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ThreadId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete Thread","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["inboxes","threads"],"x-fern-sdk-method-name":"delete"}},"/v0/inboxes/{inbox_id}/threads/{thread_id}/attachments/{attachment_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail inboxes threads get-attachment --inbox-id --thread-id --attachment-id \n```","operationId":"inboxes_threads_getAttachment","tags":["InboxesThreads"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ThreadId"}},{"name":"attachment_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/AttachmentId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Attachment","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["inboxes","threads"],"x-fern-sdk-method-name":"get-attachment"}},"/v0/inboxes/{inbox_id}/webhooks":{"get":{"description":"**CLI:**\n```bash\nagentmail inboxes webhooks list --inbox-id \n```","operationId":"inboxes_webhooks_list","tags":["InboxesWebhooks"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksListWebhooksResponse"}}}}},"summary":"List Webhooks","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["inboxes","webhooks"],"x-fern-sdk-method-name":"list"},"post":{"description":"Create a webhook scoped to this inbox.\n\n**CLI:**\n```bash\nagentmail inboxes webhooks create --inbox-id --url https://example.com/webhook --event-types message.received\n```","operationId":"inboxes_webhooks_create","tags":["InboxesWebhooks"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksWebhook"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Create Webhook","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksCreateInboxWebhookRequest"}}}},"x-fern-sdk-group-name":["inboxes","webhooks"],"x-fern-sdk-method-name":"create"}},"/v0/inboxes/{inbox_id}/webhooks/{webhook_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail inboxes webhooks get --inbox-id --webhook-id \n```","operationId":"inboxes_webhooks_get","tags":["InboxesWebhooks"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooksWebhookId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksWebhook"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Webhook","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["inboxes","webhooks"],"x-fern-sdk-method-name":"get"},"patch":{"description":"**CLI:**\n```bash\nagentmail inboxes webhooks update --inbox-id --webhook-id --event-types message.received\n```","operationId":"inboxes_webhooks_update","tags":["InboxesWebhooks"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooksWebhookId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksWebhook"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Update Webhook","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksUpdateInboxWebhookRequest"}}}},"x-fern-sdk-group-name":["inboxes","webhooks"],"x-fern-sdk-method-name":"update"},"delete":{"description":"**CLI:**\n```bash\nagentmail inboxes webhooks delete --inbox-id --webhook-id \n```","operationId":"inboxes_webhooks_delete","tags":["InboxesWebhooks"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooksWebhookId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete Webhook","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["inboxes","webhooks"],"x-fern-sdk-method-name":"delete"}},"/v0/inboxes/{inbox_id}/webhooks/{webhook_id}/headers":{"get":{"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.","operationId":"inboxes_webhooks_getHeaders","tags":["InboxesWebhooks"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooksWebhookId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksWebhookHeaderNamesResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Webhook Headers","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["inboxes","webhooks"],"x-fern-sdk-method-name":"get-headers"},"patch":{"description":"Atomically set, replace, or remove custom HTTP headers included with deliveries to this\ninbox-scoped webhook. Header values remain write-only.","operationId":"inboxes_webhooks_updateHeaders","tags":["InboxesWebhooks"],"parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooksWebhookId"}}],"responses":{"204":{"description":""},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Update Webhook Headers","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksUpdateWebhookHeadersRequest"}}}},"x-fern-sdk-group-name":["inboxes","webhooks"],"x-fern-sdk-method-name":"update-headers"}},"/v0/lists/{direction}/{type}":{"get":{"description":"**CLI:**\n```bash\nagentmail lists list --direction --type \n```","operationId":"lists_list","tags":["Lists"],"parameters":[{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ListType"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListListEntriesResponse"}}}}},"summary":"List Entries","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["lists"],"x-fern-sdk-method-name":"list"},"post":{"description":"**CLI:**\n```bash\nagentmail lists create --direction --type --entry user@example.com\n```","operationId":"lists_create","tags":["Lists"],"parameters":[{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ListType"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEntry"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Create List Entry","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateListEntryRequest"}}}},"x-fern-sdk-group-name":["lists"],"x-fern-sdk-method-name":"create"}},"/v0/lists/{direction}/{type}/{entry}":{"get":{"description":"**CLI:**\n```bash\nagentmail lists get --direction --type --entry \n```","operationId":"lists_get","tags":["Lists"],"parameters":[{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ListType"}},{"name":"entry","in":"path","description":"Email address or domain.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEntry"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get List Entry","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["lists"],"x-fern-sdk-method-name":"get"},"delete":{"description":"**CLI:**\n```bash\nagentmail lists delete --direction --type --entry \n```","operationId":"lists_delete","tags":["Lists"],"parameters":[{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ListType"}},{"name":"entry","in":"path","description":"Email address or domain.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete List Entry","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["lists"],"x-fern-sdk-method-name":"delete"}},"/v0/metrics/events":{"get":{"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```","operationId":"metrics_queryEvents","tags":["Metrics"],"parameters":[{"name":"event_types","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MetricEventTypes","nullable":true}},{"name":"start","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Start","nullable":true}},{"name":"end","in":"query","required":false,"schema":{"$ref":"#/components/schemas/End","nullable":true}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Period","nullable":true}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MetricLimit","nullable":true}},{"name":"descending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Descending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryMetricsResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Query Events","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["metrics"],"x-fern-sdk-method-name":"query-events"}},"/v0/metrics/usage":{"get":{"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.","operationId":"metrics_queryUsage","tags":["Metrics"],"parameters":[{"name":"usage_types","in":"query","required":false,"schema":{"$ref":"#/components/schemas/UsageTypes","nullable":true}},{"name":"start","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Start","nullable":true}},{"name":"end","in":"query","required":false,"schema":{"$ref":"#/components/schemas/End","nullable":true}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Period","nullable":true}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MetricLimit","nullable":true}},{"name":"descending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Descending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryUsageResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Query Usage","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["metrics"],"x-fern-sdk-method-name":"query-usage"}},"/v0/organizations":{"get":{"description":"Returns the organization for the authenticated API key (usage limits, counts, and billing metadata).\n\n**CLI:**\n```bash\nagentmail organizations get\n```","operationId":"organizations_get","tags":["Organizations"],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}}},"summary":"Get Organization","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["organizations"],"x-fern-sdk-method-name":"get"}},"/v0/pods/{pod_id}/api-keys":{"get":{"description":"**CLI:**\n```bash\nagentmail pods api-keys list --pod-id \n```","operationId":"pods_apiKeys_list","tags":["PodsApiKeys"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListApiKeysResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List API Keys","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["pods","apiKeys"],"x-fern-sdk-method-name":"list"},"post":{"description":"**CLI:**\n```bash\nagentmail pods api-keys create --pod-id --name \"My Key\"\n```","operationId":"pods_apiKeys_create","tags":["PodsApiKeys"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Create API Key","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}}},"x-fern-sdk-group-name":["pods","apiKeys"],"x-fern-sdk-method-name":"create"}},"/v0/pods/{pod_id}/api-keys/{api_key_id}":{"delete":{"description":"**CLI:**\n```bash\nagentmail pods api-keys delete --pod-id --api-key-id \n```","operationId":"pods_apiKeys_delete","tags":["PodsApiKeys"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"api_key_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ApiKeyId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete API Key","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["pods","apiKeys"],"x-fern-sdk-method-name":"delete"}},"/v0/pods/{pod_id}/domains":{"get":{"description":"**CLI:**\n```bash\nagentmail pods domains list --pod-id \n```","operationId":"pods_domains_list","tags":["PodsDomains"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDomainsResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List Domains","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["pods","domains"],"x-fern-sdk-method-name":"list"},"post":{"description":"**CLI:**\n```bash\nagentmail pods domains create --pod-id --domain example.com\n```","operationId":"pods_domains_create","tags":["PodsDomains"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Create Domain","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDomainRequest"}}}},"x-fern-sdk-group-name":["pods","domains"],"x-fern-sdk-method-name":"create"}},"/v0/pods/{pod_id}/domains/{domain_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail pods domains get --pod-id --domain-id \n```","operationId":"pods_domains_get","tags":["PodsDomains"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DomainId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Domain","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["pods","domains"],"x-fern-sdk-method-name":"get"},"patch":{"description":"**CLI:**\n```bash\nagentmail pods domains update --pod-id --domain-id \n```","operationId":"pods_domains_update","tags":["PodsDomains"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DomainId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Update Domain","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDomainRequest"}}}},"x-fern-sdk-group-name":["pods","domains"],"x-fern-sdk-method-name":"update"},"delete":{"description":"**CLI:**\n```bash\nagentmail pods domains delete --pod-id --domain-id \n```","operationId":"pods_domains_delete","tags":["PodsDomains"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DomainId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete Domain","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["pods","domains"],"x-fern-sdk-method-name":"delete"}},"/v0/pods/{pod_id}/domains/{domain_id}/zone-file":{"get":{"description":"**CLI:**\n```bash\nagentmail pods domains get-zone-file --pod-id --domain-id \n```","operationId":"pods_domains_getZoneFile","tags":["PodsDomains"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DomainId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Zone File","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["pods","domains"],"x-fern-sdk-method-name":"get-zone-file"}},"/v0/pods/{pod_id}/domains/{domain_id}/verify":{"post":{"description":"**CLI:**\n```bash\nagentmail pods domains verify --pod-id --domain-id \n```","operationId":"pods_domains_verify","tags":["PodsDomains"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"domain_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DomainId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Verify Domain","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["pods","domains"],"x-fern-sdk-method-name":"verify"}},"/v0/pods/{pod_id}/drafts":{"get":{"description":"**CLI:**\n```bash\nagentmail pods drafts list --pod-id \n```","operationId":"pods_drafts_list","tags":["PodsDrafts"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"labels","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Labels","nullable":true}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Before","nullable":true}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/After","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDraftsResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List Drafts","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["pods","drafts"],"x-fern-sdk-method-name":"list"}},"/v0/pods/{pod_id}/drafts/{draft_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail pods drafts get --pod-id --draft-id \n```","operationId":"pods_drafts_get","tags":["PodsDrafts"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DraftId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Draft","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["pods","drafts"],"x-fern-sdk-method-name":"get"}},"/v0/pods/{pod_id}/drafts/{draft_id}/attachments/{attachment_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail pods drafts get-attachment --pod-id --draft-id --attachment-id \n```","operationId":"pods_drafts_getAttachment","tags":["PodsDrafts"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"draft_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/DraftId"}},{"name":"attachment_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/AttachmentId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Attachment","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["pods","drafts"],"x-fern-sdk-method-name":"get-attachment"}},"/v0/pods/{pod_id}/inboxes":{"get":{"description":"**CLI:**\n```bash\nagentmail pods inboxes list --pod-id \n```","operationId":"pods_inboxes_list","tags":["PodsInboxes"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxesListInboxesResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List Inboxes","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["pods","inboxes"],"x-fern-sdk-method-name":"list"},"post":{"description":"**CLI:**\n```bash\nagentmail pods inboxes create --pod-id --username myagent --domain example.com\n```","operationId":"pods_inboxes_create","tags":["PodsInboxes"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxesInbox"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"422":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Create Inbox","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxesCreateInboxRequest"}}}},"x-fern-sdk-group-name":["pods","inboxes"],"x-fern-sdk-method-name":"create"}},"/v0/pods/{pod_id}/inboxes/{inbox_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail pods inboxes get --pod-id --inbox-id \n```","operationId":"pods_inboxes_get","tags":["PodsInboxes"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxesInbox"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Inbox","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["pods","inboxes"],"x-fern-sdk-method-name":"get"},"patch":{"description":"**CLI:**\n```bash\nagentmail pods inboxes update --pod-id --inbox-id \n```","operationId":"pods_inboxes_update","tags":["PodsInboxes"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxesInbox"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Update Inbox","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/inboxesUpdateInboxRequest"}}}},"x-fern-sdk-group-name":["pods","inboxes"],"x-fern-sdk-method-name":"update"},"delete":{"description":"**CLI:**\n```bash\nagentmail pods inboxes delete --pod-id --inbox-id \n```","operationId":"pods_inboxes_delete","tags":["PodsInboxes"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"inbox_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/inboxesInboxId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete Inbox","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["pods","inboxes"],"x-fern-sdk-method-name":"delete"}},"/v0/pods/{pod_id}/lists/{direction}/{type}":{"get":{"description":"**CLI:**\n```bash\nagentmail pods lists list --pod-id --direction --type \n```","operationId":"pods_lists_list","tags":["PodsLists"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ListType"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PodListListEntriesResponse"}}}}},"summary":"List Entries","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["pods","lists"],"x-fern-sdk-method-name":"list"},"post":{"description":"**CLI:**\n```bash\nagentmail pods lists create --pod-id --direction --type --entry user@example.com\n```","operationId":"pods_lists_create","tags":["PodsLists"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ListType"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PodListEntry"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Create List Entry","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateListEntryRequest"}}}},"x-fern-sdk-group-name":["pods","lists"],"x-fern-sdk-method-name":"create"}},"/v0/pods/{pod_id}/lists/{direction}/{type}/{entry}":{"get":{"description":"**CLI:**\n```bash\nagentmail pods lists get --pod-id --direction --type --entry \n```","operationId":"pods_lists_get","tags":["PodsLists"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ListType"}},{"name":"entry","in":"path","description":"Email address or domain.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PodListEntry"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get List Entry","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["pods","lists"],"x-fern-sdk-method-name":"get"},"delete":{"description":"**CLI:**\n```bash\nagentmail pods lists delete --pod-id --direction --type --entry \n```","operationId":"pods_lists_delete","tags":["PodsLists"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"direction","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Direction"}},{"name":"type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ListType"}},{"name":"entry","in":"path","description":"Email address or domain.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete List Entry","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["pods","lists"],"x-fern-sdk-method-name":"delete"}},"/v0/pods/{pod_id}/metrics/events":{"get":{"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 \n```","operationId":"pods_metrics_queryEvents","tags":["PodsMetrics"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"event_types","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MetricEventTypes","nullable":true}},{"name":"start","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Start","nullable":true}},{"name":"end","in":"query","required":false,"schema":{"$ref":"#/components/schemas/End","nullable":true}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Period","nullable":true}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MetricLimit","nullable":true}},{"name":"descending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Descending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryMetricsResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Query Events","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["pods","metrics"],"x-fern-sdk-method-name":"query-events"}},"/v0/pods/{pod_id}/metrics/usage":{"get":{"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.","operationId":"pods_metrics_queryUsage","tags":["PodsMetrics"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"usage_types","in":"query","required":false,"schema":{"$ref":"#/components/schemas/UsageTypes","nullable":true}},{"name":"start","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Start","nullable":true}},{"name":"end","in":"query","required":false,"schema":{"$ref":"#/components/schemas/End","nullable":true}},{"name":"period","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Period","nullable":true}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/MetricLimit","nullable":true}},{"name":"descending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Descending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryUsageResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Query Usage","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["pods","metrics"],"x-fern-sdk-method-name":"query-usage"}},"/v0/pods/{pod_id}/threads":{"get":{"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 \n```","operationId":"pods_threads_list","tags":["PodsThreads"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"labels","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Labels","nullable":true}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Before","nullable":true}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/After","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}},{"name":"include_spam","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeSpam","nullable":true}},{"name":"include_blocked","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeBlocked","nullable":true}},{"name":"include_unauthenticated","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeUnauthenticated","nullable":true}},{"name":"include_trash","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeTrash","nullable":true}},{"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"},"nullable":true}},{"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"},"nullable":true}},{"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"},"nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListThreadsResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List Threads","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["pods","threads"],"x-fern-sdk-method-name":"list"}},"/v0/pods/{pod_id}/threads/search":{"get":{"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.","operationId":"pods_threads_search","tags":["PodsThreads"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"q","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Query"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Before","nullable":true}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/After","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchThreadsResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Search Threads","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["pods","threads"],"x-fern-sdk-method-name":"search"}},"/v0/pods/{pod_id}/threads/{thread_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail pods threads get --pod-id --thread-id \n```","operationId":"pods_threads_get","tags":["PodsThreads"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ThreadId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Thread"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Thread","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["pods","threads"],"x-fern-sdk-method-name":"get"},"patch":{"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.","operationId":"pods_threads_update","tags":["PodsThreads"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ThreadId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateThreadResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Update Thread","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateThreadRequest"}}}},"x-fern-sdk-group-name":["pods","threads"],"x-fern-sdk-method-name":"update"},"delete":{"description":"Permanently deletes a thread and all of its messages.\n\n**CLI:**\n```bash\nagentmail pods threads delete --pod-id --thread-id \n```","operationId":"pods_threads_delete","tags":["PodsThreads"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ThreadId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete Thread","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["pods","threads"],"x-fern-sdk-method-name":"delete"}},"/v0/pods/{pod_id}/threads/{thread_id}/attachments/{attachment_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail pods threads get-attachment --pod-id --thread-id --attachment-id \n```","operationId":"pods_threads_getAttachment","tags":["PodsThreads"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ThreadId"}},{"name":"attachment_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/AttachmentId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Attachment","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["pods","threads"],"x-fern-sdk-method-name":"get-attachment"}},"/v0/pods/{pod_id}/webhooks":{"get":{"description":"**CLI:**\n```bash\nagentmail pods webhooks list --pod-id \n```","operationId":"pods_webhooks_list","tags":["PodsWebhooks"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksListWebhooksResponse"}}}}},"summary":"List Webhooks","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["pods","webhooks"],"x-fern-sdk-method-name":"list"},"post":{"description":"Create a webhook scoped to this pod.\n\n**CLI:**\n```bash\nagentmail pods webhooks create --pod-id --url https://example.com/webhook --event-types message.received\n```","operationId":"pods_webhooks_create","tags":["PodsWebhooks"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksWebhook"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}}},"summary":"Create Webhook","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksCreatePodWebhookRequest"}}}},"x-fern-sdk-group-name":["pods","webhooks"],"x-fern-sdk-method-name":"create"}},"/v0/pods/{pod_id}/webhooks/{webhook_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail pods webhooks get --pod-id --webhook-id \n```","operationId":"pods_webhooks_get","tags":["PodsWebhooks"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooksWebhookId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksWebhook"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Webhook","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["pods","webhooks"],"x-fern-sdk-method-name":"get"},"patch":{"description":"**CLI:**\n```bash\nagentmail pods webhooks update --pod-id --webhook-id --add-inbox-ids \n```","operationId":"pods_webhooks_update","tags":["PodsWebhooks"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooksWebhookId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksWebhook"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Update Webhook","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksUpdatePodWebhookRequest"}}}},"x-fern-sdk-group-name":["pods","webhooks"],"x-fern-sdk-method-name":"update"},"delete":{"description":"**CLI:**\n```bash\nagentmail pods webhooks delete --pod-id --webhook-id \n```","operationId":"pods_webhooks_delete","tags":["PodsWebhooks"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooksWebhookId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete Webhook","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["pods","webhooks"],"x-fern-sdk-method-name":"delete"}},"/v0/pods/{pod_id}/webhooks/{webhook_id}/headers":{"get":{"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.","operationId":"pods_webhooks_getHeaders","tags":["PodsWebhooks"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooksWebhookId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksWebhookHeaderNamesResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Webhook Headers","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["pods","webhooks"],"x-fern-sdk-method-name":"get-headers"},"patch":{"description":"Atomically set, replace, or remove custom HTTP headers included with deliveries to this\npod-scoped webhook. Header values remain write-only.","operationId":"pods_webhooks_updateHeaders","tags":["PodsWebhooks"],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/podsPodId"}},{"name":"webhook_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/webhooksWebhookId"}}],"responses":{"204":{"description":""},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Update Webhook Headers","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webhooksUpdateWebhookHeadersRequest"}}}},"x-fern-sdk-group-name":["pods","webhooks"],"x-fern-sdk-method-name":"update-headers"}},"/v0/threads":{"get":{"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```","operationId":"threads_list","tags":["Threads"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Limit","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"labels","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Labels","nullable":true}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Before","nullable":true}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/After","nullable":true}},{"name":"ascending","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Ascending","nullable":true}},{"name":"include_spam","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeSpam","nullable":true}},{"name":"include_blocked","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeBlocked","nullable":true}},{"name":"include_unauthenticated","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeUnauthenticated","nullable":true}},{"name":"include_trash","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IncludeTrash","nullable":true}},{"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"},"nullable":true}},{"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"},"nullable":true}},{"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"},"nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListThreadsResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List Threads","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["threads"],"x-fern-sdk-method-name":"list"}},"/v0/threads/search":{"get":{"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.","operationId":"threads_search","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","nullable":true}},{"name":"page_token","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PageToken","nullable":true}},{"name":"before","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Before","nullable":true}},{"name":"after","in":"query","required":false,"schema":{"$ref":"#/components/schemas/After","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchThreadsResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Search Threads","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["threads"],"x-fern-sdk-method-name":"search"}},"/v0/threads/{thread_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail threads get --thread-id \n```","operationId":"threads_get","tags":["Threads"],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ThreadId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Thread"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Thread","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["threads"],"x-fern-sdk-method-name":"get"},"patch":{"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.","operationId":"threads_update","tags":["Threads"],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ThreadId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateThreadResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Update Thread","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateThreadRequest"}}}},"x-fern-sdk-group-name":["threads"],"x-fern-sdk-method-name":"update"},"delete":{"description":"Permanently deletes a thread and all of its messages.\n\n**CLI:**\n```bash\nagentmail threads delete --thread-id \n```","operationId":"threads_delete","tags":["Threads"],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ThreadId"}}],"responses":{"204":{"description":""},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete Thread","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["threads"],"x-fern-sdk-method-name":"delete"}},"/v0/threads/{thread_id}/attachments/{attachment_id}":{"get":{"description":"**CLI:**\n```bash\nagentmail threads get-attachment --thread-id --attachment-id \n```","operationId":"threads_getAttachment","tags":["Threads"],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ThreadId"}},{"name":"attachment_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/AttachmentId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentResponse"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Attachment","servers":[{"url":"https://api.agentmail.to"},{"url":"https://x402.api.agentmail.to"},{"url":"https://mpp.api.agentmail.to"},{"url":"https://api.agentmail.eu"}],"security":[{"BearerAuth":[]}],"x-fern-sdk-group-name":["threads"],"x-fern-sdk-method-name":"get-attachment"}}},"components":{"schemas":{"Limit":{"title":"Limit","type":"integer","description":"Limit of number of items returned."},"Count":{"title":"Count","type":"integer","description":"Number of items returned."},"PageToken":{"title":"PageToken","type":"string","description":"Page token for pagination."},"Labels":{"title":"Labels","type":"array","items":{"type":"string"},"description":"Labels to filter by."},"Before":{"title":"Before","type":"string","format":"date-time","description":"Timestamp before which to filter by."},"After":{"title":"After","type":"string","format":"date-time","description":"Timestamp after which to filter by."},"Ascending":{"title":"Ascending","type":"boolean","description":"Sort in ascending temporal order."},"IncludeSpam":{"title":"IncludeSpam","type":"boolean","description":"Include spam in results."},"IncludeBlocked":{"title":"IncludeBlocked","type":"boolean","description":"Include blocked in results."},"IncludeUnauthenticated":{"title":"IncludeUnauthenticated","type":"boolean","description":"Include unauthenticated in results."},"IncludeTrash":{"title":"IncludeTrash","type":"boolean","description":"Include trash in results."},"OrganizationId":{"title":"OrganizationId","type":"string","description":"ID of organization."},"Query":{"title":"Query","type":"string","description":"Full-text search query. Matched against the sender, recipients, and\nsubject (substring) and the message body (tokenized full text)."},"ErrorName":{"title":"ErrorName","type":"string","description":"Name of error."},"ErrorMessage":{"title":"ErrorMessage","type":"string","description":"Error message."},"ErrorCode":{"title":"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."},"ErrorFix":{"title":"ErrorFix","type":"string","description":"The concrete next action that resolves the error."},"ErrorDocs":{"title":"ErrorDocs","type":"string","description":"Link to the error reference entry for this code."},"ErrorResponse":{"title":"ErrorResponse","type":"object","properties":{"name":{"$ref":"#/components/schemas/ErrorName"},"code":{"$ref":"#/components/schemas/ErrorCode","nullable":true},"message":{"$ref":"#/components/schemas/ErrorMessage"},"fix":{"$ref":"#/components/schemas/ErrorFix","nullable":true},"docs":{"$ref":"#/components/schemas/ErrorDocs","nullable":true}},"required":["name","message"]},"ValidationErrorResponse":{"title":"ValidationErrorResponse","type":"object","properties":{"name":{"$ref":"#/components/schemas/ErrorName"},"code":{"$ref":"#/components/schemas/ErrorCode","nullable":true},"message":{"$ref":"#/components/schemas/ErrorMessage","nullable":true},"errors":{"description":"Validation errors. Each entry has a path and a message identifying the invalid field."},"fix":{"$ref":"#/components/schemas/ErrorFix","nullable":true},"docs":{"$ref":"#/components/schemas/ErrorDocs","nullable":true}},"required":["name","errors"]},"inboxesInboxId":{"title":"inboxesInboxId","type":"string","description":"The ID of the inbox."},"inboxesEmail":{"title":"inboxesEmail","type":"string","description":"Email address of the inbox."},"inboxesDisplayName":{"title":"inboxesDisplayName","type":"string","description":"Display name: `Display Name `."},"inboxesClientId":{"title":"inboxesClientId","type":"string","description":"Client ID of inbox."},"inboxesMetadataValue":{"title":"inboxesMetadataValue","oneOf":[{"type":"string"},{"type":"number","format":"double"},{"type":"boolean"}],"description":"A metadata value. May be a string, number, or boolean."},"inboxesMetadata":{"title":"inboxesMetadata","type":"object","additionalProperties":{"$ref":"#/components/schemas/inboxesMetadataValue"},"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."},"inboxesUpdateMetadata":{"title":"inboxesUpdateMetadata","type":"object","additionalProperties":{"$ref":"#/components/schemas/inboxesMetadataValue","nullable":true},"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."},"inboxesInbox":{"title":"inboxesInbox","type":"object","properties":{"pod_id":{"$ref":"#/components/schemas/podsPodId"},"inbox_id":{"$ref":"#/components/schemas/inboxesInboxId"},"email":{"$ref":"#/components/schemas/inboxesEmail"},"display_name":{"$ref":"#/components/schemas/inboxesDisplayName","nullable":true},"client_id":{"$ref":"#/components/schemas/inboxesClientId","nullable":true},"metadata":{"$ref":"#/components/schemas/inboxesMetadata","nullable":true,"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"]},"inboxesListInboxesResponse":{"title":"inboxesListInboxesResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit","nullable":true},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"inboxes":{"type":"array","items":{"$ref":"#/components/schemas/inboxesInbox"},"description":"Ordered by `created_at` descending."}},"required":["count","inboxes"]},"inboxesCreateInboxRequest":{"title":"inboxesCreateInboxRequest","type":"object","properties":{"username":{"type":"string","nullable":true,"description":"Username of address. Randomly generated if not specified."},"domain":{"type":"string","nullable":true,"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/inboxesDisplayName","nullable":true},"client_id":{"$ref":"#/components/schemas/inboxesClientId","nullable":true},"metadata":{"$ref":"#/components/schemas/inboxesMetadata","nullable":true,"description":"Custom metadata to attach to the inbox."}}},"inboxesUpdateInboxRequest":{"title":"inboxesUpdateInboxRequest","type":"object","properties":{"display_name":{"$ref":"#/components/schemas/inboxesDisplayName","nullable":true},"metadata":{"$ref":"#/components/schemas/inboxesUpdateMetadata","nullable":true,"description":"Metadata to merge into the inbox's existing metadata. Keys you include\nare added or overwritten; keys you omit are left unchanged. To remove a\nsingle key, send it with a null value. To clear all metadata, send\n`metadata` as null. Sending an empty object is rejected; use null to\nclear. Each update must include at least one of `display_name` or\n`metadata`."}}},"podsPodId":{"title":"podsPodId","type":"string","description":"ID of pod."},"podsName":{"title":"podsName","type":"string","description":"Name of pod."},"podsClientId":{"title":"podsClientId","type":"string","description":"Client ID of pod."},"podsPod":{"title":"podsPod","type":"object","properties":{"pod_id":{"$ref":"#/components/schemas/podsPodId"},"name":{"$ref":"#/components/schemas/podsName"},"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/podsClientId","nullable":true}},"required":["pod_id","name","updated_at","created_at"]},"podsListPodsResponse":{"title":"podsListPodsResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit","nullable":true},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"pods":{"type":"array","items":{"$ref":"#/components/schemas/podsPod"},"description":"Ordered by `created_at` descending."}},"required":["count","pods"]},"podsCreatePodRequest":{"title":"podsCreatePodRequest","type":"object","properties":{"name":{"$ref":"#/components/schemas/podsName","nullable":true},"client_id":{"$ref":"#/components/schemas/podsClientId","nullable":true}}},"webhooksWebhookId":{"title":"webhooksWebhookId","type":"string","description":"ID of webhook."},"webhooksClientId":{"title":"webhooksClientId","type":"string","description":"Client ID of webhook."},"webhooksUrl":{"title":"webhooksUrl","type":"string","description":"URL of webhook endpoint."},"webhooksWebhookHeaders":{"title":"webhooksWebhookHeaders","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."},"webhooksWebhookHeaderNamesResponse":{"title":"webhooksWebhookHeaderNamesResponse","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"]},"webhooksWebhook":{"title":"webhooksWebhook","type":"object","properties":{"webhook_id":{"$ref":"#/components/schemas/webhooksWebhookId"},"url":{"$ref":"#/components/schemas/webhooksUrl"},"event_types":{"$ref":"#/components/schemas/EventTypes","nullable":true},"pod_ids":{"$ref":"#/components/schemas/PodIds","nullable":true},"inbox_ids":{"$ref":"#/components/schemas/InboxIds","nullable":true},"secret":{"type":"string","description":"Secret for webhook signature verification."},"enabled":{"type":"boolean","description":"Webhook is enabled."},"updated_at":{"type":"string","format":"date-time","description":"Time at which webhook was last updated."},"created_at":{"type":"string","format":"date-time","description":"Time at which webhook was created."},"client_id":{"$ref":"#/components/schemas/webhooksClientId","nullable":true}},"required":["webhook_id","url","secret","enabled","updated_at","created_at"]},"webhooksListWebhooksResponse":{"title":"webhooksListWebhooksResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit","nullable":true},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"webhooks":{"type":"array","items":{"$ref":"#/components/schemas/webhooksWebhook"},"description":"Ordered by `created_at` descending."}},"required":["count","webhooks"]},"webhooksCreateWebhookEventTypes":{"title":"webhooksCreateWebhookEventTypes","$ref":"#/components/schemas/EventTypes","description":"Full list of event types this webhook should receive. At least one type is required. Send every type you\nwant in this array (not incremental). See [Webhooks overview](https://docs.agentmail.to/webhooks-overview)\nfor spam, blocked, and unauthenticated events and required permissions."},"webhooksUpdateWebhookEventTypes":{"title":"webhooksUpdateWebhookEventTypes","$ref":"#/components/schemas/EventTypes","description":"When you send a non-empty list, it replaces the webhook's subscribed event types in full (the same\n\"set the list\" behavior as create). It is not a merge or diff: include every event type you want after\nthe update. Sending a one-element array means the webhook will only receive that one type afterward.\nOmit this field or send an empty array to leave event types unchanged. Clearing all types with an empty\nlist is not supported. Subscribing to `message.received.spam`, `message.received.blocked`, or\n`message.received.unauthenticated` requires the matching label permission on the API key."},"webhooksCreateInboxWebhookRequest":{"title":"webhooksCreateInboxWebhookRequest","type":"object","description":"Create a webhook scoped to an inbox. The inbox comes from the path, so `inbox_ids` and `pod_ids`\nare not accepted.","properties":{"url":{"$ref":"#/components/schemas/webhooksUrl"},"event_types":{"$ref":"#/components/schemas/webhooksCreateWebhookEventTypes"},"client_id":{"$ref":"#/components/schemas/webhooksClientId","nullable":true},"headers":{"$ref":"#/components/schemas/webhooksWebhookHeaders","nullable":true}},"required":["url","event_types"]},"webhooksCreatePodWebhookRequest":{"title":"webhooksCreatePodWebhookRequest","type":"object","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.","properties":{"inbox_ids":{"$ref":"#/components/schemas/InboxIds","nullable":true}},"allOf":[{"$ref":"#/components/schemas/webhooksCreateInboxWebhookRequest"}]},"webhooksCreateWebhookRequest":{"title":"webhooksCreateWebhookRequest","type":"object","properties":{"pod_ids":{"$ref":"#/components/schemas/PodIds","nullable":true}},"allOf":[{"$ref":"#/components/schemas/webhooksCreatePodWebhookRequest"}]},"webhooksUpdateInboxWebhookRequest":{"title":"webhooksUpdateInboxWebhookRequest","type":"object","description":"Update an inbox-scoped webhook. It is fixed to its inbox, so only `event_types` can change.","properties":{"event_types":{"$ref":"#/components/schemas/webhooksUpdateWebhookEventTypes","nullable":true}}},"webhooksUpdatePodWebhookRequest":{"title":"webhooksUpdatePodWebhookRequest","type":"object","description":"Update a pod-scoped webhook. You can adjust which inboxes within the pod it listens to and replace\nits `event_types`, but not the pod scope itself.","properties":{"add_inbox_ids":{"$ref":"#/components/schemas/InboxIds","nullable":true,"description":"Inbox IDs to subscribe to the webhook."},"remove_inbox_ids":{"$ref":"#/components/schemas/InboxIds","nullable":true,"description":"Inbox IDs to unsubscribe from the webhook."}},"allOf":[{"$ref":"#/components/schemas/webhooksUpdateInboxWebhookRequest"}]},"webhooksUpdateWebhookRequest":{"title":"webhooksUpdateWebhookRequest","type":"object","properties":{"add_pod_ids":{"$ref":"#/components/schemas/PodIds","nullable":true,"description":"Pod IDs to subscribe to the webhook."},"remove_pod_ids":{"$ref":"#/components/schemas/PodIds","nullable":true,"description":"Pod IDs to unsubscribe from the webhook."}},"allOf":[{"$ref":"#/components/schemas/webhooksUpdatePodWebhookRequest"}]},"webhooksUpdateWebhookHeadersRequest":{"title":"webhooksUpdateWebhookHeadersRequest","type":"object","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.","properties":{"headers":{"$ref":"#/components/schemas/webhooksWebhookHeaders","nullable":true},"remove_headers":{"type":"array","items":{"type":"string"},"nullable":true,"description":"Names of custom delivery headers to remove."}}},"AgentSignupRequest":{"title":"AgentSignupRequest","type":"object","description":"Request body to sign up an agent.","properties":{"human_email":{"type":"string","description":"Email address of the human who owns the agent. A 6-digit OTP will be sent to this address."},"username":{"type":"string","description":"Username for the auto-created inbox (e.g. \"my-agent\" creates my-agent@agentmail.to)."},"source":{"type":"string","nullable":true,"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","nullable":true,"description":"The channel that drove this sign-up — where the agent or its developer discovered AgentMail\n(e.g. `agent.email`, a partner URL, a campaign tag). Answers \"where did this sign-up come from\".\nMax 2048 characters."}},"required":["human_email","username"]},"AgentSignupResponse":{"title":"AgentSignupResponse","type":"object","description":"Response after successful agent sign-up.","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"]},"AgentVerifyRequest":{"title":"AgentVerifyRequest","type":"object","description":"Request body to verify an agent with an OTP code.","properties":{"otp_code":{"type":"string","description":"6-digit verification code sent to the human's email address."}},"required":["otp_code"]},"AgentVerifyResponse":{"title":"AgentVerifyResponse","type":"object","description":"Response after successful agent verification.","properties":{"verified":{"type":"boolean","description":"Whether the organization was verified."}},"required":["verified"]},"ApiKeyId":{"title":"ApiKeyId","type":"string","description":"ID of api key."},"Prefix":{"title":"Prefix","type":"string","description":"Prefix of api key."},"Name":{"title":"Name","type":"string","description":"Name of api key."},"CreatedAt":{"title":"CreatedAt","type":"string","format":"date-time","description":"Time at which api key was created."},"PublicJwkCoordinate":{"title":"PublicJwkCoordinate","type":"string","pattern":"^[A-Za-z0-9_-]{43}$","minLength":43,"maxLength":43,"description":"A 32-byte P-256 coordinate encoded as unpadded base64url."},"PublicJwk":{"title":"PublicJwk","type":"object","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.","properties":{"kty":{"type":"string","const":"EC"},"crv":{"type":"string","const":"P-256"},"x":{"$ref":"#/components/schemas/PublicJwkCoordinate"},"y":{"$ref":"#/components/schemas/PublicJwkCoordinate"}},"required":["kty","crv","x","y"]},"OrganizationPublicKeyScope":{"title":"OrganizationPublicKeyScope","type":"object","description":"Organization-wide authority.","properties":{}},"PodPublicKeyScope":{"title":"PodPublicKeyScope","type":"object","description":"Authority over one live pod and its inboxes.","properties":{"id":{"type":"string","format":"uuid","description":"ID of the pod."}},"required":["id"]},"InboxPublicKeyScope":{"title":"InboxPublicKeyScope","type":"object","description":"Authority over one live inbox incarnation.","properties":{"id":{"type":"string","format":"email","maxLength":254,"description":"ID of the inbox."}},"required":["id"]},"PublicKeyScope":{"title":"PublicKeyScope","oneOf":[{"type":"object","allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["organization"]}}},{"$ref":"#/components/schemas/OrganizationPublicKeyScope"}],"required":["type"]},{"type":"object","allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["pod"]}}},{"$ref":"#/components/schemas/PodPublicKeyScope"}],"required":["type"]},{"type":"object","allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["inbox"]}}},{"$ref":"#/components/schemas/InboxPublicKeyScope"}],"required":["type"]}],"description":"The immutable scope in which a public-key credential can approve AgentID sign-in."},"PublicKeyMaterial":{"title":"PublicKeyMaterial","type":"object","description":"Registered public key material and its server-computed RFC 7638 thumbprint.","properties":{"jwk":{"$ref":"#/components/schemas/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"]},"PublicKeyCredential":{"title":"PublicKeyCredential","type":"object","description":"An AgentID sign-in credential. `type` and `api_key_id` are server-owned;\nuse `api_key_id` as the JWS `kid`. This response never contains a bearer\nsecret or private key.","properties":{"api_key_id":{"type":"string","format":"uuid","description":"Server-generated credential ID. Store this value as the signing key's `kid`."},"type":{"type":"string","const":"public_key","description":"Server-owned credential discriminator. Callers cannot select or update it."},"name":{"$ref":"#/components/schemas/Name","description":"Human-readable credential name."},"public_key":{"$ref":"#/components/schemas/PublicKeyMaterial"},"scope":{"$ref":"#/components/schemas/PublicKeyScope"},"expires_at":{"type":"string","format":"date-time","nullable":true,"description":"Immutable absolute expiry. Omitted when the credential does not expire."},"revoked_at":{"type":"string","format":"date-time","nullable":true,"description":"Present when organization-wide revoke-all invalidated this credential generation."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["api_key_id","type","name","public_key","scope","created_at","updated_at"]},"CreatePublicKeyRequest":{"title":"CreatePublicKeyRequest","type":"object","description":"Register only a public P-256 JWK. Credential type, `api_key_id`, sign-in\neligibility, permissions, and generation are server-owned and are not\nrequest properties.","properties":{"public_key":{"$ref":"#/components/schemas/PublicJwk"},"name":{"type":"string","minLength":1,"maxLength":256,"nullable":true,"description":"Defaults to `AgentID key {first eight fingerprint characters}`."},"scope":{"$ref":"#/components/schemas/PublicKeyScope","nullable":true,"description":"Omit to inherit the registering bearer key's exact scope. An explicit\nscope must be the caller's scope or a live descendant."},"expires_at":{"type":"string","format":"date-time","nullable":true,"description":"Future absolute expiry. Omit to inherit the registering bearer key's\nexpiry. A child credential cannot outlive its creator."}},"required":["public_key"]},"UpdatePublicKeyNameRequest":{"title":"UpdatePublicKeyNameRequest","type":"object","description":"Rename a public-key credential. Key material, ID, type, scope, sign-in\neligibility, permissions, generation, and expiry are immutable.","properties":{"name":{"type":"string","minLength":1,"maxLength":256}},"required":["name"]},"ListPublicKeysResponse":{"title":"ListPublicKeysResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"public_keys":{"type":"array","items":{"$ref":"#/components/schemas/PublicKeyCredential"},"description":"Public-key credentials only, ordered by creation time descending by default."}},"required":["count","public_keys"]},"RevokeAllAgentIdSignInKeysResponse":{"title":"RevokeAllAgentIdSignInKeysResponse","type":"object","description":"Permanent idempotency receipt for an organization-wide AgentID sign-in key revocation.","properties":{"previous_generation":{"type":"integer","minimum":0},"current_generation":{"type":"integer","minimum":1},"revoked_at":{"type":"string","format":"date-time"}},"required":["previous_generation","current_generation","revoked_at"]},"BrowserEnrollmentTransactionJti":{"title":"BrowserEnrollmentTransactionJti","type":"string","pattern":"^[A-Za-z0-9_-]{22}$","minLength":22,"maxLength":22,"description":"Transaction identifier read from an enrollment action on exactly `https://auth.agentid.com`."},"CreateBrowserEnrollmentRequest":{"title":"CreateBrowserEnrollmentRequest","type":"object","description":"Attach a browser enrollment intent to one pending AgentID authorization\ntransaction. The inbox is selected by the trusted path parameter, not an\nAgentID `login_hint`.","properties":{"transaction_jti":{"$ref":"#/components/schemas/BrowserEnrollmentTransactionJti"}},"required":["transaction_jti"]},"BrowserEnrollmentAccepted":{"title":"BrowserEnrollmentAccepted","type":"object","description":"Pending enrollment receipt. The browser completes key creation and proof\non the existing AgentID page. This response contains no URL, token, or\nnavigation instruction.","properties":{"status":{"type":"string","const":"pending"},"enrollment_id":{"type":"string","format":"uuid"},"expires_at":{"type":"integer","minimum":1,"description":"Unix timestamp after which the pending enrollment cannot be activated."}},"required":["status","enrollment_id","expires_at"]},"BrowserCredentialCreator":{"title":"BrowserCredentialCreator","type":"object","properties":{"kind":{"type":"string","const":"bearer_api_key"},"api_key_id":{"type":"string","format":"uuid","description":"Bearer API key that authorized creation of the browser credential."},"created_at":{"type":"string","format":"date-time","description":"Incarnation timestamp of the authorizing bearer API key."}},"required":["kind","api_key_id","created_at"]},"BrowserCredential":{"title":"BrowserCredential","type":"object","description":"Owner-facing metadata for an active browser credential. Private key material never leaves the browser.","properties":{"credential_id":{"type":"string","format":"uuid"},"public_key_fingerprint_prefix":{"type":"string","pattern":"^[A-Za-z0-9_-]{8}$","minLength":8,"maxLength":8},"organization_id":{"type":"string","format":"uuid"},"pod_id":{"type":"string","format":"uuid"},"inbox_id":{"type":"string","format":"email","maxLength":254},"created_by":{"$ref":"#/components/schemas/BrowserCredentialCreator"},"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"}},"required":["credential_id","public_key_fingerprint_prefix","organization_id","pod_id","inbox_id","created_by","created_at","expires_at"]},"BrowserConsent":{"title":"BrowserConsent","type":"object","description":"Remembered approval for one closed AgentID client and inbox.","properties":{"consent_id":{"type":"string","pattern":"^brc1_[A-Za-z0-9_-]{43}$","minLength":48,"maxLength":48},"inbox_id":{"type":"string","format":"email","maxLength":254},"client_type":{"type":"string","const":"closed"},"client_id":{"type":"string","minLength":1,"maxLength":2048},"client_url":{"type":"string","nullable":true,"description":"Registered client URL, when one is available."},"approved_scopes":{"type":"array","items":{"type":"string"},"description":"At least one non-empty scope approved for this client."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"}},"required":["consent_id","inbox_id","client_type","client_id","approved_scopes","created_at","updated_at","expires_at"]},"BrowserLifecycleApiKeyActor":{"title":"BrowserLifecycleApiKeyActor","type":"object","properties":{"api_key_id":{"type":"string","format":"uuid"}},"required":["api_key_id"]},"BrowserLifecycleCredentialActor":{"title":"BrowserLifecycleCredentialActor","type":"object","properties":{"credential_id":{"type":"string","format":"uuid"},"authorizing_api_key_id":{"type":"string","format":"uuid"}},"required":["credential_id","authorizing_api_key_id"]},"BrowserLifecycleActor":{"title":"BrowserLifecycleActor","oneOf":[{"type":"object","allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["api_key"]}}},{"$ref":"#/components/schemas/BrowserLifecycleApiKeyActor"}],"required":["type"]},{"type":"object","allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["browser_credential"]}}},{"$ref":"#/components/schemas/BrowserLifecycleCredentialActor"}],"required":["type"]}]},"BrowserEnrollmentLifecycleEventType":{"title":"BrowserEnrollmentLifecycleEventType","type":"string","enum":["browser_enrollment_intent_created","browser_credential_activated","browser_enrollment_cancelled","browser_credential_deleted"]},"BrowserConsentLifecycleEventType":{"title":"BrowserConsentLifecycleEventType","type":"string","enum":["browser_consent_created","browser_consent_updated","browser_consent_reused","browser_consent_revoked"]},"BrowserEnrollmentLifecycleEvent":{"title":"BrowserEnrollmentLifecycleEvent","type":"object","properties":{"type":{"$ref":"#/components/schemas/BrowserEnrollmentLifecycleEventType"},"trace_id":{"type":"string","format":"uuid"},"event_id":{"type":"string","format":"uuid"},"occurred_at":{"type":"string","format":"date-time"},"organization_id":{"type":"string","format":"uuid"},"pod_id":{"type":"string","format":"uuid"},"actor":{"$ref":"#/components/schemas/BrowserLifecycleActor"},"enrollment_id":{"type":"string","format":"uuid"},"credential_id":{"type":"string","format":"uuid"}},"required":["type","trace_id","event_id","occurred_at","organization_id","pod_id","actor","enrollment_id","credential_id"]},"BrowserConsentLifecycleEvent":{"title":"BrowserConsentLifecycleEvent","type":"object","properties":{"type":{"$ref":"#/components/schemas/BrowserConsentLifecycleEventType"},"trace_id":{"type":"string","format":"uuid"},"event_id":{"type":"string","format":"uuid"},"occurred_at":{"type":"string","format":"date-time"},"organization_id":{"type":"string","format":"uuid"},"pod_id":{"type":"string","format":"uuid"},"actor":{"$ref":"#/components/schemas/BrowserLifecycleActor"},"consent_id":{"type":"string","pattern":"^brc1_[A-Za-z0-9_-]{43}$","minLength":48,"maxLength":48},"client_type":{"type":"string","const":"closed"},"client_id":{"type":"string","minLength":1,"maxLength":2048}},"required":["type","trace_id","event_id","occurred_at","organization_id","pod_id","actor","consent_id","client_type","client_id"]},"BrowserLifecycleEvent":{"title":"BrowserLifecycleEvent","oneOf":[{"$ref":"#/components/schemas/BrowserEnrollmentLifecycleEvent"},{"$ref":"#/components/schemas/BrowserConsentLifecycleEvent"}]},"BrowserAuthorizationListLimit":{"title":"BrowserAuthorizationListLimit","type":"integer","minimum":1,"maximum":100},"ListBrowserCredentialsResponse":{"title":"ListBrowserCredentialsResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/BrowserAuthorizationListLimit"},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"credentials":{"type":"array","items":{"$ref":"#/components/schemas/BrowserCredential"}}},"required":["count","limit","credentials"]},"ListBrowserConsentsResponse":{"title":"ListBrowserConsentsResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/BrowserAuthorizationListLimit"},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"consents":{"type":"array","items":{"$ref":"#/components/schemas/BrowserConsent"}}},"required":["count","limit","consents"]},"ListBrowserLifecycleEventsResponse":{"title":"ListBrowserLifecycleEventsResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/BrowserAuthorizationListLimit"},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"events":{"type":"array","items":{"$ref":"#/components/schemas/BrowserLifecycleEvent"}}},"required":["count","limit","events"]},"ApiKeyPermissions":{"title":"ApiKeyPermissions","type":"object","description":"Granular permissions for the API key. When ommitted all permissions are granted. Otherwise, only permissions set to true are granted.","properties":{"inbox_read":{"type":"boolean","nullable":true,"description":"Read inbox details."},"inbox_create":{"type":"boolean","nullable":true,"description":"Create new inboxes."},"inbox_update":{"type":"boolean","nullable":true,"description":"Update inbox settings."},"inbox_delete":{"type":"boolean","nullable":true,"description":"Delete inboxes."},"message_read":{"type":"boolean","nullable":true,"description":"Read messages. Also required to read threads."},"message_send":{"type":"boolean","nullable":true,"description":"Send messages."},"message_update":{"type":"boolean","nullable":true,"description":"Update message labels. Also required to update threads."},"message_delete":{"type":"boolean","nullable":true,"description":"Delete messages. Also required to delete threads."},"label_spam_read":{"type":"boolean","nullable":true,"description":"Access messages labeled spam."},"label_blocked_read":{"type":"boolean","nullable":true,"description":"Access messages labeled blocked."},"label_unauthenticated_read":{"type":"boolean","nullable":true,"description":"Access messages labeled unauthenticated."},"label_trash_read":{"type":"boolean","nullable":true,"description":"Access messages labeled trash."},"draft_read":{"type":"boolean","nullable":true,"description":"Read drafts."},"draft_create":{"type":"boolean","nullable":true,"description":"Create drafts."},"draft_update":{"type":"boolean","nullable":true,"description":"Update drafts."},"draft_delete":{"type":"boolean","nullable":true,"description":"Delete drafts."},"draft_send":{"type":"boolean","nullable":true,"description":"Send drafts."},"webhook_read":{"type":"boolean","nullable":true,"description":"Read webhook configurations."},"webhook_create":{"type":"boolean","nullable":true,"description":"Create webhooks."},"webhook_update":{"type":"boolean","nullable":true,"description":"Update webhooks."},"webhook_delete":{"type":"boolean","nullable":true,"description":"Delete webhooks."},"domain_read":{"type":"boolean","nullable":true,"description":"Read domain details."},"domain_create":{"type":"boolean","nullable":true,"description":"Create domains."},"domain_update":{"type":"boolean","nullable":true,"description":"Update domains."},"domain_delete":{"type":"boolean","nullable":true,"description":"Delete domains."},"list_entry_read":{"type":"boolean","nullable":true,"description":"Read list entries."},"list_entry_create":{"type":"boolean","nullable":true,"description":"Create list entries."},"list_entry_delete":{"type":"boolean","nullable":true,"description":"Delete list entries."},"metrics_read":{"type":"boolean","nullable":true,"description":"Read metrics."},"api_key_read":{"type":"boolean","nullable":true,"description":"Read API keys."},"api_key_create":{"type":"boolean","nullable":true,"description":"Create API keys."},"api_key_update":{"type":"boolean","nullable":true,"description":"Update API keys."},"api_key_delete":{"type":"boolean","nullable":true,"description":"Delete API keys."},"pod_read":{"type":"boolean","nullable":true,"description":"Read pods."},"pod_create":{"type":"boolean","nullable":true,"description":"Create pods."},"pod_delete":{"type":"boolean","nullable":true,"description":"Delete pods."}}},"ApiKey":{"title":"ApiKey","type":"object","properties":{"api_key_id":{"$ref":"#/components/schemas/ApiKeyId"},"prefix":{"$ref":"#/components/schemas/Prefix"},"name":{"$ref":"#/components/schemas/Name"},"pod_id":{"type":"string","nullable":true,"description":"Pod ID the api key is scoped to. If set, the key can only access resources within this pod."},"inbox_id":{"type":"string","nullable":true,"description":"Inbox ID the api key is scoped to. If set, the key can only access resources within this inbox."},"used_at":{"type":"string","format":"date-time","nullable":true,"description":"Time at which api key was last used."},"permissions":{"$ref":"#/components/schemas/ApiKeyPermissions","nullable":true},"created_at":{"$ref":"#/components/schemas/CreatedAt"}},"required":["api_key_id","prefix","name","created_at"]},"CreateApiKeyResponse":{"title":"CreateApiKeyResponse","type":"object","properties":{"api_key_id":{"$ref":"#/components/schemas/ApiKeyId"},"api_key":{"type":"string","description":"API key."},"prefix":{"$ref":"#/components/schemas/Prefix"},"name":{"$ref":"#/components/schemas/Name"},"pod_id":{"type":"string","nullable":true,"description":"Pod ID the api key is scoped to."},"inbox_id":{"type":"string","nullable":true,"description":"Inbox ID the api key is scoped to."},"permissions":{"$ref":"#/components/schemas/ApiKeyPermissions","nullable":true},"created_at":{"$ref":"#/components/schemas/CreatedAt"}},"required":["api_key_id","api_key","prefix","name","created_at"]},"ListApiKeysResponse":{"title":"ListApiKeysResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"api_keys":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"},"description":"Ordered by `created_at` descending."}},"required":["count","api_keys"]},"CreateApiKeyRequest":{"title":"CreateApiKeyRequest","type":"object","properties":{"name":{"$ref":"#/components/schemas/Name","nullable":true},"permissions":{"$ref":"#/components/schemas/ApiKeyPermissions","nullable":true}}},"AttachmentId":{"title":"AttachmentId","type":"string","description":"ID of attachment."},"AttachmentFilename":{"title":"AttachmentFilename","type":"string","description":"Filename of attachment."},"AttachmentSize":{"title":"AttachmentSize","type":"integer","description":"Size of attachment in bytes."},"AttachmentContentType":{"title":"AttachmentContentType","type":"string","description":"Content type of attachment."},"AttachmentContentDisposition":{"title":"AttachmentContentDisposition","type":"string","enum":["inline","attachment"],"description":"Content disposition of attachment."},"AttachmentContentId":{"title":"AttachmentContentId","type":"string","description":"Content ID of attachment."},"Attachment":{"title":"Attachment","type":"object","properties":{"attachment_id":{"$ref":"#/components/schemas/AttachmentId"},"filename":{"$ref":"#/components/schemas/AttachmentFilename","nullable":true},"size":{"$ref":"#/components/schemas/AttachmentSize"},"content_type":{"$ref":"#/components/schemas/AttachmentContentType","nullable":true},"content_disposition":{"$ref":"#/components/schemas/AttachmentContentDisposition","nullable":true},"content_id":{"$ref":"#/components/schemas/AttachmentContentId","nullable":true}},"required":["attachment_id","size"]},"AttachmentResponse":{"title":"AttachmentResponse","type":"object","properties":{"attachment_id":{"$ref":"#/components/schemas/AttachmentId"},"filename":{"$ref":"#/components/schemas/AttachmentFilename","nullable":true},"size":{"$ref":"#/components/schemas/AttachmentSize"},"content_type":{"$ref":"#/components/schemas/AttachmentContentType","nullable":true},"content_disposition":{"$ref":"#/components/schemas/AttachmentContentDisposition","nullable":true},"content_id":{"$ref":"#/components/schemas/AttachmentContentId","nullable":true},"download_url":{"type":"string","description":"URL to download the attachment."},"expires_at":{"type":"string","format":"date-time","description":"Time at which the download URL expires."}},"required":["attachment_id","size","download_url","expires_at"]},"SendAttachment":{"title":"SendAttachment","type":"object","description":"Provide either `content` or `url` for each attachment.","properties":{"filename":{"$ref":"#/components/schemas/AttachmentFilename","nullable":true},"content_type":{"$ref":"#/components/schemas/AttachmentContentType","nullable":true},"content_disposition":{"$ref":"#/components/schemas/AttachmentContentDisposition","nullable":true},"content_id":{"$ref":"#/components/schemas/AttachmentContentId","nullable":true},"content":{"type":"string","nullable":true,"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","nullable":true,"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."}}},"ScopeType":{"title":"ScopeType","type":"string","enum":["organization","pod","inbox"],"description":"The scope tier the authenticated credential is bound to."},"Identity":{"title":"Identity","type":"object","description":"Identity and scope of the authenticated credential.","properties":{"scope_type":{"$ref":"#/components/schemas/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","nullable":true,"description":"ID of the pod the credential is scoped to. Present when scope_type is pod or inbox."},"inbox_id":{"type":"string","nullable":true,"description":"ID of the inbox the credential is scoped to. Present when scope_type is inbox."},"api_key_id":{"type":"string","nullable":true,"description":"ID of the API key used to authenticate. Absent for JWT and proxy credentials."}},"required":["scope_type","scope_id","organization_id"]},"DomainId":{"title":"DomainId","type":"string","description":"The ID of the domain."},"DomainName":{"title":"DomainName","type":"string","description":"The name of the domain (e.g., `example.com`)."},"RecordType":{"title":"RecordType","type":"string","enum":["TXT","CNAME","MX"]},"VerificationStatus":{"title":"VerificationStatus","type":"string","enum":["NOT_STARTED","PENDING","INVALID","FAILED","VERIFYING","VERIFIED"]},"RecordStatus":{"title":"RecordStatus","type":"string","enum":["MISSING","INVALID","VALID"]},"VerificationRecord":{"title":"VerificationRecord","type":"object","properties":{"type":{"$ref":"#/components/schemas/RecordType","description":"The type of the DNS record."},"name":{"type":"string","description":"The name or host of the record."},"value":{"type":"string","description":"The value of the record."},"status":{"$ref":"#/components/schemas/RecordStatus","description":"The verification status of this specific record."},"priority":{"type":"integer","nullable":true,"description":"The priority of the MX record."},"reason":{"type":"string","nullable":true,"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"]},"Status":{"title":"Status","$ref":"#/components/schemas/VerificationStatus","description":"The verification status of the domain."},"FeedbackEnabled":{"title":"FeedbackEnabled","type":"boolean","description":"Bounce and complaint notifications are sent to your inboxes."},"SubdomainsEnabled":{"title":"SubdomainsEnabled","type":"boolean","description":"Allow inboxes on any subdomain of this domain. Adds a required wildcard MX\nrecord (`*.`) to `records`."},"TrackingEnabled":{"title":"TrackingEnabled","type":"boolean","description":"Serve open tracking pixels from this domain. Adds a required `link.`\nCNAME record to `records`, which must be published and verified before\n`track_opens` can be used on a send."},"ClientId":{"title":"ClientId","type":"string","description":"Client ID of domain."},"Domain":{"title":"Domain","type":"object","properties":{"pod_id":{"$ref":"#/components/schemas/podsPodId","nullable":true},"domain_id":{"$ref":"#/components/schemas/DomainId"},"domain":{"$ref":"#/components/schemas/DomainName"},"status":{"$ref":"#/components/schemas/Status"},"reason":{"type":"string","nullable":true,"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), and `ses_not_verified_for_sending`. Absent when VERIFIED."},"feedback_enabled":{"$ref":"#/components/schemas/FeedbackEnabled"},"subdomains_enabled":{"$ref":"#/components/schemas/SubdomainsEnabled"},"tracking_enabled":{"$ref":"#/components/schemas/TrackingEnabled"},"records":{"type":"array","items":{"$ref":"#/components/schemas/VerificationRecord"},"description":"A list of DNS records required to verify the domain. Includes a\nwildcard MX record (`*.`) when `subdomains_enabled` is true."},"client_id":{"$ref":"#/components/schemas/ClientId","nullable":true},"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"]},"DomainItem":{"title":"DomainItem","type":"object","properties":{"pod_id":{"$ref":"#/components/schemas/podsPodId","nullable":true},"domain_id":{"$ref":"#/components/schemas/DomainId"},"domain":{"$ref":"#/components/schemas/DomainName"},"feedback_enabled":{"$ref":"#/components/schemas/FeedbackEnabled"},"subdomains_enabled":{"$ref":"#/components/schemas/SubdomainsEnabled"},"tracking_enabled":{"$ref":"#/components/schemas/TrackingEnabled"},"client_id":{"$ref":"#/components/schemas/ClientId","nullable":true},"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"]},"ListDomainsResponse":{"title":"ListDomainsResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit","nullable":true},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"domains":{"type":"array","items":{"$ref":"#/components/schemas/DomainItem"},"description":"Ordered by `created_at` descending."}},"required":["count","domains"]},"GetSetupLinkResponse":{"title":"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","nullable":true,"description":"Display name of the domain's DNS provider, for the setup button label."},"url":{"type":"string","nullable":true,"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","nullable":true,"description":"Suggested popup width from the provider, in pixels."},"height":{"type":"integer","nullable":true,"description":"Suggested popup height from the provider, in pixels."},"state":{"type":"string","nullable":true,"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","nullable":true,"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"]},"CreateDomainRequest":{"title":"CreateDomainRequest","type":"object","properties":{"domain":{"$ref":"#/components/schemas/DomainName"},"feedback_enabled":{"$ref":"#/components/schemas/FeedbackEnabled","nullable":true},"subdomains_enabled":{"$ref":"#/components/schemas/SubdomainsEnabled","nullable":true},"tracking_enabled":{"$ref":"#/components/schemas/TrackingEnabled","nullable":true}},"required":["domain"]},"UpdateDomainRequest":{"title":"UpdateDomainRequest","type":"object","description":"Provide at least one of `feedback_enabled`, `subdomains_enabled`, or\n`tracking_enabled`. Omitted\nfields are left unchanged; an empty body is rejected. Enabling\n`subdomains_enabled` on a verified domain returns it to `PENDING` until the\nnewly-required wildcard MX record (`*.`) is published and verified.","properties":{"feedback_enabled":{"$ref":"#/components/schemas/FeedbackEnabled","nullable":true},"subdomains_enabled":{"$ref":"#/components/schemas/SubdomainsEnabled","nullable":true},"tracking_enabled":{"$ref":"#/components/schemas/TrackingEnabled","nullable":true}}},"DraftId":{"title":"DraftId","type":"string","description":"ID of draft."},"DraftClientId":{"title":"DraftClientId","type":"string","description":"Client ID of draft."},"DraftLabels":{"title":"DraftLabels","type":"array","items":{"type":"string"},"description":"Labels of draft."},"DraftReplyTo":{"title":"DraftReplyTo","type":"array","items":{"type":"string"},"description":"Reply-to addresses. In format `username@domain.com` or `Display Name `."},"DraftTo":{"title":"DraftTo","type":"array","items":{"type":"string"},"description":"Addresses of recipients. In format `username@domain.com` or `Display Name `."},"DraftCc":{"title":"DraftCc","type":"array","items":{"type":"string"},"description":"Addresses of CC recipients. In format `username@domain.com` or `Display Name `."},"DraftBcc":{"title":"DraftBcc","type":"array","items":{"type":"string"},"description":"Addresses of BCC recipients. In format `username@domain.com` or `Display Name `."},"DraftSubject":{"title":"DraftSubject","type":"string","description":"Subject of draft."},"DraftPreview":{"title":"DraftPreview","type":"string","description":"Text preview of draft."},"DraftText":{"title":"DraftText","type":"string","description":"Plain text body of draft."},"DraftHtml":{"title":"DraftHtml","type":"string","description":"HTML body of draft."},"DraftAttachments":{"title":"DraftAttachments","type":"array","items":{"$ref":"#/components/schemas/Attachment"},"description":"Attachments in draft."},"DraftInReplyTo":{"title":"DraftInReplyTo","type":"string","description":"ID of message being replied to."},"DraftForwardOf":{"title":"DraftForwardOf","type":"string","description":"ID of message being forwarded."},"DraftReplyAll":{"title":"DraftReplyAll","type":"boolean","description":"Reply to all recipients of the original message."},"DraftSendStatus":{"title":"DraftSendStatus","type":"string","enum":["scheduled","sending","failed"],"description":"Schedule send status of draft."},"DraftSendAt":{"title":"DraftSendAt","type":"string","format":"date-time","description":"Time at which to schedule send draft."},"DraftUpdatedAt":{"title":"DraftUpdatedAt","type":"string","format":"date-time","description":"Time at which draft was last updated."},"DraftItem":{"title":"DraftItem","type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxesInboxId"},"draft_id":{"$ref":"#/components/schemas/DraftId"},"labels":{"$ref":"#/components/schemas/DraftLabels"},"to":{"$ref":"#/components/schemas/DraftTo","nullable":true},"cc":{"$ref":"#/components/schemas/DraftCc","nullable":true},"bcc":{"$ref":"#/components/schemas/DraftBcc","nullable":true},"subject":{"$ref":"#/components/schemas/DraftSubject","nullable":true},"preview":{"$ref":"#/components/schemas/DraftPreview","nullable":true},"attachments":{"$ref":"#/components/schemas/DraftAttachments","nullable":true},"in_reply_to":{"$ref":"#/components/schemas/DraftInReplyTo","nullable":true},"forward_of":{"$ref":"#/components/schemas/DraftForwardOf","nullable":true},"send_status":{"$ref":"#/components/schemas/DraftSendStatus","nullable":true},"send_at":{"$ref":"#/components/schemas/DraftSendAt","nullable":true},"updated_at":{"$ref":"#/components/schemas/DraftUpdatedAt"}},"required":["inbox_id","draft_id","labels","updated_at"]},"Draft":{"title":"Draft","type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxesInboxId"},"draft_id":{"$ref":"#/components/schemas/DraftId"},"client_id":{"$ref":"#/components/schemas/DraftClientId","nullable":true},"labels":{"$ref":"#/components/schemas/DraftLabels"},"reply_to":{"$ref":"#/components/schemas/DraftReplyTo","nullable":true},"to":{"$ref":"#/components/schemas/DraftTo","nullable":true},"cc":{"$ref":"#/components/schemas/DraftCc","nullable":true},"bcc":{"$ref":"#/components/schemas/DraftBcc","nullable":true},"subject":{"$ref":"#/components/schemas/DraftSubject","nullable":true},"preview":{"$ref":"#/components/schemas/DraftPreview","nullable":true},"text":{"$ref":"#/components/schemas/DraftText","nullable":true},"html":{"$ref":"#/components/schemas/DraftHtml","nullable":true},"attachments":{"$ref":"#/components/schemas/DraftAttachments","nullable":true},"in_reply_to":{"$ref":"#/components/schemas/DraftInReplyTo","nullable":true},"forward_of":{"$ref":"#/components/schemas/DraftForwardOf","nullable":true},"references":{"type":"array","items":{"type":"string"},"nullable":true,"description":"IDs of previous messages in thread."},"send_status":{"$ref":"#/components/schemas/DraftSendStatus","nullable":true},"send_at":{"$ref":"#/components/schemas/DraftSendAt","nullable":true},"updated_at":{"$ref":"#/components/schemas/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"]},"ListDraftsResponse":{"title":"ListDraftsResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit","nullable":true},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"drafts":{"type":"array","items":{"$ref":"#/components/schemas/DraftItem"},"description":"Ordered by `updated_at` descending."}},"required":["count","drafts"]},"CreateDraftRequest":{"title":"CreateDraftRequest","type":"object","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.","properties":{"labels":{"$ref":"#/components/schemas/DraftLabels","nullable":true},"reply_to":{"$ref":"#/components/schemas/DraftReplyTo","nullable":true},"to":{"$ref":"#/components/schemas/DraftTo","nullable":true},"cc":{"$ref":"#/components/schemas/DraftCc","nullable":true},"bcc":{"$ref":"#/components/schemas/DraftBcc","nullable":true},"subject":{"$ref":"#/components/schemas/DraftSubject","nullable":true},"text":{"$ref":"#/components/schemas/DraftText","nullable":true},"html":{"$ref":"#/components/schemas/DraftHtml","nullable":true},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/SendAttachment"},"nullable":true,"description":"Attachments to include in draft."},"in_reply_to":{"$ref":"#/components/schemas/DraftInReplyTo","nullable":true},"forward_of":{"$ref":"#/components/schemas/DraftForwardOf","nullable":true},"reply_all":{"$ref":"#/components/schemas/DraftReplyAll","nullable":true},"send_at":{"$ref":"#/components/schemas/DraftSendAt","nullable":true},"client_id":{"$ref":"#/components/schemas/DraftClientId","nullable":true}}},"UpdateDraftRequest":{"title":"UpdateDraftRequest","type":"object","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.","properties":{"reply_to":{"$ref":"#/components/schemas/DraftReplyTo","nullable":true},"to":{"$ref":"#/components/schemas/DraftTo","nullable":true},"cc":{"$ref":"#/components/schemas/DraftCc","nullable":true},"bcc":{"$ref":"#/components/schemas/DraftBcc","nullable":true},"subject":{"$ref":"#/components/schemas/DraftSubject","nullable":true},"text":{"$ref":"#/components/schemas/DraftText","nullable":true},"html":{"$ref":"#/components/schemas/DraftHtml","nullable":true},"add_attachments":{"type":"array","items":{"$ref":"#/components/schemas/SendAttachment"},"nullable":true,"description":"Attachments to add to the draft."},"remove_attachments":{"type":"array","items":{"$ref":"#/components/schemas/AttachmentId"},"nullable":true,"description":"IDs of attachments to remove from the draft."},"add_labels":{"$ref":"#/components/schemas/DraftLabels","nullable":true,"description":"Label or labels to add to the draft."},"remove_labels":{"$ref":"#/components/schemas/DraftLabels","nullable":true,"description":"Label or labels to remove from the draft."},"send_at":{"$ref":"#/components/schemas/DraftSendAt","nullable":true}}},"EventType":{"title":"EventType","type":"string","enum":["message.received","message.received.spam","message.received.blocked","message.received.unauthenticated","message.sent","message.delivered","message.bounced","message.complained","message.rejected","message.opened","domain.verified"]},"EventTypes":{"title":"EventTypes","type":"array","items":{"$ref":"#/components/schemas/EventType"},"description":"Event types for which to send events."},"MessageReceivedEventType":{"title":"MessageReceivedEventType","type":"string","enum":["message.received","message.received.spam","message.received.blocked","message.received.unauthenticated"]},"PodIds":{"title":"PodIds","type":"array","items":{"type":"string"},"description":"Pods for which to send events. Maximum 10 per webhook."},"InboxIds":{"title":"InboxIds","type":"array","items":{"type":"string"},"description":"Inboxes for which to send events. Maximum 10 per webhook."},"EventId":{"title":"EventId","type":"string","description":"ID of event."},"Timestamp":{"title":"Timestamp","type":"string","format":"date-time","description":"Timestamp of event."},"Recipient":{"title":"Recipient","type":"object","properties":{"address":{"type":"string","description":"Recipient address."},"status":{"type":"string","description":"Recipient status."}},"required":["address","status"]},"Send":{"title":"Send","type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxesInboxId"},"thread_id":{"$ref":"#/components/schemas/ThreadId"},"message_id":{"$ref":"#/components/schemas/MessageId"},"timestamp":{"$ref":"#/components/schemas/Timestamp"},"recipients":{"type":"array","items":{"type":"string"},"description":"Sent recipients."}},"required":["inbox_id","thread_id","message_id","timestamp","recipients"],"x-fern-type-name":"SendEvent"},"Delivery":{"title":"Delivery","type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxesInboxId"},"thread_id":{"$ref":"#/components/schemas/ThreadId"},"message_id":{"$ref":"#/components/schemas/MessageId"},"timestamp":{"$ref":"#/components/schemas/Timestamp"},"recipients":{"type":"array","items":{"type":"string"},"description":"Delivered recipients."}},"required":["inbox_id","thread_id","message_id","timestamp","recipients"]},"Bounce":{"title":"Bounce","type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxesInboxId"},"thread_id":{"$ref":"#/components/schemas/ThreadId"},"message_id":{"$ref":"#/components/schemas/MessageId"},"timestamp":{"$ref":"#/components/schemas/Timestamp"},"type":{"type":"string","description":"Bounce type."},"sub_type":{"type":"string","description":"Bounce sub-type."},"recipients":{"type":"array","items":{"$ref":"#/components/schemas/Recipient"},"description":"Bounced recipients."}},"required":["inbox_id","thread_id","message_id","timestamp","type","sub_type","recipients"]},"Complaint":{"title":"Complaint","type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxesInboxId"},"thread_id":{"$ref":"#/components/schemas/ThreadId"},"message_id":{"$ref":"#/components/schemas/MessageId"},"timestamp":{"$ref":"#/components/schemas/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"]},"Reject":{"title":"Reject","type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxesInboxId"},"thread_id":{"$ref":"#/components/schemas/ThreadId"},"message_id":{"$ref":"#/components/schemas/MessageId"},"timestamp":{"$ref":"#/components/schemas/Timestamp"},"reason":{"type":"string","description":"Reject reason."}},"required":["inbox_id","thread_id","message_id","timestamp","reason"]},"Open":{"title":"Open","type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxesInboxId"},"thread_id":{"$ref":"#/components/schemas/ThreadId"},"message_id":{"$ref":"#/components/schemas/MessageId"},"timestamp":{"$ref":"#/components/schemas/Timestamp"}},"required":["inbox_id","thread_id","message_id","timestamp"]},"MessageReceivedEvent":{"title":"MessageReceivedEvent","type":"object","description":"A message was received. Spam, blocked, and unauthenticated received-message events use the same payload shape with different `event_type` values.","properties":{"type":{"type":"string","const":"event"},"event_type":{"$ref":"#/components/schemas/MessageReceivedEventType"},"event_id":{"$ref":"#/components/schemas/EventId"},"message":{"$ref":"#/components/schemas/Message"},"thread":{"$ref":"#/components/schemas/ThreadItem"}},"required":["type","event_type","event_id","message","thread"]},"MessageSentEvent":{"title":"MessageSentEvent","type":"object","properties":{"type":{"type":"string","const":"event"},"event_type":{"type":"string","const":"message.sent"},"event_id":{"$ref":"#/components/schemas/EventId"},"send":{"$ref":"#/components/schemas/Send"}},"required":["type","event_type","event_id","send"]},"MessageDeliveredEvent":{"title":"MessageDeliveredEvent","type":"object","properties":{"type":{"type":"string","const":"event"},"event_type":{"type":"string","const":"message.delivered"},"event_id":{"$ref":"#/components/schemas/EventId"},"delivery":{"$ref":"#/components/schemas/Delivery"}},"required":["type","event_type","event_id","delivery"]},"MessageBouncedEvent":{"title":"MessageBouncedEvent","type":"object","properties":{"type":{"type":"string","const":"event"},"event_type":{"type":"string","const":"message.bounced"},"event_id":{"$ref":"#/components/schemas/EventId"},"bounce":{"$ref":"#/components/schemas/Bounce"}},"required":["type","event_type","event_id","bounce"]},"MessageComplainedEvent":{"title":"MessageComplainedEvent","type":"object","properties":{"type":{"type":"string","const":"event"},"event_type":{"type":"string","const":"message.complained"},"event_id":{"$ref":"#/components/schemas/EventId"},"complaint":{"$ref":"#/components/schemas/Complaint"}},"required":["type","event_type","event_id","complaint"]},"MessageRejectedEvent":{"title":"MessageRejectedEvent","type":"object","properties":{"type":{"type":"string","const":"event"},"event_type":{"type":"string","const":"message.rejected"},"event_id":{"$ref":"#/components/schemas/EventId"},"reject":{"$ref":"#/components/schemas/Reject"}},"required":["type","event_type","event_id","reject"]},"MessageOpenedEvent":{"title":"MessageOpenedEvent","type":"object","description":"A tracked message was opened for the first time. Sent once per message: repeat opens do not\nresend it.","properties":{"type":{"type":"string","const":"event"},"event_type":{"type":"string","const":"message.opened"},"event_id":{"$ref":"#/components/schemas/EventId"},"open":{"$ref":"#/components/schemas/Open"}},"required":["type","event_type","event_id","open"]},"DomainVerifiedEvent":{"title":"DomainVerifiedEvent","type":"object","properties":{"type":{"type":"string","const":"event"},"event_type":{"type":"string","const":"domain.verified"},"event_id":{"$ref":"#/components/schemas/EventId"},"domain":{"$ref":"#/components/schemas/Domain"}},"required":["type","event_type","event_id","domain"]},"InboxEventId":{"title":"InboxEventId","type":"string","description":"ID of event."},"InboxEventType":{"title":"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."},"InboxEvent":{"title":"InboxEvent","type":"object","properties":{"organization_id":{"$ref":"#/components/schemas/OrganizationId"},"pod_id":{"type":"string","description":"ID of pod."},"inbox_id":{"$ref":"#/components/schemas/inboxesInboxId"},"event_id":{"$ref":"#/components/schemas/InboxEventId"},"event_type":{"$ref":"#/components/schemas/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"]},"ListInboxEventsResponse":{"title":"ListInboxEventsResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit","nullable":true},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"events":{"type":"array","items":{"$ref":"#/components/schemas/InboxEvent"},"description":"Ordered by `event_id` descending."}},"required":["count","events"]},"Direction":{"title":"Direction","type":"string","enum":["send","receive","reply"],"description":"Direction of list entry."},"ListType":{"title":"ListType","type":"string","enum":["allow","block"],"description":"Type of list entry."},"EntryType":{"title":"EntryType","type":"string","enum":["email","domain"],"description":"Whether the entry is an email address or domain."},"ListEntryBase":{"title":"ListEntryBase","type":"object","properties":{"entry":{"type":"string","description":"Email address or domain of list entry."},"organization_id":{"$ref":"#/components/schemas/OrganizationId"},"reason":{"type":"string","nullable":true,"description":"Reason for adding the entry."},"direction":{"$ref":"#/components/schemas/Direction"},"list_type":{"$ref":"#/components/schemas/ListType"},"entry_type":{"$ref":"#/components/schemas/EntryType"},"created_at":{"type":"string","format":"date-time","description":"Time at which entry was created."},"read_only":{"type":"boolean","nullable":true,"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"]},"ListEntry":{"title":"ListEntry","type":"object","properties":{},"allOf":[{"$ref":"#/components/schemas/ListEntryBase"}]},"PodListEntry":{"title":"PodListEntry","type":"object","properties":{"pod_id":{"type":"string","description":"ID of pod."},"inbox_id":{"type":"string","nullable":true,"description":"ID of inbox, if entry is inbox-scoped."}},"required":["pod_id"],"allOf":[{"$ref":"#/components/schemas/ListEntryBase"}]},"PodListListEntriesResponse":{"title":"PodListListEntriesResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit","nullable":true},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"entries":{"type":"array","items":{"$ref":"#/components/schemas/PodListEntry"},"description":"Ordered by entry ascending."}},"required":["count","entries"]},"ListListEntriesResponse":{"title":"ListListEntriesResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit","nullable":true},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"entries":{"type":"array","items":{"$ref":"#/components/schemas/ListEntry"},"description":"Ordered by entry ascending."}},"required":["count","entries"]},"CreateListEntryRequest":{"title":"CreateListEntryRequest","type":"object","properties":{"entry":{"type":"string","description":"Email address or domain to add."},"reason":{"type":"string","nullable":true,"description":"Reason for adding the entry."}},"required":["entry"]},"MessageId":{"title":"MessageId","type":"string","description":"ID of message."},"MessageLabels":{"title":"MessageLabels","type":"array","items":{"type":"string"},"description":"Labels of message."},"MessageTimestamp":{"title":"MessageTimestamp","type":"string","format":"date-time","description":"Time at which message was sent or drafted."},"MessageFrom":{"title":"MessageFrom","type":"string","description":"Address of sender. In format `username@domain.com` or `Display Name `."},"MessageReplyTo":{"title":"MessageReplyTo","type":"array","items":{"type":"string"},"description":"Addresses of reply-to recipients. In format `username@domain.com` or `Display Name `."},"MessageTo":{"title":"MessageTo","type":"array","items":{"type":"string"},"description":"Addresses of recipients. In format `username@domain.com` or `Display Name `."},"MessageCc":{"title":"MessageCc","type":"array","items":{"type":"string"},"description":"Addresses of CC recipients. In format `username@domain.com` or `Display Name `."},"MessageBcc":{"title":"MessageBcc","type":"array","items":{"type":"string"},"description":"Addresses of BCC recipients. In format `username@domain.com` or `Display Name `."},"MessageSubject":{"title":"MessageSubject","type":"string","description":"Subject of message."},"MessagePreview":{"title":"MessagePreview","type":"string","description":"Text preview of message."},"MessageText":{"title":"MessageText","type":"string","description":"Plain text body of message."},"MessageHtml":{"title":"MessageHtml","type":"string","description":"HTML body of message."},"MessageAttachments":{"title":"MessageAttachments","type":"array","items":{"$ref":"#/components/schemas/Attachment"},"description":"Attachments in message."},"MessageInReplyTo":{"title":"MessageInReplyTo","type":"string","description":"ID of message being replied to."},"MessageReferences":{"title":"MessageReferences","type":"array","items":{"type":"string"},"description":"IDs of previous messages in thread."},"MessageHeaders":{"title":"MessageHeaders","type":"object","additionalProperties":{"type":"string"},"description":"Headers in message."},"MessageSize":{"title":"MessageSize","type":"integer","description":"Size of message in bytes."},"MessageUpdatedAt":{"title":"MessageUpdatedAt","type":"string","format":"date-time","description":"Time at which message was last updated."},"MessageCreatedAt":{"title":"MessageCreatedAt","type":"string","format":"date-time","description":"Time at which message was created."},"MessageItem":{"title":"MessageItem","type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxesInboxId"},"thread_id":{"$ref":"#/components/schemas/ThreadId"},"message_id":{"$ref":"#/components/schemas/MessageId"},"labels":{"$ref":"#/components/schemas/MessageLabels"},"timestamp":{"$ref":"#/components/schemas/MessageTimestamp"},"from":{"$ref":"#/components/schemas/MessageFrom"},"to":{"$ref":"#/components/schemas/MessageTo"},"cc":{"$ref":"#/components/schemas/MessageCc","nullable":true},"bcc":{"$ref":"#/components/schemas/MessageBcc","nullable":true},"subject":{"$ref":"#/components/schemas/MessageSubject","nullable":true},"preview":{"$ref":"#/components/schemas/MessagePreview","nullable":true},"attachments":{"$ref":"#/components/schemas/MessageAttachments","nullable":true},"in_reply_to":{"$ref":"#/components/schemas/MessageInReplyTo","nullable":true},"references":{"$ref":"#/components/schemas/MessageReferences","nullable":true},"headers":{"$ref":"#/components/schemas/MessageHeaders","nullable":true},"size":{"$ref":"#/components/schemas/MessageSize"},"updated_at":{"$ref":"#/components/schemas/MessageUpdatedAt"},"created_at":{"$ref":"#/components/schemas/MessageCreatedAt"}},"required":["inbox_id","thread_id","message_id","labels","timestamp","from","to","size","updated_at","created_at"]},"Message":{"title":"Message","type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxesInboxId"},"thread_id":{"$ref":"#/components/schemas/ThreadId"},"message_id":{"$ref":"#/components/schemas/MessageId"},"labels":{"$ref":"#/components/schemas/MessageLabels"},"timestamp":{"$ref":"#/components/schemas/MessageTimestamp"},"from":{"$ref":"#/components/schemas/MessageFrom"},"reply_to":{"type":"array","items":{"type":"string"},"nullable":true,"description":"Reply-to addresses. In format `username@domain.com` or `Display Name `."},"to":{"$ref":"#/components/schemas/MessageTo"},"cc":{"$ref":"#/components/schemas/MessageCc","nullable":true},"bcc":{"$ref":"#/components/schemas/MessageBcc","nullable":true},"subject":{"$ref":"#/components/schemas/MessageSubject","nullable":true},"preview":{"$ref":"#/components/schemas/MessagePreview","nullable":true},"text":{"$ref":"#/components/schemas/MessageText","nullable":true},"html":{"$ref":"#/components/schemas/MessageHtml","nullable":true},"extracted_text":{"type":"string","nullable":true,"description":"Extracted new text content."},"extracted_html":{"type":"string","nullable":true,"description":"Extracted new HTML content."},"attachments":{"$ref":"#/components/schemas/MessageAttachments","nullable":true},"in_reply_to":{"$ref":"#/components/schemas/MessageInReplyTo","nullable":true},"references":{"$ref":"#/components/schemas/MessageReferences","nullable":true},"headers":{"$ref":"#/components/schemas/MessageHeaders","nullable":true},"size":{"$ref":"#/components/schemas/MessageSize"},"updated_at":{"$ref":"#/components/schemas/MessageUpdatedAt"},"created_at":{"$ref":"#/components/schemas/MessageCreatedAt"}},"required":["inbox_id","thread_id","message_id","labels","timestamp","from","to","size","updated_at","created_at"]},"ListMessagesResponse":{"title":"ListMessagesResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit","nullable":true},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"messages":{"type":"array","items":{"$ref":"#/components/schemas/MessageItem"},"description":"Ordered by `timestamp` descending."}},"required":["count","messages"]},"SearchMessageHighlights":{"title":"SearchMessageHighlights","type":"object","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.","properties":{"from":{"type":"array","items":{"type":"string"},"nullable":true,"description":"Matched fragments from the sender address."},"recipients":{"type":"array","items":{"type":"string"},"nullable":true,"description":"Matched fragments from the recipient addresses (to, cc, or bcc)."},"subject":{"type":"array","items":{"type":"string"},"nullable":true,"description":"Matched fragments from the subject."},"text":{"type":"array","items":{"type":"string"},"nullable":true,"description":"Matched fragments from the message body."}}},"SearchMessageItem":{"title":"SearchMessageItem","type":"object","properties":{"highlights":{"$ref":"#/components/schemas/SearchMessageHighlights","nullable":true,"description":"Matched fragments per field. Present only when the query matched an indexed field."}},"allOf":[{"$ref":"#/components/schemas/MessageItem"}]},"SearchMessagesResponse":{"title":"SearchMessagesResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit","nullable":true},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"messages":{"type":"array","items":{"$ref":"#/components/schemas/SearchMessageItem"},"description":"Ordered by relevance, best match first."}},"required":["count","messages"]},"BatchGetMessagesMessageIds":{"title":"BatchGetMessagesMessageIds","type":"array","items":{"$ref":"#/components/schemas/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`."},"BatchGetMessagesRequest":{"title":"BatchGetMessagesRequest","type":"object","properties":{"message_ids":{"$ref":"#/components/schemas/BatchGetMessagesMessageIds"}},"required":["message_ids"]},"BatchGetMessagesResponse":{"title":"BatchGetMessagesResponse","type":"object","properties":{"limit":{"$ref":"#/components/schemas/Limit"},"count":{"$ref":"#/components/schemas/Count"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/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"]},"BatchUpdateMessagesMessageIds":{"title":"BatchUpdateMessagesMessageIds","type":"array","items":{"$ref":"#/components/schemas/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`."},"BatchUpdateMessagesRequest":{"title":"BatchUpdateMessagesRequest","type":"object","properties":{"message_ids":{"$ref":"#/components/schemas/BatchUpdateMessagesMessageIds"},"add_labels":{"$ref":"#/components/schemas/UpdateMessageLabels","nullable":true,"description":"Label or labels to add to every message."},"remove_labels":{"$ref":"#/components/schemas/UpdateMessageLabels","nullable":true,"description":"Label or labels to remove from every message."}},"required":["message_ids"]},"BatchUpdateMessagesResponse":{"title":"BatchUpdateMessagesResponse","type":"object","properties":{"limit":{"$ref":"#/components/schemas/Limit"},"count":{"$ref":"#/components/schemas/Count"},"updates":{"type":"array","items":{"$ref":"#/components/schemas/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"]},"RawMessageResponse":{"title":"RawMessageResponse","type":"object","description":"S3 presigned URL to download the raw .eml file.","properties":{"message_id":{"$ref":"#/components/schemas/MessageId","description":"ID of the message."},"size":{"$ref":"#/components/schemas/MessageSize","description":"Size of the raw message in bytes."},"download_url":{"type":"string","description":"S3 presigned URL to download the raw message. Expires at expires_at."},"expires_at":{"type":"string","format":"date-time","description":"Time at which the download URL expires."}},"required":["message_id","size","download_url","expires_at"]},"Addresses":{"title":"Addresses","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"SendMessageReplyTo":{"title":"SendMessageReplyTo","$ref":"#/components/schemas/Addresses","description":"Reply-to address or addresses."},"SendMessageTo":{"title":"SendMessageTo","$ref":"#/components/schemas/Addresses","description":"Recipient address or addresses."},"SendMessageCc":{"title":"SendMessageCc","$ref":"#/components/schemas/Addresses","description":"CC recipient address or addresses."},"SendMessageBcc":{"title":"SendMessageBcc","$ref":"#/components/schemas/Addresses","description":"BCC recipient address or addresses."},"SendMessageAttachments":{"title":"SendMessageAttachments","type":"array","items":{"$ref":"#/components/schemas/SendAttachment"},"description":"Attachments to include in message."},"SendMessageHeaders":{"title":"SendMessageHeaders","type":"object","additionalProperties":{"type":"string"},"description":"Headers to include in message."},"TrackOpens":{"title":"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."},"SendMessageRequest":{"title":"SendMessageRequest","type":"object","properties":{"labels":{"$ref":"#/components/schemas/MessageLabels","nullable":true},"reply_to":{"$ref":"#/components/schemas/SendMessageReplyTo","nullable":true},"to":{"$ref":"#/components/schemas/SendMessageTo","nullable":true},"cc":{"$ref":"#/components/schemas/SendMessageCc","nullable":true},"bcc":{"$ref":"#/components/schemas/SendMessageBcc","nullable":true},"subject":{"$ref":"#/components/schemas/MessageSubject","nullable":true},"text":{"$ref":"#/components/schemas/MessageText","nullable":true},"html":{"$ref":"#/components/schemas/MessageHtml","nullable":true},"attachments":{"$ref":"#/components/schemas/SendMessageAttachments","nullable":true},"headers":{"$ref":"#/components/schemas/SendMessageHeaders","nullable":true},"track_opens":{"$ref":"#/components/schemas/TrackOpens","nullable":true}}},"SendMessageResponse":{"title":"SendMessageResponse","type":"object","properties":{"message_id":{"$ref":"#/components/schemas/MessageId"},"thread_id":{"$ref":"#/components/schemas/ThreadId"}},"required":["message_id","thread_id"]},"UpdateMessageResponse":{"title":"UpdateMessageResponse","type":"object","properties":{"message_id":{"$ref":"#/components/schemas/MessageId"},"labels":{"$ref":"#/components/schemas/MessageLabels"}},"required":["message_id","labels"]},"ReplyAll":{"title":"ReplyAll","type":"boolean","description":"Reply to all recipients of the original message."},"ReplyToMessageRequest":{"title":"ReplyToMessageRequest","type":"object","properties":{"labels":{"$ref":"#/components/schemas/MessageLabels","nullable":true},"reply_to":{"$ref":"#/components/schemas/SendMessageReplyTo","nullable":true},"to":{"$ref":"#/components/schemas/SendMessageTo","nullable":true},"cc":{"$ref":"#/components/schemas/SendMessageCc","nullable":true},"bcc":{"$ref":"#/components/schemas/SendMessageBcc","nullable":true},"reply_all":{"$ref":"#/components/schemas/ReplyAll","nullable":true},"text":{"$ref":"#/components/schemas/MessageText","nullable":true},"html":{"$ref":"#/components/schemas/MessageHtml","nullable":true},"attachments":{"$ref":"#/components/schemas/SendMessageAttachments","nullable":true},"headers":{"$ref":"#/components/schemas/SendMessageHeaders","nullable":true},"track_opens":{"$ref":"#/components/schemas/TrackOpens","nullable":true}}},"ReplyAllMessageRequest":{"title":"ReplyAllMessageRequest","type":"object","properties":{"labels":{"$ref":"#/components/schemas/MessageLabels","nullable":true},"reply_to":{"$ref":"#/components/schemas/SendMessageReplyTo","nullable":true},"text":{"$ref":"#/components/schemas/MessageText","nullable":true},"html":{"$ref":"#/components/schemas/MessageHtml","nullable":true},"attachments":{"$ref":"#/components/schemas/SendMessageAttachments","nullable":true},"headers":{"$ref":"#/components/schemas/SendMessageHeaders","nullable":true},"track_opens":{"$ref":"#/components/schemas/TrackOpens","nullable":true}}},"UpdateMessageLabels":{"title":"UpdateMessageLabels","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Label or list of labels."},"UpdateMessageRequest":{"title":"UpdateMessageRequest","type":"object","properties":{"add_labels":{"$ref":"#/components/schemas/UpdateMessageLabels","nullable":true,"description":"Label or labels to add to message."},"remove_labels":{"$ref":"#/components/schemas/UpdateMessageLabels","nullable":true,"description":"Label or labels to remove from message."}}},"MetricEventType":{"title":"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."},"MetricEventTypes":{"title":"MetricEventTypes","type":"array","items":{"$ref":"#/components/schemas/MetricEventType"},"description":"List of metric event types to query."},"Start":{"title":"Start","type":"string","format":"date-time","description":"Start timestamp for the query."},"End":{"title":"End","type":"string","format":"date-time","description":"End timestamp for the query."},"Period":{"title":"Period","type":"integer","description":"Size of each time bucket as a whole number of seconds, between 1 and 86400."},"MetricLimit":{"title":"MetricLimit","type":"integer","description":"Limit on number of buckets to return."},"Descending":{"title":"Descending","type":"boolean","description":"Sort in descending order."},"MetricBucket":{"title":"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"]},"QueryMetricsResponse":{"title":"QueryMetricsResponse","type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/MetricBucket"}},"description":"Metrics grouped by event type."},"UsageType":{"title":"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`."},"UsageTypes":{"title":"UsageTypes","type":"array","items":{"$ref":"#/components/schemas/UsageType"},"description":"List of usage metric types to query. Omit to query every type valid for the scope."},"UsagePoint":{"title":"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"]},"QueryUsageResponse":{"title":"QueryUsageResponse","type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/UsagePoint"}},"description":"Cumulative usage series grouped by usage type."},"Organization":{"title":"Organization","type":"object","description":"Organization details with usage limits and counts.","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","nullable":true,"description":"Maximum number of inboxes allowed."},"domain_limit":{"type":"integer","nullable":true,"description":"Maximum number of domains allowed."},"billing_id":{"type":"string","nullable":true,"description":"Provider-agnostic billing customer ID."},"billing_type":{"type":"string","nullable":true,"description":"Billing provider type (e.g. \"stripe\")."},"billing_subscription_id":{"type":"string","nullable":true,"description":"Active billing subscription ID."},"authentication_id":{"type":"string","nullable":true,"description":"Provider-agnostic authentication ID."},"authentication_type":{"type":"string","nullable":true,"description":"Authentication provider type."},"updated_at":{"type":"string","format":"date-time","description":"Time at which organization was last updated."},"created_at":{"type":"string","format":"date-time","description":"Time at which organization was created."}},"required":["organization_id","inbox_count","domain_count","updated_at","created_at"]},"ThreadId":{"title":"ThreadId","type":"string","description":"ID of thread."},"ThreadLabels":{"title":"ThreadLabels","type":"array","items":{"type":"string"},"description":"Labels of thread."},"ThreadTimestamp":{"title":"ThreadTimestamp","type":"string","format":"date-time","description":"Timestamp of last sent or received message."},"ThreadReceivedTimestamp":{"title":"ThreadReceivedTimestamp","type":"string","format":"date-time","description":"Timestamp of last received message."},"ThreadSentTimestamp":{"title":"ThreadSentTimestamp","type":"string","format":"date-time","description":"Timestamp of last sent message."},"ThreadSenders":{"title":"ThreadSenders","type":"array","items":{"type":"string"},"description":"Senders in thread. In format `username@domain.com` or `Display Name `."},"ThreadRecipients":{"title":"ThreadRecipients","type":"array","items":{"type":"string"},"description":"Recipients in thread. In format `username@domain.com` or `Display Name `."},"ThreadSubject":{"title":"ThreadSubject","type":"string","description":"Subject of thread."},"ThreadPreview":{"title":"ThreadPreview","type":"string","description":"Text preview of last message in thread."},"ThreadAttachments":{"title":"ThreadAttachments","type":"array","items":{"$ref":"#/components/schemas/Attachment"},"description":"Attachments in thread."},"ThreadLastMessageId":{"title":"ThreadLastMessageId","type":"string","description":"ID of last message in thread."},"ThreadMessageCount":{"title":"ThreadMessageCount","type":"integer","description":"Number of messages in thread."},"ThreadSize":{"title":"ThreadSize","type":"integer","description":"Size of thread in bytes."},"ThreadUpdatedAt":{"title":"ThreadUpdatedAt","type":"string","format":"date-time","description":"Time at which thread was last updated."},"ThreadCreatedAt":{"title":"ThreadCreatedAt","type":"string","format":"date-time","description":"Time at which thread was created."},"ThreadItem":{"title":"ThreadItem","type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxesInboxId"},"thread_id":{"$ref":"#/components/schemas/ThreadId"},"labels":{"$ref":"#/components/schemas/ThreadLabels"},"timestamp":{"$ref":"#/components/schemas/ThreadTimestamp"},"received_timestamp":{"$ref":"#/components/schemas/ThreadReceivedTimestamp","nullable":true},"sent_timestamp":{"$ref":"#/components/schemas/ThreadSentTimestamp","nullable":true},"senders":{"$ref":"#/components/schemas/ThreadSenders"},"recipients":{"$ref":"#/components/schemas/ThreadRecipients"},"subject":{"$ref":"#/components/schemas/ThreadSubject","nullable":true},"preview":{"$ref":"#/components/schemas/ThreadPreview","nullable":true},"attachments":{"$ref":"#/components/schemas/ThreadAttachments","nullable":true},"last_message_id":{"$ref":"#/components/schemas/ThreadLastMessageId"},"message_count":{"$ref":"#/components/schemas/ThreadMessageCount"},"size":{"$ref":"#/components/schemas/ThreadSize"},"updated_at":{"$ref":"#/components/schemas/ThreadUpdatedAt"},"created_at":{"$ref":"#/components/schemas/ThreadCreatedAt"}},"required":["inbox_id","thread_id","labels","timestamp","senders","recipients","last_message_id","message_count","size","updated_at","created_at"]},"Thread":{"title":"Thread","type":"object","properties":{"inbox_id":{"$ref":"#/components/schemas/inboxesInboxId"},"thread_id":{"$ref":"#/components/schemas/ThreadId"},"labels":{"$ref":"#/components/schemas/ThreadLabels"},"timestamp":{"$ref":"#/components/schemas/ThreadTimestamp"},"received_timestamp":{"$ref":"#/components/schemas/ThreadReceivedTimestamp","nullable":true},"sent_timestamp":{"$ref":"#/components/schemas/ThreadSentTimestamp","nullable":true},"senders":{"$ref":"#/components/schemas/ThreadSenders"},"recipients":{"$ref":"#/components/schemas/ThreadRecipients"},"subject":{"$ref":"#/components/schemas/ThreadSubject","nullable":true},"preview":{"$ref":"#/components/schemas/ThreadPreview","nullable":true},"attachments":{"$ref":"#/components/schemas/ThreadAttachments","nullable":true},"last_message_id":{"$ref":"#/components/schemas/ThreadLastMessageId"},"message_count":{"$ref":"#/components/schemas/ThreadMessageCount"},"size":{"$ref":"#/components/schemas/ThreadSize"},"updated_at":{"$ref":"#/components/schemas/ThreadUpdatedAt"},"created_at":{"$ref":"#/components/schemas/ThreadCreatedAt"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/Message"},"description":"Messages in thread. Ordered by `timestamp` ascending."}},"required":["inbox_id","thread_id","labels","timestamp","senders","recipients","last_message_id","message_count","size","updated_at","created_at","messages"]},"UpdateThreadRequest":{"title":"UpdateThreadRequest","type":"object","properties":{"add_labels":{"type":"array","items":{"type":"string"},"nullable":true,"description":"Labels to add to thread. Cannot be system labels."},"remove_labels":{"type":"array","items":{"type":"string"},"nullable":true,"description":"Labels to remove from thread. Cannot be system labels. Takes priority over `add_labels` (in the event of duplicate labels passed in)."}}},"UpdateThreadResponse":{"title":"UpdateThreadResponse","type":"object","properties":{"thread_id":{"$ref":"#/components/schemas/ThreadId"},"labels":{"$ref":"#/components/schemas/ThreadLabels"}},"required":["thread_id","labels"]},"ListThreadsResponse":{"title":"ListThreadsResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit","nullable":true},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"threads":{"type":"array","items":{"$ref":"#/components/schemas/ThreadItem"},"description":"Ordered by `timestamp` descending."}},"required":["count","threads"]},"SearchThreadHighlights":{"title":"SearchThreadHighlights","type":"object","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.","properties":{"from":{"type":"array","items":{"type":"string"},"nullable":true,"description":"Matched fragments from a sender address in the thread."},"recipients":{"type":"array","items":{"type":"string"},"nullable":true,"description":"Matched fragments from a recipient address in the thread (to, cc, or bcc)."},"subject":{"type":"array","items":{"type":"string"},"nullable":true,"description":"Matched fragments from the subject."},"text":{"type":"array","items":{"type":"string"},"nullable":true,"description":"Matched fragments from a message body in the thread."}}},"SearchThreadItem":{"title":"SearchThreadItem","type":"object","properties":{"highlights":{"$ref":"#/components/schemas/SearchThreadHighlights","nullable":true,"description":"Matched fragments per field. Present only when the query matched an indexed field."}},"allOf":[{"$ref":"#/components/schemas/ThreadItem"}]},"SearchThreadsResponse":{"title":"SearchThreadsResponse","type":"object","properties":{"count":{"$ref":"#/components/schemas/Count"},"limit":{"$ref":"#/components/schemas/Limit","nullable":true},"next_page_token":{"$ref":"#/components/schemas/PageToken","nullable":true},"threads":{"type":"array","items":{"$ref":"#/components/schemas/SearchThreadItem"},"description":"Ordered by relevance, best match first."}},"required":["count","threads"]},"webhooksSvixId":{"title":"webhooksSvixId","type":"string","description":"ID of webhook message."},"webhooksSvixTimestamp":{"title":"webhooksSvixTimestamp","type":"string","format":"date-time","description":"Timestamp of webhook message."},"webhooksSvixSignature":{"title":"webhooksSvixSignature","type":"string","description":"Signature of webhook message."},"Subscribe":{"title":"Subscribe","type":"object","properties":{"type":{"type":"string","const":"subscribe"},"event_types":{"$ref":"#/components/schemas/EventTypes","nullable":true},"inbox_ids":{"$ref":"#/components/schemas/InboxIds","nullable":true},"pod_ids":{"$ref":"#/components/schemas/PodIds","nullable":true}},"required":["type"]},"Subscribed":{"title":"Subscribed","type":"object","properties":{"type":{"type":"string","const":"subscribed"},"event_types":{"$ref":"#/components/schemas/EventTypes","nullable":true},"inbox_ids":{"$ref":"#/components/schemas/InboxIds","nullable":true},"pod_ids":{"$ref":"#/components/schemas/PodIds","nullable":true}},"required":["type"]},"Error":{"title":"Error","type":"object","properties":{"type":{"type":"string","const":"error"},"name":{"$ref":"#/components/schemas/ErrorName"},"message":{"$ref":"#/components/schemas/ErrorMessage"}},"required":["type","name","message"]}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}}}} \ No newline at end of file diff --git a/reference.md b/reference.md index b79795b..6640d00 100644 --- a/reference.md +++ b/reference.md @@ -314,6 +314,16 @@ agentmail domains get --domain-id |------|------|----------|-------------| | `--domain-id` | `DomainId` | Yes | | +#### `agentmail domains get-setup-link` + +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. + +`GET /v0/domains/{domain_id}/setup-link` + +| Flag | Type | Required | Description | +|------|------|----------|-------------| +| `--domain-id` | `DomainId` | Yes | | + #### `agentmail domains get-zone-file` **CLI:** diff --git a/src/openapi/commands.rs b/src/openapi/commands.rs index 4d0682a..1fabef7 100644 --- a/src/openapi/commands.rs +++ b/src/openapi/commands.rs @@ -658,8 +658,7 @@ fn build_resource_command( // Skip fields whose kebab name collides with a builtin flag, // matching the regular-param convention above. for field in &method.multipart_fields { - let kebab = to_kebab_flag(&field.wire_name); - if is_reserved_flag_name(&kebab) { + if resolve_multipart_field_flag_name(&field.wire_name).is_none() { continue; } method_cmd = method_cmd.arg(build_multipart_field_arg(field)); @@ -837,11 +836,31 @@ fn build_resource_command( crate::text::CLI_SHORT_DESCRIPTION_LIMIT, true, )); - let long_help_text = decorate(&crate::text::truncate_description( - &description, - crate::text::CLI_LONG_DESCRIPTION_LIMIT, - true, - )); + let long_help_text = { + let text = decorate(&crate::text::truncate_description( + &description, + crate::text::CLI_LONG_DESCRIPTION_LIMIT, + true, + )); + // A repeated flag accepts two forms and the value name can only + // show one. It used to read ``, which at least + // hinted at the array form; now that it correctly shows the + // element type, nothing on the surface says the flag can be + // repeated or handed a whole array. Both work, so say so — in + // the long help only, since the short form is width-limited and + // truncated. + if param.repeated { + let hint = "Repeatable: pass the flag once per value, \ + or supply a JSON array as a single value."; + if text.is_empty() { + hint.to_string() + } else { + format!("{text}\n\n{hint}") + } + } else { + text + } + }; let arg_id = param_clap_arg_id(param_name); let mut arg = Arg::new(arg_id) @@ -966,6 +985,19 @@ pub(crate) fn resolve_param_flag_name(param: &MethodParameter, wire_name: &str) Some(flag) } +/// Resolve the CLI flag name for a multipart field, replicating what +/// `build_resource_command` registers. `None` when the kebab name is +/// reserved by the runtime: the builder skips those args, so no flag +/// exists and the field is reachable only through `--params`. +pub(crate) fn resolve_multipart_field_flag_name(wire_name: &str) -> Option { + let kebab = to_kebab_flag(wire_name); + if is_reserved_flag_name(&kebab) { + None + } else { + Some(kebab) + } +} + /// Whether a parameter-derived flag long name is reserved by the runtime /// and therefore must be mangled (`-param` suffix) to avoid a clap /// duplicate-flag panic. Covers the always-present built-in flags plus a @@ -1026,8 +1058,13 @@ fn build_possible_value(wire: &str, cfg: Option<&FernEnumValue>) -> PossibleValu /// strings — so the spec's real element type lives in `item_type`. Reading /// `param_type` here made an array-of-objects flag advertise `` while /// `--schema` (correctly) said `items: {type: object}` and the collector -/// decoded objects: three surfaces, two answers. `item_type: None` means -/// string, so non-array and string-array flags are unchanged. +/// decoded objects: three surfaces, two answers. +/// +/// The `param_type` fallback is only correct for *body* arrays, where +/// `param_type` already holds the element type. On a query, header or path +/// array it is the container type `"array"`, so those must arrive with +/// `item_type` resolved — `convert_parameter` spells it out, defaulting to +/// `Some("string")`, rather than leaving it `None` and falling through here. fn value_name_for(param: &MethodParameter) -> &'static str { let value_type = if param.repeated { param.item_type.as_deref().or(param.param_type.as_deref()) @@ -3327,6 +3364,80 @@ paths: ); } + #[test] + fn test_repeated_flag_long_help_discloses_both_input_forms() { + // The value name can only show one form. It used to read + // ``, which at least hinted at the array form; once it + // correctly shows the element type, nothing on the surface says the + // flag is repeatable or accepts a whole array. Both work. + let doc = crate::openapi::discovery::RestDescription { + resources: HashMap::from([( + "threads".to_string(), + crate::openapi::discovery::RestResource { + methods: HashMap::from([( + "list".to_string(), + crate::openapi::discovery::RestMethod { + http_method: "GET".to_string(), + path: "/threads".to_string(), + parameters: HashMap::from([ + ( + "labels".to_string(), + MethodParameter { + param_type: Some("array".to_string()), + item_type: Some("string".to_string()), + location: Some("query".to_string()), + repeated: true, + description: Some("Filter by label.".to_string()), + ..Default::default() + }, + ), + ( + "limit".to_string(), + MethodParameter { + param_type: Some("integer".to_string()), + location: Some("query".to_string()), + description: Some("Page size.".to_string()), + ..Default::default() + }, + ), + ]), + ..Default::default() + }, + )]), + ..Default::default() + }, + )]), + ..Default::default() + }; + let cmd = build_cli(&doc); + let sub = cmd + .get_subcommands() + .find(|c| c.get_name() == "threads") + .and_then(|c| c.get_subcommands().find(|m| m.get_name() == "list")) + .expect("threads list"); + + let long_help_for = |flag: &str| -> String { + sub.get_arguments() + .find(|a| a.get_long() == Some(flag)) + .map(|a| { + a.get_long_help() + .or_else(|| a.get_help()) + .map(|h| h.to_string()) + .unwrap_or_default() + }) + .unwrap_or_default() + }; + + let labels = long_help_for("labels"); + assert!(labels.contains("Filter by label."), "keeps the description: {labels}"); + assert!(labels.contains("Repeatable"), "must disclose repeatability: {labels}"); + assert!(labels.contains("JSON array"), "must disclose the array form: {labels}"); + + // A non-repeated flag gains nothing. + let limit = long_help_for("limit"); + assert!(!limit.contains("Repeatable"), "not repeatable: {limit}"); + } + #[test] fn test_repeated_flag_value_name_uses_the_element_type() { // An array-of-objects flag advertised `` in `--help` while @@ -3346,9 +3457,20 @@ paths: location: Some("body".to_string()), ..Default::default() }; + // A query array: `param_type` is the *container* type, so falling back + // to it rendered `` — an array of arrays — on every + // string-element query parameter. + let query_strings = MethodParameter { + param_type: Some("array".to_string()), + item_type: Some("string".to_string()), + repeated: true, + location: Some("query".to_string()), + ..Default::default() + }; assert_eq!(value_name_for(&objects), "JSON_OBJECT"); - // `item_type: None` means string — unchanged from before. + // Body array: `item_type: None` means string — unchanged from before. assert_eq!(value_name_for(&strings), "STRING"); + assert_eq!(value_name_for(&query_strings), "STRING"); } #[test] diff --git a/src/openapi/discovery.rs b/src/openapi/discovery.rs index 7d6f8f3..5c5d071 100644 --- a/src/openapi/discovery.rs +++ b/src/openapi/discovery.rs @@ -1100,6 +1100,20 @@ pub struct MethodParameter { /// `None` means "string" — the overwhelmingly common case, and the value /// every pre-existing lowering produced. pub item_type: Option, + /// Enum members an *element* of an array parameter may take, i.e. the + /// `items.enum` of `type: array, items: {$ref: SomeEnum}`. + /// + /// Separate from [`MethodParameter::enum_values`] because that one is + /// enforced by a clap `value_parser`, which cannot work here: a repeated + /// flag also accepts a whole JSON array in one argument + /// (`--labels '["a","b"]'`), and clap would reject that literal as a + /// non-member. So element enums are enforced after collection, in the + /// executor, and advertised as `items.enum` by `--schema`. + /// + /// Without this an array-of-enum parameter was completely unconstrained + /// while its scalar twin was checked — `--event-types bogus` went to the + /// API, `--direction bogus` did not. + pub item_enum_values: Option>, /// True for `oneOf/anyOf [string, array]` unions where a single /// value should be sent as a scalar string, not wrapped in a length-1 /// array. Pure `type: array` params leave this `false`. @@ -1233,6 +1247,13 @@ pub struct JsonSchema { #[serde(rename = "$ref")] pub schema_ref: Option, pub items: Option>, + /// The component's own `enum`. A property that reaches its enum through a + /// `$ref` resolves to a component, so without this field the members were + /// unreachable from the validator and an invalid value was accepted and + /// sent — while the identical enum declared inline on the property was + /// enforced. Mirrors [`JsonSchemaProperty::enum_values`]. + #[serde(rename = "enum")] + pub enum_values: Option>, #[serde(default)] pub required: Vec, /// JSON Schema composition branches at the component-schema root. Mirrors diff --git a/src/openapi/executor.rs b/src/openapi/executor.rs index 5526eba..448ca38 100644 --- a/src/openapi/executor.rs +++ b/src/openapi/executor.rs @@ -722,6 +722,14 @@ fn parse_and_validate_inputs( set_nested_value(&mut body_from_flags, key, coerced); } _ => { + // Query and path parameters go on the wire as strings, so + // nothing downstream ever type-checked them: `--limit nope` + // serialized as `?limit=nope` and 400'd at the API. Bodies have + // been checked since the `$ref` work; this is the other half of + // the same surface, and it only became possible once `$ref`'d + // parameters started resolving their type at all. + let param_def = method.parameters.get(key); + validate_non_body_param_type(key, value, param_def)?; non_header_params.insert(key.clone(), value.clone()); } } @@ -732,10 +740,23 @@ fn parse_and_validate_inputs( // (3) object-shorthand JSON for a single field (`--name '{...}'`). // Mixing any two is a validation error so the user's intent is // unambiguous and the precedence rules are not surprising. + // Both messages name flags, so they must go through the same resolver + // `build_resource_command` registered them with. Interpolating the raw + // wire key advised flags that do not exist — `--permissions.inbox_read` + // for a flag registered as `--permissions.inbox-read`, and clap rejects + // the spelling it suggests. `--schema` discloses the resolved name, so + // the error also contradicted the contract. + let flag_for = |key: &str| -> String { + method + .parameters + .get(key) + .and_then(|param| crate::openapi::commands::resolve_param_flag_name(param, key)) + .map_or_else(|| format!("--{key}"), |flag| format!("--{flag}")) + }; if body_json.is_some() && !raw_body_flag_keys.is_empty() { let conflicting = raw_body_flag_keys .iter() - .map(|k| format!("--{k}")) + .map(|k| flag_for(k)) .collect::>() .join(", "); return Err(CliError::Validation(format!( @@ -754,7 +775,9 @@ fn parse_and_validate_inputs( let prefix = format!("{object_key}."); if let Some(leaf_key) = raw_body_flag_keys.iter().find(|k| k.starts_with(&prefix)) { return Err(CliError::Validation(format!( - "Cannot combine --{object_key} with --{leaf_key}. Use the JSON shorthand or individual flags, not both." + "Cannot combine {} with {}. Use the JSON shorthand or individual flags, not both.", + flag_for(object_key), + flag_for(leaf_key), ))); } } @@ -4059,6 +4082,235 @@ fn coerce_body_param_value( } } +/// Type-check a query- or path-located parameter against its schema type. +/// +/// Only the numeric and boolean types are enforced. `string` accepts anything +/// (it is what the wire carries), and `array`/`object` are left alone because +/// their CLI surface is a repeated flag or a JSON literal whose shape the +/// style-aware serializer handles. A `nullable` parameter accepts the resolved +/// `null` sentinel. +/// +/// Deliberately narrow: the value of this check is catching a typo locally +/// instead of paying an API round-trip, not enforcing every JSON-Schema +/// keyword. Over-reaching here would reject requests a server accepts. +/// Whether a string is an integer literal, ignoring magnitude. +/// +/// Shape-based rather than `parse::()` so an unbounded integer parameter +/// is not rejected for exceeding a limit the spec never declared, and so this +/// agrees with the JSON-number path, which accepts the full `u64` range. +fn is_integer_literal(raw: &str) -> bool { + // A leading `+` is not a valid JSON integer and most servers will not parse + // it as one, so accepting it here would just defer the 400 this check + // exists to prevent. Leading zeros are tolerated: `007` is unambiguous and + // servers routinely accept it. + let digits = raw.strip_prefix('-').unwrap_or(raw); + !digits.is_empty() && digits.bytes().all(|b| b.is_ascii_digit()) +} + +/// Whether a string is a boolean literal. +/// +/// Deliberately lenient. A strict `true|false|1|0` list rejected `True`, +/// `TRUE`, `False`, `yes`, `no`, `on` and `off` — spellings the CLI forwarded +/// before any type-checking existed, and which the frameworks that generate +/// these specs accept on the wire. A local check exists to catch typos before +/// a round trip, not to be stricter than the server it is standing in for. +fn is_boolean_literal(raw: &str) -> bool { + // Exactly what pydantic/FastAPI accept for a query boolean. Single-letter + // forms (`t`/`f`/`y`/`n`) are deliberately absent: those frameworks reject + // them, and since the value is forwarded verbatim rather than normalized, + // accepting one locally only moves the 400 later — the opposite of the + // point. The rule is "do not be stricter than the server", not "accept + // anything plausible". + matches!( + raw.to_ascii_lowercase().as_str(), + "true" | "false" | "1" | "0" | "yes" | "no" | "on" | "off" + ) +} + +fn validate_non_body_param_type( + name: &str, + value: &Value, + param_def: Option<&MethodParameter>, +) -> Result<(), CliError> { + let Some(param) = param_def else { + // Not a declared parameter (e.g. a multipart field routed elsewhere, or + // an extra `--params` key). Nothing to check it against. + return Ok(()); + }; + if value.is_null() { + return Ok(()); + } + // Element enum for an array parameter. Deliberately above the + // `param_type` early-return: an array param's `param_type` is the + // container type, so nothing below this point ever learns what an element + // is allowed to be. This is the only enforcement point for these — a clap + // `value_parser` would reject the `--labels '["a","b"]'` form, which is + // valid input. Non-string elements are left alone, matching the body + // validator's string-only enum check. + if let Some(allowed) = param.item_enum_values.as_deref() { + let elements: &[Value] = match value { + Value::Array(items) => items, + single => std::slice::from_ref(single), + }; + for element in elements { + // A non-string element cannot be a member of a string enum, so + // `--params '{"event_types": [5]}'` was routing around the check + // entirely — `?event_types=5` went out. Compared by rendered form + // so the diagnostic names what the user actually wrote. + let rendered = match element { + Value::String(raw) => raw.clone(), + Value::Null => continue, // null handled by the nullable path + other => other.to_string(), + }; + let raw = &rendered; + if !allowed.iter().any(|candidate| candidate == raw) { + let flag = crate::openapi::commands::resolve_param_flag_name(param, name) + .map(|f| format!("--{f}")) + .unwrap_or_else(|| format!("--params '{{\"{name}\": ...}}'")); + return Err(CliError::Validation(format!( + "Invalid value for {flag}: '{raw}' is not a valid enum member. \ + Valid options: {allowed:?}" + ))); + } + } + } + // Scalar enum. `--flag` is already gated by clap's `PossibleValuesParser`, + // but `--params` bypasses clap entirely, so + // `--params '{"direction": "bogus"}'` went on the wire and 400'd — and in + // one spec landed in the *path*, producing `/v0/lists/bogus/allow`. + // + // The accepted set has to match what clap accepts, not just the wire + // values, or this would reject input the flag path allows: an + // `x-fern-enum` display name is registered as the canonical name with the + // wire value as an alias, and a nullable param additionally accepts the + // literal `null` sentinel. Getting this wrong is precisely how the boolean + // check ended up rejecting `True`. + if !param.repeated { + if let Some(members) = param.enum_values.as_deref() { + if let Value::String(raw) = value { + let is_member = members.iter().any(|wire| wire == raw) + || param.fern_enum.as_ref().is_some_and(|m| { + m.values().any(|cfg| cfg.display_name.as_deref() == Some(raw.as_str())) + }) + || (param.nullable && raw == "null"); + if !is_member { + let flag = crate::openapi::commands::resolve_param_flag_name(param, name) + .map(|f| format!("--{f}")) + .unwrap_or_else(|| format!("--params '{{\"{name}\": ...}}'")); + return Err(CliError::Validation(format!( + "Invalid value for {flag}: '{raw}' is not a valid enum member. \ + Valid options: {members:?}" + ))); + } + } + } + } + + let Some(expected) = param.param_type.as_deref() else { + return Ok(()); + }; + // The collected value of a repeated flag is an array, so check the + // elements. Against `item_type`, NOT `param_type`: for a non-body + // parameter `param_type` is the *container* type `"array"`, so recursing + // through this function compared every element against `"array"` and fell + // into the permissive `_ => true` arm below. `--ids abc` on an integer + // array passed local validation and reached the API as `?ids=abc` — + // exactly what this function exists to prevent. (`param_type` does + // describe the element for a *body* array, but body params never reach + // here.) `None` means string, which accepts anything. + if let Value::Array(items) = value { + // `item_type` is authoritative when set. Falling back to `param_type` + // covers a param whose `param_type` already *is* the element type + // (the body-array convention) without ever comparing an element + // against the container type, which is the bug this fixes. `None` + // means string, which accepts anything. + let element_type = param + .item_type + .as_deref() + .or_else(|| param.param_type.as_deref().filter(|t| *t != "array")) + .unwrap_or("string"); + for item in items { + check_param_value_type(name, item, param, element_type)?; + } + return Ok(()); + } + // An empty string is the shape a shell produces from an unset variable + // (`--limit "$LIMIT"`). Rejecting it turned a request that previously went + // out — as `?limit=` — into a hard local failure, so it stays accepted and + // the server decides. Deliberately below the array branch: that rationale + // is about a whole flag value, not about an empty element inside a + // collected array, where nothing was ever omitted. + if value.as_str() == Some("") { + return Ok(()); + } + check_param_value_type(name, value, param, expected) +} + +/// Type-check one already-unwrapped value against `expected`. +/// +/// Split out of [`validate_non_body_param_type`] so an array element can be +/// checked against its *element* type. Recursing through the outer function +/// instead compared each element against the container type `"array"`, which +/// falls into the permissive arm — so numeric array parameters went unchecked. +fn check_param_value_type( + name: &str, + value: &Value, + param: &MethodParameter, + expected: &str, +) -> Result<(), CliError> { + let ok = match expected { + // The string arm checks digit shape rather than `parse::()`, so + // it agrees with the `Value::Number` arm: `n.is_u64()` accepted values + // above `i64::MAX` that `parse::()` rejected, so the same number + // was valid via `--params` and invalid via the flag. Range is a + // separate concern (`minimum`/`maximum`); this only asserts "is an + // integer", and the spec need not declare a `maximum`. + "integer" => match value { + // `is_i64() || is_u64()` alone left the same asymmetry one boundary + // further out: serde widens an integer literal beyond `u64::MAX` to + // `f64`, so `--params '{"limit": 18446744073709551616}'` was + // rejected while the identical value via the flag was accepted. + // A whole-valued float is an integer for this purpose; range is + // `minimum`/`maximum` business, checked separately. + Value::Number(n) => { + n.is_i64() || n.is_u64() || n.as_f64().is_some_and(|f| f.fract() == 0.0) + } + Value::String(raw) => is_integer_literal(raw), + _ => false, + }, + "number" => match value { + Value::Number(_) => true, + Value::String(raw) => raw.parse::().is_ok_and(f64::is_finite), + _ => false, + }, + // Booleans are the one place a strict list actively broke working + // commands: the previous `"true" | "false" | "1" | "0"` rejected + // `True`, `TRUE`, `False`, `yes`, `on` and friends, all of which the + // CLI forwarded before this check existed and which the server-side + // frameworks that emit these specs (pydantic/FastAPI) accept. A + // numeric `1`/`0` is accepted too, since the string forms are — the + // asymmetry meant `--params '{"ascending": 1}'` failed while + // `--ascending 1` passed. + "boolean" => match value { + Value::Bool(_) => true, + Value::Number(n) => matches!(n.as_i64(), Some(0) | Some(1)), + Value::String(raw) => is_boolean_literal(raw), + _ => false, + }, + _ => true, + }; + if ok { + return Ok(()); + } + let flag = crate::openapi::commands::resolve_param_flag_name(param, name) + .map(|f| format!("--{f}")) + .unwrap_or_else(|| format!("--params '{{\"{name}\": ...}}'")); + Err(CliError::Validation(format!( + "Invalid value for {flag}: expected {expected}, got {}", + get_value_type(value) + ))) +} + /// Validates a JSON body against a Discovery Document schema. fn validate_body_against_schema( body: &Value, @@ -4184,13 +4436,42 @@ fn validate_value( // body whose fields were all the wrong type, which reads as confirmation // to an agent. Only inline-typed properties were ever checked. let Some(expected_type) = schema.schema_type.as_deref() else { - // No `type` keyword, no properties, no `allOf` — a free-form or - // pure-union component. Nothing to assert. + // A `$ref`'d component that is itself a nullable union has its type in + // the branch, exactly as at the property level above. Without this a + // component spelled `anyOf: [{type: string}, {type: null}]` accepted + // any value, while the identical property spelled inline did not. + if let Some(branch) = sole_non_null_branch(&schema.any_of) + .or_else(|| sole_non_null_branch(&schema.one_of)) + { + validate_property(value, branch, doc, path, errors); + return; + } + // No `type` keyword, no properties, no `allOf`, no single-branch + // union — a free-form or genuine-union component. Nothing to assert. return; }; if !check_json_type(value, expected_type, path, errors) { return; } + // A `$ref`'d enum component. `validate_property` checks `enum_values` on an + // inline property (step 5), but a property that reaches its enum through a + // `$ref` landed here and fell off the end, so the members were advertised + // and never enforced: `webhooks create --event-types bogus` was accepted + // and sent while the query-parameter equivalent was rejected. Also covers + // an array's element enum, since the items schema recurses through + // `validate_property` into this function. + // + // Exact match is safe: the flag layer canonicalizes an `x-fern-enum` + // display name to its wire value before the executor sees it + // (`MethodParameter::resolve_enum_display_to_wire`). + if let (Some(members), Value::String(raw)) = (&schema.enum_values, value) { + if !members.iter().any(|member| member == raw) { + errors.push(format!( + "{path}: Value '{raw}' is not a valid enum member. Valid options: {members:?}" + )); + return; + } + } if expected_type == "array" { if let (Some(items), Value::Array(arr)) = (&schema.items, value) { for (index, item) in arr.iter().enumerate() { @@ -4331,6 +4612,32 @@ fn has_null_branch(branches: &[crate::openapi::discovery::JsonSchemaProperty]) - .any(|b| b.prop_type.as_deref() == Some("null") || (b.nullable && b.prop_type.is_none())) } +/// The single non-null branch of a nullable union, i.e. the `T` in +/// `anyOf: [T, {type: null}]` — pydantic's `Optional[T]`. `None` when the +/// composition is empty or has more than one non-null branch, so a genuine +/// union like `oneOf: [string, array]` is left alone (asserting one branch +/// there would reject values the other branch permits). +/// +/// The validator needs this because such a property carries no `type:` of its +/// own: the type lives in the branch. Everything downstream keyed off +/// `prop_type`, so `--json '{"name": 123}'` on a `name` declared +/// `anyOf: [{type: string}, {type: null}]` was accepted and forwarded to the +/// wire, while the same property spelled `type: string` was correctly +/// rejected. The parser already promotes these shapes (ADR-0005 / ADR-0010) — +/// this is the validator's half of that. +fn sole_non_null_branch( + branches: &[crate::openapi::discovery::JsonSchemaProperty], +) -> Option<&crate::openapi::discovery::JsonSchemaProperty> { + let mut non_null = branches + .iter() + .filter(|b| !(b.prop_type.as_deref() == Some("null") || (b.nullable && b.prop_type.is_none()))); + let first = non_null.next()?; + if non_null.next().is_some() { + return None; + } + Some(first) +} + fn validate_properties( obj: &Map, properties: &HashMap, @@ -4381,12 +4688,6 @@ fn validate_property( path: &str, errors: &mut Vec, ) { - // 1. Resolve $ref if present - if let Some(ref_name) = &prop_schema.schema_ref { - validate_value(value, ref_name, doc, path, errors); - return; - } - // Null on a nullable property is always valid — short-circuits type // checking that would otherwise reject `null` for a `string` / // `integer` / etc. base type. Also honors ADR-0005's nullable-union @@ -4394,6 +4695,16 @@ fn validate_property( // branch accepts null even when the intrinsic `nullable` flag is // false (which it is for `anyOf: [scalar, null]` shapes, since the // null-ness lives in the branch, not on the parent schema). + // + // This runs *before* `$ref` resolution, and the order is the whole + // point. `{$ref: X, nullable: true}` is how OpenAPI 3.0 spells a + // nullable object — the 3.0 counterpart of 3.1's + // `anyOf: [{$ref: X}, {type: null}]`. Resolving the ref first handed + // `null` to the referenced schema, which is a plain object and quite + // reasonably answered "Expected object", so the property's own + // `nullable: true` was never consulted. On one customer's 3.0.1 spec + // that rejected `null` on 112 body properties the spec explicitly + // permits. if value.is_null() && (prop_schema.nullable || has_null_branch(&prop_schema.one_of) @@ -4402,6 +4713,26 @@ fn validate_property( return; } + // 1. Resolve $ref if present + if let Some(ref_name) = &prop_schema.schema_ref { + validate_value(value, ref_name, doc, path, errors); + return; + } + + // 1b. A nullable union carries its type in the branch, not on the + // property, so every check below this point was a no-op for it. Non-null + // values are validated against the sole non-null branch; `null` already + // returned above. A multi-branch union resolves to `None` and is left + // alone, as before. + if prop_schema.prop_type.is_none() && prop_schema.all_of.is_empty() { + if let Some(branch) = sole_non_null_branch(&prop_schema.any_of) + .or_else(|| sole_non_null_branch(&prop_schema.one_of)) + { + validate_property(value, branch, doc, path, errors); + return; + } + } + // 2. Type checking if let Some(expected_type) = &prop_schema.prop_type { if !check_json_type(value, expected_type, path, errors) { @@ -7013,6 +7344,224 @@ mod tests { } } + #[test] + fn test_query_param_type_is_validated_locally() { + // `--limit nope` used to serialize as `?limit=nope` and 400 at the API. + // Bodies have been checked since the `$ref` work; this is the other + // half of the same surface. + let int_param = MethodParameter { + param_type: Some("integer".to_string()), + location: Some("query".to_string()), + ..Default::default() + }; + let err = validate_non_body_param_type("limit", &json!("nope"), Some(&int_param)) + .expect_err("a non-numeric integer must be rejected"); + let msg = format!("{err}"); + assert!(msg.contains("--limit"), "names the flag: {msg}"); + assert!(msg.contains("expected integer"), "{msg}"); + + // Numeric strings are how clap delivers them, so these must pass. + for good in [json!("5"), json!(5), json!("-3")] { + validate_non_body_param_type("limit", &good, Some(&int_param)) + .unwrap_or_else(|e| panic!("{good} should be accepted: {e}")); + } + // A float is not an integer. + assert!(validate_non_body_param_type("limit", &json!("1.5"), Some(&int_param)).is_err()); + + let bool_param = MethodParameter { + param_type: Some("boolean".to_string()), + location: Some("query".to_string()), + ..Default::default() + }; + // This list started as `true|false|1|0` — strict enough to reject + // `True`, `yes` and `on`, which the CLI forwarded happily before any + // type-checking existed. A local check is here to catch typos before a + // round trip, not to be stricter than the server it stands in for, and + // the frameworks that emit these specs accept all of these. + for good in [ + json!("true"), + json!("false"), + json!("True"), + json!("TRUE"), + json!("False"), + json!("yes"), + json!("no"), + json!("on"), + json!("off"), + json!("1"), + json!("0"), + json!(true), + // The numeric forms, which were rejected while the string "1"/"0" + // were accepted — so `--params '{"flag": 1}'` failed where + // `--flag 1` passed. + json!(1), + json!(0), + ] { + validate_non_body_param_type("flag", &good, Some(&bool_param)) + .unwrap_or_else(|e| panic!("{good} should be accepted: {e}")); + } + // Still catches an actual typo, which is the whole point. The + // single-letter forms are rejected on purpose — pydantic/FastAPI do not + // accept them, and the value is forwarded verbatim, so accepting one + // here would only move the 400 later. + for bad in [json!("ture"), json!("maybe"), json!("2"), json!(2), json!("t"), json!("y")] { + assert!( + validate_non_body_param_type("flag", &bad, Some(&bool_param)).is_err(), + "{bad} should be rejected", + ); + } + } + + #[test] + fn test_array_param_elements_are_checked_against_the_element_type() { + // The realistic shape, straight from `convert_parameter`: a repeated + // non-body param has `param_type: "array"` (the CONTAINER type) and + // carries the element type in `item_type`. Recursing through the outer + // function compared each element against `"array"`, which falls into + // the permissive arm — so `--ids abc` on an integer array passed local + // validation and reached the API as `?ids=abc`. + let param = MethodParameter { + param_type: Some("array".to_string()), + item_type: Some("integer".to_string()), + location: Some("query".to_string()), + repeated: true, + ..Default::default() + }; + validate_non_body_param_type("ids", &json!(["1", "2"]), Some(¶m)) + .expect("integer elements must pass"); + for bad in [json!(["abc"]), json!(["1", "abc"]), json!(["1.5"]), json!([""])] { + assert!( + validate_non_body_param_type("ids", &bad, Some(¶m)).is_err(), + "{bad} must be rejected", + ); + } + + // A string-element array still accepts anything, as before. + let strings = MethodParameter { + item_type: Some("string".to_string()), + ..param.clone() + }; + validate_non_body_param_type("labels", &json!(["a", "1", ""]), Some(&strings)) + .expect("string elements accept anything"); + } + + #[test] + fn test_whole_valued_json_number_counts_as_an_integer() { + // Recorded rather than incidental: the `Value::Number` arm accepts a + // whole-valued float so the flag and `--params` paths agree past + // `u64::MAX`, where serde widens the literal. `1.0` therefore passes + // and `1.5` does not. + let param = MethodParameter { + param_type: Some("integer".to_string()), + location: Some("query".to_string()), + ..Default::default() + }; + validate_non_body_param_type("limit", &json!(1.0), Some(¶m)) + .expect("a whole-valued number is an integer here"); + assert!(validate_non_body_param_type("limit", &json!(1.5), Some(¶m)).is_err()); + } + + #[test] + fn test_typed_param_accepts_an_empty_string() { + // A shell turns an unset variable into an empty argument, so + // `--limit "$LIMIT"` arrives as "". Rejecting it converted a request + // that previously went out as `?limit=` into a hard local failure — + // a working script broken by a validation check. + for param_type in ["integer", "number", "boolean"] { + let param = MethodParameter { + param_type: Some(param_type.to_string()), + location: Some("query".to_string()), + ..Default::default() + }; + validate_non_body_param_type("limit", &json!(""), Some(¶m)) + .unwrap_or_else(|e| panic!("empty string on {param_type} must pass: {e}")); + } + } + + #[test] + fn test_integer_param_agrees_across_the_flag_and_params_paths() { + // `n.is_u64()` accepted values above `i64::MAX` while + // `raw.parse::()` rejected them, so the same number was valid via + // `--params` and invalid via the flag. The spec need not declare a + // `maximum`, so magnitude is not ours to police. + let param = MethodParameter { + param_type: Some("integer".to_string()), + location: Some("query".to_string()), + ..Default::default() + }; + let huge = "9223372036854775808"; // i64::MAX + 1 + validate_non_body_param_type("limit", &json!(huge), Some(¶m)) + .expect("flag path must accept a large integer"); + validate_non_body_param_type( + "limit", + &serde_json::from_str::(huge).unwrap(), + Some(¶m), + ) + .expect("--params path must agree with the flag path"); + + // And one boundary further out, where serde widens the literal to f64. + let past_u64 = "18446744073709551616"; // u64::MAX + 1 + validate_non_body_param_type("limit", &json!(past_u64), Some(¶m)) + .expect("flag path must accept an integer past u64::MAX"); + validate_non_body_param_type( + "limit", + &serde_json::from_str::(past_u64).unwrap(), + Some(¶m), + ) + .expect("--params path must agree past u64::MAX too"); + + // A genuine float is still not an integer, at any magnitude. + for bad in [json!(1.5), json!(-2.25), json!("1.5")] { + assert!( + validate_non_body_param_type("limit", &bad, Some(¶m)).is_err(), + "{bad} is not an integer", + ); + } + + // Shape is still enforced. (An empty string is deliberately accepted — + // see `test_typed_param_accepts_an_empty_string`.) + for bad in [json!("12a"), json!("-"), json!("+"), json!("1_0")] { + assert!( + validate_non_body_param_type("limit", &bad, Some(¶m)).is_err(), + "{bad} should be rejected", + ); + } + } + + #[test] + fn test_query_param_validation_stays_narrow() { + // Deliberately permissive where the wire is permissive: over-reaching + // would reject requests a server accepts. + let string_param = MethodParameter { + param_type: Some("string".to_string()), + location: Some("query".to_string()), + ..Default::default() + }; + // Anything goes for a string. + for v in [json!("x"), json!("123"), json!("{\"a\":1}")] { + validate_non_body_param_type("q", &v, Some(&string_param)).expect("string accepts all"); + } + // A nullable param accepts the resolved null sentinel. + let nullable = MethodParameter { + param_type: Some("integer".to_string()), + location: Some("query".to_string()), + nullable: true, + ..Default::default() + }; + validate_non_body_param_type("limit", &Value::Null, Some(&nullable)).expect("null ok"); + // An undeclared key (e.g. an extra `--params` entry) is not our business. + validate_non_body_param_type("unknown", &json!("whatever"), None).expect("undeclared ok"); + // A repeated flag checks each element, not the container. + let repeated = MethodParameter { + param_type: Some("integer".to_string()), + location: Some("query".to_string()), + repeated: true, + ..Default::default() + }; + validate_non_body_param_type("ids", &json!(["1", "2"]), Some(&repeated)).expect("elements ok"); + assert!(validate_non_body_param_type("ids", &json!(["1", "no"]), Some(&repeated)).is_err()); + } + #[test] fn test_validate_body_rejects_wrong_type_behind_a_ref() { // `validate_value` only had an object branch, so a `$ref` to a scalar @@ -7376,6 +7925,476 @@ mod tests { ); } + #[test] + fn test_ref_to_enum_component_is_enforced_in_a_body() { + // `validate_property` checks `enum_values` on an inline property, but a + // property reaching its enum through a `$ref` resolved to a + // `JsonSchema` -- which had no `enum_values` field at all, so the + // members were advertised in `--schema` and never enforced. On a real + // spec, `webhooks create --event-types bogus` was accepted and sent + // while the query-parameter equivalent was rejected. + let schemas = HashMap::from([ + ( + "Msg".to_string(), + JsonSchema { + schema_type: Some("object".to_string()), + properties: HashMap::from([ + ( + "direction".to_string(), + JsonSchemaProperty { + schema_ref: Some("Direction".to_string()), + ..Default::default() + }, + ), + ( + "event_types".to_string(), + JsonSchemaProperty { + prop_type: Some("array".to_string()), + items: Some(Box::new(JsonSchemaProperty { + schema_ref: Some("Direction".to_string()), + ..Default::default() + })), + ..Default::default() + }, + ), + ]), + ..Default::default() + }, + ), + ( + "Direction".to_string(), + JsonSchema { + schema_type: Some("string".to_string()), + enum_values: Some(vec!["send".to_string(), "receive".to_string()]), + ..Default::default() + }, + ), + ]); + let doc = RestDescription { schemas, ..Default::default() }; + + // Legal members pass, as a scalar and as array elements. + for body in [ + json!({ "direction": "send" }), + json!({ "event_types": ["send", "receive"] }), + ] { + assert!( + validate_body_against_schema(&body, "Msg", &doc).is_ok(), + "legal members must pass: {body}", + ); + } + + // Non-members are caught, including inside an array. + for body in [ + json!({ "direction": "bogus" }), + json!({ "event_types": ["bogus"] }), + json!({ "event_types": ["send", "bogus"] }), + ] { + let error = validate_body_against_schema(&body, "Msg", &doc) + .expect_err(&format!("must reject a non-member: {body}")); + let message = format!("{error}"); + assert!(message.contains("bogus"), "got: {message}"); + assert!(message.contains("send"), "must list valid options; got: {message}"); + } + } + + #[test] + fn test_nullable_ref_property_accepts_null() { + // `{$ref: X, nullable: true}` is how OpenAPI 3.0 spells a nullable + // object — the counterpart of 3.1's `anyOf: [{$ref: X}, {type: null}]`. + // The validator resolved the ref before consulting the property's own + // `nullable`, so null was handed to a plain object schema, which + // answered "Expected object". 112 body properties on one customer's + // 3.0.1 spec rejected a value the spec permits. + let schemas = HashMap::from([ + ( + "Msg".to_string(), + JsonSchema { + schema_type: Some("object".to_string()), + properties: HashMap::from([ + ( + "metadata".to_string(), + JsonSchemaProperty { + schema_ref: Some("Metadata".to_string()), + nullable: true, + ..Default::default() + }, + ), + ( + "required_meta".to_string(), + JsonSchemaProperty { + schema_ref: Some("Metadata".to_string()), + nullable: false, + ..Default::default() + }, + ), + ]), + ..Default::default() + }, + ), + ( + "Metadata".to_string(), + JsonSchema { + schema_type: Some("object".to_string()), + ..Default::default() + }, + ), + ]); + let doc = RestDescription { schemas, ..Default::default() }; + + assert!( + validate_body_against_schema(&json!({ "metadata": null }), "Msg", &doc).is_ok(), + "a nullable $ref property must accept null", + ); + // A real value still validates against the referenced schema. + assert!(validate_body_against_schema(&json!({ "metadata": {} }), "Msg", &doc).is_ok()); + assert!( + validate_body_against_schema(&json!({ "metadata": 5 }), "Msg", &doc).is_err(), + "the referenced schema is still enforced for non-null values", + ); + // And a $ref property that is NOT nullable still rejects null. + assert!( + validate_body_against_schema(&json!({ "required_meta": null }), "Msg", &doc).is_err(), + "nullable: false must still reject null", + ); + } + + #[test] + fn test_scalar_enum_is_enforced_through_params() { + // `--flag` is gated by clap, but `--params` bypasses clap entirely, so + // an invalid member went on the wire — and for a path param it landed + // in the URL (`/v0/lists/bogus/allow`). + let param = MethodParameter { + param_type: Some("string".to_string()), + location: Some("query".to_string()), + enum_values: Some(vec!["send".to_string(), "receive".to_string()]), + ..Default::default() + }; + validate_non_body_param_type("direction", &json!("send"), Some(¶m)) + .expect("a legal member must pass"); + let error = validate_non_body_param_type("direction", &json!("bogus"), Some(¶m)) + .expect_err("a non-member must be rejected"); + let message = error.to_string(); + assert!(message.contains("--direction"), "got: {message}"); + assert!(message.contains("send"), "must list valid options; got: {message}"); + + // The accepted set must match clap's, not just the wire values, or this + // rejects input the flag path allows. clap registers an `x-fern-enum` + // display name as the canonical value with the wire value as an alias. + let mut fern_enum = HashMap::new(); + fern_enum.insert( + "send".to_string(), + crate::openapi::discovery::FernEnumValue { + display_name: Some("Outbound".to_string()), + ..Default::default() + }, + ); + let aliased = MethodParameter { + fern_enum: Some(fern_enum), + ..param.clone() + }; + validate_non_body_param_type("direction", &json!("Outbound"), Some(&aliased)) + .expect("an x-fern-enum display name must be accepted"); + validate_non_body_param_type("direction", &json!("send"), Some(&aliased)) + .expect("the wire value must still be accepted"); + + // A nullable enum param accepts the `null` sentinel, as clap does. + let nullable = MethodParameter { + nullable: true, + ..param.clone() + }; + validate_non_body_param_type("direction", &json!("null"), Some(&nullable)) + .expect("the null sentinel must be accepted on a nullable enum param"); + } + + #[test] + fn test_array_enum_rejects_non_string_elements() { + // `--params '{"event_types": [5]}'` routed around the element-enum + // check, which only inspected strings, and `?event_types=5` went out. + let param = MethodParameter { + param_type: Some("array".to_string()), + item_type: Some("string".to_string()), + item_enum_values: Some(vec!["sent".to_string(), "received".to_string()]), + location: Some("query".to_string()), + repeated: true, + ..Default::default() + }; + for bad in [json!([5]), json!([true]), json!(["sent", 5])] { + assert!( + validate_non_body_param_type("event_types", &bad, Some(¶m)).is_err(), + "{bad} must be rejected", + ); + } + // Legal members and a null element are unaffected. + validate_non_body_param_type("event_types", &json!(["sent"]), Some(¶m)) + .expect("legal member"); + validate_non_body_param_type("event_types", &json!([Value::Null]), Some(¶m)) + .expect("a null element is the nullable path's business"); + } + + #[test] + fn test_array_parameter_enforces_its_element_enum() { + // `--event-types bogus` was accepted and sent to the API, while the + // scalar `--direction bogus` was correctly rejected: the same spec + // construct validated or not purely based on array-ness. + let param = MethodParameter { + param_type: Some("array".to_string()), + item_type: Some("string".to_string()), + item_enum_values: Some(vec!["sent".to_string(), "received".to_string()]), + location: Some("query".to_string()), + repeated: true, + ..Default::default() + }; + + // Legal members pass, in the collected-array form and singly. + for value in [json!(["sent", "received"]), json!(["sent"]), json!("sent")] { + assert!( + validate_non_body_param_type("event_types", &value, Some(¶m)).is_ok(), + "legal enum members must pass: {value}", + ); + } + + // An illegal member is caught locally, and the message names the flag. + for value in [json!(["bogus"]), json!(["sent", "bogus"]), json!("bogus")] { + let error = validate_non_body_param_type("event_types", &value, Some(¶m)) + .expect_err(&format!("must reject a non-member: {value}")); + let message = error.to_string(); + assert!(message.contains("--event-types"), "got: {message}"); + assert!(message.contains("bogus"), "got: {message}"); + assert!(message.contains("sent"), "must list valid options; got: {message}"); + } + + // Null still short-circuits, and an array param with no element enum + // stays unconstrained. + assert!(validate_non_body_param_type("event_types", &json!(null), Some(¶m)).is_ok()); + let unconstrained = MethodParameter { + item_enum_values: None, + ..param + }; + assert!( + validate_non_body_param_type("labels", &json!(["anything"]), Some(&unconstrained)) + .is_ok() + ); + } + + #[test] + fn test_mutual_exclusion_errors_name_the_registered_flag() { + // Both messages advised flags clap then rejects: they interpolated the + // raw wire key, so a body property `event_types` was reported as + // `--event_types` (registered: `--event-types`) and an object leaf + // `permissions.inbox_read` as `--permissions.inbox_read` (registered: + // `--permissions.inbox-read`). `--schema` discloses the resolved name, + // so the error contradicted the contract it sits next to. + let body_param = |param_type: &str| MethodParameter { + param_type: Some(param_type.to_string()), + location: Some("body".to_string()), + ..Default::default() + }; + let method = RestMethod { + http_method: "POST".to_string(), + path: "/keys".to_string(), + parameters: HashMap::from([ + ("event_types".to_string(), body_param("string")), + ("permissions".to_string(), body_param("object")), + ("permissions.inbox_read".to_string(), body_param("boolean")), + ]), + ..Default::default() + }; + let doc = RestDescription::default(); + + // --json against a per-field flag. + let error = parse_and_validate_inputs( + &doc, + &method, + Some(r#"{"event_types":"a"}"#), + Some("{}"), + false, + None, + &[], + &[], + ) + .expect_err("combining --json with a body flag must be rejected"); + let message = error.to_string(); + assert!(message.contains("--event-types"), "got: {message}"); + assert!(!message.contains("--event_types"), "got: {message}"); + + // Object shorthand against its own dotted leaf. + let error = parse_and_validate_inputs( + &doc, + &method, + Some(r#"{"permissions":{},"permissions.inbox_read":true}"#), + None, + false, + None, + &[], + &[], + ) + .expect_err("combining an object shorthand with its leaf must be rejected"); + let message = error.to_string(); + assert!(message.contains("--permissions.inbox-read"), "got: {message}"); + assert!(!message.contains("--permissions.inbox_read"), "got: {message}"); + } + + #[test] + fn test_validate_body_type_checks_the_non_null_branch_of_a_nullable_union() { + // The mirror of the test above: a nullable union must accept null, but + // it must also still enforce its branch type. Everything downstream of + // the null short-circuit keyed off `prop_type`, which is None here, so + // this property accepted *any* value and forwarded it to the wire — + // while the same property spelled `type: string` was rejected. + let branch_union = |inner: JsonSchemaProperty| JsonSchemaProperty { + prop_type: None, + nullable: false, + any_of: vec![ + inner, + JsonSchemaProperty { + prop_type: Some("null".to_string()), + ..Default::default() + }, + ], + ..Default::default() + }; + let properties = HashMap::from([ + ( + "name".to_string(), + branch_union(JsonSchemaProperty { + prop_type: Some("string".to_string()), + ..Default::default() + }), + ), + ( + "tags".to_string(), + branch_union(JsonSchemaProperty { + prop_type: Some("array".to_string()), + items: Some(Box::new(JsonSchemaProperty { + prop_type: Some("string".to_string()), + ..Default::default() + })), + ..Default::default() + }), + ), + ]); + let schemas = HashMap::from([( + "Agent".to_string(), + JsonSchema { + schema_type: Some("object".to_string()), + properties, + ..Default::default() + }, + )]); + let doc = RestDescription { schemas, ..Default::default() }; + + // Valid values, including null, still pass. + for body in [ + json!({ "name": "ok" }), + json!({ "name": null }), + json!({ "tags": ["a", "b"] }), + json!({ "tags": null }), + ] { + assert!( + validate_body_against_schema(&body, "Agent", &doc).is_ok(), + "must still accept a valid value: {body}", + ); + } + + // Wrong branch types are now caught locally instead of being sent. + for body in [ + json!({ "name": 123 }), + json!({ "tags": "not-an-array" }), + json!({ "tags": [1, 2] }), + ] { + assert!( + validate_body_against_schema(&body, "Agent", &doc).is_err(), + "must reject a value the branch type forbids: {body}", + ); + } + } + + #[test] + fn test_validate_body_leaves_a_genuine_multi_branch_union_alone() { + // `oneOf: [string, array]` — the scalar-or-array shape. Two + // non-null branches, so asserting either one would reject values the + // other permits. Must stay permissive. + let properties = HashMap::from([( + "to".to_string(), + JsonSchemaProperty { + prop_type: None, + one_of: vec![ + JsonSchemaProperty { + prop_type: Some("string".to_string()), + ..Default::default() + }, + JsonSchemaProperty { + prop_type: Some("array".to_string()), + ..Default::default() + }, + ], + ..Default::default() + }, + )]); + let schemas = HashMap::from([( + "Msg".to_string(), + JsonSchema { + schema_type: Some("object".to_string()), + properties, + ..Default::default() + }, + )]); + let doc = RestDescription { schemas, ..Default::default() }; + for body in [json!({ "to": "a@b.c" }), json!({ "to": ["a@b.c"] })] { + assert!( + validate_body_against_schema(&body, "Msg", &doc).is_ok(), + "both branches of a genuine union must be accepted: {body}", + ); + } + } + + #[test] + fn test_validate_body_type_checks_a_ref_to_a_nullable_union_component() { + // Same gap one level up: a `$ref`'d component that is itself + // `anyOf: [T, null]` has no `type:` of its own, so it fell through + // `validate_value`'s "pure-union component, nothing to assert" exit. + let schemas = HashMap::from([ + ( + "Msg".to_string(), + JsonSchema { + schema_type: Some("object".to_string()), + properties: HashMap::from([( + "subject".to_string(), + JsonSchemaProperty { + schema_ref: Some("MaybeSubject".to_string()), + ..Default::default() + }, + )]), + ..Default::default() + }, + ), + ( + "MaybeSubject".to_string(), + JsonSchema { + schema_type: None, + any_of: vec![ + JsonSchemaProperty { + prop_type: Some("string".to_string()), + ..Default::default() + }, + JsonSchemaProperty { + prop_type: Some("null".to_string()), + ..Default::default() + }, + ], + ..Default::default() + }, + ), + ]); + let doc = RestDescription { schemas, ..Default::default() }; + assert!(validate_body_against_schema(&json!({ "subject": "hi" }), "Msg", &doc).is_ok()); + assert!(validate_body_against_schema(&json!({ "subject": null }), "Msg", &doc).is_ok()); + assert!( + validate_body_against_schema(&json!({ "subject": 5 }), "Msg", &doc).is_err(), + "a nullable-union component must still enforce its branch type", + ); + } + #[test] fn test_validate_body_root_level_all_of_enters_object_branch() { // ADR-0004: a top-level schema with no `type:` declared but diff --git a/src/openapi/help.rs b/src/openapi/help.rs index 199fe08..bb868bc 100644 --- a/src/openapi/help.rs +++ b/src/openapi/help.rs @@ -174,15 +174,28 @@ fn build_operation_schema( let mut properties: Map = Map::new(); let mut required: Vec = Vec::new(); + // Mirrors `commands::build_resource_command`: when two wire names + // sanitize to the same flag only the first in sorted order is + // registered, so the loser must not advertise a flag that belongs to + // the winner. + let mut flag_to_wire: HashMap = HashMap::new(); + let mut param_names: Vec<_> = method.parameters.keys().collect(); param_names.sort(); for name in param_names { let param = &method.parameters[name]; - // A repeated flag carries `param_type: "string"` because clap collects - // strings; the spec's real element type lives in `item_type`. Rendering - // `param_type` as the element type advertised `items: {type: string}` - // for an array of objects, so an agent reading the contract sent - // `["x"]` and the validator rejected it. + // A repeated *body* flag carries `param_type: "string"` because clap + // collects strings; the spec's real element type lives in `item_type`. + // Rendering `param_type` as the element type advertised + // `items: {type: string}` for an array of objects, so an agent reading + // the contract sent `["x"]` and the validator rejected it. + // + // The `param_type` fallback is therefore correct for body arrays only. + // For a query, header or path array `param_type` is the *container* + // type `"array"`, which rendered `items: {"type": "array"}` — an array + // of arrays. `convert_parameter` resolves `item_type` eagerly for those + // (defaulting to `"string"`) so the fallback is never reached; it stays + // here for the body path and as a floor for hand-built parameters. let element_type = param .item_type .as_deref() @@ -198,9 +211,18 @@ fn build_operation_schema( "location": param.location.as_deref().unwrap_or("query"), }) } else if param.repeated { + // Element enum belongs on `items`, not the property: the property + // is the array. Advertising it is half the fix — the executor + // enforces it (see `MethodParameter::item_enum_values`) — but + // without it an agent has no way to learn the legal values, and + // `--schema` is the surface it reads. + let mut items = json!({ "type": element_type }); + if let (Some(values), Some(map)) = (¶m.item_enum_values, items.as_object_mut()) { + map.insert("enum".to_string(), json!(values)); + } json!({ "type": "array", - "items": { "type": element_type }, + "items": items, "description": param.description.as_deref().unwrap_or(""), "location": param.location.as_deref().unwrap_or("query"), }) @@ -277,7 +299,24 @@ fn build_operation_schema( prop["variable"] = json!(var_name); prop["globalFlag"] = json!(format!("--{}", crate::text::to_kebab_flag(var_name))); prop["envVar"] = json!(crate::text::to_screaming_snake(var_name)); - } else if param.required || param.required_by_spec { + } else if let Some(flag) = crate::openapi::commands::resolve_param_flag_name(param, name) { + // Property keys are wire names, which diverge from the flag an + // agent types (header casing, `x-fern-parameter-name` renames, a + // `-param` suffix on builtin collisions). Derived from the same + // `resolve_param_flag_name` the command builder uses so the two + // cannot drift; absent means the parameter is reachable only via + // `--params`, because the builder registers no flag for it. + match flag_to_wire.entry(flag.clone()) { + std::collections::hash_map::Entry::Vacant(slot) => { + slot.insert(name.clone()); + prop["flag"] = json!(format!("--{flag}")); + } + // The builder skipped this parameter: `--{flag}` sets the + // wire name that claimed it first, not this one. + std::collections::hash_map::Entry::Occupied(_) => {} + } + } + if param.variable_reference.is_none() && (param.required || param.required_by_spec) { // `required_by_spec` catches object-valued body properties whose // shorthand flag is deliberately clap-optional (the caller may use // dot-notation leaves instead) but which the wire still requires. @@ -296,14 +335,16 @@ fn build_operation_schema( // undiscoverable, so an agent driving purely from `--schema` could not // invoke *any* multipart operation. // - // Skips fields whose kebab name collides with a builtin flag, mirroring + // Skips fields whose kebab name is reserved by the runtime, mirroring // `commands::build_resource_command` — those args are never registered, so - // advertising them would be the same class of lie. + // advertising them would be the same class of lie. Both loops resolve the + // name through `resolve_multipart_field_flag_name` so they cannot drift. for field in &method.multipart_fields { - let kebab = crate::text::to_kebab_flag(&field.wire_name); - if crate::openapi::commands::BUILTIN_FLAG_NAMES.contains(&kebab.as_str()) { + let Some(kebab) = + crate::openapi::commands::resolve_multipart_field_flag_name(&field.wire_name) + else { continue; - } + }; // The flag surface is a string either way: a text part takes its value // verbatim, a file part takes a filesystem path (`@path` / `-` for // stdin are accepted too — see `--help`). `file: true` is what tells an @@ -324,6 +365,7 @@ fn build_operation_schema( if let Some(content_type) = &field.content_type { prop["contentType"] = json!(content_type); } + prop["flag"] = json!(format!("--{kebab}")); if field.required { required.push(field.wire_name.clone()); } @@ -355,13 +397,19 @@ fn build_operation_schema( .collect(); required.retain(|name| !covered.contains(name)); - // Per ADR-0006: `--schema` is the agent-facing contract. Drop HTTP - // plumbing (`httpMethod`, `path`) — agents drive the CLI, not raw - // HTTP. Rename `parameters` → `input` to sidestep OpenAPI's narrow - // meaning (which excludes body fields) and pair symmetrically with - // `output`. + // `parameters` is renamed to `input` to sidestep OpenAPI's narrow meaning + // (which excludes body fields) and to pair symmetrically with `output`. + // + // `httpMethod` and `path` are present per ADR-0006's 2026-08-28 amendment. + // They were dropped as "HTTP-execution detail an agent never uses", but a + // real agent consumer needs them for a reason the original decision did not + // consider: they are how you tell a read from a write *before* running the + // command. `operation` and `description` are prose an agent has to guess + // from. That is a safety property, not plumbing. let mut output = json!({ "operation": format!("{}.{}", resource_path.join("."), method_name), + "httpMethod": method.http_method, + "path": method.path, "description": method.description.as_deref().unwrap_or(""), "input": { "type": "object", @@ -746,11 +794,13 @@ fn collect_resource_ops(res: &RestResource, path: &[&str], ops: &mut Vec) method_names.sort(); for method_name in method_names { let m = &res.methods[method_name]; - // Per ADR-0006: drop `httpMethod` and `path` from listings — - // they're HTTP-execution detail an agent driving the CLI never - // uses. Agents pick by `operation` + `description`. + // `httpMethod` / `path` are in the catalog too, per ADR-0006's + // 2026-08-28 amendment: an agent picking an operation from the listing + // is exactly when it most needs to know whether the call mutates. let mut entry = json!({ "operation": format!("{}.{}", path.join("."), method_name), + "httpMethod": m.http_method, + "path": m.path, "description": m.description.as_deref().unwrap_or(""), }); if let Some(availability) = m.availability { @@ -833,26 +883,36 @@ mod tests { fn test_render_operation_schema() { let doc = make_doc(); let schema = operation_schema(&doc, &["users"], "get").unwrap(); - // Per ADR-0006: `httpMethod` and `path` are dropped from the - // per-op envelope, `parameters` is renamed to `input`. - assert!(schema.get("httpMethod").is_none(), "httpMethod should be dropped"); - assert!(schema.get("path").is_none(), "path should be dropped"); + // `parameters` is renamed to `input`; `httpMethod` and `path` are + // present per ADR-0006's 2026-08-28 amendment — they are how an agent + // tells a read from a write before running the command. + assert_eq!(schema["httpMethod"], "GET", "httpMethod must be advertised"); + assert!( + schema["path"].is_string(), + "path must be advertised: {schema}", + ); assert!(schema.get("parameters").is_none(), "`parameters` should be renamed to `input`"); let required = schema["input"]["required"].as_array().unwrap(); assert!(required.iter().any(|v| v == "user_id")); } #[test] - fn test_root_listing_drops_http_method_and_path() { - // Per ADR-0006: listings expose `operation` + `description` only. - // HTTP-plumbing fields are agent-irrelevant noise. + fn test_root_listing_advertises_http_method_and_path() { + // ADR-0006 originally dropped these as agent-irrelevant noise. The + // 2026-08-28 amendment restores them: the catalog is exactly where an + // agent chooses an operation, so it is where knowing whether the call + // mutates matters most. `operation` and `description` are prose it + // would otherwise have to guess from. let doc = make_doc(); let output = list_all_operations(&doc); let arr = output.as_array().unwrap(); assert!(!arr.is_empty()); for op in arr { - assert!(op.get("httpMethod").is_none(), "httpMethod must be dropped from listings"); - assert!(op.get("path").is_none(), "path must be dropped from listings"); + assert!( + op["httpMethod"].is_string(), + "httpMethod must be advertised in listings: {op}", + ); + assert!(op["path"].is_string(), "path must be advertised: {op}"); assert!(op["operation"].is_string()); assert!(op["description"].is_string()); } @@ -2055,6 +2115,94 @@ mod tests { assert!(props["subject"]["items"].is_null()); } + #[test] + fn test_repeated_param_advertises_its_element_enum_on_items() { + // An array-of-enum parameter advertised no enum at all, so an agent + // reading the contract had no way to learn the legal values — and the + // CLI accepted anything and sent it. + let mut params = HashMap::new(); + params.insert( + "event_types".to_string(), + MethodParameter { + param_type: Some("array".to_string()), + item_type: Some("string".to_string()), + item_enum_values: Some(vec!["sent".to_string(), "received".to_string()]), + location: Some("query".to_string()), + repeated: true, + ..Default::default() + }, + ); + params.insert( + "labels".to_string(), + MethodParameter { + param_type: Some("array".to_string()), + item_type: Some("string".to_string()), + location: Some("query".to_string()), + repeated: true, + ..Default::default() + }, + ); + let method = RestMethod { + http_method: "GET".to_string(), + path: "/events".to_string(), + parameters: params, + ..Default::default() + }; + let schema = build_operation_schema(&["events"], "list", &method, &HashMap::new()); + let props = &schema["input"]["properties"]; + + // The enum belongs on `items`, not the property: the property is the array. + assert_eq!(props["event_types"]["items"]["type"], "string"); + assert_eq!(props["event_types"]["items"]["enum"], json!(["sent", "received"])); + assert!(props["event_types"]["enum"].is_null()); + // A non-enum array is unchanged — no empty `enum` key invented. + assert!(props["labels"]["items"]["enum"].is_null()); + } + + #[test] + fn test_repeated_query_param_advertises_its_element_type_not_the_container() { + // A query array's `param_type` is the container type, so falling back + // to it advertised `items: {"type": "array"}` — an array of arrays — + // for every string-element query parameter. An agent reading that + // contract has no way to construct a correct value. + let mut params = HashMap::new(); + params.insert( + "labels".to_string(), + MethodParameter { + param_type: Some("array".to_string()), + item_type: Some("string".to_string()), + location: Some("query".to_string()), + repeated: true, + ..Default::default() + }, + ); + params.insert( + "ids".to_string(), + MethodParameter { + param_type: Some("array".to_string()), + item_type: Some("integer".to_string()), + location: Some("query".to_string()), + repeated: true, + ..Default::default() + }, + ); + let method = RestMethod { + http_method: "GET".to_string(), + path: "/threads".to_string(), + parameters: params, + ..Default::default() + }; + let schema = build_operation_schema(&["threads"], "list", &method, &HashMap::new()); + let props = &schema["input"]["properties"]; + + assert_eq!(props["labels"]["type"], "array"); + assert_eq!( + props["labels"]["items"]["type"], "string", + "a string-element query array must not advertise an array of arrays", + ); + assert_eq!(props["ids"]["items"]["type"], "integer"); + } + #[test] fn test_scalar_or_array_union_rendered_as_oneof_in_schema() { let mut params = HashMap::new(); @@ -2240,4 +2388,101 @@ mod tests { .collect(); assert_eq!(required, vec!["audio"], "only the required part is listed"); } + + /// Every settable property must disclose the flag an agent types. + /// + /// Property keys are wire names and diverge from flags more often than + /// they look. The case that made a contract unfollowable: a spec parameter + /// named `query` is registered as `--query-param`, because `--query` is the + /// JMESPath global — `required` named `query` and no such flag existed. + #[test] + fn every_settable_property_discloses_its_flag() { + use crate::openapi::discovery::{MethodParameter, MultipartField}; + let mut parameters = HashMap::new(); + // Collides with the JMESPath global -> registered with a `-param` suffix. + parameters.insert("query".to_string(), MethodParameter { + param_type: Some("string".to_string()), + location: Some("query".to_string()), + required: true, + ..Default::default() + }); + // Header wire-casing -> kebab flag. + parameters.insert("Idempotency-Key".to_string(), MethodParameter { + param_type: Some("string".to_string()), + location: Some("header".to_string()), + ..Default::default() + }); + // Ordinary name -> unchanged. + parameters.insert("limit".to_string(), MethodParameter { + param_type: Some("integer".to_string()), + location: Some("query".to_string()), + ..Default::default() + }); + // Two wire names sanitizing to `--page-size`: the command builder + // registers only the first in sorted order, so the loser must stay + // silent rather than point at the winner's flag. + for wire in ["pageSize", "page_size"] { + parameters.insert(wire.to_string(), MethodParameter { + param_type: Some("integer".to_string()), + location: Some("query".to_string()), + ..Default::default() + }); + } + + let mut methods = HashMap::new(); + methods.insert( + "search".to_string(), + RestMethod { + parameters, + multipart_fields: vec![MultipartField { + wire_name: "audio_file".to_string(), + is_file: true, + description: None, + required: true, + content_type: None, + repeated: false, + }], + ..Default::default() + }, + ); + let mut resources = HashMap::new(); + resources.insert( + "things".to_string(), + crate::openapi::discovery::RestResource { + methods, + resources: HashMap::new(), + }, + ); + let doc = RestDescription { + resources, + ..Default::default() + }; + + let schema = operation_schema(&doc, &["things"], "search").expect("schema"); + let props = &schema["input"]["properties"]; + + assert_eq!( + props["query"]["flag"], "--query-param", + "a builtin-colliding name must disclose its suffixed flag: {props}", + ); + assert_eq!(props["Idempotency-Key"]["flag"], "--idempotency-key"); + assert_eq!(props["limit"]["flag"], "--limit"); + assert_eq!(props["audio_file"]["flag"], "--audio-file"); + assert_eq!(props["pageSize"]["flag"], "--page-size"); + assert!( + props["page_size"].get("flag").is_none(), + "the parameter that lost the flag collision must not advertise it: {props}", + ); + + // The required list still uses wire names (the `--params` route), so + // both spellings stay usable. + let required: Vec<&str> = schema["input"]["required"] + .as_array() + .expect("required") + .iter() + .map(|v| v.as_str().unwrap()) + .collect(); + assert!(required.contains(&"query"), "{required:?}"); + assert!(required.contains(&"audio_file"), "{required:?}"); + } } diff --git a/src/openapi/parser.rs b/src/openapi/parser.rs index d85101f..6bef364 100644 --- a/src/openapi/parser.rs +++ b/src/openapi/parser.rs @@ -735,6 +735,11 @@ struct OpenApiParamSchema { /// one silently became a single-value string flag. #[serde(rename = "$ref", default)] schema_ref: Option, + /// Element schema for an inline `type: array` parameter. Consumed only to + /// resolve the element type for `--schema` / `--help`; a `$ref`'d or + /// `anyOf`-wrapped array resolves through `component_schemas` instead. + #[serde(default)] + items: Option>, /// `oneOf` / `anyOf` branches on the parameter's own schema. Needed for /// pydantic's `Optional[list[T]]` spelling — see /// [`resolve_param_nullable_branch`]. @@ -2043,6 +2048,9 @@ fn convert_schema_object(obj: &OpenApiSchemaObject) -> JsonSchema { let name = strip_ref_prefix(ref_path); return JsonSchema { schema_ref: Some(name), + // Same reasoning as `convert_schema_property`: nullability is + // declared at the ref site and must survive the indirection. + nullable: obj.is_nullable(), ..Default::default() }; } @@ -2061,6 +2069,10 @@ fn convert_schema_object(obj: &OpenApiSchemaObject) -> JsonSchema { properties, schema_ref: None, items: obj.items.as_ref().map(|i| Box::new(convert_schema_property(i))), + // `effective_enum_values` rather than `obj.enum_values` so a `const:` + // lowers to a single-member enum here exactly as it does everywhere + // else the parser reads an enum. + enum_values: effective_enum_values(obj), required: obj.required.clone(), one_of: convert_composition_branches(&obj.one_of), any_of: convert_composition_branches(&obj.any_of), @@ -2077,6 +2089,15 @@ fn convert_schema_property(obj: &OpenApiSchemaObject) -> JsonSchemaProperty { let name = strip_ref_prefix(ref_path); return JsonSchemaProperty { schema_ref: Some(name), + // `nullable` lives at the ref *site*, not on the component — a + // component is shared, so it cannot be nullable for one referrer + // and not another. Dropping it here made `{$ref: X, nullable: true}` + // — the OpenAPI 3.0 spelling of a nullable object — lower to + // `nullable: false`, so the validator's null short-circuit could + // never fire for the one shape it exists to handle: it resolved the + // ref and rejected `null` with "Expected object". 121 body + // properties on one customer's 3.0.1 spec. + nullable: obj.is_nullable(), ..Default::default() }; } @@ -2387,6 +2408,28 @@ fn resolve_param_nullable_branch<'a>( resolve_ref_chain(non_null?, component_schemas) } +/// Resolved `type` of a parameter-shaped schema, following one `$ref` into +/// `component_schemas`. `None` for an untyped or `string` schema — callers +/// treat `None` as "string", which is what every lowering produced before +/// element types were tracked at all. +fn param_schema_type( + schema: &OpenApiParamSchema, + component_schemas: &HashMap, +) -> Option { + if let Some(ref_path) = &schema.schema_ref { + let resolved = component_schemas.get(&strip_ref_prefix(ref_path))?; + let terminal = resolve_ref_chain(resolved, component_schemas)?; + return match terminal.schema_type() { + Some("string") | None => None, + Some(other) => Some(other.to_string()), + }; + } + match schema.schema_type.as_deref() { + Some("string") | None => None, + Some(other) => Some(other.to_string()), + } +} + fn convert_parameter( param: &OpenApiParameter, ref_site_default: Option<&serde_yaml::Value>, @@ -2435,6 +2478,61 @@ fn convert_parameter( // (the repeated collector splices it), so both spellings now agree. let repeated = param_type.as_deref() == Some("array"); + // Element type of an array parameter, so `--schema` and `--help` describe + // what a value actually is. Without it both renderers fall back to + // `param_type` — which for a query array is the container type `"array"` — + // and advertise `items: {"type": "array"}` / ``: an array of + // arrays. Body arrays were already correct because for them `param_type` + // *is* the element type; query, header and path arrays never were. + // + // Resolved eagerly to `Some(..)`, defaulting to `"string"`, rather than + // leaning on the body path's `None`-means-string convention: that + // convention only holds where `param_type` already carries the element + // type, so on this branch a `None` would fall straight back through to + // `"array"` and fix nothing. `array_item_type` is still what resolves the + // element schema, so `$ref` and `anyOf: [T, null]` spellings agree with + // the body path. + // + // Advertisement-only: the collector at `app.rs` branches on + // `item_type != "string"`, so an explicit `Some("string")` and `None` + // drive the wire identically. + let item_type = if repeated { + let resolved = match resolved_ref { + // `$ref`'d or `anyOf: [array, null]` — the resolved branch is an + // `OpenApiSchemaObject`, so the body path's resolver applies. + Some(schema) => array_item_type(schema, component_schemas), + // Inline `type: array` — the element schema is an + // `OpenApiParamSchema`, which has its own (possibly `$ref`'d) type. + None => param + .schema + .as_ref() + .and_then(|s| s.items.as_deref()) + .and_then(|items| param_schema_type(items, component_schemas)), + }; + Some(resolved.unwrap_or_else(|| "string".to_string())) + } else { + None + }; + + // Element enum, resolved from the same element schema as `item_type`. An + // array parameter's own `enum_values` is empty (the enum lives on the + // items), so without this the flag was unconstrained: `--event-types + // bogus` was accepted and sent, while the scalar `--direction bogus` was + // correctly rejected. Enforced in the executor rather than by a clap + // `value_parser` — see `MethodParameter::item_enum_values`. + let item_enum_values = if repeated { + match resolved_ref { + Some(schema) => array_item_enum_values(schema, component_schemas), + None => param + .schema + .as_ref() + .and_then(|s| s.items.as_deref()) + .and_then(|items| param_item_enum_values(items, component_schemas)), + } + } else { + None + }; + // `x-fern-default` is the only source of a client-side default — // i.e. a value the CLI will (a) advertise in `--help` via clap's // `[default: ...]` and (b) substitute into the outgoing request @@ -2504,6 +2602,8 @@ fn convert_parameter( fern_enum, variable_reference, repeated, + item_type, + item_enum_values, ..Default::default() }; @@ -3892,6 +3992,36 @@ fn array_item_type( } } +/// Enum members an element of an array schema may take — the `items.enum` of +/// `type: array, items: {$ref: SomeEnum}`. Mirrors [`array_item_type`]'s +/// resolution (`$ref` chain, then nullable composition) so the two always +/// describe the same element schema. +fn array_item_enum_values( + schema: &OpenApiSchemaObject, + component_schemas: &HashMap, +) -> Option> { + let items = schema.items.as_deref()?; + let resolved = resolve_ref_chain(items, component_schemas) + .or_else(|| recognize_nullable_composite(items, component_schemas))?; + effective_enum_values(resolved) +} + +/// `array_item_enum_values` for an inline `items:` on a *parameter* schema, +/// which is an [`OpenApiParamSchema`] rather than an [`OpenApiSchemaObject`]. +/// A parameter's inline items can still be a `$ref` to an enum component, +/// which is the spelling that actually occurs in the wild. +fn param_item_enum_values( + items: &OpenApiParamSchema, + component_schemas: &HashMap, +) -> Option> { + if let Some(ref_path) = &items.schema_ref { + let resolved = component_schemas.get(&strip_ref_prefix(ref_path))?; + let terminal = resolve_ref_chain(resolved, component_schemas)?; + return effective_enum_values(terminal); + } + items.enum_values.clone() +} + /// True when a multipart property holds a list, so its flag must be /// repeatable. `type: array` counts whether it is declared inline, behind a /// `$ref`, or inside a nullable composition (`anyOf: [{type: array}, null]` — @@ -4512,6 +4642,11 @@ fn flatten_body_params_prefix( } else { None }, + item_enum_values: if is_array { + array_item_enum_values(effective, component_schemas) + } else { + None + }, nullable: is_scalar_nullable(resolved) || promoted_scalar.is_some() || promoted_composite.is_some(), @@ -4657,6 +4792,11 @@ fn flatten_body_params_prefix( } else { None }, + item_enum_values: if is_array { + array_item_enum_values(effective, component_schemas) + } else { + None + }, nullable: is_scalar_nullable(prop) || promoted_scalar.is_some() || promoted_composite.is_some(), @@ -4949,6 +5089,249 @@ mod tests { assert!(!params["optional_thing"].required_by_spec); } + #[test] + fn test_array_parameter_records_its_element_type() { + // `--schema` advertised `items: {"type": "array"}` for an array query + // parameter — an array of arrays. Only body arrays carried an element + // type, so `help.rs` fell back to `param_type`, which is `"array"` for + // these. All three spellings appear in real specs, so all three are + // covered here: inline, `$ref`'d, and `anyOf: [array, null]`. + let mut components = HashMap::new(); + components.insert( + "Labels".to_string(), + serde_yaml::from_str::( + "type: array\nitems:\n type: integer\n", + ) + .unwrap(), + ); + + // Inline, string elements -> `Some("string")`, spelled out rather than + // left implicit. `None` here would fall back through both renderers to + // `param_type`, which on a query array is the container type "array" — + // the exact no-op this assertion exists to catch. + let inline: OpenApiParameter = serde_yaml::from_str( + "name: labels\nin: query\nschema:\n type: array\n items:\n type: string\n", + ) + .unwrap(); + let (_, mp) = convert_parameter(&inline, None, &components); + assert!(mp.repeated); + assert_eq!( + mp.item_type.as_deref(), + Some("string"), + "string elements must be explicit, not left to the param_type fallback", + ); + + // No spelling of a string-element array parameter may leave the + // element type unresolved. + for spec in [ + "name: labels\nin: query\nschema:\n type: array\n items:\n type: string\n", + "name: labels\nin: header\nschema:\n type: array\n items:\n type: string\n", + "name: labels\nin: query\nschema:\n type: array\n", + ] { + let p: OpenApiParameter = serde_yaml::from_str(spec).unwrap(); + let (_, mp) = convert_parameter(&p, None, &components); + assert_eq!( + mp.item_type.as_deref(), + Some("string"), + "unresolved element type falls back to the container type: {spec}", + ); + } + + // Inline, non-string elements -> recorded. + let inline_int: OpenApiParameter = serde_yaml::from_str( + "name: ids\nin: query\nschema:\n type: array\n items:\n type: integer\n", + ) + .unwrap(); + let (_, mp) = convert_parameter(&inline_int, None, &components); + assert_eq!(mp.item_type.as_deref(), Some("integer")); + + // `$ref` to an array component. + let via_ref: OpenApiParameter = serde_yaml::from_str( + "name: labels\nin: query\nschema:\n $ref: '#/components/schemas/Labels'\n", + ) + .unwrap(); + let (_, mp) = convert_parameter(&via_ref, None, &components); + assert!(mp.repeated); + assert_eq!(mp.item_type.as_deref(), Some("integer")); + + // `anyOf: [array, null]` — pydantic's `Optional[list[T]]`. + let nullable: OpenApiParameter = serde_yaml::from_str( + "name: labels\nin: query\nschema:\n anyOf:\n - $ref: '#/components/schemas/Labels'\n - type: 'null'\n", + ) + .unwrap(); + let (_, mp) = convert_parameter(&nullable, None, &components); + assert!(mp.repeated); + assert_eq!(mp.item_type.as_deref(), Some("integer")); + + // A scalar parameter records nothing. + let scalar: OpenApiParameter = + serde_yaml::from_str("name: limit\nin: query\nschema:\n type: integer\n").unwrap(); + let (_, mp) = convert_parameter(&scalar, None, &components); + assert!(!mp.repeated); + assert_eq!(mp.item_type, None); + } + + #[test] + fn test_body_array_of_enum_resolves_its_element_enum() { + // The element-enum resolution was wired into `convert_parameter` only, + // so a body array of enums advertised no enum at all. On a real spec + // that meant `metrics query-events --event-types bogus` was rejected + // while `webhooks create --event-types bogus` — same 10-member enum, + // and required there — was not. + let mut components = HashMap::new(); + components.insert( + "EventType".to_string(), + serde_yaml::from_str::( + "type: string\nenum:\n - message.sent\n - message.received\n", + ) + .unwrap(), + ); + components.insert( + "EventTypes".to_string(), + serde_yaml::from_str::( + "type: array\nitems:\n $ref: '#/components/schemas/EventType'\n", + ) + .unwrap(), + ); + let schema: OpenApiSchemaObject = serde_yaml::from_str( + r#" +type: object +properties: + event_types: + $ref: '#/components/schemas/EventTypes' + inline_types: + type: array + items: + $ref: '#/components/schemas/EventType' + labels: + type: array + items: + type: string +"#, + ) + .unwrap(); + let params = flatten_body_params(&schema, &components, 0); + let expected = vec!["message.sent".to_string(), "message.received".to_string()]; + + for name in ["event_types", "inline_types"] { + let p = ¶ms[name]; + assert!(p.repeated, "{name} must be repeated"); + assert_eq!( + p.item_enum_values.as_deref(), + Some(expected.as_slice()), + "{name} must resolve its element enum", + ); + } + // A plain string array invents nothing. + assert_eq!(params["labels"].item_enum_values, None); + } + + #[test] + fn test_ref_site_nullability_survives_the_ref_indirection() { + // This is the test that was missing, and its absence is why the + // executor-side null guard shipped as dead code. That guard had a unit + // test, but the test hand-built `JsonSchemaProperty { schema_ref, + // nullable: true }` — a state `convert_schema_property` could not + // produce, because its `$ref` early-return dropped every sibling + // keyword. The guard passed its test and never fired on a real spec. + // + // So this asserts the lowering from spec YAML, not a struct literal. + let nullable_ref: OpenApiSchemaObject = serde_yaml::from_str( + "$ref: '#/components/schemas/Metadata'\nnullable: true\n", + ) + .unwrap(); + let lowered = convert_schema_property(&nullable_ref); + assert_eq!(lowered.schema_ref.as_deref(), Some("Metadata")); + assert!( + lowered.nullable, + "nullability is declared at the ref site and must survive the indirection", + ); + + // A `$ref` without `nullable` stays non-nullable — the fix must not + // make every referenced property accept null. + let plain_ref: OpenApiSchemaObject = + serde_yaml::from_str("$ref: '#/components/schemas/Metadata'\n").unwrap(); + assert!(!convert_schema_property(&plain_ref).nullable); + + // The 3.1 spelling, for contrast: null-ness lives in the branch, which + // `has_null_branch` handles on the executor side. + let component: OpenApiSchemaObject = serde_yaml::from_str( + "$ref: '#/components/schemas/Metadata'\nnullable: true\n", + ) + .unwrap(); + assert!(convert_schema_object(&component).nullable); + } + + #[test] + fn test_array_parameter_resolves_its_element_enum() { + // An array-of-enum parameter carries no enum of its own — it lives on + // `items` — so the flag was entirely unconstrained while its scalar + // twin was checked by a clap value_parser. + let mut components = HashMap::new(); + components.insert( + "EventType".to_string(), + serde_yaml::from_str::( + "type: string\nenum:\n - message.sent\n - message.received\n", + ) + .unwrap(), + ); + components.insert( + "EventTypes".to_string(), + serde_yaml::from_str::( + "type: array\nitems:\n $ref: '#/components/schemas/EventType'\n", + ) + .unwrap(), + ); + let expected = vec!["message.sent".to_string(), "message.received".to_string()]; + + // Inline `items: {$ref: Enum}` — the spelling that occurs in the wild. + let inline: OpenApiParameter = serde_yaml::from_str( + "name: event_types\nin: query\nschema:\n type: array\n items:\n $ref: '#/components/schemas/EventType'\n", + ) + .unwrap(); + let (_, mp) = convert_parameter(&inline, None, &components); + assert_eq!(mp.item_enum_values.as_deref(), Some(expected.as_slice())); + + // Inline `items: {type: string, enum: [...]}`. + let inline_enum: OpenApiParameter = serde_yaml::from_str( + "name: event_types\nin: query\nschema:\n type: array\n items:\n type: string\n enum:\n - message.sent\n - message.received\n", + ) + .unwrap(); + let (_, mp) = convert_parameter(&inline_enum, None, &components); + assert_eq!(mp.item_enum_values.as_deref(), Some(expected.as_slice())); + + // `$ref` to an array component whose items are a `$ref` to the enum. + let via_ref: OpenApiParameter = serde_yaml::from_str( + "name: event_types\nin: query\nschema:\n $ref: '#/components/schemas/EventTypes'\n", + ) + .unwrap(); + let (_, mp) = convert_parameter(&via_ref, None, &components); + assert_eq!(mp.item_enum_values.as_deref(), Some(expected.as_slice())); + + // `anyOf: [array, null]` — pydantic's `Optional[list[Enum]]`. + let nullable: OpenApiParameter = serde_yaml::from_str( + "name: event_types\nin: query\nschema:\n anyOf:\n - $ref: '#/components/schemas/EventTypes'\n - type: 'null'\n", + ) + .unwrap(); + let (_, mp) = convert_parameter(&nullable, None, &components); + assert_eq!(mp.item_enum_values.as_deref(), Some(expected.as_slice())); + + // A non-enum array records nothing, and neither does a scalar. + let plain: OpenApiParameter = serde_yaml::from_str( + "name: labels\nin: query\nschema:\n type: array\n items:\n type: string\n", + ) + .unwrap(); + let (_, mp) = convert_parameter(&plain, None, &components); + assert_eq!(mp.item_enum_values, None); + let scalar: OpenApiParameter = serde_yaml::from_str( + "name: direction\nin: query\nschema:\n $ref: '#/components/schemas/EventType'\n", + ) + .unwrap(); + let (_, mp) = convert_parameter(&scalar, None, &components); + assert_eq!(mp.item_enum_values, None, "a scalar enum belongs on enum_values"); + assert!(mp.enum_values.is_some()); + } + #[test] fn test_camel_to_kebab() { assert_eq!(camel_to_kebab("scheduledEvents"), "scheduled-events"); From 3d5dbed92135984e81f2d91a7b5920524608ba52 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Mon, 31 Aug 2026 23:27:59 +0000 Subject: [PATCH 2/3] [fern-replay] Applied customizations Patches with unresolved conflicts (2): - patch-bf63549e: chore: restore .fernignore, defer windows npm package - patch-9c5e5935: chore: publish packageIdentity metadata to npm, restore .fernignore Run `fern-replay resolve` to apply these customizations. --- .fern/replay.lock | 3800 +++++++++++++++++++++++++++++++++++++- .github/workflows/ci.yml | 10 +- Cargo.lock | 102 +- 3 files changed, 3877 insertions(+), 35 deletions(-) diff --git a/.fern/replay.lock b/.fern/replay.lock index 3a46287..15b08fd 100644 --- a/.fern/replay.lock +++ b/.fern/replay.lock @@ -18,7 +18,13 @@ generations: cli_version: unknown generator_versions: fernapi/fern-cli-generator: 0.38.6 -current_generation: 65ed3a7c07fc8fcedf01cebd8c050fbe2844deb2 + - commit_sha: 473cb1c150ef1ff542af352b8db2ff2653ab46da + tree_hash: fb201ab0f6ae7989a8b62ab43687263832b50eb2 + timestamp: 2026-08-31T23:27:52.477Z + cli_version: unknown + generator_versions: + fernapi/fern-cli-generator: 0.38.10 +current_generation: 473cb1c150ef1ff542af352b8db2ff2653ab46da patches: - id: patch-bf63549e content_hash: sha256:a660ef1be2e6211b2d9aee152022a339ffd879d56f0e8b0b557ce0fb5e4d9b5c @@ -3874,6 +3880,3798 @@ patches: "syn", ] + [[package]] + name = "zmij" + version = "1.0.21" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" + status: unresolved + - id: patch-9c5e5935 + content_hash: sha256:4028d9dcd63eeec99dcff572323eea21bca92f35bc501bb4e37976dfd5bcd38c + original_commit: 9c5e593522dcc9eaf98056966c8259239c329da3 + original_message: "chore: publish packageIdentity metadata to npm, restore .fernignore" + original_author: Harry Du + base_generation: 24b6309c660dc6df8954bfe8a1173b9b666ad607 + files: + - .github/workflows/ci.yml + - Cargo.lock + patch_content: |+ + From 9c5e593522dcc9eaf98056966c8259239c329da3 Mon Sep 17 00:00:00 2001 + From: Harry Du + Date: Thu, 27 Aug 2026 23:25:58 -0700 + Subject: [PATCH] chore: publish packageIdentity metadata to npm, restore + .fernignore + + Re-applied by bin/post-regen-patch.py. Fern Replay preserved the repo + assets and the windows deferral from the previous release, so the only + new patch is the npm metadata one. + + - ci.yml: the launcher's package.json now carries the configured + description, license MIT, keywords and homepage, ships README.md, and + the README is copied beside package.json so npm packs it. Until now + packageIdentity reached Cargo.toml and stopped there, which is why the + npm page for 1.1.0 reads "License: none" with no README and the + description "CLI for agentmail". The license gap is the part that + matters: dependency scanners reject unlicensed packages. + - .fernignore: reset by every regeneration because it cannot protect + itself; the assets it guards did survive. + + win32-x64 stays out of the npm matrix while npm's spam flag on that + package name is open; the GitHub Release still carries the Windows + binary and .ps1 installer. + --- + .github/workflows/ci.yml | 8 +++++-- + Cargo.lock | 50 +--------------------------------------- + 2 files changed, 7 insertions(+), 51 deletions(-) + + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml + index 5ecf547..00c5679 100644 + --- a/.github/workflows/ci.yml + +++ b/.github/workflows/ci.yml + @@ -260,7 +260,10 @@ jobs: + { + "name": "agentmail-cli", + "version": "${VERSION}", + - "description": "CLI for agentmail", + + "description": "Command-line interface for the AgentMail API. Send, receive, reply, and manage threaded email conversations from your terminal.", + + "license": "MIT", + + "keywords": ["email", "api", "cli", "agent", "agentmail"], + + "homepage": "https://agentmail.to", + "repository": { + "type": "git", + "url": "https://github.com/agentmail-to/agentmail-cli" + @@ -271,7 +274,7 @@ jobs: + "optionalDependencies": { + ${OPTIONAL_DEPS} + }, + - "files": ["bin/"] + + "files": ["bin/", "README.md"] + } + PKGJSON + + @@ -319,6 +322,7 @@ jobs: + } + LAUNCHER + + + cp README.md "${PKG_DIR}/README.md" + cd "${PKG_DIR}" + # Pre-release detection. ANY SemVer pre-release (a "-" after the + # version core) must get a non-latest dist-tag: matching only + diff --git a/Cargo.lock b/Cargo.lock + index 489673f..dc894f9 100644 + --- a/Cargo.lock + +++ b/Cargo.lock + @@ -10,7 +10,7 @@ checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + + [[package]] + name = "agentmail-cli" + -version = "1.1.0" + +version = "1.1.1" + dependencies = [ + "agentmail_sdk", + "anyhow", + @@ -567,54 +567,6 @@ version = "2.4.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" + + -[[package]] + -name = "agentmail-cli" + -version = "1.1.1" + -dependencies = [ + - "agentmail_sdk", + - "anyhow", + - "base64", + - "bytes", + - "chrono", + - "clap_complete", + - "clap_mangen", + - "clap", + - "dotenvy", + - "form_urlencoded", + - "futures-util", + - "hmac", + - "httpdate", + - "jmespath", + - "keyring", + - "libc", + - "num-bigint", + - "ordered-float", + - "percent-encoding", + - "pin-project", + - "rand 0.8.6", + - "reqwest-sse", + - "reqwest", + - "secrecy", + - "serde_json_path", + - "serde_json", + - "serde_qs", + - "serde_yaml", + - "serde", + - "serial_test", + - "sha2", + - "tempfile", + - "thiserror 2.0.18", + - "tokio-tungstenite", + - "tokio-util", + - "tokio", + - "tracing-appender", + - "tracing-subscriber", + - "tracing", + - "unicode-normalization", + - "webbrowser", + - "wiremock", + -] + - + [[package]] + name = "find-msvc-tools" + version = "0.1.9" + -- + 2.52.0 + + theirs_snapshot: + .github/workflows/ci.yml: | + name: ci + + on: [push] + + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: false + + env: + RUSTFLAGS: "-A warnings" + + jobs: + check: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v6 + + - name: Set up Rust + uses: actions-rust-lang/setup-rust-toolchain@v1 + + - name: Check + run: cargo check + + compile: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v6 + + - name: Set up Rust + uses: actions-rust-lang/setup-rust-toolchain@v1 + + - name: Compile + run: cargo build + + test: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v6 + + - name: Set up Rust + uses: actions-rust-lang/setup-rust-toolchain@v1 + + - name: Test + run: cargo test + + # The npm packages take their version from the release tag, while the + # binary reports the version in Cargo.toml. Publishing when they disagree + # ships a package whose --version names a release that isn't on the + # registry, so refuse to publish instead (cargo-dist hard-fails on the + # same mismatch for the GitHub Release). + version: + if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v6 + + - name: Set up Rust + uses: actions-rust-lang/setup-rust-toolchain@v1 + + - name: Check tag matches crate version + shell: bash + run: | + set -euo pipefail + + TAG_VERSION="${GITHUB_REF_NAME#v}" + CRATE_VERSION=$(cargo metadata --no-deps --format-version 1 \ + | jq -r --arg manifest "${PWD}/Cargo.toml" \ + '.packages[] | select(.manifest_path == $manifest) | .version') + + if [[ -z "${CRATE_VERSION}" ]]; then + echo "::error::Could not determine the crate version from cargo metadata (no package matched ${PWD}/Cargo.toml)." + exit 1 + fi + + if [[ "${TAG_VERSION}" != "${CRATE_VERSION}" ]]; then + echo "::error::Tag ${GITHUB_REF_NAME} publishes version ${TAG_VERSION}, but Cargo.toml is ${CRATE_VERSION}." + echo "::error::The binary would report ${CRATE_VERSION} from --version while the npm packages say ${TAG_VERSION}." + echo "::error::Set the generator's output version to ${TAG_VERSION} and regenerate, or tag v${CRATE_VERSION} instead." + exit 1 + fi + echo "Tag and crate version agree: ${TAG_VERSION}" + + publish: + needs: [check, compile, test, version] + if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') + runs-on: ${{ matrix.runner }} + permissions: + contents: read + id-token: write + strategy: + # Don't cancel sibling matrix jobs on first failure — a transient + # failure on one platform would otherwise leave npm in a partial + # state (some platform packages published, others not, launcher + # never published), with no clean re-run since the already- + # published versions reject re-publish. + fail-fast: false + matrix: + include: + - rust-target: x86_64-unknown-linux-musl + runner: ubuntu-latest + npm-platform-suffix: linux-x64 + - rust-target: aarch64-unknown-linux-musl + runner: ubuntu-24.04-arm + npm-platform-suffix: linux-arm64 + - rust-target: x86_64-apple-darwin + runner: macos-latest + npm-platform-suffix: darwin-x64 + - rust-target: aarch64-apple-darwin + runner: macos-latest + npm-platform-suffix: darwin-arm64 + steps: + - name: Checkout repo + uses: actions/checkout@v6 + + - name: Set up Rust + uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + target: ${{ matrix.rust-target }} + + - name: Set up Node.js + uses: actions/setup-node@v6 + with: + node-version: "lts/Krypton" + registry-url: "https://registry.npmjs.org" + + - name: Install musl build tools + if: contains(matrix.rust-target, '-linux-musl') + run: | + sudo apt-get update + sudo apt-get install -y musl-tools + + # The TLS backend and the keyring backend are selected per target by + # Cargo.toml, so no per-target feature flags are needed here. + # + # musl targets get a C compiler for the C dependencies, but not a + # linker: musl-gcc cannot produce static-pie, so it yields a binary + # that needs /lib/ld-musl-*.so.1 at runtime — which defeats the point + # of a musl build and crashes where that loader is absent. Left alone, + # rustc links the self-contained musl objects statically. + # + # Built with the `dist` profile — the same one cargo-dist uses for the + # GitHub Release — so npm and the Release ship byte-identical binaries + # for a given tag. Building `--release` here meant two channels + # shipping different bytes under one version, which surfaces as an + # unreproducible bug report. + - name: Build release binary + shell: bash + run: | + if [[ "${{ matrix.rust-target }}" == *-linux-musl ]]; then + TARGET_UNDERSCORE=$(echo "${{ matrix.rust-target }}" | tr '-' '_') + export "CC_${TARGET_UNDERSCORE}=musl-gcc" + fi + cargo build --profile dist --target ${{ matrix.rust-target }} + + - name: Package and publish npm platform package + shell: bash + run: | + set -euo pipefail + + VERSION="${GITHUB_REF_NAME#v}" + PLATFORM_PKG="agentmail-cli-${{ matrix.npm-platform-suffix }}" + PKG_DIR="npm-pkg/${PLATFORM_PKG}" + mkdir -p "${PKG_DIR}" + + # Locate the compiled binary + BINARY_NAME="agentmail" + if [[ "${{ matrix.rust-target }}" == *"windows"* ]]; then + BINARY_NAME="agentmail.exe" + fi + # A custom cargo profile writes to target///, not + # .../release/. + cp "target/${{ matrix.rust-target }}/dist/${BINARY_NAME}" "${PKG_DIR}/" + + # Write platform package.json + cat > "${PKG_DIR}/package.json" < rc + # and -next.1 -> next; an all-numeric or empty identifier falls + # back to "prerelease" because npm rejects a numeric dist-tag. + PRERELEASE="${VERSION#*-}" + if [[ "${VERSION}" == *-* ]]; then + TAG=$(echo "${PRERELEASE%%.*}" | tr -cd '[:alnum:]-') + if [[ -z "${TAG}" || "${TAG}" =~ ^[0-9]+$ ]]; then + TAG=prerelease + fi + echo "Publishing pre-release ${VERSION} with --tag ${TAG}" + npm publish --access public --tag "${TAG}" + else + PKG_NAME=$(node -p "require('./package.json').name") + PKG_VERSION=$(node -p "require('./package.json').version") + CURRENT_LATEST=$(npm view "${PKG_NAME}" dist-tags.latest 2>/dev/null || echo "0.0.0") + if npx -y semver@7.8.1 "${PKG_VERSION}" -r "<${CURRENT_LATEST}" > /dev/null 2>&1; then + echo "Publishing ${PKG_VERSION} with --tag backport (current latest is ${CURRENT_LATEST})" + npm publish --access public --tag backport + else + npm publish --access public + fi + fi + + publish-launcher: + needs: [publish] + if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - name: Checkout repo + uses: actions/checkout@v6 + + - name: Set up Node.js + uses: actions/setup-node@v6 + with: + node-version: "lts/Krypton" + registry-url: "https://registry.npmjs.org" + + - name: Publish launcher package + shell: bash + run: | + set -euo pipefail + + VERSION="${GITHUB_REF_NAME#v}" + PKG_DIR="npm-pkg/launcher" + mkdir -p "${PKG_DIR}" + + BINARY_NAME="agentmail" + + # Build optionalDependencies map + OPTIONAL_DEPS="" + OPTIONAL_DEPS="${OPTIONAL_DEPS}\"agentmail-cli-linux-x64\": \"${VERSION}\"," + OPTIONAL_DEPS="${OPTIONAL_DEPS}\"agentmail-cli-linux-arm64\": \"${VERSION}\"," + OPTIONAL_DEPS="${OPTIONAL_DEPS}\"agentmail-cli-darwin-x64\": \"${VERSION}\"," + OPTIONAL_DEPS="${OPTIONAL_DEPS}\"agentmail-cli-darwin-arm64\": \"${VERSION}\"" + + cat > "${PKG_DIR}/package.json" < "${PKG_DIR}/bin/cli.js" <<'LAUNCHER' + #!/usr/bin/env node + "use strict"; + const { execFileSync } = require("child_process"); + const path = require("path"); + const os = require("os"); + + const PLATFORMS = { + "linux-x64": "agentmail-cli-linux-x64", + "linux-arm64": "agentmail-cli-linux-arm64", + "darwin-x64": "agentmail-cli-darwin-x64", + "darwin-arm64": "agentmail-cli-darwin-arm64", + }; + + const platformKey = os.platform() + "-" + os.arch(); + const pkg = PLATFORMS[platformKey]; + if (!pkg) { + console.error("Unsupported platform: " + platformKey); + process.exit(1); + } + + const binName = os.platform() === "win32" ? "agentmail.exe" : "agentmail"; + const binPath = path.join(require.resolve(pkg + "/package.json"), "..", binName); + + try { + execFileSync(binPath, process.argv.slice(2), { stdio: "inherit" }); + } catch (e) { + if (e && typeof e === "object") { + // Propagate the child's exit code; a signal death has no + // numeric status, so report it as 128+signum like a shell does. + if (typeof e.status === "number") { + process.exit(e.status); + } + if (typeof e.signal === "string") { + const SIGNUM = { SIGHUP: 1, SIGINT: 2, SIGQUIT: 3, SIGILL: 4, SIGABRT: 6, SIGFPE: 8, SIGKILL: 9, SIGSEGV: 11, SIGPIPE: 13, SIGALRM: 14, SIGTERM: 15 }; + process.exit(128 + (SIGNUM[e.signal] || 0)); + } + } + throw e; + } + LAUNCHER + + cp README.md "${PKG_DIR}/README.md" + cd "${PKG_DIR}" + # Pre-release detection. ANY SemVer pre-release (a "-" after the + # version core) must get a non-latest dist-tag: matching only + # -alpha/-beta let a v1.1.0-rc.1 or -next.1 tag fall through to a + # bare `npm publish`, which moves `latest` to a pre-release for + # every existing installer. The tag is the first dot-separated + # pre-release identifier, stripped to a safe slug, so -rc.1 -> rc + # and -next.1 -> next; an all-numeric or empty identifier falls + # back to "prerelease" because npm rejects a numeric dist-tag. + PRERELEASE="${VERSION#*-}" + if [[ "${VERSION}" == *-* ]]; then + TAG=$(echo "${PRERELEASE%%.*}" | tr -cd '[:alnum:]-') + if [[ -z "${TAG}" || "${TAG}" =~ ^[0-9]+$ ]]; then + TAG=prerelease + fi + echo "Publishing pre-release ${VERSION} with --tag ${TAG}" + npm publish --access public --tag "${TAG}" + else + PKG_NAME=$(node -p "require('./package.json').name") + PKG_VERSION=$(node -p "require('./package.json').version") + CURRENT_LATEST=$(npm view "${PKG_NAME}" dist-tags.latest 2>/dev/null || echo "0.0.0") + if npx -y semver@7.8.1 "${PKG_VERSION}" -r "<${CURRENT_LATEST}" > /dev/null 2>&1; then + echo "Publishing ${PKG_VERSION} with --tag backport (current latest is ${CURRENT_LATEST})" + npm publish --access public --tag backport + else + npm publish --access public + fi + fi + Cargo.lock: | + # This file is automatically @generated by Cargo. + # It is not intended for manual editing. + version = 4 + + [[package]] + name = "adler2" + version = "2.0.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + + [[package]] + name = "agentmail-cli" + version = "1.1.1" + dependencies = [ + "agentmail_sdk", + "anyhow", + "base64", + "bytes", + "chrono", + "clap", + "clap_complete", + "clap_mangen", + "dotenvy", + "form_urlencoded", + "futures-util", + "hmac", + "httpdate", + "jmespath", + "keyring", + "libc", + "num-bigint", + "ordered-float", + "percent-encoding", + "pin-project", + "rand 0.8.6", + "reqwest", + "reqwest-sse", + "secrecy", + "serde", + "serde_json", + "serde_json_path", + "serde_qs", + "serde_yaml", + "serial_test", + "sha2", + "tempfile", + "thiserror 2.0.18", + "tokio", + "tokio-tungstenite", + "tokio-util", + "tracing", + "tracing-appender", + "tracing-subscriber", + "unicode-normalization", + "webbrowser", + "wiremock", + ] + + [[package]] + name = "agentmail_sdk" + version = "0.1.0" + dependencies = [ + "agentmail_types", + "bytes", + "chrono", + "futures", + "reqwest", + "serde", + "serde_json", + "thiserror 1.0.69", + "tokio", + ] + + [[package]] + name = "agentmail_types" + version = "0.0.0" + dependencies = [ + "base64", + "chrono", + "num-bigint", + "ordered-float", + "serde", + "serde_json", + ] + + [[package]] + name = "aho-corasick" + version = "1.1.4" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" + dependencies = [ + "memchr", + ] + + [[package]] + name = "android_system_properties" + version = "0.1.6" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc" + dependencies = [ + "libc", + ] + + [[package]] + name = "anstream" + version = "1.0.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" + dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", + ] + + [[package]] + name = "anstyle" + version = "1.0.14" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" + + [[package]] + name = "anstyle-parse" + version = "1.0.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" + dependencies = [ + "utf8parse", + ] + + [[package]] + name = "anstyle-query" + version = "1.1.5" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" + dependencies = [ + "windows-sys 0.60.2", + ] + + [[package]] + name = "anstyle-wincon" + version = "3.0.11" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" + dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys 0.60.2", + ] + + [[package]] + name = "anyhow" + version = "1.0.103" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "2a4385e2e34eb35d6b3efe798b9eb88096925d87726c0798709bf56d9ed84af3" + + [[package]] + name = "assert-json-diff" + version = "2.0.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "47e4f2b81832e72834d7518d8487a0396a28cc408186a2e8854c0f98011faf12" + dependencies = [ + "serde", + "serde_json", + ] + + [[package]] + name = "async-compression" + version = "0.4.43" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "3976abdc8fe7d1133d43d304afd42abdf5bc3e1319d263d223bde07b5efc4be8" + dependencies = [ + "compression-codecs", + "compression-core", + "pin-project-lite", + "tokio", + ] + + [[package]] + name = "async-stream" + version = "0.3.6" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" + dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", + ] + + [[package]] + name = "async-stream-impl" + version = "0.3.6" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" + dependencies = [ + "proc-macro2", + "quote", + "syn", + ] + + [[package]] + name = "atomic-waker" + version = "1.1.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + + [[package]] + name = "autocfg" + version = "1.5.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" + + [[package]] + name = "base64" + version = "0.22.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + + [[package]] + name = "bitflags" + version = "2.13.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "b4388bee8683e3d04af747c73422af53102d2bd24d9eadb6cbc100baef4b43f8" + + [[package]] + name = "block-buffer" + version = "0.10.4" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" + dependencies = [ + "generic-array", + ] + + [[package]] + name = "bumpalo" + version = "3.20.3" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" + + [[package]] + name = "byteorder" + version = "1.5.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + + [[package]] + name = "bytes" + version = "1.12.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "8ae3f5d315924270530207e2a68396c3cc547f6dca3fbdca317cfb1a51edb593" + + [[package]] + name = "cc" + version = "1.2.65" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "e228eec9be7c17ccb640b59b36a5cd805ea2a564a4c5e162c2f659fea30d3b96" + dependencies = [ + "find-msvc-tools", + "shlex", + ] + + [[package]] + name = "cfg-if" + version = "1.0.4" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + + [[package]] + name = "cfg_aliases" + version = "0.2.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + + [[package]] + name = "chrono" + version = "0.4.45" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" + dependencies = [ + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-link", + ] + + [[package]] + name = "clap" + version = "4.6.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51" + dependencies = [ + "clap_builder", + "clap_derive", + ] + + [[package]] + name = "clap_builder" + version = "4.6.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" + dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", + ] + + [[package]] + name = "clap_complete" + version = "4.6.5" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "e0a7a9bfdb35811f9e59832f0f05975114d2251b415fb534108e6f34060fd772" + dependencies = [ + "clap", + ] + + [[package]] + name = "clap_derive" + version = "4.6.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "f2ce8604710f6733aa641a2b3731eaa1e8b3d9973d5e3565da11800813f997a9" + dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", + ] + + [[package]] + name = "clap_lex" + version = "1.1.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" + + [[package]] + name = "clap_mangen" + version = "0.2.33" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "7e30ffc187e2e3aeafcd1c6e2aa416e29739454c0ccaa419226d5ecd181f2d78" + dependencies = [ + "clap", + "roff", + ] + + [[package]] + name = "colorchoice" + version = "1.0.5" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" + + [[package]] + name = "combine" + version = "4.6.7" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" + dependencies = [ + "bytes", + "memchr", + ] + + [[package]] + name = "compression-codecs" + version = "0.4.38" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "ce2548391e9c1929c21bf6aa2680af86fe4c1b33e6cea9ac1cfeec0bd11218cf" + dependencies = [ + "compression-core", + "flate2", + "memchr", + ] + + [[package]] + name = "compression-core" + version = "0.4.32" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "cc14f565cf027a105f7a44ccf9e5b424348421a1d8952a8fc9d499d313107789" + + [[package]] + name = "core-foundation" + version = "0.9.4" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" + dependencies = [ + "core-foundation-sys", + "libc", + ] + + [[package]] + name = "core-foundation" + version = "0.10.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" + dependencies = [ + "core-foundation-sys", + "libc", + ] + + [[package]] + name = "core-foundation-sys" + version = "0.8.7" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + + [[package]] + name = "cpufeatures" + version = "0.2.17" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" + dependencies = [ + "libc", + ] + + [[package]] + name = "crc32fast" + version = "1.5.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" + dependencies = [ + "cfg-if", + ] + + [[package]] + name = "crossbeam-channel" + version = "0.5.15" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" + dependencies = [ + "crossbeam-utils", + ] + + [[package]] + name = "crossbeam-utils" + version = "0.8.21" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + + [[package]] + name = "crypto-common" + version = "0.1.7" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" + dependencies = [ + "generic-array", + "typenum", + ] + + [[package]] + name = "data-encoding" + version = "2.11.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "a4ae5f15dda3c708c0ade84bfee31ccab44a3da4f88015ed22f63732abe300c8" + + [[package]] + name = "dbus" + version = "0.9.11" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "b942602992bb7acfd1f51c49811c58a610ef9181b6e66f3e519d79b540a3bf73" + dependencies = [ + "libc", + "libdbus-sys", + "windows-sys 0.61.2", + ] + + [[package]] + name = "dbus-secret-service" + version = "4.1.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "708b509edf7889e53d7efb0ffadd994cc6c2345ccb62f55cfd6b0682165e4fa6" + dependencies = [ + "dbus", + "openssl", + "zeroize", + ] + + [[package]] + name = "deadpool" + version = "0.12.3" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "0be2b1d1d6ec8d846f05e137292d0b89133caf95ef33695424c09568bdd39b1b" + dependencies = [ + "deadpool-runtime", + "lazy_static", + "num_cpus", + "tokio", + ] + + [[package]] + name = "deadpool-runtime" + version = "0.1.4" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "092966b41edc516079bdf31ec78a2e0588d1d0c08f78b91d8307215928642b2b" + + [[package]] + name = "deranged" + version = "0.5.8" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" + + [[package]] + name = "deunicode" + version = "1.6.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "abd57806937c9cc163efc8ea3910e00a62e2aeb0b8119f1793a978088f8f6b04" + + [[package]] + name = "digest" + version = "0.10.7" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" + dependencies = [ + "block-buffer", + "crypto-common", + "subtle", + ] + + [[package]] + name = "dispatch2" + version = "0.3.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" + dependencies = [ + "bitflags", + "objc2", + ] + + [[package]] + name = "displaydoc" + version = "0.2.6" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "1ac70aa55017e108007fbaf5aa0f54b021c98f92ff8af59d42eda9da96e3dd4f" + dependencies = [ + "proc-macro2", + "quote", + "syn", + ] + + [[package]] + name = "dotenvy" + version = "0.15.7" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" + + [[package]] + name = "equivalent" + version = "1.0.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + + [[package]] + name = "errno" + version = "0.3.14" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" + dependencies = [ + "libc", + "windows-sys 0.52.0", + ] + + [[package]] + name = "fastrand" + version = "2.4.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" + + [[package]] + name = "find-msvc-tools" + version = "0.1.9" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" + + [[package]] + name = "flate2" + version = "1.1.9" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" + dependencies = [ + "crc32fast", + "miniz_oxide", + ] + + [[package]] + name = "fnv" + version = "1.0.7" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + + [[package]] + name = "foreign-types" + version = "0.3.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" + dependencies = [ + "foreign-types-shared", + ] + + [[package]] + name = "foreign-types-shared" + version = "0.1.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + + [[package]] + name = "form_urlencoded" + version = "1.2.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" + dependencies = [ + "percent-encoding", + ] + + [[package]] + name = "futures" + version = "0.3.32" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d" + dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", + ] + + [[package]] + name = "futures-channel" + version = "0.3.32" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" + dependencies = [ + "futures-core", + "futures-sink", + ] + + [[package]] + name = "futures-core" + version = "0.3.32" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" + + [[package]] + name = "futures-executor" + version = "0.3.32" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d" + dependencies = [ + "futures-core", + "futures-task", + "futures-util", + ] + + [[package]] + name = "futures-io" + version = "0.3.32" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" + + [[package]] + name = "futures-macro" + version = "0.3.32" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" + dependencies = [ + "proc-macro2", + "quote", + "syn", + ] + + [[package]] + name = "futures-sink" + version = "0.3.32" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" + + [[package]] + name = "futures-task" + version = "0.3.32" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" + + [[package]] + name = "futures-util" + version = "0.3.32" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" + dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "slab", + ] + + [[package]] + name = "generic-array" + version = "0.14.7" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" + dependencies = [ + "typenum", + "version_check", + ] + + [[package]] + name = "getrandom" + version = "0.2.17" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" + dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", + ] + + [[package]] + name = "getrandom" + version = "0.3.4" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" + dependencies = [ + "cfg-if", + "js-sys", + "libc", + "r-efi 5.3.0", + "wasip2", + "wasm-bindgen", + ] + + [[package]] + name = "getrandom" + version = "0.4.3" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" + dependencies = [ + "cfg-if", + "libc", + "r-efi 6.0.0", + ] + + [[package]] + name = "h2" + version = "0.4.16" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "a9f37a958b41b3b19ee2707c06439c0e9e547e847223eb791ecb0cb821c65e27" + dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", + ] + + [[package]] + name = "hashbrown" + version = "0.17.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" + + [[package]] + name = "heck" + version = "0.5.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + + [[package]] + name = "hermit-abi" + version = "0.5.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" + + [[package]] + name = "hmac" + version = "0.12.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" + dependencies = [ + "digest", + ] + + [[package]] + name = "http" + version = "1.4.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "6970f50e31d6fc17d3fa27329444bfa74e196cf62e95052a3f6fee181dba6425" + dependencies = [ + "bytes", + "itoa", + ] + + [[package]] + name = "http-body" + version = "1.0.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" + dependencies = [ + "bytes", + "http", + ] + + [[package]] + name = "http-body-util" + version = "0.1.3" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" + dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", + ] + + [[package]] + name = "httparse" + version = "1.10.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + + [[package]] + name = "httpdate" + version = "1.0.3" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + + [[package]] + name = "hyper" + version = "1.10.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "55281c53a1894c864990125767da440a4e630446785086f52523b20033b74498" + dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", + ] + + [[package]] + name = "hyper-rustls" + version = "0.27.9" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "33ca68d021ef39cf6463ab54c1d0f5daf03377b70561305bb89a8f83aab66e0f" + dependencies = [ + "http", + "hyper", + "hyper-util", + "rustls", + "rustls-native-certs", + "tokio", + "tokio-rustls", + "tower-service", + ] + + [[package]] + name = "hyper-tls" + version = "0.6.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" + dependencies = [ + "bytes", + "http-body-util", + "hyper", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", + ] + + [[package]] + name = "hyper-util" + version = "0.1.20" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" + dependencies = [ + "base64", + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + ] + + [[package]] + name = "iana-time-zone" + version = "0.1.65" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" + dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core", + ] + + [[package]] + name = "iana-time-zone-haiku" + version = "0.1.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" + dependencies = [ + "cc", + ] + + [[package]] + name = "icu_collections" + version = "2.2.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" + dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", + ] + + [[package]] + name = "icu_locale_core" + version = "2.2.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" + dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", + ] + + [[package]] + name = "icu_normalizer" + version = "2.2.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" + dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", + ] + + [[package]] + name = "icu_normalizer_data" + version = "2.2.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" + + [[package]] + name = "icu_properties" + version = "2.2.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" + dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", + ] + + [[package]] + name = "icu_properties_data" + version = "2.2.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" + + [[package]] + name = "icu_provider" + version = "2.2.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" + dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", + ] + + [[package]] + name = "idna" + version = "1.1.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" + dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", + ] + + [[package]] + name = "idna_adapter" + version = "1.2.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" + dependencies = [ + "icu_normalizer", + "icu_properties", + ] + + [[package]] + name = "indexmap" + version = "2.14.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" + dependencies = [ + "equivalent", + "hashbrown", + ] + + [[package]] + name = "inventory" + version = "0.3.24" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "a4f0c30c76f2f4ccee3fe55a2435f691ca00c0e4bd87abe4f4a851b1d4dac39b" + dependencies = [ + "rustversion", + ] + + [[package]] + name = "ipnet" + version = "2.12.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" + + [[package]] + name = "is_terminal_polyfill" + version = "1.70.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" + + [[package]] + name = "itoa" + version = "1.0.18" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + + [[package]] + name = "jmespath" + version = "0.3.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "017f8f53dd3b8ada762acb1f850da2a742d0ef3f921c60849a644380de1d683a" + dependencies = [ + "lazy_static", + "serde", + "serde_json", + "slug", + ] + + [[package]] + name = "jni" + version = "0.22.4" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" + dependencies = [ + "cfg-if", + "combine", + "jni-macros", + "jni-sys", + "log", + "simd_cesu8", + "thiserror 2.0.18", + "walkdir", + "windows-link", + ] + + [[package]] + name = "jni-macros" + version = "0.22.4" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" + dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "simd_cesu8", + "syn", + ] + + [[package]] + name = "jni-sys" + version = "0.4.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" + dependencies = [ + "jni-sys-macros", + ] + + [[package]] + name = "jni-sys-macros" + version = "0.4.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" + dependencies = [ + "quote", + "syn", + ] + + [[package]] + name = "js-sys" + version = "0.3.103" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "53b44bfcdb3f8d5837a46dae1ca9660a837176eee74a28b229bc626816589102" + dependencies = [ + "cfg-if", + "futures-util", + "wasm-bindgen", + ] + + [[package]] + name = "keyring" + version = "3.6.3" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "eebcc3aff044e5944a8fbaf69eb277d11986064cba30c468730e8b9909fb551c" + dependencies = [ + "byteorder", + "dbus-secret-service", + "log", + "openssl", + "security-framework 2.11.1", + "security-framework 3.7.0", + "windows-sys 0.60.2", + "zeroize", + ] + + [[package]] + name = "lazy_static" + version = "1.5.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + + [[package]] + name = "libc" + version = "0.2.186" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" + + [[package]] + name = "libdbus-sys" + version = "0.2.7" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "328c4789d42200f1eeec05bd86c9c13c7f091d2ba9a6ea35acdf51f31bc0f043" + dependencies = [ + "cc", + "pkg-config", + ] + + [[package]] + name = "linux-raw-sys" + version = "0.12.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + + [[package]] + name = "litemap" + version = "0.8.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" + + [[package]] + name = "lock_api" + version = "0.4.14" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" + dependencies = [ + "scopeguard", + ] + + [[package]] + name = "log" + version = "0.4.33" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" + + [[package]] + name = "lru-slab" + version = "0.1.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" + + [[package]] + name = "matchers" + version = "0.2.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" + dependencies = [ + "regex-automata", + ] + + [[package]] + name = "memchr" + version = "2.8.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "88904434abc2901f197fe8cc55f0445e7ded921dba5911dad2e2b39b48e663c4" + + [[package]] + name = "mime" + version = "0.3.17" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + + [[package]] + name = "mime_guess" + version = "2.0.5" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" + dependencies = [ + "mime", + "unicase", + ] + + [[package]] + name = "minimal-lexical" + version = "0.2.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + + [[package]] + name = "miniz_oxide" + version = "0.8.9" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" + dependencies = [ + "adler2", + "simd-adler32", + ] + + [[package]] + name = "mio" + version = "1.2.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "02bd0af71c67b473010cbbc60715ee815645a4dc942899111f494b4b737d6fda" + dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", + ] + + [[package]] + name = "native-tls" + version = "0.2.18" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "465500e14ea162429d264d44189adc38b199b62b1c21eea9f69e4b73cb03bbf2" + dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework 3.7.0", + "security-framework-sys", + "tempfile", + ] + + [[package]] + name = "ndk-context" + version = "0.1.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" + + [[package]] + name = "nom" + version = "7.1.3" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" + dependencies = [ + "memchr", + "minimal-lexical", + ] + + [[package]] + name = "nu-ansi-term" + version = "0.50.3" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" + dependencies = [ + "windows-sys 0.60.2", + ] + + [[package]] + name = "num-bigint" + version = "0.4.8" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "c89e69e7e0f03bea5ef08013795c25018e101932225a656383bd384495ecc367" + dependencies = [ + "num-integer", + "num-traits", + "serde", + ] + + [[package]] + name = "num-conv" + version = "0.2.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" + + [[package]] + name = "num-integer" + version = "0.1.46" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" + dependencies = [ + "num-traits", + ] + + [[package]] + name = "num-traits" + version = "0.2.19" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" + dependencies = [ + "autocfg", + ] + + [[package]] + name = "num_cpus" + version = "1.17.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" + dependencies = [ + "hermit-abi", + "libc", + ] + + [[package]] + name = "objc2" + version = "0.6.4" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "3a12a8ed07aefc768292f076dc3ac8c48f3781c8f2d5851dd3d98950e8c5a89f" + dependencies = [ + "objc2-encode", + ] + + [[package]] + name = "objc2-app-kit" + version = "0.3.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" + dependencies = [ + "bitflags", + "objc2", + "objc2-foundation", + ] + + [[package]] + name = "objc2-core-foundation" + version = "0.3.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" + dependencies = [ + "bitflags", + "dispatch2", + "objc2", + ] + + [[package]] + name = "objc2-encode" + version = "4.1.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + + [[package]] + name = "objc2-foundation" + version = "0.3.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" + dependencies = [ + "bitflags", + "objc2", + "objc2-core-foundation", + ] + + [[package]] + name = "once_cell" + version = "1.21.4" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + + [[package]] + name = "once_cell_polyfill" + version = "1.70.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" + + [[package]] + name = "openssl" + version = "0.10.81" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "77823a27f0babb03091cb9ed9ef80af3b39dbc82f97e8fa530374b7dafd87a45" + dependencies = [ + "bitflags", + "cfg-if", + "foreign-types", + "libc", + "openssl-macros", + "openssl-sys", + ] + + [[package]] + name = "openssl-macros" + version = "0.1.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" + dependencies = [ + "proc-macro2", + "quote", + "syn", + ] + + [[package]] + name = "openssl-probe" + version = "0.2.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" + + [[package]] + name = "openssl-src" + version = "300.6.1+3.6.3" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "46eb8fb9fb3b61ce1c0f8a026c4c1a0714d3a9e138e7fbde78753ce2babc3846" + dependencies = [ + "cc", + ] + + [[package]] + name = "openssl-sys" + version = "0.9.117" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "b47e7e6bb2c38cd930d25a23b40fa52e068c10e85f3e03a7f5ba5aaca5713695" + dependencies = [ + "cc", + "libc", + "openssl-src", + "pkg-config", + "vcpkg", + ] + + [[package]] + name = "ordered-float" + version = "4.6.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "7bb71e1b3fa6ca1c61f383464aaf2bb0e2f8e772a1f01d486832464de363b951" + dependencies = [ + "num-traits", + "rand 0.8.6", + "serde", + ] + + [[package]] + name = "parking_lot" + version = "0.12.5" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" + dependencies = [ + "lock_api", + "parking_lot_core", + ] + + [[package]] + name = "parking_lot_core" + version = "0.9.12" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" + dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-link", + ] + + [[package]] + name = "percent-encoding" + version = "2.3.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + + [[package]] + name = "pin-project" + version = "1.1.13" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924" + dependencies = [ + "pin-project-internal", + ] + + [[package]] + name = "pin-project-internal" + version = "1.1.13" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" + dependencies = [ + "proc-macro2", + "quote", + "syn", + ] + + [[package]] + name = "pin-project-lite" + version = "0.2.17" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + + [[package]] + name = "pkg-config" + version = "0.3.33" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" + + [[package]] + name = "potential_utf" + version = "0.1.5" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" + dependencies = [ + "zerovec", + ] + + [[package]] + name = "powerfmt" + version = "0.2.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + + [[package]] + name = "ppv-lite86" + version = "0.2.21" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" + dependencies = [ + "zerocopy", + ] + + [[package]] + name = "proc-macro2" + version = "1.0.106" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" + dependencies = [ + "unicode-ident", + ] + + [[package]] + name = "quinn" + version = "0.11.11" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "0c1a41e437b6bbd489372cd4971de128e85c855f56c57f283d20ff016cf7c0a8" + dependencies = [ + "bytes", + "cfg_aliases", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2", + "thiserror 2.0.18", + "tokio", + "tracing", + "web-time", + ] + + [[package]] + name = "quinn-proto" + version = "0.11.15" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "4fcb935c5bec503c2f0e306bdd3e58bb9029dcb14fa8d9ac76e3a5256ac0763e" + dependencies = [ + "bytes", + "getrandom 0.3.4", + "lru-slab", + "rand 0.9.4", + "ring", + "rustc-hash", + "rustls", + "rustls-pki-types", + "slab", + "thiserror 2.0.18", + "tinyvec", + "tracing", + "web-time", + ] + + [[package]] + name = "quinn-udp" + version = "0.5.14" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" + dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.60.2", + ] + + [[package]] + name = "quote" + version = "1.0.46" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "dfbc457d0c7a0759a614551b11a6409e5951f6c7537be1f1b7682b9ae9230368" + dependencies = [ + "proc-macro2", + ] + + [[package]] + name = "r-efi" + version = "5.3.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + + [[package]] + name = "r-efi" + version = "6.0.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + + [[package]] + name = "rand" + version = "0.8.6" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" + dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "serde", + ] + + [[package]] + name = "rand" + version = "0.9.4" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea" + dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.5", + ] + + [[package]] + name = "rand_chacha" + version = "0.3.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" + dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", + ] + + [[package]] + name = "rand_chacha" + version = "0.9.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" + dependencies = [ + "ppv-lite86", + "rand_core 0.9.5", + ] + + [[package]] + name = "rand_core" + version = "0.6.4" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" + dependencies = [ + "getrandom 0.2.17", + "serde", + ] + + [[package]] + name = "rand_core" + version = "0.9.5" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" + dependencies = [ + "getrandom 0.3.4", + ] + + [[package]] + name = "redox_syscall" + version = "0.5.18" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" + dependencies = [ + "bitflags", + ] + + [[package]] + name = "regex" + version = "1.12.4" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "f1292b7759ae1cb9ec195452d1390a074f0cd8541ab7a5a8c31cd6db45d4a6ba" + dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", + ] + + [[package]] + name = "regex-automata" + version = "0.4.14" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" + dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", + ] + + [[package]] + name = "regex-syntax" + version = "0.8.11" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" + + [[package]] + name = "reqwest" + version = "0.12.28" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" + dependencies = [ + "base64", + "bytes", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-tls", + "hyper-util", + "js-sys", + "log", + "mime_guess", + "native-tls", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls", + "rustls-native-certs", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-native-tls", + "tokio-rustls", + "tokio-util", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", + ] + + [[package]] + name = "reqwest-sse" + version = "0.1.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "60e0aedd78f3626aad0ac3352f6128b73d3b617080da13fbaf8d168dad82de89" + dependencies = [ + "async-stream", + "reqwest", + "tokio", + "tokio-stream", + "tokio-util", + ] + + [[package]] + name = "ring" + version = "0.17.14" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" + dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.17", + "libc", + "untrusted", + "windows-sys 0.52.0", + ] + + [[package]] + name = "roff" + version = "1.1.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "323c417e1d9665a65b263ec744ba09030cfb277e9daa0b018a4ab62e57bc8189" + + [[package]] + name = "rustc-hash" + version = "2.1.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe" + + [[package]] + name = "rustc_version" + version = "0.4.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" + dependencies = [ + "semver", + ] + + [[package]] + name = "rustix" + version = "1.1.4" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" + dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", + ] + + [[package]] + name = "rustls" + version = "0.23.41" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "6b92b125634d9b795e7beca796cc790df15a7fb38323bf3196fda83292d06b1f" + dependencies = [ + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", + ] + + [[package]] + name = "rustls-native-certs" + version = "0.8.4" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "dab5152771c58876a2146916e53e35057e1a4dfa2b9df0f0305b07f611fdea4d" + dependencies = [ + "openssl-probe", + "rustls-pki-types", + "schannel", + "security-framework 3.7.0", + ] + + [[package]] + name = "rustls-pki-types" + version = "1.14.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "30a7197ae7eb376e574fe940d068c30fe0462554a3ddbe4eca7838e049c937a9" + dependencies = [ + "web-time", + "zeroize", + ] + + [[package]] + name = "rustls-webpki" + version = "0.103.13" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" + dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", + ] + + [[package]] + name = "rustversion" + version = "1.0.22" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + + [[package]] + name = "ryu" + version = "1.0.23" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + + [[package]] + name = "same-file" + version = "1.0.6" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" + dependencies = [ + "winapi-util", + ] + + [[package]] + name = "schannel" + version = "0.1.29" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939" + dependencies = [ + "windows-sys 0.61.2", + ] + + [[package]] + name = "scopeguard" + version = "1.2.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + + [[package]] + name = "secrecy" + version = "0.10.3" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "e891af845473308773346dc847b2c23ee78fe442e0472ac50e22a18a93d3ae5a" + dependencies = [ + "zeroize", + ] + + [[package]] + name = "security-framework" + version = "2.11.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" + dependencies = [ + "bitflags", + "core-foundation 0.9.4", + "core-foundation-sys", + "libc", + "security-framework-sys", + ] + + [[package]] + name = "security-framework" + version = "3.7.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" + dependencies = [ + "bitflags", + "core-foundation 0.10.1", + "core-foundation-sys", + "libc", + "security-framework-sys", + ] + + [[package]] + name = "security-framework-sys" + version = "2.17.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3" + dependencies = [ + "core-foundation-sys", + "libc", + ] + + [[package]] + name = "semver" + version = "1.0.28" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" + + [[package]] + name = "serde" + version = "1.0.228" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" + dependencies = [ + "serde_core", + "serde_derive", + ] + + [[package]] + name = "serde_core" + version = "1.0.228" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" + dependencies = [ + "serde_derive", + ] + + [[package]] + name = "serde_derive" + version = "1.0.228" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" + dependencies = [ + "proc-macro2", + "quote", + "syn", + ] + + [[package]] + name = "serde_json" + version = "1.0.150" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9" + dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", + ] + + [[package]] + name = "serde_json_path" + version = "0.7.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "b992cea3194eea663ba99a042d61cea4bd1872da37021af56f6a37e0359b9d33" + dependencies = [ + "inventory", + "nom", + "regex", + "serde", + "serde_json", + "serde_json_path_core", + "serde_json_path_macros", + "thiserror 2.0.18", + ] + + [[package]] + name = "serde_json_path_core" + version = "0.2.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "dde67d8dfe7d4967b5a95e247d4148368ddd1e753e500adb34b3ffe40c6bc1bc" + dependencies = [ + "inventory", + "serde", + "serde_json", + "thiserror 2.0.18", + ] + + [[package]] + name = "serde_json_path_macros" + version = "0.1.6" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "517acfa7f77ddaf5c43d5f119c44a683774e130b4247b7d3210f8924506cfac8" + dependencies = [ + "inventory", + "serde_json_path_core", + "serde_json_path_macros_internal", + ] + + [[package]] + name = "serde_json_path_macros_internal" + version = "0.1.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "aafbefbe175fa9bf03ca83ef89beecff7d2a95aaacd5732325b90ac8c3bd7b90" + dependencies = [ + "proc-macro2", + "quote", + "syn", + ] + + [[package]] + name = "serde_qs" + version = "1.1.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "67d525c8ff68aa99e5818302259bdd02d86d0303710616f39c0f44846ff6d332" + dependencies = [ + "itoa", + "percent-encoding", + "ryu", + "serde", + ] + + [[package]] + name = "serde_urlencoded" + version = "0.7.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" + dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", + ] + + [[package]] + name = "serde_yaml" + version = "0.9.34+deprecated" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" + dependencies = [ + "indexmap", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", + ] + + [[package]] + name = "serial_test" + version = "3.5.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "699f4197115b8a7e7ff19c9a315a4bd6fffec26cc4626ef45ecaea389e081c6d" + dependencies = [ + "futures-executor", + "futures-util", + "log", + "once_cell", + "parking_lot", + "serial_test_derive", + ] + + [[package]] + name = "serial_test_derive" + version = "3.5.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "94e153fc76e1c6a068703d6d29c508a0b15c061c4b7e43da59cc097bc342673c" + dependencies = [ + "proc-macro2", + "quote", + "syn", + ] + + [[package]] + name = "sha1" + version = "0.10.6" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" + dependencies = [ + "cfg-if", + "cpufeatures", + "digest", + ] + + [[package]] + name = "sha2" + version = "0.10.9" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" + dependencies = [ + "cfg-if", + "cpufeatures", + "digest", + ] + + [[package]] + name = "sharded-slab" + version = "0.1.7" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" + dependencies = [ + "lazy_static", + ] + + [[package]] + name = "shlex" + version = "2.0.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + + [[package]] + name = "signal-hook-registry" + version = "1.4.8" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" + dependencies = [ + "errno", + "libc", + ] + + [[package]] + name = "simd-adler32" + version = "0.3.10" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" + + [[package]] + name = "simd_cesu8" + version = "1.1.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "94f90157bb87cddf702797c5dadfa0be7d266cdf49e22da2fcaa32eff75b2c33" + dependencies = [ + "rustc_version", + "simdutf8", + ] + + [[package]] + name = "simdutf8" + version = "0.1.5" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + + [[package]] + name = "slab" + version = "0.4.12" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + + [[package]] + name = "slug" + version = "0.1.6" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "882a80f72ee45de3cc9a5afeb2da0331d58df69e4e7d8eeb5d3c7784ae67e724" + dependencies = [ + "deunicode", + "wasm-bindgen", + ] + + [[package]] + name = "smallvec" + version = "1.15.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" + + [[package]] + name = "socket2" + version = "0.6.4" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "52d1cfed4120b4d927bf7c0f86d2087a4a7d6027c906d9f9d525a80573b9be51" + dependencies = [ + "libc", + "windows-sys 0.60.2", + ] + + [[package]] + name = "stable_deref_trait" + version = "1.2.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + + [[package]] + name = "strsim" + version = "0.11.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + + [[package]] + name = "subtle" + version = "2.6.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + + [[package]] + name = "symlink" + version = "0.1.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "a7973cce6668464ea31f176d85b13c7ab3bba2cb3b77a2ed26abd7801688010a" + + [[package]] + name = "syn" + version = "2.0.118" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "1b9ae57f904213ebb649ce6895b8a66c66f0203b9319718f69a5612a065b1422" + dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", + ] + + [[package]] + name = "sync_wrapper" + version = "1.0.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" + dependencies = [ + "futures-core", + ] + + [[package]] + name = "synstructure" + version = "0.13.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" + dependencies = [ + "proc-macro2", + "quote", + "syn", + ] + + [[package]] + name = "tempfile" + version = "3.27.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" + dependencies = [ + "fastrand", + "getrandom 0.4.3", + "once_cell", + "rustix", + "windows-sys 0.52.0", + ] + + [[package]] + name = "thiserror" + version = "1.0.69" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" + dependencies = [ + "thiserror-impl 1.0.69", + ] + + [[package]] + name = "thiserror" + version = "2.0.18" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" + dependencies = [ + "thiserror-impl 2.0.18", + ] + + [[package]] + name = "thiserror-impl" + version = "1.0.69" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" + dependencies = [ + "proc-macro2", + "quote", + "syn", + ] + + [[package]] + name = "thiserror-impl" + version = "2.0.18" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" + dependencies = [ + "proc-macro2", + "quote", + "syn", + ] + + [[package]] + name = "thread_local" + version = "1.1.9" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" + dependencies = [ + "cfg-if", + ] + + [[package]] + name = "time" + version = "0.3.51" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "85c17d80feb7334b40c484e45ed1a5273dfd8bfda537c3be2e74a06a6686f327" + dependencies = [ + "deranged", + "num-conv", + "powerfmt", + "serde_core", + "time-core", + "time-macros", + ] + + [[package]] + name = "time-core" + version = "0.1.9" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" + + [[package]] + name = "time-macros" + version = "0.2.30" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "dcef1a61bdb119096e153208ec5cbec23944ce8bca13be5c7f60c634f7403935" + dependencies = [ + "num-conv", + "time-core", + ] + + [[package]] + name = "tinystr" + version = "0.8.3" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" + dependencies = [ + "displaydoc", + "zerovec", + ] + + [[package]] + name = "tinyvec" + version = "1.11.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3" + dependencies = [ + "tinyvec_macros", + ] + + [[package]] + name = "tinyvec_macros" + version = "0.1.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + + [[package]] + name = "tokio" + version = "1.52.3" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "8fc7f01b389ac15039e4dc9531aa973a135d7a4135281b12d7c1bc79fd57fffe" + dependencies = [ + "bytes", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.61.2", + ] + + [[package]] + name = "tokio-macros" + version = "2.7.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" + dependencies = [ + "proc-macro2", + "quote", + "syn", + ] + + [[package]] + name = "tokio-native-tls" + version = "0.3.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" + dependencies = [ + "native-tls", + "tokio", + ] + + [[package]] + name = "tokio-rustls" + version = "0.26.4" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" + dependencies = [ + "rustls", + "tokio", + ] + + [[package]] + name = "tokio-stream" + version = "0.1.19" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "a3d06f0b082ba57c26b79407372e57cf2a1e28124f78e9479fe80322cf53420b" + dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", + ] + + [[package]] + name = "tokio-tungstenite" + version = "0.24.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9" + dependencies = [ + "futures-util", + "log", + "native-tls", + "rustls", + "rustls-native-certs", + "rustls-pki-types", + "tokio", + "tokio-native-tls", + "tokio-rustls", + "tungstenite", + ] + + [[package]] + name = "tokio-util" + version = "0.7.18" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" + dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + ] + + [[package]] + name = "tower" + version = "0.5.3" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" + dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", + ] + + [[package]] + name = "tower-http" + version = "0.6.11" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" + dependencies = [ + "async-compression", + "bitflags", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "pin-project-lite", + "tokio", + "tokio-util", + "tower", + "tower-layer", + "tower-service", + "url", + ] + + [[package]] + name = "tower-layer" + version = "0.3.3" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + + [[package]] + name = "tower-service" + version = "0.3.3" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + + [[package]] + name = "tracing" + version = "0.1.44" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" + dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", + ] + + [[package]] + name = "tracing-appender" + version = "0.2.5" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "050686193eb999b4bb3bc2acfa891a13da00f79734704c4b8b4ef1a10b368a3c" + dependencies = [ + "crossbeam-channel", + "symlink", + "thiserror 2.0.18", + "time", + "tracing-subscriber", + ] + + [[package]] + name = "tracing-attributes" + version = "0.1.31" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" + dependencies = [ + "proc-macro2", + "quote", + "syn", + ] + + [[package]] + name = "tracing-core" + version = "0.1.36" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" + dependencies = [ + "once_cell", + "valuable", + ] + + [[package]] + name = "tracing-log" + version = "0.2.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" + dependencies = [ + "log", + "once_cell", + "tracing-core", + ] + + [[package]] + name = "tracing-serde" + version = "0.2.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "704b1aeb7be0d0a84fc9828cae51dab5970fee5088f83d1dd7ee6f6246fc6ff1" + dependencies = [ + "serde", + "tracing-core", + ] + + [[package]] + name = "tracing-subscriber" + version = "0.3.23" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" + dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex-automata", + "serde", + "serde_json", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", + "tracing-serde", + ] + + [[package]] + name = "try-lock" + version = "0.2.5" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + + [[package]] + name = "tungstenite" + version = "0.24.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "18e5b8366ee7a95b16d32197d0b2604b43a0be89dc5fac9f8e96ccafbaedda8a" + dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http", + "httparse", + "log", + "native-tls", + "rand 0.8.6", + "rustls", + "rustls-pki-types", + "sha1", + "thiserror 1.0.69", + "utf-8", + ] + + [[package]] + name = "typenum" + version = "1.20.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" + + [[package]] + name = "unicase" + version = "2.9.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" + + [[package]] + name = "unicode-ident" + version = "1.0.24" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" + + [[package]] + name = "unicode-normalization" + version = "0.1.25" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "5fd4f6878c9cb28d874b009da9e8d183b5abc80117c40bbd187a1fde336be6e8" + dependencies = [ + "tinyvec", + ] + + [[package]] + name = "unsafe-libyaml" + version = "0.2.11" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" + + [[package]] + name = "untrusted" + version = "0.9.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + + [[package]] + name = "url" + version = "2.5.8" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" + dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", + ] + + [[package]] + name = "utf-8" + version = "0.7.6" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + + [[package]] + name = "utf8_iter" + version = "1.0.4" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + + [[package]] + name = "utf8parse" + version = "0.2.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + + [[package]] + name = "valuable" + version = "0.1.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" + + [[package]] + name = "vcpkg" + version = "0.2.15" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + + [[package]] + name = "version_check" + version = "0.9.5" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + + [[package]] + name = "walkdir" + version = "2.5.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" + dependencies = [ + "same-file", + "winapi-util", + ] + + [[package]] + name = "want" + version = "0.3.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" + dependencies = [ + "try-lock", + ] + + [[package]] + name = "wasi" + version = "0.11.1+wasi-snapshot-preview1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + + [[package]] + name = "wasip2" + version = "1.0.4+wasi-0.2.12" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" + dependencies = [ + "wit-bindgen", + ] + + [[package]] + name = "wasm-bindgen" + version = "0.2.126" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "4b067c0c11094aef6b7a801c1e34a26affafdf3d051dba08456b868789aaf9a4" + dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", + ] + + [[package]] + name = "wasm-bindgen-futures" + version = "0.4.76" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "c62df1340f32221cb9c54d6a27b030e3dba64361d4a95bed55f9aacb44da291d" + dependencies = [ + "js-sys", + "wasm-bindgen", + ] + + [[package]] + name = "wasm-bindgen-macro" + version = "0.2.126" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "167ce5e579f6bcf889c4f7175a8a5a585de84e8ff93976ce393efa5f2837aab1" + dependencies = [ + "quote", + "wasm-bindgen-macro-support", + ] + + [[package]] + name = "wasm-bindgen-macro-support" + version = "0.2.126" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "f3997c7839262f4ef12cf90b818d6340c18e80f263f1a94bf157d0ec4420380e" + dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", + ] + + [[package]] + name = "wasm-bindgen-shared" + version = "0.2.126" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "dc1b4cb0cc549fcf58d7dfc081778139b3d283a081644e833e84682ad71cea24" + dependencies = [ + "unicode-ident", + ] + + [[package]] + name = "wasm-streams" + version = "0.4.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" + dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + ] + + [[package]] + name = "web-sys" + version = "0.3.103" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "8622dcb61c0bcc9fffa6938bed81210af2da9a7e4a1a834b2e37a59b6dfb6141" + dependencies = [ + "js-sys", + "wasm-bindgen", + ] + + [[package]] + name = "web-time" + version = "1.1.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" + dependencies = [ + "js-sys", + "wasm-bindgen", + ] + + [[package]] + name = "webbrowser" + version = "1.2.4" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "62c35be770821a214dbc362fc26908c853e776c0004294d0b10b8a6bad582f94" + dependencies = [ + "jni", + "log", + "ndk-context", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "url", + "web-sys", + ] + + [[package]] + name = "winapi-util" + version = "0.1.11" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" + dependencies = [ + "windows-sys 0.52.0", + ] + + [[package]] + name = "windows-core" + version = "0.62.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" + dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", + ] + + [[package]] + name = "windows-implement" + version = "0.60.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" + dependencies = [ + "proc-macro2", + "quote", + "syn", + ] + + [[package]] + name = "windows-interface" + version = "0.59.3" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" + dependencies = [ + "proc-macro2", + "quote", + "syn", + ] + + [[package]] + name = "windows-link" + version = "0.2.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + + [[package]] + name = "windows-result" + version = "0.4.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" + dependencies = [ + "windows-link", + ] + + [[package]] + name = "windows-strings" + version = "0.5.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" + dependencies = [ + "windows-link", + ] + + [[package]] + name = "windows-sys" + version = "0.52.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" + dependencies = [ + "windows-targets 0.52.6", + ] + + [[package]] + name = "windows-sys" + version = "0.60.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" + dependencies = [ + "windows-targets 0.53.5", + ] + + [[package]] + name = "windows-sys" + version = "0.61.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" + dependencies = [ + "windows-link", + ] + + [[package]] + name = "windows-targets" + version = "0.52.6" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" + dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", + ] + + [[package]] + name = "windows-targets" + version = "0.53.5" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" + dependencies = [ + "windows-link", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", + ] + + [[package]] + name = "windows_aarch64_gnullvm" + version = "0.52.6" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + + [[package]] + name = "windows_aarch64_gnullvm" + version = "0.53.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + + [[package]] + name = "windows_aarch64_msvc" + version = "0.52.6" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + + [[package]] + name = "windows_aarch64_msvc" + version = "0.53.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + + [[package]] + name = "windows_i686_gnu" + version = "0.52.6" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + + [[package]] + name = "windows_i686_gnu" + version = "0.53.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + + [[package]] + name = "windows_i686_gnullvm" + version = "0.52.6" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + + [[package]] + name = "windows_i686_gnullvm" + version = "0.53.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + + [[package]] + name = "windows_i686_msvc" + version = "0.52.6" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + + [[package]] + name = "windows_i686_msvc" + version = "0.53.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + + [[package]] + name = "windows_x86_64_gnu" + version = "0.52.6" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + + [[package]] + name = "windows_x86_64_gnu" + version = "0.53.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + + [[package]] + name = "windows_x86_64_gnullvm" + version = "0.52.6" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + + [[package]] + name = "windows_x86_64_gnullvm" + version = "0.53.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + + [[package]] + name = "windows_x86_64_msvc" + version = "0.52.6" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + + [[package]] + name = "windows_x86_64_msvc" + version = "0.53.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + + [[package]] + name = "wiremock" + version = "0.6.5" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "08db1edfb05d9b3c1542e521aea074442088292f00b5f28e435c714a98f85031" + dependencies = [ + "assert-json-diff", + "base64", + "deadpool", + "futures", + "http", + "http-body-util", + "hyper", + "hyper-util", + "log", + "once_cell", + "regex", + "serde", + "serde_json", + "tokio", + "url", + ] + + [[package]] + name = "wit-bindgen" + version = "0.57.1" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + + [[package]] + name = "writeable" + version = "0.6.3" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" + + [[package]] + name = "yoke" + version = "0.8.3" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" + dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", + ] + + [[package]] + name = "yoke-derive" + version = "0.8.2" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" + dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", + ] + + [[package]] + name = "zerocopy" + version = "0.8.52" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "ce1022995ff5ff5d841ad7d994facc23098cd40152f2c1d11cd607c6f530653f" + dependencies = [ + "zerocopy-derive", + ] + + [[package]] + name = "zerocopy-derive" + version = "0.8.52" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "1ae7f38b72ec2a254e2b87ef277cf2cd4fb97cbebf944faa6f33354da0867930" + dependencies = [ + "proc-macro2", + "quote", + "syn", + ] + + [[package]] + name = "zerofrom" + version = "0.1.8" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" + dependencies = [ + "zerofrom-derive", + ] + + [[package]] + name = "zerofrom-derive" + version = "0.1.7" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" + dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", + ] + + [[package]] + name = "zeroize" + version = "1.9.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e" + dependencies = [ + "zeroize_derive", + ] + + [[package]] + name = "zeroize_derive" + version = "1.5.0" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "3c50655cbb0fe3fc43170059e702f1ce5e19b84cec58dc87b037a09935c2f328" + dependencies = [ + "proc-macro2", + "quote", + "syn", + ] + + [[package]] + name = "zerotrie" + version = "0.2.4" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" + dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + ] + + [[package]] + name = "zerovec" + version = "0.11.6" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" + dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", + ] + + [[package]] + name = "zerovec-derive" + version = "0.11.3" + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" + dependencies = [ + "proc-macro2", + "quote", + "syn", + ] + [[package]] name = "zmij" version = "1.0.21" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8a25fbb..f445ed1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -112,9 +112,6 @@ jobs: - rust-target: aarch64-apple-darwin runner: macos-latest npm-platform-suffix: darwin-arm64 - - rust-target: x86_64-pc-windows-msvc - runner: windows-latest - npm-platform-suffix: win32-x64 steps: - name: Checkout repo uses: actions/checkout@v6 @@ -257,8 +254,7 @@ jobs: OPTIONAL_DEPS="${OPTIONAL_DEPS}\"agentmail-cli-linux-x64\": \"${VERSION}\"," OPTIONAL_DEPS="${OPTIONAL_DEPS}\"agentmail-cli-linux-arm64\": \"${VERSION}\"," OPTIONAL_DEPS="${OPTIONAL_DEPS}\"agentmail-cli-darwin-x64\": \"${VERSION}\"," - OPTIONAL_DEPS="${OPTIONAL_DEPS}\"agentmail-cli-darwin-arm64\": \"${VERSION}\"," - OPTIONAL_DEPS="${OPTIONAL_DEPS}\"agentmail-cli-win32-x64\": \"${VERSION}\"" + OPTIONAL_DEPS="${OPTIONAL_DEPS}\"agentmail-cli-darwin-arm64\": \"${VERSION}\"" cat > "${PKG_DIR}/package.json" < Date: Mon, 31 Aug 2026 16:32:17 -0700 Subject: [PATCH 3/3] chore: refresh .fernignore comment for 0.38.10 Generator 0.38.10 emits cli/agentmail/custom.rs in .fernignore itself. The entry stays here because this file is written wholesale by post-regen-patch.py to protect CHANGELOG.md and SECURITY.md, and dropping the line would remove protection the generator now adds on its own. --- .fernignore | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.fernignore b/.fernignore index 782b839..6dd7e5a 100644 --- a/.fernignore +++ b/.fernignore @@ -7,6 +7,7 @@ CHANGELOG.md SECURITY.md -# Hand-authored custom command bindings. The scaffold and its docs say -# this file is protected; without this entry a regeneration overwrites it. +# Hand-authored custom command bindings. Generator 0.38.10 emits this +# entry itself; it is repeated here because this patch replaces the whole +# file, and dropping the line would remove protection the generator added. cli/agentmail/custom.rs