웹훅 삭제
DELETE /v1/webhooks/{id}
웹훅을 즉시 삭제합니다. 삭제되면 해당 엔드포인트는 이벤트 수신을 중단합니다.
사용해 보기
이 엔드포인트를 Swagger UI에서 대화형으로 테스트할 수 있습니다.
인증 필요
Authorization 헤더에 API 키를 포함하세요.
DANGER
웹훅 삭제는 즉시 영구적으로 적용됩니다. 해당 엔드포인트는 즉시 이벤트 수신을 중단합니다. 이 작업은 되돌릴 수 없으며 -- 새 웹훅을 생성해야 합니다.
요청
헤더
| 헤더 | 값 | 필수 |
|---|---|---|
Authorization | Bearer <token> | 예 |
경로 파라미터
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
id | string | 예 | 삭제할 웹훅 ID (예: webhook-abc123def456). |
코드 예제
bash
curl -X DELETE https://api.docmap.io/v1/webhooks/webhook-abc123def456 \
-H "Authorization: Bearer dm_live_abc123def456ghi789jkl012mno345"typescript
const apiKey = process.env.DOCMAP_API_KEY
const webhookId = 'webhook-abc123def456'
const response = await fetch(
`https://api.docmap.io/v1/webhooks/${webhookId}`,
{
method: 'DELETE',
headers: { 'Authorization': `Bearer ${apiKey}` },
},
)
const result = await response.json()
console.log(result) // { success: true }python
import requests
api_key = "dm_live_abc123def456ghi789jkl012mno345"
webhook_id = "webhook-abc123def456"
response = requests.delete(
f"https://api.docmap.io/v1/webhooks/{webhook_id}",
headers={"Authorization": f"Bearer {api_key}"},
)
print(response.json()) # {"success": True}응답
상태: 200 OK
예시
json
{
"success": true
}오류
| 상태 | 코드 | 설명 |
|---|---|---|
401 | UNAUTHORIZED | 누락, 유효하지 않거나 만료된 API 키 / 토큰. |
403 | FORBIDDEN | 웹훅이 다른 사용자에게 속해 있습니다. 자신의 웹훅만 삭제할 수 있습니다. |
404 | NOT_FOUND | 지정된 ID의 웹훅을 찾을 수 없습니다. |
