메인 콘텐츠로 건너뛰기
POST
/
api
/
v1
/
webhooks
Create Webhook
curl --request POST \
  --url https://api.agentwallex.com/api/v1/webhooks \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "url": "https://your-app.com/webhooks/agentwallex",
  "events": [
    "payment.completed",
    "payment.failed",
    "policy.violated"
  ],
  "secret": "whsec_your_signing_secret"
}
'
{
  "id": "whk_abc123",
  "url": "https://your-app.com/webhooks/agentwallex",
  "events": [
    "payment.completed",
    "payment.failed",
    "policy.violated"
  ],
  "status": "active",
  "created_at": "2025-06-01T10:00:00Z"
}
HTTP POST를 통해 실시간 이벤트 알림을 수신하기 위한 새 Webhook 엔드포인트를 등록합니다.

요청 본문

url
string
필수
Webhook 이벤트를 수신할 HTTPS URL.
events
string[]
필수
구독할 이벤트 유형 목록. 사용 가능한 이벤트 유형은 Webhooks를 참조하십시오.
secret
string
필수
Webhook 페이로드를 검증하기 위한 서명 시크릿. whsec_로 시작해야 합니다.

예시

curl -X POST https://api.agentwallex.com/api/v1/webhooks \
  -H "X-API-Key: awx_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://your-app.com/webhooks/agentwallex",
    "events": ["payment.completed", "payment.failed", "policy.violated"],
    "secret": "whsec_your_signing_secret"
  }'
Response
{
  "id": "whk_abc123",
  "url": "https://your-app.com/webhooks/agentwallex",
  "events": ["payment.completed", "payment.failed", "policy.violated"],
  "status": "active",
  "created_at": "2025-06-01T10:00:00Z"
}

인증

X-API-Key
string
header
필수

API key authentication. Keys are prefixed with awx_.

본문

application/json
url
string<uri>
필수

The HTTPS URL that will receive webhook events.

events
string[]
필수

List of event types to subscribe to (e.g., payment.completed, payment.failed, policy.violated).

secret
string
필수

Signing secret used to verify webhook payloads. Must start with whsec_.

응답

Webhook created successfully.

A registered webhook endpoint for receiving real-time event notifications.

id
string

Unique webhook identifier (e.g., whk_abc123).

url
string<uri>

HTTPS URL that receives webhook events.

events
string[]

List of subscribed event types.

status
enum<string>

Webhook status.

사용 가능한 옵션:
active,
inactive
created_at
string<date-time>

ISO 8601 creation timestamp.