Skip to main content
API-enabled organizations receive webhooks instead of email when Insta Swaps change state. Manage endpoints in the app (Developer → Webhooks) or via 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

When 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:
Compare to X-YPH-Signature (strip the sha256= prefix). Use constant-time comparison in production.
Reject requests with invalid signatures. The secret is only returned at endpoint creation.

List and delete

Delivery history: GET /webhooks/{id}/deliveries.

Retries

Failed deliveries are retried with exponential backoff (up to 3 attempts). Check last_error in delivery records for debugging.