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
}| フィールド | 型 | 必須 | 備考 |
|---|---|---|---|
url | string (HTTPS URL) | はい | パブリック DNS のみ。ループバック/プライベート IP は拒否されます。 |
events | string[] | はい | 次のいずれか: job.completed、job.failed、credits.low_balance、credits.topped_up。 |
enabled | boolean | いいえ | デフォルト true。 |
signing_secret | string | いいえ | 16-255 文字。省略すると自動生成されます。 |
provider_filter | string または 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 を参照してください。