Smart Report 수정
인증된 클라이언트에 속한 기존 SmartReport를 수정합니다. 변경하려는 필드만 전송하세요. 요청에서 생략된 필드는 기존 값을 유지합니다.
리포트 ID가 존재하지 않거나 다른 클라이언트에 속한 경우, 이 엔드포인트는 404 Not Found({ "message": "not_found", "code": "NotFound" })를 반환합니다.
엔드포인트
PUT 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. |
요청 본문
모든 본문 필드는 선택 사항입니다. 업데이트하려는 속성만 제공하세요.
| 이름 | 타입 | 필수 | 설명 |
|---|---|---|---|
name | string | 아니요 | 리포트 표시 이름. |
status | string | 아니요 | 리포트 상태: "draft", "generating", "generated", "sent" 또는 "failed". |
pdfUrl | string | 아니요 | 생성된 PDF 아티팩트의 저장 URL. |
pdfSize | number | 아니요 | 생성된 PDF 크기(바이트). |
htmlSnapshot | string | 아니요 | 렌더링된 리포트의 저장된 HTML 스냅샷. |
pageCount | number | 아니요 | 생성된 PDF의 페이지 수. |
pdfEngine | string | 아니요 | 렌더링 엔진: "pdfkit" 또는 "puppeteer". |
generatedAt | string | 아니요 | 리포트가 생성된 ISO 8601 타임스탬프. |
generationDurationMs | number | 아니요 | PDF 생성 소요 시간(밀리초). |
dataSnapshot | object | 아니요 | 리포트에 사용된 행 또는 입력 데이터 스냅샷. |
externalRefId | string | 아니요 | 호출자 상관관계 식별자. |
webhookUrl | string | 아니요 | 리포트별 http 또는 https 웹훅 재정의 URL. |
rowIndex | number | 아니요 | 이 리포트와 연결된 0부터 시작하는 행 인덱스. |
createdByChannel | string | 아니요 | 발생 채널: "portal", "api", "mcp", "x402" 또는 "webhook". |
verificationScoreSummary | object | 아니요 | 검증 점수 계산의 요약 메타데이터. |
error | object 또는 string | 아니요 | 실패 상태에 기록된 오류 페이로드 또는 메시지. |
요청
- Node.js
- PHP
- Python
- Go
- cURL
import axios from "axios";
const run = async () => {
const id = "6801a2b3c4d5e6f7a8b9c0d1";
const { data } = await axios.put(
`https://api.verifik.co/v2/smart-reports/${id}`,
{
name: "Background Check - Applicant 42 (Reviewed)",
externalRefId: "applicant-42-v2",
webhookUrl: "https://webhooks.example.com/verifik",
},
{
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, "PUT");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json",
"Authorization: Bearer " . getenv("VERIFIK_JWT"),
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
"name" => "Background Check - Applicant 42 (Reviewed)",
"externalRefId" => "applicant-42-v2",
"webhookUrl" => "https://webhooks.example.com/verifik",
]));
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')}",
}
payload = {
"name": "Background Check - Applicant 42 (Reviewed)",
"externalRefId": "applicant-42-v2",
"webhookUrl": "https://webhooks.example.com/verifik",
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"os"
)
func main() {
id := "6801a2b3c4d5e6f7a8b9c0d1"
body, _ := json.Marshal(map[string]interface{}{
"name": "Background Check - Applicant 42 (Reviewed)",
"externalRefId": "applicant-42-v2",
"webhookUrl": "https://webhooks.example.com/verifik",
})
req, _ := http.NewRequest("PUT", "https://api.verifik.co/v2/smart-reports/"+id, bytes.NewReader(body))
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 PUT "https://api.verifik.co/v2/smart-reports/6801a2b3c4d5e6f7a8b9c0d1" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $VERIFIK_JWT" \
-d '{
"name": "Background Check - Applicant 42 (Reviewed)",
"externalRefId": "applicant-42-v2",
"webhookUrl": "https://webhooks.example.com/verifik"
}'
응답
- 200 OK
- 401
- 403
- 404
- 409
- 422
{
"data": {
"_id": "6801a2b3c4d5e6f7a8b9c0d1",
"template": "6801a2b3c4d5e6f7a8b9c0d2",
"smartBatch": "6801a2b3c4d5e6f7a8b9c0d3",
"name": "Background Check - Applicant 42 (Reviewed)",
"status": "generated",
"externalRefId": "applicant-42-v2",
"webhookUrl": "https://webhooks.example.com/verifik",
"rowIndex": 0,
"createdByChannel": "api",
"createdAt": "2026-11-24T20:00:00.000Z",
"updatedAt": "2026-11-24T20:05:00.000Z"
}
}
{
"message": "Unauthorized",
"code": "Unauthorized"
}
{
"message": "Shared x402 execution is forbidden on this endpoint",
"code": "Forbidden"
}
{
"message": "not_found",
"code": "NotFound"
}
{
"message": "\"status\" must be one of [draft, generating, generated, sent, failed]",
"code": "MissingParameter"
}
{
"message": "UnprocessableEntity",
"code": "UnprocessableEntity"
}
웹훅 및 MCP 연동
webhookUrl또는externalRefId를 수정하면 후속 Smart Report PDF 생성 및 이메일로 Smart Report 전송 호출에 사용되는 대상 콜백 URL 및 상관관계 ID가 함께 업데이트됩니다. SmartReports 웹훅을 참조하세요.- AI 에이전트를 통해 수정된 레코드를 확인하거나 헤드리스 리포트 작업을 실행하려면 MCP 및 AI 에이전트를 참조하세요.
참고 사항
SmartReport를 수정하면 저장된 리포트 필드만 업데이트되며, PDF를 자동으로 재생성하거나 이메일을 발송하지는 않습니다. 다시 렌더링하거나 전달하려면 Smart Report PDF 생성 또는 이메일로 Smart Report 전송을 호출하세요.