向当前 Webhook 发送一次 webhook.test POST 请求,回调地址返回 2xx 后才返回成功。请求体为空。测试不重试,不保存投递记录,不影响连续失败计数。3xx 或安全校验失败仍会按安全规则禁用当前 Webhook。
前提
已完成 Endpoint 与鉴权配置,详见API 总览与认证。
接口
POST /webhook_endpoints/{id}/test
路径参数
| 参数 | 必填 | 类型 | 说明 |
|---|---|---|---|
id | 是 | string | Webhook ID,格式 wep_<ULID> |
请求示例
响应
响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 event |
id | string | 事件 ID,格式 whe_<ULID> |
created_at | string | 事件创建时间,ISO 8601 |
data | object | 事件载荷 |
data.id | string | Webhook ID |
data.type | string | 固定为 webhook.test |
data.workspace_id | string | 工作空间 ID |
request_id | string | 本次请求的唯一标识,排查问题时附带 |
错误码
| 状态码 | 错误码 | 说明 |
|---|---|---|
| 404 | 11800001 | webhook not found |
| 409 | — | Webhook 未启用 |
| 502 | 11800015 | Webhook endpoint returned HTTP 408, response body: request timeout |