agentmail 0.3.8 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/apiKeys/client/Client.js +2 -1
  3. package/dist/cjs/api/resources/apiKeys/client/requests/ListApiKeysRequest.d.ts +1 -0
  4. package/dist/cjs/api/resources/domains/client/Client.js +2 -1
  5. package/dist/cjs/api/resources/domains/client/requests/ListDomainsRequest.d.ts +1 -0
  6. package/dist/cjs/api/resources/inboxes/client/Client.js +2 -1
  7. package/dist/cjs/api/resources/inboxes/client/requests/ListInboxesRequest.d.ts +1 -0
  8. package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.js +2 -1
  9. package/dist/cjs/api/resources/inboxes/resources/messages/client/requests/ListMessagesRequest.d.ts +1 -0
  10. package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.js +2 -1
  11. package/dist/cjs/api/resources/inboxes/resources/threads/client/requests/ListThreadsRequest.d.ts +1 -0
  12. package/dist/cjs/api/resources/inboxes/types/InboxId.d.ts +1 -1
  13. package/dist/cjs/api/resources/pods/client/Client.js +2 -1
  14. package/dist/cjs/api/resources/pods/client/requests/ListPodsRequest.d.ts +1 -0
  15. package/dist/cjs/api/resources/pods/resources/domains/client/Client.d.ts +12 -0
  16. package/dist/cjs/api/resources/pods/resources/domains/client/Client.js +65 -1
  17. package/dist/cjs/api/resources/pods/resources/domains/client/requests/ListDomainsRequest.d.ts +1 -0
  18. package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.js +2 -1
  19. package/dist/cjs/api/resources/pods/resources/inboxes/client/requests/ListInboxesRequest.d.ts +1 -0
  20. package/dist/cjs/api/resources/pods/resources/threads/client/Client.js +2 -1
  21. package/dist/cjs/api/resources/pods/resources/threads/client/requests/ListThreadsRequest.d.ts +1 -0
  22. package/dist/cjs/api/resources/webhooks/client/Client.js +2 -1
  23. package/dist/cjs/api/resources/webhooks/client/requests/ListWebhooksRequest.d.ts +1 -0
  24. package/dist/cjs/api/types/IncludeTrash.d.ts +4 -0
  25. package/dist/cjs/api/types/IncludeTrash.js +3 -0
  26. package/dist/cjs/api/types/index.d.ts +1 -0
  27. package/dist/cjs/api/types/index.js +1 -0
  28. package/dist/cjs/serialization/types/IncludeTrash.d.ts +7 -0
  29. package/dist/cjs/serialization/types/IncludeTrash.js +39 -0
  30. package/dist/cjs/serialization/types/index.d.ts +1 -0
  31. package/dist/cjs/serialization/types/index.js +1 -0
  32. package/dist/cjs/version.d.ts +1 -1
  33. package/dist/cjs/version.js +1 -1
  34. package/dist/esm/BaseClient.mjs +2 -2
  35. package/dist/esm/api/resources/apiKeys/client/Client.mjs +2 -1
  36. package/dist/esm/api/resources/apiKeys/client/requests/ListApiKeysRequest.d.mts +1 -0
  37. package/dist/esm/api/resources/domains/client/Client.mjs +2 -1
  38. package/dist/esm/api/resources/domains/client/requests/ListDomainsRequest.d.mts +1 -0
  39. package/dist/esm/api/resources/inboxes/client/Client.mjs +2 -1
  40. package/dist/esm/api/resources/inboxes/client/requests/ListInboxesRequest.d.mts +1 -0
  41. package/dist/esm/api/resources/inboxes/resources/messages/client/Client.mjs +2 -1
  42. package/dist/esm/api/resources/inboxes/resources/messages/client/requests/ListMessagesRequest.d.mts +1 -0
  43. package/dist/esm/api/resources/inboxes/resources/threads/client/Client.mjs +2 -1
  44. package/dist/esm/api/resources/inboxes/resources/threads/client/requests/ListThreadsRequest.d.mts +1 -0
  45. package/dist/esm/api/resources/inboxes/types/InboxId.d.mts +1 -1
  46. package/dist/esm/api/resources/pods/client/Client.mjs +2 -1
  47. package/dist/esm/api/resources/pods/client/requests/ListPodsRequest.d.mts +1 -0
  48. package/dist/esm/api/resources/pods/resources/domains/client/Client.d.mts +12 -0
  49. package/dist/esm/api/resources/pods/resources/domains/client/Client.mjs +65 -1
  50. package/dist/esm/api/resources/pods/resources/domains/client/requests/ListDomainsRequest.d.mts +1 -0
  51. package/dist/esm/api/resources/pods/resources/inboxes/client/Client.mjs +2 -1
  52. package/dist/esm/api/resources/pods/resources/inboxes/client/requests/ListInboxesRequest.d.mts +1 -0
  53. package/dist/esm/api/resources/pods/resources/threads/client/Client.mjs +2 -1
  54. package/dist/esm/api/resources/pods/resources/threads/client/requests/ListThreadsRequest.d.mts +1 -0
  55. package/dist/esm/api/resources/webhooks/client/Client.mjs +2 -1
  56. package/dist/esm/api/resources/webhooks/client/requests/ListWebhooksRequest.d.mts +1 -0
  57. package/dist/esm/api/types/IncludeTrash.d.mts +4 -0
  58. package/dist/esm/api/types/IncludeTrash.mjs +2 -0
  59. package/dist/esm/api/types/index.d.mts +1 -0
  60. package/dist/esm/api/types/index.mjs +1 -0
  61. package/dist/esm/serialization/types/IncludeTrash.d.mts +7 -0
  62. package/dist/esm/serialization/types/IncludeTrash.mjs +3 -0
  63. package/dist/esm/serialization/types/index.d.mts +1 -0
  64. package/dist/esm/serialization/types/index.mjs +1 -0
  65. package/dist/esm/version.d.mts +1 -1
  66. package/dist/esm/version.mjs +1 -1
  67. package/dist/llms-full.txt +376 -139
  68. package/dist/llms.txt +3 -2
  69. package/package.json +1 -1
  70. package/reference.md +57 -0
