API リファレンス
Webhook エンドポイントPOST

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
string必須

ワークスペース API キー。このヘッダーからワークスペースを特定します。

Content-Type
string必須

JSON のリクエストボディを送る場合は application/json を使用します。

パスパラメータ

このエンドポイントにパスパラメータはありません。

リクエストボディ

url
string必須

Webhook を受け取る絶対 HTTP(S) URL。production では HTTPS を推奨します。

format: uri

status
string必須

エンドポイントの状態: active または inactive。

enum: active, inactive

subscribed_events[]
string[]

エンドポイントに配信される公開標準イベント種別。["*"] は公開イベントをすべて購読しますが provider.raw_event は含みません。

signing_secret
string

任意の Webhook 署名シークレット。サンプルではプレースホルダを使用してください。

retry_policy
object

max_attempts は初回配信後のリトライ回数です。既定 3、範囲 0〜5、0 は初回配信のみ。

max_attempts
integer

初回配信後のリトライ回数(0〜5)。

レスポンスボディ

id
string

Webhook エンドポイント識別子(we_...)。

url
string

Webhook 配信を受け取る絶対 HTTP(S) URL。production では HTTPS を推奨します。

format: uri

status
string

エンドポイントのステータス: active または inactive。

enum: active, inactive

subscribed_events[]
string[]

エンドポイントに配信される公開標準イベント種別。["*"] は公開イベントをすべて意味し、provider.raw_event は含みません。

signing_enabled
boolean

署名シークレットが設定され配信が署名される場合は true。

retry_policy
object

max_attempts は初回配信後のリトライ回数で、既定 3、範囲 0〜5。

max_attempts
integer

設定済みの初回配信後リトライ回数(0〜5)。

レスポンス

201
201 Created

リクエスト成功。レスポンスボディの例を参照してください。

400
Bad Request

リクエストボディ、パス、またはパラメータが不正です。

401
Unauthorized

X-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
    }
  }
}