コンテンツへスキップ
会nokai.studio

Webhook endpoints

Auth: Authorization: Bearer zpk_... が必要です。


GET /v1/webhook-endpoints

登録済みのすべてのエンドポイントを一覧します。

レスポンス 200

{
  "data": [
    {
      "id": "endpoint_uuid",
      "customer_id": "cust_uuid",
      "url": "https://yourapp.com/webhooks/kinokai",
      "events": ["job.completed", "job.failed"],
      "enabled": true,
      "has_custom_signing_secret": false,
      "provider_filter": null,
      "created_at": "2026-05-01T00:00:00Z",
      "updated_at": "2026-05-01T00:00:00Z"
    }
  ]
}

POST /v1/webhook-endpoints

新しいエンドポイントを登録します。

リクエストボディ

{
  "url": "https://yourapp.com/webhooks/kinokai",
  "events": ["job.completed", "job.failed"],
  "enabled": true,
  "signing_secret": "my-custom-secret-min-16-chars",
  "provider_filter": null
}
フィールド型必須備考
urlstring (HTTPS URL)はいパブリック DNS のみ。ループバック/プライベート IP は拒否されます。
eventsstring[]はい次のいずれか: job.completed、job.failed、credits.low_balance、credits.topped_up。
enabledbooleanいいえデフォルト true。
signing_secretstringいいえ16-255 文字。省略すると自動生成されます。
provider_filterstring または nullいいえこの生成プロバイダのイベントのみを受信します。

レスポンス 201

作成されたエンドポイントオブジェクトを返します(シークレットを指定した場合は has_custom_signing_secret: true)。


PATCH /v1/webhook-endpoints/:id

エンドポイントを更新します。

パスパラメータ

id -- エンドポイントの UUID。

リクエストボディ(すべてのフィールドは任意)

{
  "url": "https://yourapp.com/webhooks/v2",
  "events": ["job.completed", "job.failed", "credits.low_balance"],
  "enabled": true,
  "signing_secret": "new-secret-min-16-chars",
  "provider_filter": null
}

自動生成されたシークレットにリセットするには signing_secret: null を渡してください。

レスポンス 200

更新されたエンドポイントオブジェクトを返します。


DELETE /v1/webhook-endpoints/:id

エンドポイントを削除します。204 No Content を返します。


配信履歴

Webhook deliveries を参照してください。