@@ -205,107 +205,6 @@ Get your API key from the [Console](https://console.agentmail.to) and replace `a
205
205
  ```
206
206
  </CodeBlocks>
207
207
 
208
- ## Copy for Cursor / Claude
209
-
210
- Copy one of the blocks below into Cursor or Claude for a complete, working AgentMail integration. Each block includes setup, API reference, error handling, rate limiting, and idempotency guidance.
211
-
212
- <CodeBlocks>
213
- ```python title="Python"
214
- """
215
- AgentMail Python Quickstart — copy into Cursor/Claude for instant setup.
216
-
217
- Setup: pip install agentmail python-dotenv. Set AGENTMAIL_API_KEY in .env.
218
-
219
- API reference:
220
- - inboxes.create(username?, domain?, display_name?, client_id?) — client_id for idempotent retries
221
- - messages.send(inbox_id, to, subject, text, html?, cc?, bcc?, reply_to?, attachments?)
222
- - messages.list(inbox_id, limit?, page_token?, labels?) — receive emails; use extracted_text/extracted_html for reply content
223
-
224
- Errors: SDK raises on 4xx/5xx. Inspect error.body.message or str(e).
225
- Rate limit: 429 with Retry-After header. Implement exponential backoff for retries.
226
- Idempotency: Pass client_id to inboxes.create() to safely retry without duplicates.
227
- """
228
- import os
229
- from dotenv import load_dotenv
230
- from agentmail import AgentMail
231
-
232
- load_dotenv()
233
- client = AgentMail(api_key=os.getenv("AGENTMAIL_API_KEY"))
234
-
235
- # Create inbox (client_id enables safe retries)
236
- inbox = client.inboxes.create(client_id="my-agent-inbox-v1")
237
-
238
- # Send email
239
- try:
240
- client.inboxes.messages.send(
241
- inbox.inbox_id,
242
- to="recipient@example.com",
243
- subject="Hello from AgentMail",
244
- text="Plain text body",
245
- html="<p>HTML body</p>",
246
- )
247
- except Exception as e:
248
- # Handle validation, not found, rate limit (429), etc.
249
- print(f"Send failed: {e}")
250
- raise
251
-
252
- # Receive messages
253
- for msg in client.inboxes.messages.list(inbox.inbox_id, limit=10).messages:
254
- print(msg.subject, msg.extracted_text or msg.text)
255
- ```
256
-
257
- ```typescript title="TypeScript"
258
- /**
259
- * AgentMail TypeScript Quickstart — copy into Cursor/Claude for instant setup.
260
- *
261
- * Setup: npm install agentmail dotenv. Set AGENTMAIL_API_KEY in .env.
262
- *
263
- * API reference:
264
- * - inboxes.create({ username?, domain?, displayName?, clientId? }) — clientId for idempotent retries
265
- * - messages.send(inboxId, { to, subject, text, html?, cc?, bcc?, replyTo?, attachments? })
266
- * - messages.list(inboxId, { limit?, pageToken?, labels? }) — receive; use extractedText/extractedHtml for reply content
267
- *
268
- * Errors: SDK throws on 4xx/5xx. Check error.body?.message.
269
- * Rate limit: 429 with Retry-After header. Use exponential backoff for retries.
270
- * Idempotency: Pass clientId to inboxes.create() to safely retry without duplicates.
271
- */
272
- import { AgentMailClient } from "agentmail";
273
- import "dotenv/config";
274
-
275
- const client = new AgentMailClient({
276
- apiKey: process.env.AGENTMAIL_API_KEY!,
277
- });
278
-
279
- async function main() {
280
- // Create inbox (clientId enables safe retries)
281
- const inbox = await client.inboxes.create({
282
- clientId: "my-agent-inbox-v1",
283
- });
284
-
285
- try {
286
- await client.inboxes.messages.send(inbox.inboxId, {
287
- to: "recipient@example.com",
288
- subject: "Hello from AgentMail",
289
- text: "Plain text body",
290
- html: "<p>HTML body</p>",
291
- });
292
- } catch (error: unknown) {
293
- // Handle validation, not found, rate limit (429), etc.
294
- const msg = (error as { body?: { message?: string } })?.body?.message ?? String(error);
295
- throw new Error(`Send failed: ${msg}`);
296
- }
297
-
298
- // Receive messages
299
- const res = await client.inboxes.messages.list(inbox.inboxId, { limit: 10 });
300
- for (const msg of res.messages) {
301
- console.log(msg.subject, msg.extractedText ?? msg.text);
302
- }
303
- }
304
-
305
- main();
306
- ```
307
- </CodeBlocks>
308
-
309
208
  <Tip>
310
209
  When receiving emails, messages include `extracted_text` and `extracted_html`
311
210
  for reply content without quoted history.
@@ -1806,30 +1705,30 @@ title: Skills
1806
1705
  subtitle: Add AgentMail to AI coding assistants with the official skill
1807
1706
  slug: integrations/skills
1808
1707
  description: >-
1809
- AgentMail's official skill for OpenClaw, Claude Code, Cursor, and other AI
1708
+ AgentMail's official skill for Moltbot, Claude Code, Cursor, and other AI
1810
1709
  assistants
1811
1710
  ----------
1812
1711
 
1813
1712
  ## Getting started
1814
1713
 
1815
- AgentMail provides an official skill that can be installed on AI coding assistants and agents that support the [AgentSkills](https://skills.sh) format. This includes OpenClaw, Claude Code, Cursor, Codex, and other compatible tools.
1714
+ AgentMail provides an official skill that can be installed on AI coding assistants and agents that support the [AgentSkills](https://skills.sh) format. This includes Moltbot, Claude Code, Cursor, Codex, and other compatible tools.
1816
1715
 
1817
1716
  The skill is available at [skills.sh/agentmail-to/agentmail-skills/agentmail](https://skills.sh/agentmail-to/agentmail-skills/agentmail).
1818
1717
 
1819
1718
  ## Installation
1820
1719
 
1821
- ### OpenClaw
1720
+ ### Moltbot
1822
1721
 
1823
- Install the skill using the OpenClaw CLI:
1722
+ Install the skill using the Moltbot CLI:
1824
1723
 
1825
1724
  ```bash
1826
- openclaw skills install agentmail-to/agentmail-skills/agentmail
1725
+ moltbot skills install agentmail-to/agentmail-skills/agentmail
1827
1726
  ```
1828
1727
 
1829
- Or install via ClawHub:
1728
+ Or install via ClawdHub:
1830
1729
 
1831
1730
  ```bash
1832
- npx clawhub@latest install agentmail
1731
+ clawdhub install agentmail
1833
1732
  ```
1834
1733
 
1835
1734
  ### Claude Code
@@ -1868,9 +1767,9 @@ Set the `AGENTMAIL_API_KEY` environment variable:
1868
1767
  export AGENTMAIL_API_KEY="your-api-key-here"
1869
1768
  ```
1870
1769
 
1871
- ### OpenClaw configuration
1770
+ ### Moltbot configuration
1872
1771
 
1873
- Add the API key to `~/.openclaw/openclaw.json`:
1772
+ Add the API key to `~/.clawdbot/moltbot.json`:
1874
1773
 
1875
1774
  ```json
1876
1775
  {
@@ -1957,13 +1856,7 @@ The Model Context Protocol (MCP) is an open standard that enables AI application
1957
1856
 
1958
1857
  ### Setup
1959
1858
 
1960
- Install with:
1961
-
1962
- ```bash
1963
- npx @smithery/cli@latest mcp add agentmail
1964
- ```
1965
-
1966
- Configure your API key when prompted. Get your key from the [AgentMail Console](https://console.agentmail.to). For more details, visit [mcp.agentmail.to](https://mcp.agentmail.to).
1859
+ To get started with the AgentMail MCP server, visit [mcp.agentmail.to](https://mcp.agentmail.to) for installation instructions and configuration details.
1967
1860
 
1968
1861
  ## Features
1969
1862
 
@@ -1988,25 +1881,25 @@ For detailed setup instructions and available tools, visit [mcp.agentmail.to](ht
1988
1881
 
1989
1882
  ***
1990
1883
 
1991
- title: OpenClaw
1992
- subtitle: Give your OpenClaw agent its own email inbox
1884
+ title: Openclaw
1885
+ subtitle: Give your Openclaw agent its own email inbox
1993
1886
  slug: integrations/openclaw
1994
- description: AgentMail's OpenClaw integration
1887
+ description: AgentMail's Openclaw integration
1995
1888
  ---------------------------------------------
1996
1889
 
1997
1890
  ## Getting started
1998
1891
 
1999
- OpenClaw (formerly Moltbot) is an open-source AI personal assistant that runs on your own devices and integrates with messaging platforms like WhatsApp, Telegram, Discord, and Slack. By adding AgentMail to OpenClaw, your agent gains the ability to send and receive emails, enabling two-way email conversations alongside your existing chat channels.
1892
+ Openclaw (formerly Moltbot) is an open-source AI personal assistant that runs on your own devices and integrates with messaging platforms like WhatsApp, Telegram, Discord, and Slack. By adding AgentMail to Openclaw, your agent gains the ability to send and receive emails, enabling two-way email conversations alongside your existing chat channels.
2000
1893
 
2001
- There are two ways to integrate AgentMail with OpenClaw: using the official AgentMail skill or creating a custom skill.
1894
+ There are two ways to integrate AgentMail with Openclaw: using the official AgentMail skill or creating a custom skill.
2002
1895
 
2003
1896
  ## Option 1: Official AgentMail Skill (Recommended)
2004
1897
 
2005
- The easiest way to add email capabilities to OpenClaw is by installing the official AgentMail skill from [skills.sh](https://skills.sh/agentmail-to/agentmail-skills/agentmail). This skill is maintained by the AgentMail team and provides comprehensive email functionality.
1898
+ The easiest way to add email capabilities to Openclaw is by installing the official AgentMail skill from [skills.sh](https://skills.sh/agentmail-to/agentmail-skills/agentmail). This skill is maintained by the AgentMail team and provides comprehensive email functionality.
2006
1899
 
2007
1900
  ### Installation
2008
1901
 
2009
- Install the skill using the OpenClaw CLI:
1902
+ Install the skill using the Openclaw CLI:
2010
1903
 
2011
1904
  ```bash
2012
1905
  openclaw skills install agentmail-to/agentmail-skills/agentmail
@@ -2064,11 +1957,11 @@ You should see `agentmail` in the list of available skills.
2064
1957
 
2065
1958
  ## Option 2: Custom Skill
2066
1959
 
2067
- For more control over the integration, you can create a custom AgentMail skill. Skills are directories containing a `SKILL.md` file with instructions for OpenClaw.
1960
+ For more control over the integration, you can create a custom AgentMail skill. Skills are directories containing a `SKILL.md` file with instructions for Openclaw.
2068
1961
 
2069
1962
  ### Create the skill directory
2070
1963
 
2071
- Create a new skill in your OpenClaw workspace:
1964
+ Create a new skill in your Openclaw workspace:
2072
1965
 
2073
1966
  ```bash
2074
1967
  mkdir -p ~/.openclaw/skills/agentmail
@@ -2130,10 +2023,10 @@ curl -s -X POST -H "Authorization: Bearer $AGENTMAIL_API_KEY" \
2130
2023
  -H "Content-Type: application/json" \
2131
2024
  -d '{
2132
2025
  "to": ["recipient@example.com"],
2133
- "subject": "Hello from OpenClaw",
2026
+ "subject": "Hello from Openclaw",
2134
2027
  "text": "This email was sent by my AI assistant."
2135
2028
  }' \
2136
- https://api.agentmail.to/v0/inboxes/{inbox_id}/messages/send
2029
+ https://api.agentmail.to/v0/inboxes/{inbox_id}/messages
2137
2030
  ```
2138
2031
 
2139
2032
  ### List messages in an inbox
@@ -2184,7 +2077,7 @@ You should see `agentmail` in the list of available skills.
2184
2077
 
2185
2078
  ## Example use cases
2186
2079
 
2187
- Once AgentMail is integrated with OpenClaw, you can ask your agent to:
2080
+ Once AgentMail is integrated with Openclaw, you can ask your agent to:
2188
2081
 
2189
2082
  * "Create a new email inbox for my project"
2190
2083
  * "Check my inbox for new emails"
@@ -2194,9 +2087,9 @@ Once AgentMail is integrated with OpenClaw, you can ask your agent to:
2194
2087
 
2195
2088
  ## Real-time email notifications
2196
2089
 
2197
- For proactive email handling, you can combine AgentMail webhooks with OpenClaw's webhook support. This allows OpenClaw to notify you immediately when new emails arrive.
2090
+ For proactive email handling, you can combine AgentMail webhooks with Openclaw's webhook support. This allows Openclaw to notify you immediately when new emails arrive.
2198
2091
 
2199
- 1. Set up a webhook endpoint in OpenClaw (see [OpenClaw webhook documentation](https://docs.openclaw.ai/automation/webhook))
2092
+ 1. Set up a webhook endpoint in Openclaw (see [Openclaw webhook documentation](https://docs.openclaw.ai/automation/webhook))
2200
2093
 
2201
2094
  2. Register the webhook with AgentMail:
2202
2095
 
@@ -2210,14 +2103,14 @@ curl -X POST -H "Authorization: Bearer $AGENTMAIL_API_KEY" \
2210
2103
  https://api.agentmail.to/v0/webhooks
2211
2104
  ```
2212
2105
 
2213
- Now OpenClaw will be notified whenever a new email arrives, allowing it to proactively inform you or take action.
2106
+ Now Openclaw will be notified whenever a new email arrives, allowing it to proactively inform you or take action.
2214
2107
 
2215
2108
  ## Resources
2216
2109
 
2217
2110
  * [Official AgentMail Skill](https://skills.sh/agentmail-to/agentmail-skills/agentmail)
2218
2111
  * [AgentMail API Reference](/api-reference)
2219
- * [OpenClaw Documentation](https://docs.openclaw.ai)
2220
- * [OpenClaw Skills Guide](https://docs.openclaw.ai/tools/skills)
2112
+ * [Openclaw Documentation](https://docs.openclaw.ai)
2113
+ * [Openclaw Skills Guide](https://docs.openclaw.ai/tools/skills)
2221
2114
 
2222
2115
 
2223
2116
  ***
@@ -2748,6 +2641,10 @@ Configure IMAP and SMTP to access your AgentMail inboxes using email clients
2748
2641
  or programmatic access.
2749
2642
  -----------------------
2750
2643
 
2644
+ <Callout intent="warn" title="IMAP is Under Development">
2645
+ IMAP support is currently under development and will be available in the coming weeks. The documentation below describes the planned functionality. SMTP is fully available today.
2646
+ </Callout>
2647
+
2751
2648
  AgentMail supports standard IMAP and SMTP protocols, allowing you to connect using traditional email clients or integrate with existing systems that rely on these protocols.
2752
2649
 
2753
2650
  ## What are IMAP and SMTP?
@@ -8751,7 +8648,8 @@ and get support.
8751
8648
  </Callout>
8752
8649
 
8753
8650
 
8754
-  ---
8651
+ ***
8652
+
8755
8653
  title: Support
8756
8654
  slug: support
8757
8655
  description: Get help with AgentMail through our support channels.
@@ -10411,6 +10309,11 @@ paths:
10411
10309
  required: false
10412
10310
  schema:
10413
10311
  $ref: '#/components/schemas/type_:IncludeBlocked'
10312
+ - name: include_trash
10313
+ in: query
10314
+ required: false
10315
+ schema:
10316
+ $ref: '#/components/schemas/type_:IncludeTrash'
10414
10317
  - name: Authorization
10415
10318
  in: header
10416
10319
  description: Bearer authentication
@@ -10477,6 +10380,10 @@ components:
10477
10380
  type: boolean
10478
10381
  description: Include blocked in results.
10479
10382
  title: IncludeBlocked
10383
+ type_:IncludeTrash:
10384
+ type: boolean
10385
+ description: Include trash in results.
10386
+ title: IncludeTrash
10480
10387
  type_:Count:
10481
10388
  type: integer
10482
10389
  description: Number of items returned.
@@ -11949,6 +11856,11 @@ paths:
11949
11856
  required: false
11950
11857
  schema:
11951
11858
  $ref: '#/components/schemas/type_:IncludeBlocked'
11859
+ - name: include_trash
11860
+ in: query
11861
+ required: false
11862
+ schema:
11863
+ $ref: '#/components/schemas/type_:IncludeTrash'
11952
11864
  - name: Authorization
11953
11865
  in: header
11954
11866
  description: Bearer authentication
@@ -12015,6 +11927,10 @@ components:
12015
11927
  type: boolean
12016
11928
  description: Include blocked in results.
12017
11929
  title: IncludeBlocked
11930
+ type_:IncludeTrash:
11931
+ type: boolean
11932
+ description: Include trash in results.
11933
+ title: IncludeTrash
12018
11934
  type_:Count:
12019
11935
  type: integer
12020
11936
  description: Number of items returned.
@@ -18185,8 +18101,8 @@ client = AgentMail(
18185
18101
 
18186
18102
  client.inboxes.metrics.get(
18187
18103
  inbox_id="inbox_id",
18188
- start_timestamp=datetime.fromisoformat("2024-01-15T09:30:00Z"),
18189
- end_timestamp=datetime.fromisoformat("2024-01-15T09:30:00Z")
18104
+ start_timestamp=datetime.fromisoformat("2024-01-15T09:30:00+00:00"),
18105
+ end_timestamp=datetime.fromisoformat("2024-01-15T09:30:00+00:00")
18190
18106
  )
18191
18107
 
18192
18108
  ```
@@ -27194,8 +27110,8 @@ client = AgentMail(
27194
27110
  )
27195
27111
 
27196
27112
  client.metrics.list(
27197
- start_timestamp=datetime.fromisoformat("2024-01-15T09:30:00Z"),
27198
- end_timestamp=datetime.fromisoformat("2024-01-15T09:30:00Z")
27113
+ start_timestamp=datetime.fromisoformat("2024-01-15T09:30:00+00:00"),
27114
+ end_timestamp=datetime.fromisoformat("2024-01-15T09:30:00+00:00")
27199
27115
  )
27200
27116
 
27201
27117
  ```
@@ -30105,6 +30021,11 @@ paths:
30105
30021
  required: false
30106
30022
  schema:
30107
30023
  $ref: '#/components/schemas/type_:IncludeBlocked'
30024
+ - name: include_trash
30025
+ in: query
30026
+ required: false
30027
+ schema:
30028
+ $ref: '#/components/schemas/type_:IncludeTrash'
30108
30029
  - name: Authorization
30109
30030
  in: header
30110
30031
  description: Bearer authentication
@@ -30171,6 +30092,10 @@ components:
30171
30092
  type: boolean
30172
30093
  description: Include blocked in results.
30173
30094
  title: IncludeBlocked
30095
+ type_:IncludeTrash:
30096
+ type: boolean
30097
+ description: Include trash in results.
30098
+ title: IncludeTrash
30174
30099
  type_:Count:
30175
30100
  type: integer
30176
30101
  description: Number of items returned.
@@ -33155,6 +33080,318 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
33155
33080
  dataTask.resume()
33156
33081
  ```
33157
33082
 
33083
+ # Get Domain
33084
+
33085
+ GET https://api.agentmail.to/v0/pods/{pod_id}/domains/{domain_id}
33086
+
33087
+ Reference: https://docs.agentmail.to/api-reference/pods/domains/get
33088
+
33089
+ ## OpenAPI Specification
33090
+
33091
+ ```yaml
33092
+ openapi: 3.1.0
33093
+ info:
33094
+ title: api
33095
+ version: 1.0.0
33096
+ paths:
33097
+ /v0/pods/{pod_id}/domains/{domain_id}:
33098
+ get:
33099
+ operationId: get
33100
+ summary: Get Domain
33101
+ tags:
33102
+ - subpackage_pods.subpackage_pods/domains
33103
+ parameters:
33104
+ - name: pod_id
33105
+ in: path
33106
+ required: true
33107
+ schema:
33108
+ $ref: '#/components/schemas/type_pods:PodId'
33109
+ - name: domain_id
33110
+ in: path
33111
+ required: true
33112
+ schema:
33113
+ $ref: '#/components/schemas/type_domains:DomainId'
33114
+ - name: Authorization
33115
+ in: header
33116
+ description: Bearer authentication
33117
+ required: true
33118
+ schema:
33119
+ type: string
33120
+ responses:
33121
+ '200':
33122
+ description: Response with status 200
33123
+ content:
33124
+ application/json:
33125
+ schema:
33126
+ $ref: '#/components/schemas/type_domains:Domain'
33127
+ '404':
33128
+ description: Error response with status 404
33129
+ content:
33130
+ application/json:
33131
+ schema:
33132
+ $ref: '#/components/schemas/type_:ErrorResponse'
33133
+ servers:
33134
+ - url: https://api.agentmail.to
33135
+ - url: https://x402.api.agentmail.to
33136
+ - url: https://mpp.api.agentmail.to
33137
+ - url: https://api.agentmail.eu
33138
+ components:
33139
+ schemas:
33140
+ type_pods:PodId:
33141
+ type: string
33142
+ description: ID of pod.
33143
+ title: PodId
33144
+ type_domains:DomainId:
33145
+ type: string
33146
+ description: The name of the domain. (e.g., " your-domain.com")
33147
+ title: DomainId
33148
+ type_domains:VerificationStatus:
33149
+ type: string
33150
+ enum:
33151
+ - NOT_STARTED
33152
+ - PENDING
33153
+ - INVALID
33154
+ - FAILED
33155
+ - VERIFYING
33156
+ - VERIFIED
33157
+ title: VerificationStatus
33158
+ type_domains:FeedbackEnabled:
33159
+ type: boolean
33160
+ description: Bounce and complaint notifications are sent to your inboxes.
33161
+ title: FeedbackEnabled
33162
+ type_domains:RecordType:
33163
+ type: string
33164
+ enum:
33165
+ - TXT
33166
+ - CNAME
33167
+ - MX
33168
+ title: RecordType
33169
+ type_domains:RecordStatus:
33170
+ type: string
33171
+ enum:
33172
+ - MISSING
33173
+ - INVALID
33174
+ - VALID
33175
+ title: RecordStatus
33176
+ type_domains:VerificationRecord:
33177
+ type: object
33178
+ properties:
33179
+ type:
33180
+ $ref: '#/components/schemas/type_domains:RecordType'
33181
+ description: The type of the DNS record.
33182
+ name:
33183
+ type: string
33184
+ description: The name or host of the record.
33185
+ value:
33186
+ type: string
33187
+ description: The value of the record.
33188
+ status:
33189
+ $ref: '#/components/schemas/type_domains:RecordStatus'
33190
+ description: The verification status of this specific record.
33191
+ priority:
33192
+ type: integer
33193
+ description: The priority of the MX record.
33194
+ required:
33195
+ - type
33196
+ - name
33197
+ - value
33198
+ - status
33199
+ title: VerificationRecord
33200
+ type_domains:ClientId:
33201
+ type: string
33202
+ description: Client ID of domain.
33203
+ title: ClientId
33204
+ type_domains:Domain:
33205
+ type: object
33206
+ properties:
33207
+ pod_id:
33208
+ $ref: '#/components/schemas/type_pods:PodId'
33209
+ domain_id:
33210
+ $ref: '#/components/schemas/type_domains:DomainId'
33211
+ status:
33212
+ $ref: '#/components/schemas/type_domains:VerificationStatus'
33213
+ description: The verification status of the domain.
33214
+ feedback_enabled:
33215
+ $ref: '#/components/schemas/type_domains:FeedbackEnabled'
33216
+ records:
33217
+ type: array
33218
+ items:
33219
+ $ref: '#/components/schemas/type_domains:VerificationRecord'
33220
+ description: A list of DNS records required to verify the domain.
33221
+ client_id:
33222
+ $ref: '#/components/schemas/type_domains:ClientId'
33223
+ updated_at:
33224
+ type: string
33225
+ format: date-time
33226
+ description: Time at which the domain was last updated.
33227
+ created_at:
33228
+ type: string
33229
+ format: date-time
33230
+ description: Time at which the domain was created.
33231
+ required:
33232
+ - domain_id
33233
+ - status
33234
+ - feedback_enabled
33235
+ - records
33236
+ - updated_at
33237
+ - created_at
33238
+ title: Domain
33239
+ type_:ErrorName:
33240
+ type: string
33241
+ description: Name of error.
33242
+ title: ErrorName
33243
+ type_:ErrorMessage:
33244
+ type: string
33245
+ description: Error message.
33246
+ title: ErrorMessage
33247
+ type_:ErrorResponse:
33248
+ type: object
33249
+ properties:
33250
+ name:
33251
+ $ref: '#/components/schemas/type_:ErrorName'
33252
+ message:
33253
+ $ref: '#/components/schemas/type_:ErrorMessage'
33254
+ required:
33255
+ - name
33256
+ - message
33257
+ title: ErrorResponse
33258
+ securitySchemes:
33259
+ Bearer:
33260
+ type: http
33261
+ scheme: bearer
33262
+
33263
+ ```
33264
+
33265
+ ## SDK Code Examples
33266
+
33267
+ ```typescript
33268
+ import { AgentMailClient } from "agentmail";
33269
+
33270
+ async function main() {
33271
+ const client = new AgentMailClient({
33272
+ apiKey: "YOUR_TOKEN_HERE",
33273
+ });
33274
+ await client.pods.domains.get("pod_id", "domain_id");
33275
+ }
33276
+ main();
33277
+
33278
+ ```
33279
+
33280
+ ```python
33281
+ from agentmail import AgentMail
33282
+
33283
+ client = AgentMail(
33284
+ api_key="YOUR_TOKEN_HERE"
33285
+ )
33286
+
33287
+ client.pods.domains.get(
33288
+ pod_id="pod_id",
33289
+ domain_id="domain_id"
33290
+ )
33291
+
33292
+ ```
33293
+
33294
+ ```go
33295
+ package main
33296
+
33297
+ import (
33298
+ "fmt"
33299
+ "net/http"
33300
+ "io"
33301
+ )
33302
+
33303
+ func main() {
33304
+
33305
+ url := "https://api.agentmail.to/v0/pods/pod_id/domains/domain_id"
33306
+
33307
+ req, _ := http.NewRequest("GET", url, nil)
33308
+
33309
+ req.Header.Add("Authorization", "Bearer <api_key>")
33310
+
33311
+ res, _ := http.DefaultClient.Do(req)
33312
+
33313
+ defer res.Body.Close()
33314
+ body, _ := io.ReadAll(res.Body)
33315
+
33316
+ fmt.Println(res)
33317
+ fmt.Println(string(body))
33318
+
33319
+ }
33320
+ ```
33321
+
33322
+ ```ruby
33323
+ require 'uri'
33324
+ require 'net/http'
33325
+
33326
+ url = URI("https://api.agentmail.to/v0/pods/pod_id/domains/domain_id")
33327
+
33328
+ http = Net::HTTP.new(url.host, url.port)
33329
+ http.use_ssl = true
33330
+
33331
+ request = Net::HTTP::Get.new(url)
33332
+ request["Authorization"] = 'Bearer <api_key>'
33333
+
33334
+ response = http.request(request)
33335
+ puts response.read_body
33336
+ ```
33337
+
33338
+ ```java
33339
+ import com.mashape.unirest.http.HttpResponse;
33340
+ import com.mashape.unirest.http.Unirest;
33341
+
33342
+ HttpResponse<String> response = Unirest.get("https://api.agentmail.to/v0/pods/pod_id/domains/domain_id")
33343
+ .header("Authorization", "Bearer <api_key>")
33344
+ .asString();
33345
+ ```
33346
+
33347
+ ```php
33348
+ <?php
33349
+ require_once('vendor/autoload.php');
33350
+
33351
+ $client = new \GuzzleHttp\Client();
33352
+
33353
+ $response = $client->request('GET', 'https://api.agentmail.to/v0/pods/pod_id/domains/domain_id', [
33354
+ 'headers' => [
33355
+ 'Authorization' => 'Bearer <api_key>',
33356
+ ],
33357
+ ]);
33358
+
33359
+ echo $response->getBody();
33360
+ ```
33361
+
33362
+ ```csharp
33363
+ using RestSharp;
33364
+
33365
+ var client = new RestClient("https://api.agentmail.to/v0/pods/pod_id/domains/domain_id");
33366
+ var request = new RestRequest(Method.GET);
33367
+ request.AddHeader("Authorization", "Bearer <api_key>");
33368
+ IRestResponse response = client.Execute(request);
33369
+ ```
33370
+
33371
+ ```swift
33372
+ import Foundation
33373
+
33374
+ let headers = ["Authorization": "Bearer <api_key>"]
33375
+
33376
+ let request = NSMutableURLRequest(url: NSURL(string: "https://api.agentmail.to/v0/pods/pod_id/domains/domain_id")! as URL,
33377
+ cachePolicy: .useProtocolCachePolicy,
33378
+ timeoutInterval: 10.0)
33379
+ request.httpMethod = "GET"
33380
+ request.allHTTPHeaderFields = headers
33381
+
33382
+ let session = URLSession.shared
33383
+ let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
33384
+ if (error != nil) {
33385
+ print(error as Any)
33386
+ } else {
33387
+ let httpResponse = response as? HTTPURLResponse
33388
+ print(httpResponse)
33389
+ }
33390
+ })
33391
+
33392
+ dataTask.resume()
33393
+ ```
33394
+
33158
33395
  # Delete Domain
33159
33396
 
33160
33397
  DELETE https://api.agentmail.to/v0/pods/{pod_id}/domains/{domain_id}