pub struct Webhook {
pub id: WebhookId,
pub description: Option<String>,
pub trigger_types: Vec<WebhookTrigger>,
pub webhook_url: String,
pub webhook_secret: Option<String>,
pub notification_email_addresses: Vec<String>,
pub privacy_mode: Option<PrivacyMode>,
}Expand description
A webhook configuration.
Webhooks send HTTP POST requests to your specified callback URL when events occur.
§Example
let webhook = Webhook {
id: WebhookId::new("webhook_123"),
description: Some("Production webhook for message events".to_string()),
trigger_types: vec![WebhookTrigger::MessageCreated, WebhookTrigger::MessageUpdated],
webhook_url: "https://api.example.com/webhooks".to_string(),
webhook_secret: Some("secret_key_xyz".to_string()),
notification_email_addresses: vec!["admin@example.com".to_string()],
privacy_mode: None,
};Fields§
§id: WebhookIdUnique identifier for the webhook.
description: Option<String>Description of the webhook.
trigger_types: Vec<WebhookTrigger>List of trigger types this webhook listens for.
webhook_url: StringURL where webhook notifications will be sent.
webhook_secret: Option<String>Secret key for webhook signature verification.
notification_email_addresses: Vec<String>Email addresses to notify when webhook fails.
privacy_mode: Option<PrivacyMode>Privacy mode settings (NEW in 2025)
When enabled, sensitive information is redacted from webhook payloads and server logs.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Webhook
impl<'de> Deserialize<'de> for Webhook
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Webhook
impl StructuralPartialEq for Webhook
Auto Trait Implementations§
impl Freeze for Webhook
impl RefUnwindSafe for Webhook
impl Send for Webhook
impl Sync for Webhook
impl Unpin for Webhook
impl UnsafeUnpin for Webhook
impl UnwindSafe for Webhook
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more