{"openapi":"3.1.0","info":{"title":"AgentMail (BYOK) API","version":"0.1.0","description":"AgentMail (BYOK) lets an AI assistant read your own AgentMail data through the AgentMail API with a key you supply (AgentMail API key). Read-only: 9 tools (list_inboxes, get_inbox, list_domains, get_domain, list_pods, list_webhooks, list_api_keys, get_organization, query_usage). The BYOK key travels with each request, is used for that one call only and is never stored, logged or cached; it is...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-agentmail.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-agentmail/docs"},"termsOfService":"https://connectorbay.com/byok-agentmail/terms"},"servers":[{"url":"https://byok-agentmail.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-agentmail/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_inboxes":{"post":{"operationId":"list_inboxes","summary":"List agent inboxes with address, display name, pod and status, newest first, with page tokens (no messages are returned)","description":"List agent inboxes with address, display name, pod and status, newest first, with page tokens (no messages are returned). Use for \"Which AgentMail inboxes do I have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return (default set by AgentMail).","title":"Limit"},"page_token":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Page token from next_page_token of the previous answer; leave empty for the first page.","title":"Page Token"},"ascending":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to sort oldest first instead of newest first.","title":"Ascending"}},"title":"list_inboxesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_inbox":{"post":{"operationId":"get_inbox","summary":"Get one inbox's address, display name, pod, status and dates by inbox id. Use for \"Show the AgentMail inbox support@exam","description":"Get one inbox's address, display name, pod, status and dates by inbox id. Use for \"Show the AgentMail inbox support@example.com\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"inbox_id":{"description":"Inbox id (usually the email address), from list_inboxes.","maxLength":200,"title":"Inbox Id","type":"string"}},"required":["inbox_id"],"title":"get_inboxArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_domains":{"post":{"operationId":"list_domains","summary":"List custom sending domains with feature flags (feedback, subdomains, tracking, inbound), pod and dates. Use for \"Which ","description":"List custom sending domains with feature flags (feedback, subdomains, tracking, inbound), pod and dates. Use for \"Which domains are set up in AgentMail\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return (default set by AgentMail).","title":"Limit"},"page_token":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Page token from next_page_token of the previous answer; leave empty for the first page.","title":"Page Token"},"ascending":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to sort oldest first instead of newest first.","title":"Ascending"}},"title":"list_domainsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_domain":{"post":{"operationId":"get_domain","summary":"Get one domain's verification status, reason if not verified, feature flags and dates by domain id. Use for \"Is example.","description":"Get one domain's verification status, reason if not verified, feature flags and dates by domain id. Use for \"Is example.com verified in AgentMail\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"domain_id":{"description":"Domain id (usually the domain name), from list_domains.","maxLength":200,"title":"Domain Id","type":"string"}},"required":["domain_id"],"title":"get_domainArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_pods":{"post":{"operationId":"list_pods","summary":"List pods (isolated groups of inboxes and domains) with name and dates. Use for \"What pods exist in my AgentMail organiz","description":"List pods (isolated groups of inboxes and domains) with name and dates. Use for \"What pods exist in my AgentMail organization\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return (default set by AgentMail).","title":"Limit"},"page_token":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Page token from next_page_token of the previous answer; leave empty for the first page.","title":"Page Token"},"ascending":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to sort oldest first instead of newest first.","title":"Ascending"}},"title":"list_podsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_webhooks":{"post":{"operationId":"list_webhooks","summary":"List webhooks with endpoint URL, enabled flag, event types and scope (secrets are not returned). Use for \"Which AgentMai","description":"List webhooks with endpoint URL, enabled flag, event types and scope (secrets are not returned). Use for \"Which AgentMail webhooks are enabled and where do they point\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return (default set by AgentMail).","title":"Limit"},"page_token":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Page token from next_page_token of the previous answer; leave empty for the first page.","title":"Page Token"},"ascending":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to sort oldest first instead of newest first.","title":"Ascending"}},"title":"list_webhooksArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_api_keys":{"post":{"operationId":"list_api_keys","summary":"List API key metadata (name, prefix, scope, last use, expiry) without the secret values; filter by key family. Use for \"","description":"List API key metadata (name, prefix, scope, last use, expiry) without the secret values; filter by key family. Use for \"Which AgentMail API keys exist and when were they last used\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"type":{"anyOf":[{"enum":["bearer","public_key"],"type":"string"},{"type":"null"}],"default":null,"description":"Only this credential family: bearer or public_key.","title":"Type"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return (default set by AgentMail).","title":"Limit"},"page_token":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Page token from next_page_token of the previous answer; leave empty for the first page.","title":"Page Token"},"ascending":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to sort oldest first instead of newest first.","title":"Ascending"}},"title":"list_api_keysArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_organization":{"post":{"operationId":"get_organization","summary":"Show the organization's inbox and domain counts and limits, creation date and suspension state. Use for \"How many inboxe","description":"Show the organization's inbox and domain counts and limits, creation date and suspension state. Use for \"How many inboxes and domains can my AgentMail organization have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_organizationArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/query_usage":{"post":{"operationId":"query_usage","summary":"Get cumulative usage series (storage bytes, message, thread, inbox, pod and domain counts) over a time range; defaults t","description":"Get cumulative usage series (storage bytes, message, thread, inbox, pod and domain counts) over a time range; defaults to the last 24 hours, at most 90 days back. Use for \"How many messages has my AgentMail organization handled in total over the last day\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"start":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Start time, ISO 8601, within the last 90 days.","title":"Start"},"end":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"End time, ISO 8601; a future value is clamped to now.","title":"End"},"period":{"anyOf":[{"maximum":86400,"minimum":1,"type":"integer"},{"type":"null"}],"default":3600,"description":"Bucket size in seconds, 1 to 86400.","title":"Period"},"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":24,"description":"Maximum number of buckets to return.","title":"Limit"},"descending":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to sort newest first.","title":"Descending"}},"title":"query_usageArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}