API Webhook

通过 webhook 接收来自 myumbrella.ai 的实时事件通知。

Webhook

当 myumbrella.ai 中发生事件时,Webhook 会实时通知您的应用程序,例如提交新理赔或激活合同。

设置 Webhook

  1. 前往设置 → Webhook → 添加端点
  2. 输入您的端点 URL(必须为 HTTPS)
  3. 选择您希望接收的事件
  4. 保存并复制签名密钥

事件类型

事件触发条件
contract.created新保修合同已激活
contract.cancelled合同已取消或退款
claim.submitted新理赔已提交
claim.approved理赔已批准进行处理
claim.denied理赔被拒绝
claim.resolved理赔处理已完成
plan.updated保修计划配置已更改

载荷格式

{
  "id": "evt_abc123",
  "type": "claim.submitted",
  "created_at": "2025-01-15T10:30:00Z",
  "data": {
    "claim_id": "clm_xyz789",
    "contract_id": "ctr_def456",
    "customer_email": "jane@example.com",
    "issue_type": "accidental_damage",
    "amount": 299.99
  }
}

验证签名

每个 webhook 都包含一个 X-Umbrella-Signature 头。验证它以确保真实性:

const crypto = require('crypto');

function verifyWebhook(payload, signature, secret) {
  const expected = crypto
    .createHmac('sha256', secret)
    .update(payload)
    .digest('hex');
  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from(expected)
  );
}

重试策略

失败的投递(非 2xx 响应)将以指数退避方式重试最多 5 次:1 分钟、5 分钟、30 分钟、2 小时、24 小时。

Book a Demo

See how myUmbrella can transform your warranty program

Choose a Time

Select a convenient time for your personalized demo

ESC

Start typing to search across all content

No results found

Try a different search term