웹훅 엔드포인트로 테스트 이벤트 전송

POST /v1/webhook-endpoints/{endpoint_id}:test · 권한 webhook-endpoints:write · 모든 요금제

선택한 유형(기본값 user.created)의 서명된 합성 이벤트 하나를 엔드포인트로 보내고 결과를 반환합니다. 이벤트에는 data.test = true가 포함되며, 실제 전송과 마찬가지로 엔드포인트의 현재 비밀 값으로 서명되므로 서명 검증을 확인할 수 있습니다. 전송 기록은 저장되지 않으며 수신자의 응답 본문은 반환되지 않습니다. 엔드포인트당 분당 10회까지 테스트할 수 있습니다.

요청

필드 유형 필수 설명
endpoint_id path 예 웹훅 엔드포인트 ID(whe_…).
event_type string 아니요 전송할 이벤트 카탈로그 유형. 기본값은 user.created입니다. 본문은 선택 사항입니다.
Idempotency-Key header 아니요 같은 키로 반복된 요청에 대해 결과를 재생합니다.
{
  "event_type": "user.updated"
}

응답

200 OK와 결과입니다. 전송에 실패해도 응답은 200입니다. 이때 succeeded는 false이며, error_class에 이유가 표시됩니다(timeout, tls, dns, egress_blocked, http_status, connection).

{
  "succeeded": true,
  "http_status": 204,
  "error_class": null,
  "latency_ms": 87,
  "event_id": "evt_01k8a3m7s9v1w3x5y7z9b2c4d6"
}

오류

HTTP code 조건
400 unknown_field 본문에 위에 나열되지 않은 필드가 있습니다.
404 not_found 이 환경에 해당 엔드포인트가 없습니다.
409 conflict 엔드포인트가 enabled 상태가 아닙니다.
422 validation_failed /event_type unknown_event_type: 카탈로그 유형이 아닙니다.
429 rate_limited 이 엔드포인트에 대해 분당 10회를 초과하여 테스트했습니다. Retry-After 이후에 다시 시도하십시오.
401 unauthenticated 자격 증명이 없거나 잘못되었거나 취소되었습니다.
403 insufficient_permissions 자격 증명에 webhook-endpoints:write 권한이 없습니다.
503 service_unavailable 웹훅 관리 기능을 일시적으로 사용할 수 없습니다. Retry-After 기간 이후에 다시 시도하십시오.

예제

curl -X POST https://api.eu.keenauth.com/v1/webhook-endpoints/whe_01k8a3m5q7t9v1w3x5y7z9b2c4:test \
  -H "Authorization: Bearer $KEENAUTH_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"event_type":"user.updated"}'

CLI: keenauth webhook-endpoints test whe_01k8a3m5q7t9v1w3x5y7z9b2c4 --event-type user.updated