agentmail 0.1.3 → 0.1.5

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 (82) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/apiKeys/client/Client.js +3 -1
  3. package/dist/cjs/api/resources/domains/client/Client.js +3 -1
  4. package/dist/cjs/api/resources/domains/types/{DomainSummary.d.ts → DomainItem.d.ts} +1 -1
  5. package/dist/cjs/api/resources/domains/types/ListDomainsResponse.d.ts +2 -1
  6. package/dist/cjs/api/resources/domains/types/index.d.ts +1 -1
  7. package/dist/cjs/api/resources/domains/types/index.js +1 -1
  8. package/dist/cjs/api/resources/drafts/client/Client.js +6 -1
  9. package/dist/cjs/api/resources/inboxes/client/Client.d.ts +14 -0
  10. package/dist/cjs/api/resources/inboxes/client/Client.js +86 -1
  11. package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.js +15 -4
  12. package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.js +15 -4
  13. package/dist/cjs/api/resources/inboxes/resources/metrics/client/Client.js +3 -1
  14. package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.js +6 -1
  15. package/dist/cjs/api/resources/inboxes/types/UpdateInboxRequest.d.ts +4 -0
  16. package/dist/cjs/api/resources/inboxes/types/UpdateInboxRequest.js +3 -0
  17. package/dist/cjs/api/resources/inboxes/types/index.d.ts +1 -0
  18. package/dist/cjs/api/resources/inboxes/types/index.js +1 -0
  19. package/dist/cjs/api/resources/metrics/client/Client.js +3 -1
  20. package/dist/cjs/api/resources/pods/client/Client.js +3 -1
  21. package/dist/cjs/api/resources/pods/resources/domains/client/Client.js +9 -2
  22. package/dist/cjs/api/resources/pods/resources/drafts/client/Client.js +6 -1
  23. package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.js +9 -2
  24. package/dist/cjs/api/resources/pods/resources/threads/client/Client.js +6 -1
  25. package/dist/cjs/api/resources/threads/client/Client.js +6 -1
  26. package/dist/cjs/api/resources/webhooks/client/Client.js +3 -1
  27. package/dist/cjs/serialization/resources/domains/types/{DomainSummary.d.ts → DomainItem.d.ts} +2 -2
  28. package/dist/cjs/serialization/resources/domains/types/{DomainSummary.js → DomainItem.js} +2 -2
  29. package/dist/cjs/serialization/resources/domains/types/ListDomainsResponse.d.ts +4 -2
  30. package/dist/cjs/serialization/resources/domains/types/ListDomainsResponse.js +4 -2
  31. package/dist/cjs/serialization/resources/domains/types/index.d.ts +1 -1
  32. package/dist/cjs/serialization/resources/domains/types/index.js +1 -1
  33. package/dist/cjs/serialization/resources/inboxes/types/UpdateInboxRequest.d.ts +10 -0
  34. package/dist/cjs/serialization/resources/inboxes/types/UpdateInboxRequest.js +42 -0
  35. package/dist/cjs/serialization/resources/inboxes/types/index.d.ts +1 -0
  36. package/dist/cjs/serialization/resources/inboxes/types/index.js +1 -0
  37. package/dist/cjs/version.d.ts +1 -1
  38. package/dist/cjs/version.js +1 -1
  39. package/dist/esm/Client.mjs +2 -2
  40. package/dist/esm/api/resources/apiKeys/client/Client.mjs +3 -1
  41. package/dist/esm/api/resources/domains/client/Client.mjs +3 -1
  42. package/dist/esm/api/resources/domains/types/{DomainSummary.d.mts → DomainItem.d.mts} +1 -1
  43. package/dist/esm/api/resources/domains/types/ListDomainsResponse.d.mts +2 -1
  44. package/dist/esm/api/resources/domains/types/index.d.mts +1 -1
  45. package/dist/esm/api/resources/domains/types/index.mjs +1 -1
  46. package/dist/esm/api/resources/drafts/client/Client.mjs +6 -1
  47. package/dist/esm/api/resources/inboxes/client/Client.d.mts +14 -0
  48. package/dist/esm/api/resources/inboxes/client/Client.mjs +86 -1
  49. package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.mjs +15 -4
  50. package/dist/esm/api/resources/inboxes/resources/messages/client/Client.mjs +15 -4
  51. package/dist/esm/api/resources/inboxes/resources/metrics/client/Client.mjs +3 -1
  52. package/dist/esm/api/resources/inboxes/resources/threads/client/Client.mjs +6 -1
  53. package/dist/esm/api/resources/inboxes/types/UpdateInboxRequest.d.mts +4 -0
  54. package/dist/esm/api/resources/inboxes/types/UpdateInboxRequest.mjs +2 -0
  55. package/dist/esm/api/resources/inboxes/types/index.d.mts +1 -0
  56. package/dist/esm/api/resources/inboxes/types/index.mjs +1 -0
  57. package/dist/esm/api/resources/metrics/client/Client.mjs +3 -1
  58. package/dist/esm/api/resources/pods/client/Client.mjs +3 -1
  59. package/dist/esm/api/resources/pods/resources/domains/client/Client.mjs +9 -2
  60. package/dist/esm/api/resources/pods/resources/drafts/client/Client.mjs +6 -1
  61. package/dist/esm/api/resources/pods/resources/inboxes/client/Client.mjs +9 -2
  62. package/dist/esm/api/resources/pods/resources/threads/client/Client.mjs +6 -1
  63. package/dist/esm/api/resources/threads/client/Client.mjs +6 -1
  64. package/dist/esm/api/resources/webhooks/client/Client.mjs +3 -1
  65. package/dist/esm/serialization/resources/domains/types/{DomainSummary.d.mts → DomainItem.d.mts} +2 -2
  66. package/dist/esm/serialization/resources/domains/types/{DomainSummary.mjs → DomainItem.mjs} +1 -1
  67. package/dist/esm/serialization/resources/domains/types/ListDomainsResponse.d.mts +4 -2
  68. package/dist/esm/serialization/resources/domains/types/ListDomainsResponse.mjs +4 -2
  69. package/dist/esm/serialization/resources/domains/types/index.d.mts +1 -1
  70. package/dist/esm/serialization/resources/domains/types/index.mjs +1 -1
  71. package/dist/esm/serialization/resources/inboxes/types/UpdateInboxRequest.d.mts +10 -0
  72. package/dist/esm/serialization/resources/inboxes/types/UpdateInboxRequest.mjs +6 -0
  73. package/dist/esm/serialization/resources/inboxes/types/index.d.mts +1 -0
  74. package/dist/esm/serialization/resources/inboxes/types/index.mjs +1 -0
  75. package/dist/esm/version.d.mts +1 -1
  76. package/dist/esm/version.mjs +1 -1
  77. package/dist/llms-full.txt +297 -57
  78. package/dist/llms.txt +1 -0
  79. package/package.json +1 -1
  80. package/reference.md +59 -0
  81. /package/dist/cjs/api/resources/domains/types/{DomainSummary.js → DomainItem.js} +0 -0
  82. /package/dist/esm/api/resources/domains/types/{DomainSummary.mjs → DomainItem.mjs} +0 -0
