@@ -95,6 +95,61 @@ def get(self, webhook_id: WebhookId, *, request_options: typing.Optional[Request
9595 _response = self ._raw_client .get (webhook_id , request_options = request_options )
9696 return _response .data
9797
98+ def update (
99+ self ,
100+ webhook_id : WebhookId ,
101+ * ,
102+ add_inbox_ids : typing .Optional [InboxIds ] = OMIT ,
103+ remove_inbox_ids : typing .Optional [InboxIds ] = OMIT ,
104+ add_pod_ids : typing .Optional [PodIds ] = OMIT ,
105+ remove_pod_ids : typing .Optional [PodIds ] = OMIT ,
106+ request_options : typing .Optional [RequestOptions ] = None ,
107+ ) -> Webhook :
108+ """
109+ Parameters
110+ ----------
111+ webhook_id : WebhookId
112+
113+ add_inbox_ids : typing.Optional[InboxIds]
114+ Inbox IDs to subscribe to the webhook.
115+
116+ remove_inbox_ids : typing.Optional[InboxIds]
117+ Inbox IDs to unsubscribe from the webhook.
118+
119+ add_pod_ids : typing.Optional[PodIds]
120+ Pod IDs to subscribe to the webhook.
121+
122+ remove_pod_ids : typing.Optional[PodIds]
123+ Pod IDs to unsubscribe from the webhook.
124+
125+ request_options : typing.Optional[RequestOptions]
126+ Request-specific configuration.
127+
128+ Returns
129+ -------
130+ Webhook
131+
132+ Examples
133+ --------
134+ from agentmail import AgentMail
135+
136+ client = AgentMail(
137+ api_key="YOUR_API_KEY",
138+ )
139+ client.webhooks.update(
140+ webhook_id="webhook_id",
141+ )
142+ """
143+ _response = self ._raw_client .update (
144+ webhook_id ,
145+ add_inbox_ids = add_inbox_ids ,
146+ remove_inbox_ids = remove_inbox_ids ,
147+ add_pod_ids = add_pod_ids ,
148+ remove_pod_ids = remove_pod_ids ,
149+ request_options = request_options ,
150+ )
151+ return _response .data
152+
98153 def create (
99154 self ,
100155 * ,
@@ -266,6 +321,69 @@ async def main() -> None:
266321 _response = await self ._raw_client .get (webhook_id , request_options = request_options )
267322 return _response .data
268323
324+ async def update (
325+ self ,
326+ webhook_id : WebhookId ,
327+ * ,
328+ add_inbox_ids : typing .Optional [InboxIds ] = OMIT ,
329+ remove_inbox_ids : typing .Optional [InboxIds ] = OMIT ,
330+ add_pod_ids : typing .Optional [PodIds ] = OMIT ,
331+ remove_pod_ids : typing .Optional [PodIds ] = OMIT ,
332+ request_options : typing .Optional [RequestOptions ] = None ,
333+ ) -> Webhook :
334+ """
335+ Parameters
336+ ----------
337+ webhook_id : WebhookId
338+
339+ add_inbox_ids : typing.Optional[InboxIds]
340+ Inbox IDs to subscribe to the webhook.
341+
342+ remove_inbox_ids : typing.Optional[InboxIds]
343+ Inbox IDs to unsubscribe from the webhook.
344+
345+ add_pod_ids : typing.Optional[PodIds]
346+ Pod IDs to subscribe to the webhook.
347+
348+ remove_pod_ids : typing.Optional[PodIds]
349+ Pod IDs to unsubscribe from the webhook.
350+
351+ request_options : typing.Optional[RequestOptions]
352+ Request-specific configuration.
353+
354+ Returns
355+ -------
356+ Webhook
357+
358+ Examples
359+ --------
360+ import asyncio
361+
362+ from agentmail import AsyncAgentMail
363+
364+ client = AsyncAgentMail(
365+ api_key="YOUR_API_KEY",
366+ )
367+
368+
369+ async def main() -> None:
370+ await client.webhooks.update(
371+ webhook_id="webhook_id",
372+ )
373+
374+
375+ asyncio.run(main())
376+ """
377+ _response = await self ._raw_client .update (
378+ webhook_id ,
379+ add_inbox_ids = add_inbox_ids ,
380+ remove_inbox_ids = remove_inbox_ids ,
381+ add_pod_ids = add_pod_ids ,
382+ remove_pod_ids = remove_pod_ids ,
383+ request_options = request_options ,
384+ )
385+ return _response .data
386+
269387 async def create (
270388 self ,
271389 * ,
0 commit comments