> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ycloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 联系人退订删除 Webhook 示例

> 处理联系人退订记录删除事件。

<Note>如需查看基于 Schema 生成的完整目录，请参阅[所有示例](/zh/api-reference/guides/examples/webhook-examples/webhook-payload-examples)。</Note>

## 功能介绍

处理联系人退订记录删除事件。

## 准备工作

* 在您的应用程序中创建一个公开的 HTTPS 端点。
* 为您所需的事件类型配置 YCloud Webhook 端点。
* 安全存储端点签名密钥。
* 确保事件处理具备幂等性。

## 工作原理

事件发生时，YCloud 会发送一个 HTTP `POST` 请求。验证签名，持久化记录该事件，返回 `2xx` 响应，并异步处理耗时任务。

## 请求

以下场景展示了发送至您的 Webhook URL 的请求。将事件 `id` 视为投递标识符，并使用 `type` 对负载进行路由分发。

## 响应

接收事件后返回 `2xx` 状态。

```http theme={"theme":{"light":"github-light","dark":"github-dark"}}
HTTP/1.1 200 OK
```

<Note>有关端点设置、签名验证及重试机制的详细信息，请参阅[配置 Webhook](/zh/api-reference/guides/api-fundamentals/configure-webhooks)。</Note>

<br />

<br />

当用户恢复订阅您发送的 WhatsApp 消息时触发。Webhook 负载中包含用户的手机号信息及订阅时间。

## 联系人退订删除示例

### 请求

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "id": "evt_68f8886903683f3481f9707b",
  "type": "contact.unsubscribe.deleted",
  "apiVersion": "v2",
  "createTime": "2025-10-22T07:31:53.872Z",
  "unsubscriberChanged": {
    "id": "68f888692abba5779b565928",
    "phoneNumber": "+8615166662222",
    "source": "API",
    "updateTime": "2025-10-22T07:31:53.864Z"
  }
}
```

### 响应

持久化接收事件后确认投递。

```http theme={"theme":{"light":"github-light","dark":"github-dark"}}
HTTP/1.1 200 OK
```

### 说明

* `unsubscriberChanged` 对象包含用户的手机号信息和订阅时间。

<br />


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.