Skip to content

웹훅 목록

GET /v1/webhooks

인증된 사용자의 모든 활성 웹훅을 조회합니다. 응답에는 서명 시크릿이 포함되지 않습니다 -- 식별 및 관리를 위한 메타데이터만 포함됩니다.

사용해 보기

이 엔드포인트를 Swagger UI에서 대화형으로 테스트할 수 있습니다.

인증 필요

Authorization 헤더에 API 키를 포함하세요.

요청

헤더

헤더필수
AuthorizationBearer <token>

이 엔드포인트는 쿼리 파라미터나 요청 본문이 필요하지 않습니다.

코드 예제

bash
curl https://api.docmap.io/v1/webhooks \
  -H "Authorization: Bearer dm_live_abc123def456ghi789jkl012mno345"
typescript
const apiKey = process.env.DOCMAP_API_KEY

const response = await fetch('https://api.docmap.io/v1/webhooks', {
  headers: { 'Authorization': `Bearer ${apiKey}` },
})

const { data } = await response.json()

for (const webhook of data) {
  console.log(`${webhook.url} — events: ${webhook.events.join(', ')}`)
}
python
import requests

api_key = "dm_live_abc123def456ghi789jkl012mno345"

response = requests.get(
    "https://api.docmap.io/v1/webhooks",
    headers={"Authorization": f"Bearer {api_key}"},
)

webhooks = response.json()["data"]

for webhook in webhooks:
    events = ", ".join(webhook["events"])
    print(f"{webhook['url']} — events: {events}")

응답

상태: 200 OK

응답 본문은 웹훅 메타데이터 객체의 data 배열을 포함합니다.

필드

배열의 각 객체에는 다음이 포함됩니다:

필드타입설명
idstring웹훅의 고유 식별자.
userIdstring웹훅을 소유한 사용자의 ID.
urlstring등록된 엔드포인트 URL.
eventsstring[]웹훅이 구독한 이벤트.
activeboolean웹훅이 활성 상태인지 여부. 이 응답에서는 항상 true.
createdAtstring웹훅이 생성된 ISO 8601 타임스탬프.

예시

json
{
  "data": [
    {
      "id": "webhook-abc123def456",
      "userId": "uid_a1b2c3d4e5f6",
      "url": "https://your-app.com/webhooks/docmap",
      "events": ["extraction.completed", "extraction.failed"],
      "active": true,
      "createdAt": "2025-01-15T10:00:00.000Z"
    },
    {
      "id": "webhook-xyz789uvw012",
      "userId": "uid_a1b2c3d4e5f6",
      "url": "https://slack-webhook.example.com/docmap",
      "events": ["extraction.failed"],
      "active": true,
      "createdAt": "2025-01-10T08:00:00.000Z"
    }
  ]
}

오류

상태코드설명
401UNAUTHORIZED누락, 유효하지 않거나 만료된 API 키 / 토큰.

DocMap API 문서