Update Webhook
**CLI:**
```bash
agentmail inboxes:webhooks update --inbox-id <inbox_id> --webhook-id <webhook_id> --event-type message.received
```
Authentication
AuthorizationBearer
Bearer authentication of the form Bearer <token>, where token is your auth token.
Path parameters
inbox_id
The ID of the inbox.
webhook_id
ID of webhook.
Request
This endpoint expects an object.
event_types
When you send a non-empty list, it replaces the webhook’s subscribed event types in full (the same
“set the list” behavior as create). It is not a merge or diff: include every event type you want after
the update. Sending a one-element array means the webhook will only receive that one type afterward.
Omit this field or send an empty array to leave event types unchanged. Clearing all types with an empty
list is not supported. Subscribing to message.received.spam, message.received.blocked, or
message.received.unauthenticated requires the matching label permission on the API key.
Response
This endpoint returns an object.
webhook_id
ID of webhook.
url
URL of webhook endpoint.
secret
Secret for webhook signature verification.
enabled
Webhook is enabled.
updated_at
Time at which webhook was last updated.
created_at
Time at which webhook was created.
event_types
Event types for which to send events.
pod_ids
Pods for which to send events. Maximum 10 per webhook.
inbox_ids
Inboxes for which to send events. Maximum 10 per webhook.
client_id
Client ID of webhook.
Errors
400
Validation Error
404
Not Found Error
