POST /webhooks.
Events
Webhook events ≠ Insta Swap
status. A swap moves through many pipeline states (QUEUED, ASSIGNED, RENDERING, PENDING_APPROVAL, COMPLETED, FAILED, EXPIRED, CANCELLED) visible on GET /insta-swaps/{id}. Public webhooks only fire at three integration milestones — queued, completed, and failed — so partners are not flooded with intermediate GPU/render updates. Mid-flight progress is for polling, not subscription.Create an endpoint
verify is true (default), YPH sends webhook.test before saving. Your URL must respond with HTTP 2xx.
On success, the response includes a signing secret (shown once):
Payload shape
Verify signatures
Each delivery includes:
Compute the signature:
X-YPH-Signature (strip the sha256= prefix). Use constant-time comparison in production.
List and delete
GET /webhooks/{id}/deliveries.
Retries
Failed deliveries are retried with exponential backoff (up to 3 attempts). Checklast_error in delivery records for debugging.