Preview. The API is shared with design partners and may change before launch. Register interest for sandbox access.
Webhook endpoints
A webhook endpoint is a URL on your server that Phew sends events to. Each endpoint subscribes to the event types you choose and has its own signing secret or key.
Delivery
Section titled “Delivery”- Phew sends a
POSTwith a JSON event body and waits up to 10 seconds for a2xx. - Delivery is at least once. Use
Phew-Event-Idto ignore duplicates. - Events can arrive out of order. Use
created_aton the event, or retrieve the object, if order matters. - Failed deliveries are retried with exponential backoff for up to 3 days. After that the event is marked failed and can be redelivered on request.
- An endpoint that keeps failing for 3 days is disabled, and we email your technical contact.
Always verify the signature before acting on an event.
Create an endpoint
Section titled “Create an endpoint”api.getphew.com/v1/webhook_endpoints webhooks:manageRequest body
url string requiredevents array required["*"] for all.signing enum hmac_sha256 (default) or ed25519_rfc9421. See Webhook verification.
description string { "id": "whe_01JDD2G4J6L8N0Q2S4U6W8Y0A2", "object": "webhook_endpoint", "url": "https://shop.example/phew/webhooks", "events": ["policy.cancelled", "claim.resolved", "settlement.statement.created"], "signing": "hmac_sha256", "secret": "whsec_9mF2...", "status": "enabled", "created_at": "2026-10-23T14:01:12Z"}Manage endpoints
Section titled “Manage endpoints”api.getphew.com/v1/webhook_endpoints webhooks:manageapi.getphew.com/v1/webhook_endpoints/{id} webhooks:manageapi.getphew.com/v1/webhook_endpoints/{id} webhooks:manageapi.getphew.com/v1/webhook_endpoints/{id} webhooks:managePATCH accepts url, events, description and status (enabled or disabled).
Roll the secret
Section titled “Roll the secret”api.getphew.com/v1/webhook_endpoints/{id}/roll_secret webhooks:manageReturns a new secret. Optionally send expires_in (seconds, up to 7 days) to keep the old one valid in parallel;
during that time the Phew-Signature header carries a v1 signature for each.
Send a test event
Section titled “Send a test event”api.getphew.com/v1/webhook_endpoints/{id}/test webhooks:manageSends a ping event to the endpoint and returns the status code and timing of your response.