Skip to main content
Webhooks push event notifications to your server when jobs complete, inputs are ready, or other events occur. Unlike WebSockets, webhooks don’t require a persistent connection.

Creating a Webhook

The webhook secret is only returned when creating the webhook or rotating the secret. Store it securely - you’ll need it to verify signatures.

Event Types

Webhook Payload

Signature Verification

All webhooks are signed with HMAC-SHA256. Always verify signatures to ensure requests are from ComfyUI Cloud.

Headers

Python Verification

Parse and Verify Together

Manual Verification

The signature is computed as:
Example in Python without the SDK:

Managing Webhooks

List Webhooks

Rotate Secret

If your secret is compromised:

Delete Webhook

Retry Policy

Failed deliveries are retried with exponential backoff: Webhooks are considered failed if:
  • Your server returns a non-2xx status code
  • Connection timeout (30 seconds)
  • DNS resolution fails

Best Practices

Never trust webhook payloads without verifying the signature. This prevents attackers from spoofing events.
Return a 2xx response within 30 seconds. Do heavy processing asynchronously after acknowledging receipt.
Use delivery_id to deduplicate. Retries may cause the same event to be delivered multiple times.
Always use HTTPS endpoints. HTTP webhooks are rejected in production.

Per-Job Webhooks

You can also specify a webhook URL when creating a job:
This webhook receives events only for that specific job, using your account’s default webhook secret.