删除 Smart Report
删除属于已认证客户的 SmartReport 记录。成功后,API 会在 { "data": ... } 中返回被删除的 SmartReport 文档。
如果报告 ID 不存在或属于其他客户,该端点会返回 404 Not Found({ "message": "not_found", "code": "NotFound" })。删除报告只会移除 SmartReport 文档,不会删除底层的 SmartBatch 核验数据。
端点
DELETE https://api.verifik.co/v2/smart-reports/{id}
使用你自己的每客户 Authorization: Bearer <VERIFIK_JWT>,也可通过 Smart-Agent 代理地址 https://ai.verifik.co/v2/smart-reports/{id} 访问此端点。共享 x402 执行会被拦截并返回 403 Forbidden。
请求头
| 名称 | 值 | 说明 |
|---|---|---|
Content-Type | application/json | 请求体负载格式。 |
Authorization | Bearer <VERIFIK_JWT> | 客户作用域 JWT(authUser.clientId)。 |
参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
id | string | 是 | 要删除的 SmartReport ObjectId。 |
请求示例
- Node.js
- PHP
- Python
- Go
- cURL
import axios from "axios";
const run = async () => {
const id = "6801a2b3c4d5e6f7a8b9c0d1";
const { data } = await axios.delete(`https://api.verifik.co/v2/smart-reports/${id}`, {
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_JWT}`,
},
});
console.log(data);
};
run();
<?php
$id = "6801a2b3c4d5e6f7a8b9c0d1";
$ch = curl_init("https://api.verifik.co/v2/smart-reports/" . $id);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json",
"Authorization: Bearer " . getenv("VERIFIK_JWT"),
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import os
import requests
report_id = "6801a2b3c4d5e6f7a8b9c0d1"
url = f"https://api.verifik.co/v2/smart-reports/{report_id}"
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {os.getenv('VERIFIK_JWT')}",
}
response = requests.delete(url, headers=headers)
print(response.json())
package main
import (
"encoding/json"
"fmt"
"net/http"
"os"
)
func main() {
id := "6801a2b3c4d5e6f7a8b9c0d1"
req, _ := http.NewRequest("DELETE", "https://api.verifik.co/v2/smart-reports/"+id, nil)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+os.Getenv("VERIFIK_JWT"))
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
var out map[string]interface{}
json.NewDecoder(resp.Body).Decode(&out)
fmt.Println(out)
}
curl -X DELETE "https://api.verifik.co/v2/smart-reports/6801a2b3c4d5e6f7a8b9c0d1" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $VERIFIK_JWT"
响应示例
- 200 OK
- 401
- 403
- 404
- 409
- 422
{
"data": {
"_id": "6801a2b3c4d5e6f7a8b9c0d1",
"template": "6801a2b3c4d5e6f7a8b9c0d2",
"smartBatch": "6801a2b3c4d5e6f7a8b9c0d3",
"name": "Background Check - Applicant 42",
"status": "generated",
"externalRefId": "applicant-42",
"rowIndex": 0,
"createdByChannel": "api",
"createdAt": "2026-11-24T20:00:00.000Z",
"updatedAt": "2026-11-24T20:00:04.000Z"
}
}
{
"message": "Unauthorized",
"code": "Unauthorized"
}
{
"message": "Shared x402 execution is forbidden on this endpoint",
"code": "Forbidden"
}
{
"message": "not_found",
"code": "NotFound"
}
{
"message": "\"id\" must be a valid ObjectId",
"code": "MissingParameter"
}
{
"message": "UnprocessableEntity",
"code": "UnprocessableEntity"
}
注意事项
- 后续对
GET /v2/smart-reports/{id}的调用会返回{ "data": null },而PUT、DELETE、/generate、/download、/html和/send-email会返回404(not_found)。 - 删除
SmartReport不会触发报告投递或生成类的 Webhook;有关生命周期自动化的详细信息,请参阅 SmartReports Webhooks 与 MCP 与 AI 智能体。