@@ -2,8 +2,8 @@ export * from "./ClientId.mjs";
2
2
  export * from "./CreateDomainRequest.mjs";
3
3
  export * from "./Domain.mjs";
4
4
  export * from "./DomainId.mjs";
5
+ export * from "./DomainItem.mjs";
5
6
  export * from "./DomainName.mjs";
6
- export * from "./DomainSummary.mjs";
7
7
  export * from "./FeedbackEnabled.mjs";
8
8
  export * from "./ListDomainsResponse.mjs";
9
9
  export * from "./RecordStatus.mjs";
@@ -2,8 +2,8 @@ export * from "./ClientId.mjs";
2
2
  export * from "./CreateDomainRequest.mjs";
3
3
  export * from "./Domain.mjs";
4
4
  export * from "./DomainId.mjs";
5
+ export * from "./DomainItem.mjs";
5
6
  export * from "./DomainName.mjs";
6
- export * from "./DomainSummary.mjs";
7
7
  export * from "./FeedbackEnabled.mjs";
8
8
  export * from "./ListDomainsResponse.mjs";
9
9
  export * from "./RecordStatus.mjs";
@@ -0,0 +1,10 @@
1
+ import type * as AgentMail from "../../../../api/index.mjs";
2
+ import * as core from "../../../../core/index.mjs";
3
+ import type * as serializers from "../../../index.mjs";
4
+ import { DisplayName } from "./DisplayName.mjs";
5
+ export declare const UpdateInboxRequest: core.serialization.ObjectSchema<serializers.inboxes.UpdateInboxRequest.Raw, AgentMail.inboxes.UpdateInboxRequest>;
6
+ export declare namespace UpdateInboxRequest {
7
+ interface Raw {
8
+ display_name: DisplayName.Raw;
9
+ }
10
+ }
@@ -0,0 +1,6 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as core from "../../../../core/index.mjs";
3
+ import { DisplayName } from "./DisplayName.mjs";
4
+ export const UpdateInboxRequest = core.serialization.object({
5
+ displayName: core.serialization.property("display_name", DisplayName),
6
+ });
@@ -4,3 +4,4 @@ export * from "./DisplayName.mjs";
4
4
  export * from "./Inbox.mjs";
5
5
  export * from "./InboxId.mjs";
6
6
  export * from "./ListInboxesResponse.mjs";
7
+ export * from "./UpdateInboxRequest.mjs";
@@ -4,3 +4,4 @@ export * from "./DisplayName.mjs";
4
4
  export * from "./Inbox.mjs";
5
5
  export * from "./InboxId.mjs";
6
6
  export * from "./ListInboxesResponse.mjs";
7
+ export * from "./UpdateInboxRequest.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.1.3";
1
+ export declare const SDK_VERSION = "0.1.5";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.1.3";
1
+ export const SDK_VERSION = "0.1.5";
@@ -130,7 +130,7 @@ AgentMail is an API-first email provider that is designed for agents. Think of i
130
130
  </Step>
131
131
  </Steps>
132
132
 
