Create Webhook
**CLI:**
```bash
agentmail webhooks create --url https://example.com/webhook --event-type message.received
```
Authentication
AuthorizationBearer
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
This endpoint expects an object.
url
URL of webhook endpoint.
event_types
Full list of event types this webhook should receive. At least one type is required. Send every type you want in this array (not incremental). See Webhooks overview for spam, blocked, and unauthenticated events and required permissions.
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.
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
