Webhook エンドポイント作成
絶対 HTTP(S) URL に Webhook を作成し、production では HTTPS を推奨します。status は active / inactive。subscribed_events は公開イベントまたは ["*"]、max_attempts は 0..5 です。
https://api.unifyport.ai/v1/webhook-endpointsヘッダー
X-Api-Keyワークスペース API キー。このヘッダーからワークスペースを特定します。
Content-TypeJSON のリクエストボディを送る場合は application/json を使用します。
パスパラメータ
このエンドポイントにパスパラメータはありません。
リクエストボディ
urlWebhook を受け取る絶対 HTTP(S) URL。production では HTTPS を推奨します。
format: uri
statusエンドポイントの状態: active または inactive。
enum: active, inactive
subscribed_events[]エンドポイントに配信される公開標準イベント種別。["*"] は公開イベントをすべて購読しますが provider.raw_event は含みません。
signing_secret任意の Webhook 署名シークレット。サンプルではプレースホルダを使用してください。
retry_policyobjectmax_attempts は初回配信後のリトライ回数です。既定 3、範囲 0〜5、0 は初回配信のみ。
retry_policymax_attempts は初回配信後のリトライ回数です。既定 3、範囲 0〜5、0 は初回配信のみ。
max_attempts初回配信後のリトライ回数(0〜5)。
レスポンスボディ
idWebhook エンドポイント識別子(we_...)。
urlWebhook 配信を受け取る絶対 HTTP(S) URL。production では HTTPS を推奨します。
format: uri
statusエンドポイントのステータス: active または inactive。
enum: active, inactive
subscribed_events[]エンドポイントに配信される公開標準イベント種別。["*"] は公開イベントをすべて意味し、provider.raw_event は含みません。
signing_enabled署名シークレットが設定され配信が署名される場合は true。
retry_policyobjectmax_attempts は初回配信後のリトライ回数で、既定 3、範囲 0〜5。
retry_policymax_attempts は初回配信後のリトライ回数で、既定 3、範囲 0〜5。
max_attempts設定済みの初回配信後リトライ回数(0〜5)。
レスポンス
201リクエスト成功。レスポンスボディの例を参照してください。
400リクエストボディ、パス、またはパラメータが不正です。
401X-Api-Key ヘッダが欠落しているか無効です。
リクエスト
curl -X POST https://api.unifyport.ai/v1/webhook-endpoints \
-H "X-Api-Key: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/webhook",
"status": "active",
"subscribed_events": ["*"],
"signing_secret": "<WEBHOOK_SIGNING_SECRET>"
}'レスポンス
{
"data": {
"id": "we_example",
"url": "https://example.com/webhook",
"status": "active",
"subscribed_events": ["*"],
"signing_enabled": true,
"retry_policy": {
"max_attempts": 3
}
}
}