133
- Our customers use AgentMail for agent identity, authentication, and communication. To get started reach out to [contact@agentmail.cc](mailto:contact@agentmail.cc) for API keys and [support@agentmail.cc](mailto:support@agentmail.cc) for help.
133
+ Our customers use AgentMail for agent identity, authentication, and communication. To get started make an account on our [console](https://console.agentmail.to) and please email [support@agentmail.cc](mailto:support@agentmail.cc) if you run into any issues.
134
134
 
135
135
  <iframe width="560" height="315" src="https://www.youtube.com/embed/1V7BISeFUTM?si=4asiGnuV4O81nu5B" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen />
136
136
 
@@ -171,7 +171,7 @@ This guide will walk you through installing the AgentMail SDK, authenticating wi
171
171
  <Step title="Create an API Key">
172
172
  Now that you're in the console, you'll need to create an API key to
173
173
  authenticate your requests. Navigate to the API Keys section in your console
174
- dashboard. ![API Key Creation Screenshot](file:647e2f44-c63a-47a2-81eb-027d0d36aea4) Click
174
+ dashboard. ![API Key Creation Screenshot](file:70efc386-e5f7-4897-a497-515e32142b26) Click
175
175
  "Create New API Key" and give it a descriptive name. Once created, copy the
176
176
  API key and store it securely. Create a `.env` file in your project's root
177
177
  directory and add your key to it. We recommend using environment variables to
@@ -312,7 +312,7 @@ Unlike traditional email providers that are designed for human scale, AgentMail
312
312
 
313
313
  As the diagram below illustrates, your `organization` is the top-level container that holds all your resources. You can provision many `Inboxes` within your `organization`, each with its own `Threads`, `Messages`, and `Attachments`, allowing you to manage a large fleet of agents seamlessly.
314
314
 
315
- <img src="file:e05c208a-738a-412f-a0e6-ee36b45d1c58" alt="AgentMail Organizational Hierarchy" />
315
+ <img src="file:2d3ffce3-a340-42d2-9a67-f0be52f7500d" alt="AgentMail Organizational Hierarchy" />
316
316
 
317
317
  <Steps>
318
318
  <Step title="Organization">
@@ -732,7 +732,7 @@ Here is an example of a well-structured and styled HTML header:
732
732
  </CodeBlocks>
733
733
 
734
734
  <Frame caption="Look how pretty this message looks!">
735
- <img src="file:5048f406-a627-4265-b0af-dd051584c954" alt="rendered css" />
735
+ <img src="file:42af328f-ce02-484c-a5b5-1566ac786ee2" alt="rendered css" />
736
736
  </Frame>
737
737
 
738
738
  ## Receiving `Messages`
@@ -1759,7 +1759,7 @@ Configuring your domain is a three-step process: add the domain via API, copy th
1759
1759
  After creating your domain in the AgentMail Console, click the "Download BIND Zone File" button to get the complete zone file.
1760
1760
 
1761
1761
  <Frame caption="Downloading BIND zone file from AgentMail Console">
1762
- <img src="file:cdea45d4-68bf-4ba0-b5ca-335bf648cdcc" alt="Download BIND Zone File from Console" />
1762
+ <img src="file:b3ff2a02-c596-4554-be3d-1e54811dfa55" alt="Download BIND Zone File from Console" />
1763
1763
  </Frame>
1764
1764
 
1765
1765
  <Tabs>
@@ -1770,13 +1770,13 @@ Configuring your domain is a three-step process: add the domain via API, copy th
1770
1770
  2. Click **"Import zone file"** in the top right corner
1771
1771
 
1772
1772
  <Frame caption="Importing BIND zone file in AWS Route 53">
1773
- <img src="file:2a2170c9-a1ca-42df-9ae7-2f8be2b5786a" alt="AWS Route 53 BIND Import" />
1773
+ <img src="file:e7101e7a-5590-4fe1-b1d4-733c24ec310f" alt="AWS Route 53 BIND Import" />
1774
1774
  </Frame>
1775
1775
 
1776
1776
  3. Paste the CONTENTS of downloaded BIND zone file
1777
1777
 
1778
1778
  <Frame caption="Open the file with text editor and paste the contents. It should look similar to what we have in this image.">
1779
- <img src="file:a45bcc2c-6233-4810-b421-f05ff7d1d9e2" alt="AWS Route 53 BIND Import" />
1779
+ <img src="file:fe2e9d0f-f350-479c-b634-5477599d3053" alt="AWS Route 53 BIND Import" />
1780
1780
  </Frame>
1781
1781
 
1782
1782
  4. Review the records and click **"Import"**
@@ -1789,13 +1789,13 @@ Configuring your domain is a three-step process: add the domain via API, copy th
1789
1789
  2. Navigate to **DNS > Records**
1790
1790
 
1791
1791
  <Frame caption="This is what the page looks like">
1792
- <img src="file:188c4275-664e-4191-938b-cfd43be0b5af" alt="Cloudflare BIND Import" />
1792
+ <img src="file:b8cfed63-5fea-420f-ac7f-9731a80e840d" alt="Cloudflare BIND Import" />
1793
1793
  </Frame>
1794
1794
 
1795
1795
  3. Click **"Import and Export"**
1796
1796
 
1797
1797
  <Frame caption="You should be able to just drop the file in">
1798
- <img src="file:24aa7c24-9fec-4270-94d6-53216596f05b" alt="Cloudflare BIND Import" />
1798
+ <img src="file:d8762904-358d-432e-99cf-4e4b4763fed5" alt="Cloudflare BIND Import" />
1799
1799
  </Frame>
1800
1800
 
1801
1801
  4. Upload the downloaded BIND zone file as is
@@ -1808,13 +1808,13 @@ Configuring your domain is a three-step process: add the domain via API, copy th
1808
1808
  2. Navigate to the **DNS** subtab of the domain you want to send from
1809
1809
 
1810
1810
  <Frame caption="Click on this button!">
1811
- <img src="file:60fc16e7-57d3-4836-926a-ad412278e979" alt="Porkbun DNS Management" />
1811
+ <img src="file:58e638a2-7862-451e-9c69-2705ad1f6022" alt="Porkbun DNS Management" />
1812
1812
  </Frame>
1813
1813
 
1814
1814
  3. Scroll down to the quick upload section
1815
1815
 
1816
1816
  <Frame caption="Upload your BIND zone file here">
1817
- <img src="file:fa0d13d1-d8d2-4c7c-a772-ff1a9f5defe8" alt="Porkbun Zone File Import" />
1817
+ <img src="file:a33096b6-9f1c-40f0-9e3d-71c7aa850d30" alt="Porkbun Zone File Import" />
1818
1818
  </Frame>
1819
1819
 
1820
1820
  4. Upload the downloaded BIND zone file as is
@@ -1898,7 +1898,7 @@ Configuring your domain is a three-step process: add the domain via API, copy th
1898
1898
  * **Value:** Can directly copy paste the `value` from the API response (e.g., `{random_letters_numbers}.dkim.amazonses.com`).
1899
1899
 
1900
1900
  <Frame caption="Example of adding a CNAME record in Route 53. Notice that AWS already appends the root domain (agentmail.cc) to the end of the name value!">
1901
- <img src="file:7b5a4349-f189-48b4-b76b-57acdc3adda9" alt="AWS Route 53 Record Configuration" />
1901
+ <img src="file:b6048450-c831-4d87-96bf-7f62d837ef90" alt="AWS Route 53 Record Configuration" />
1902
1902
  </Frame>
1903
1903
 
1904
1904
  * **TXT (DMARC/SPF):**
@@ -2434,13 +2434,13 @@ Ngrok creates a secure tunnel from a public URL to your local development server
2434
2434
 
2435
2435
  Visit [ngrok.com](https://ngrok.com/) and click "Sign up" to create a free account.
2436
2436
 
2437
- <img src="file:4bc85b25-98e4-47b6-8634-b10c99126a74" alt="Ngrok homepage" />
2437
+ <img src="file:2b9efd50-bc45-4c1d-be5d-0a0e2451fc05" alt="Ngrok homepage" />
2438
2438
 
2439
2439
  ### 1.2 Choose your platform and install
2440
2440
 
2441
2441
  After logging in, ngrok will guide you through the setup process. Select your operating system and follow the installation instructions.
2442
2442
 
2443
- <img src="file:694649d0-b6ed-4078-ade0-57160c1df709" alt="Ngrok setup instructions" />
2443
+ <img src="file:53878264-f22e-45d0-b6e5-3deace921b2d" alt="Ngrok setup instructions" />
2444
2444
 
2445
2445
  For macOS, you can install ngrok via Homebrew:
2446
2446
 
@@ -2486,7 +2486,7 @@ ngrok http 3000
2486
2486
 
2487
2487
  You should see output similar to this:
2488
2488
 
2489
- <img src="file:18d605b1-a8f1-4680-adc0-f67da20a0e09" alt="Ngrok terminal output" />
2489
+ <img src="file:da7bae5a-8b4d-4657-9da6-ffe312457580" alt="Ngrok terminal output" />
2490
2490
 
2491
2491
  Copy the **Forwarding URL** (e.g., `https://your-subdomain.ngrok-free.app`). This is the public URL that AgentMail will use to send webhooks.
2492
2492
 
@@ -2583,7 +2583,7 @@ python webhook_receiver.py
2583
2583
 
2584
2584
  Open your browser and visit `http://127.0.0.1:3000` to see the status page confirming your webhook receiver is running:
2585
2585
 
2586
- <img src="file:e1bdd83f-8e7f-48b0-836e-4488e36a5fae" alt="Webhook receiver status page" />
2586
+ <img src="file:a246e89b-1dc2-4f91-b1b7-ebe6527efb10" alt="Webhook receiver status page" />
2587
2587
 
2588
2588
  ## Testing Your Setup
2589
2589
 
@@ -2705,7 +2705,7 @@ How you send your emails is just as important as what you send. If you're sendin
2705
2705
  more natural to email providers. AgentMail's ability to create inboxes at
2706
2706
  scale makes this strategy easy to implement.
2707
2707
 
2708
- <img src="file:8daee71e-d560-475e-a2f6-6ba191425a0a" alt="Diagram comparing one inbox sending 1000 emails vs. five inboxes sending 200 each." />
2708
+ <img src="file:1c500820-48d4-480b-8df5-7f6b0c12fc34" alt="Diagram comparing one inbox sending 1000 emails vs. five inboxes sending 200 each." />
2709
2709
  </Step>
2710
2710
 
2711
2711
  <Step title="Protect Your Reputation with Multiple Domains">
@@ -2825,7 +2825,7 @@ We will use Flask to create a simple web server and `ngrok` to expose it to the
2825
2825
  Before you start, make sure you have the following:
2826
2826
 
2827
2827
  * Python 3.8+
2828
- * An [AgentMail API Key](mailto:contact@agentmail.to).
2828
+ * An [AgentMail API Key](https://console.agentmail.to/dashboard/api-keys).
2829
2829
  * An [OpenAI account](https://openai.com/) and API key.
2830
2830
  * An [ngrok account](https://ngrok.com/) and authtoken.
2831
2831
 
@@ -2898,15 +2898,15 @@ Create a file named `main.py` and add the full code example you provided. This s
2898
2898
 
2899
2899
  target_github_repo = os.getenv("TARGET_GITHUB_REPO")
2900
2900
  if not target_github_repo:
2901
- print("\nWARNING: The TARGET_GITHUB_REPO environment variable is not set.")
2902
- print("The agent will not have a specific GitHub repository to focus on.")
2903
- print("Please set it in your .env file (e.g., TARGET_GITHUB_REPO='owner/repository_name')\n")
2901
+ print("\nWARNING: The TARGET_GITHUB_REPO environment variable is not set.")
2902
+ print("The agent will not have a specific GitHub repository to focus on.")
2903
+ print("Please set it in your .env file (e.g., TARGET_GITHUB_REPO='owner/repository_name')\n")
2904
2904
 
2905
2905
  demo_target_email = os.getenv("DEMO_TARGET_EMAIL")
2906
2906
  if not demo_target_email:
2907
- print("\nWARNING: The DEMO_TARGET_EMAIL environment variable is not set.")
2908
- print("The agent will not have a specific email to send the 'top starrer' outreach to.")
2909
- print("Please set it in your .env file (e.g., DEMO_TARGET_EMAIL='your.email@example.com')\n")
2907
+ print("\nWARNING: The DEMO_TARGET_EMAIL environment variable is not set.")
2908
+ print("The agent will not have a specific email to send the 'top starrer' outreach to.")
2909
+ print("Please set it in your .env file (e.g., DEMO_TARGET_EMAIL='your.email@example.com')\n")
2910
2910
 
2911
2911
  # Determine the target email, with a fallback if the environment variable is not set.
2912
2912
 
@@ -2933,13 +2933,13 @@ Create a file named `main.py` and add the full code example you provided. This s
2933
2933
  inbox_client_id = f"inbox-for-{inbox_username}"
2934
2934
  print(f"Attempting to create or retrieve inbox '{inbox}' with client_id: {inbox_client_id}")
2935
2935
  try:
2936
- client.inboxes.create(
2937
- username=inbox_username,
2938
- client_id=inbox_client_id
2939
- )
2940
- print("Inbox creation/retrieval successful.")
2936
+ client.inboxes.create(
2937
+ username=inbox_username,
2938
+ client_id=inbox_client_id
2939
+ )
2940
+ print("Inbox creation/retrieval successful.")
2941
2941
  except Exception as e:
2942
- print(f"Error creating/retrieving inbox: {e}") # Depending on the desired behavior, you might want to exit here # if the inbox is critical for the agent's function.
2942
+ print(f"Error creating/retrieving inbox: {e}") # Depending on the desired behavior, you might want to exit here # if the inbox is critical for the agent's function.
2943
2943
 
2944
2944
  # 3. Start the ngrok tunnel to get a public URL
2945
2945
 
@@ -2953,13 +2953,13 @@ Create a file named `main.py` and add the full code example you provided. This s
2953
2953
  webhook_client_id = f"webhook-for-{inbox_username}"
2954
2954
  print(f"Attempting to create or retrieve webhook for URL: {webhook_url}")
2955
2955
  try:
2956
- client.webhooks.create(
2957
- url=webhook_url,
2958
- client_id=webhook_client_id,
2959
- )
2960
- print("Webhook creation/retrieval successful.")
2956
+ client.webhooks.create(
2957
+ url=webhook_url,
2958
+ client_id=webhook_client_id,
2959
+ )
2960
+ print("Webhook creation/retrieval successful.")
2961
2961
  except Exception as e:
2962
- print(f"Error creating/retrieving webhook: {e}")
2962
+ print(f"Error creating/retrieving webhook: {e}")
2963
2963
 
2964
2964
  # 5. Initialize the Flask App
2965
2965
 
@@ -3015,9 +3015,9 @@ Create a file named `main.py` and add the full code example you provided. This s
3015
3015
  """
3016
3016
 
3017
3017
  agent = Agent(
3018
- name="GitHub Agent",
3019
- instructions=instructions,
3020
- tools=AgentMailToolkit(client).get_tools() + [WebSearchTool()],
3018
+ name="GitHub Agent",
3019
+ instructions=instructions,
3020
+ tools=AgentMailToolkit(client).get_tools() + [WebSearchTool()],
3021
3021
  )
3022
3022
 
3023
3023
  messages = []
@@ -3029,8 +3029,8 @@ Create a file named `main.py` and add the full code example you provided. This s
3029
3029
  stars_found_so_far = 0
3030
3030
 
3031
3031
  def poll_github_stargazers():
3032
- global simulated_stargazer_count, stars_found_so_far
3033
- print(f"GitHub polling thread started for top 20 repositories related to AI agents...")
3032
+ global simulated_stargazer_count, stars_found_so_far
3033
+ print(f"GitHub polling thread started for top 20 repositories related to AI agents...")
3034
3034
 
3035
3035
  # Give the Flask app a moment to start up if run concurrently
3036
3036
  time.sleep(3)
@@ -3104,12 +3104,12 @@ Create a file named `main.py` and add the full code example you provided. This s
3104
3104
 
3105
3105
  @app.route("/webhooks", methods=["POST"])
3106
3106
  def receive_webhook():
3107
- print(f"\n[/webhooks] Received webhook. Payload keys: {list(request.json.keys()) if request.is_json else 'Not JSON or empty'}")
3108
- Thread(target=process_webhook, args=(request.json,)).start()
3109
- return Response(status=200)
3107
+ print(f"\n[/webhooks] Received webhook. Payload keys: {list(request.json.keys()) if request.is_json else 'Not JSON or empty'}")
3108
+ Thread(target=process_webhook, args=(request.json,)).start()
3109
+ return Response(status=200)
3110
3110
 
3111
3111
  def process_webhook(payload):
3112
- global messages
3112
+ global messages
3113
3113
 
3114
3114
  email = payload["message"]
3115
3115
  print(f"[process_webhook] Processing email from: {email.get('from')}, subject: {email.get('subject')}, id: {email.get('message_id')}")
@@ -3131,12 +3131,12 @@ Create a file named `main.py` and add the full code example you provided. This s
3131
3131
  messages = response.to_input_list()
3132
3132
  print(f"[process_webhook] Updated message history. New length: {len(messages)}\n")
3133
3133
 
3134
- if __name__ == "__main__":
3135
- print(f"Inbox: {inbox}\n")
3136
- if not target_github_repo or target_github_repo == "example/repo":
3137
- print("WARNING: TARGET_GITHUB_REPO not set or is default. Poller will not be effective.")
3138
- if not demo_target_email:
3139
- print("WARNING: DEMO_TARGET_EMAIL not set or is default. Poller will not be effective.")
3134
+ if **name** == "**main**":
3135
+ print(f"Inbox: {inbox}\n")
3136
+ if not target_github_repo or target_github_repo == "example/repo":
3137
+ print("WARNING: TARGET_GITHUB_REPO not set or is default. Poller will not be effective.")
3138
+ if not demo_target_email:
3139
+ print("WARNING: DEMO_TARGET_EMAIL not set or is default. Poller will not be effective.")
3140
3140
 
3141
3141
  polling_thread = Thread(target=poll_github_stargazers)
3142
3142
  polling_thread.daemon = True # So it exits when the main thread exits
@@ -4705,7 +4705,7 @@ Done
4705
4705
 
4706
4706
  Go to your AgentMail inbox and filter by labels to organize your emails:
4707
4707
 
4708
- <img src="file:6467fddc-96b2-4aa9-b2fe-5e16fba7af9e" alt="Test image" />
4708
+ <img src="file:879ff90e-9416-4b31-a009-2054c03d170d" alt="Test image" />
4709
4709
 
4710
4710
  **Filter by sentiment:**
4711
4711
 
@@ -4899,7 +4899,7 @@ Ready to build your own intelligent email agent? Check out our [quickstart guide
4899
4899
  <Callout title="Premium Support for Customers" intent="info" icon="fa-brands fa-slack">
4900
4900
  For purchasing customers, we offer dedicated support channels to ensure your success. Get priority assistance, custom integration help, and a private Slack channel with our core engineering team.
4901
4901
 
4902
- To learn more about our premium plans and dedicated support options, please email us at [contact@agentmail.to](mailto:contact@agentmail.to).
4902
+ To learn more about our premium plans and dedicated support options, please visit our website [here](https://agentmail.to/pricing).
4903
4903
  </Callout>
4904
4904
 
4905
4905
 
@@ -5678,6 +5678,242 @@ let dataTask = session.dataTask(with: request as URLRequest, completionHandler:
5678
5678
  dataTask.resume()
5679
5679
  ```
5680
5680
 
5681
+ # Update Inbox
5682
+
5683
+ PATCH https://api.agentmail.to/v0/inboxes/{inbox_id}
5684
+ Content-Type: application/json
5685
+
5686
+ Reference: https://docs.agentmail.to/api-reference/inboxes/update
5687
+
5688
+ ## OpenAPI Specification
5689
+
5690
+ ```yaml
5691
+ openapi: 3.1.1
5692
+ info:
5693
+ title: Update Inbox
5694
+ version: endpoint_inboxes.update
5695
+ paths:
5696
+ /v0/inboxes/{inbox_id}:
5697
+ patch:
5698
+ operationId: update
5699
+ summary: Update Inbox
5700
+ tags:
5701
+ - - subpackage_inboxes
5702
+ parameters:
5703
+ - name: inbox_id
5704
+ in: path
5705
+ required: true
5706
+ schema:
5707
+ $ref: '#/components/schemas/type_inboxes:InboxId'
5708
+ - name: Authorization
5709
+ in: header
5710
+ description: >-
5711
+ Bearer authentication of the form `Bearer <token>`, where token is
5712
+ your auth token.
5713
+ required: true
5714
+ schema:
5715
+ type: string
5716
+ responses:
5717
+ '200':
5718
+ description: Response with status 200
5719
+ content:
5720
+ application/json:
5721
+ schema:
5722
+ $ref: '#/components/schemas/type_inboxes:Inbox'
5723
+ '404':
5724
+ description: Error response with status 404
5725
+ content: {}
5726
+ requestBody:
5727
+ content:
5728
+ application/json:
5729
+ schema:
5730
+ $ref: '#/components/schemas/type_inboxes:UpdateInboxRequest'
5731
+ components:
5732
+ schemas:
5733
+ type_inboxes:InboxId:
5734
+ type: string
5735
+ type_inboxes:DisplayName:
5736
+ type: string
5737
+ type_inboxes:UpdateInboxRequest:
5738
+ type: object
5739
+ properties:
5740
+ display_name:
5741
+ $ref: '#/components/schemas/type_inboxes:DisplayName'
5742
+ required:
5743
+ - display_name
5744
+ type_inboxes:ClientId:
5745
+ type: string
5746
+ type_inboxes:Inbox:
5747
+ type: object
5748
+ properties:
5749
+ inbox_id:
5750
+ $ref: '#/components/schemas/type_inboxes:InboxId'
5751
+ display_name:
5752
+ $ref: '#/components/schemas/type_inboxes:DisplayName'
5753
+ client_id:
5754
+ $ref: '#/components/schemas/type_inboxes:ClientId'
5755
+ updated_at:
5756
+ type: string
5757
+ format: date-time
5758
+ created_at:
5759
+ type: string
5760
+ format: date-time
5761
+ required:
5762
+ - inbox_id
5763
+ - updated_at
5764
+ - created_at
5765
+
5766
+ ```
5767
+
5768
+ ## SDK Code Examples
5769
+
5770
+ ```typescript
5771
+ import { AgentMailClient } from "agentmail";
5772
+
5773
+ async function main() {
5774
+ const client = new AgentMailClient({
5775
+ environment: "https://api.agentmail.to",
5776
+ apiKey: "YOUR_TOKEN_HERE",
5777
+ });
5778
+ await client.inboxes.update("inbox_id", {
5779
+ displayName: "display_name",
5780
+ });
5781
+ }
5782
+ main();
5783
+
5784
+ ```
5785
+
5786
+ ```python
5787
+ from agentmail import AgentMail
5788
+
5789
+ client = AgentMail(
5790
+ base_url="https://api.agentmail.to",
5791
+ api_key="YOUR_TOKEN_HERE"
5792
+ )
5793
+
5794
+ client.inboxes.update(
5795
+ inbox_id="inbox_id",
5796
+ display_name="display_name"
5797
+ )
5798
+
5799
+ ```
5800
+
5801
+ ```go
5802
+ package main
5803
+
5804
+ import (
5805
+ "fmt"
5806
+ "strings"
5807
+ "net/http"
5808
+ "io"
5809
+ )
5810
+
5811
+ func main() {
5812
+
5813
+ url := "https://api.agentmail.to/v0/inboxes/inbox_id"
5814
+
5815
+ payload := strings.NewReader("{\n \"display_name\": \"display_name\"\n}")
5816
+
5817
+ req, _ := http.NewRequest("PATCH", url, payload)
5818
+
5819
+ req.Header.Add("Authorization", "Bearer <api_key>")
5820
+ req.Header.Add("Content-Type", "application/json")
5821
+
5822
+ res, _ := http.DefaultClient.Do(req)
5823
+
5824
+ defer res.Body.Close()
5825
+ body, _ := io.ReadAll(res.Body)
5826
+
5827
+ fmt.Println(res)
5828
+ fmt.Println(string(body))
5829
+
5830
+ }
5831
+ ```
5832
+
5833
+ ```ruby
5834
+ require 'uri'
5835
+ require 'net/http'
5836
+
5837
+ url = URI("https://api.agentmail.to/v0/inboxes/inbox_id")
5838
+
5839
+ http = Net::HTTP.new(url.host, url.port)
5840
+ http.use_ssl = true
5841
+
5842
+ request = Net::HTTP::Patch.new(url)
5843
+ request["Authorization"] = 'Bearer <api_key>'
5844
+ request["Content-Type"] = 'application/json'
5845
+ request.body = "{\n \"display_name\": \"display_name\"\n}"
5846
+
5847
+ response = http.request(request)
5848
+ puts response.read_body
5849
+ ```
5850
+
5851
+ ```java
5852
+ HttpResponse<String> response = Unirest.patch("https://api.agentmail.to/v0/inboxes/inbox_id")
5853
+ .header("Authorization", "Bearer <api_key>")
5854
+ .header("Content-Type", "application/json")
5855
+ .body("{\n \"display_name\": \"display_name\"\n}")
5856
+ .asString();
5857
+ ```
5858
+
5859
+ ```php
5860
+ <?php
5861
+
5862
+ $client = new \GuzzleHttp\Client();
5863
+
5864
+ $response = $client->request('PATCH', 'https://api.agentmail.to/v0/inboxes/inbox_id', [
5865
+ 'body' => '{
5866
+ "display_name": "display_name"
5867
+ }',
5868
+ 'headers' => [
5869
+ 'Authorization' => 'Bearer <api_key>',
5870
+ 'Content-Type' => 'application/json',
5871
+ ],
5872
+ ]);
5873
+
5874
+ echo $response->getBody();
5875
+ ```
5876
+
5877
+ ```csharp
5878
+ var client = new RestClient("https://api.agentmail.to/v0/inboxes/inbox_id");
5879
+ var request = new RestRequest(Method.PATCH);
5880
+ request.AddHeader("Authorization", "Bearer <api_key>");
5881
+ request.AddHeader("Content-Type", "application/json");
5882
+ request.AddParameter("application/json", "{\n \"display_name\": \"display_name\"\n}", ParameterType.RequestBody);
5883
+ IRestResponse response = client.Execute(request);
5884
+ ```
5885
+
5886
+ ```swift
5887
+ import Foundation
5888
+
5889
+ let headers = [
5890
+ "Authorization": "Bearer <api_key>",
5891
+ "Content-Type": "application/json"
5892
+ ]
5893
+ let parameters = ["display_name": "display_name"] as [String : Any]
5894
+
5895
+ let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
5896
+
5897
+ let request = NSMutableURLRequest(url: NSURL(string: "https://api.agentmail.to/v0/inboxes/inbox_id")! as URL,
5898
+ cachePolicy: .useProtocolCachePolicy,
5899
+ timeoutInterval: 10.0)
5900
+ request.httpMethod = "PATCH"
5901
+ request.allHTTPHeaderFields = headers
5902
+ request.httpBody = postData as Data
5903
+
5904
+ let session = URLSession.shared
5905
+ let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
5906
+ if (error != nil) {
5907
+ print(error as Any)
5908
+ } else {
5909
+ let httpResponse = response as? HTTPURLResponse
5910
+ print(httpResponse)
5911
+ }
5912
+ })
5913
+
5914
+ dataTask.resume()
5915
+ ```
5916
+
5681
5917
  # Delete Inbox
5682
5918
 
5683
5919
  DELETE https://api.agentmail.to/v0/inboxes/{inbox_id}
@@ -12694,7 +12930,7 @@ components:
12694
12930
  type: boolean
12695
12931
  type_domains:ClientId:
12696
12932
  type: string
12697
- type_domains:DomainSummary:
12933
+ type_domains:DomainItem:
12698
12934
  type: object
12699
12935
  properties:
12700
12936
  domain_id:
@@ -12719,12 +12955,14 @@ components:
12719
12955
  properties:
12720
12956
  count:
12721
12957
  $ref: '#/components/schemas/type_:Count'
12958
+ limit:
12959
+ $ref: '#/components/schemas/type_:Limit'
12722
12960
  next_page_token:
12723
12961
  $ref: '#/components/schemas/type_:PageToken'
12724
12962
  domains:
12725
12963
  type: array
12726
12964
  items:
12727
- $ref: '#/components/schemas/type_domains:DomainSummary'
12965
+ $ref: '#/components/schemas/type_domains:DomainItem'
12728
12966
  required:
12729
12967
  - count
12730
12968
  - domains
@@ -20457,7 +20695,7 @@ components:
20457
20695
  type: boolean
20458
20696
  type_domains:ClientId:
20459
20697
  type: string
20460
- type_domains:DomainSummary:
20698
+ type_domains:DomainItem:
20461
20699
  type: object
20462
20700
  properties:
20463
20701
  domain_id:
@@ -20482,12 +20720,14 @@ components:
20482
20720
  properties:
20483
20721
  count:
20484
20722
  $ref: '#/components/schemas/type_:Count'
20723
+ limit:
20724
+ $ref: '#/components/schemas/type_:Limit'
20485
20725
  next_page_token:
20486
20726
  $ref: '#/components/schemas/type_:PageToken'
20487
20727
  domains:
20488
20728
  type: array
20489
20729
  items:
20490
- $ref: '#/components/schemas/type_domains:DomainSummary'
20730
+ $ref: '#/components/schemas/type_domains:DomainItem'
20491
20731
  required:
20492
20732
  - count
20493
20733
  - domains
package/dist/llms.txt CHANGED
@@ -38,6 +38,7 @@
38
38
  - API Reference > Inboxes [List Inboxes](https://docs.agentmail.to/api-reference/inboxes/list.mdx)
39
39
  - API Reference > Inboxes [Get Inbox](https://docs.agentmail.to/api-reference/inboxes/get.mdx)
40
40
  - API Reference > Inboxes [Create Inbox](https://docs.agentmail.to/api-reference/inboxes/create.mdx)
41
+ - API Reference > Inboxes [Update Inbox](https://docs.agentmail.to/api-reference/inboxes/update.mdx)
41
42
  - API Reference > Inboxes [Delete Inbox](https://docs.agentmail.to/api-reference/inboxes/delete.mdx)
42
43
  - API Reference > Inboxes > Threads [List Threads](https://docs.agentmail.to/api-reference/inboxes/threads/list.mdx)
43
44
  - API Reference > Inboxes > Threads [Get Thread](https://docs.agentmail.to/api-reference/inboxes/threads/get.mdx)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentmail",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "private": false,
5
5
  "repository": "github:agentmail-to/agentmail-node",
6
6
  "type": "commonjs",