Webhooks API

Receive real-time notifications when events occur on your account.

Create Webhook

curl -X POST https://api.pulserun.dev/v1/webhooks \
  -H "Authorization: Bearer pr_live_xxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://your-server.com/webhooks/pulserun",
    "events": ["instance.started", "instance.stopped", "instance.terminated", "balance.low", "spot.preempted", "migration.started"]
  }'

Supported Events

EventDescription
instance.startedInstance is running
instance.stoppedInstance was stopped
instance.terminatedInstance was terminated
balance.lowBalance dropped below threshold
spot.preemptedSpot instance was interrupted
migration.startedAuto-migration initiated (Phase 3)

List Webhooks

curl https://api.pulserun.dev/v1/webhooks \
  -H "Authorization: Bearer pr_live_xxxxxxxxxxxxx"

Delete Webhook

curl -X DELETE https://api.pulserun.dev/v1/webhooks/{id} \
  -H "Authorization: Bearer pr_live_xxxxxxxxxxxxx"

Webhook Payload

Each webhook delivery includes:

  • event — Event type
  • data — Event-specific payload
  • timestamp — ISO 8601 timestamp
  • signature — HMAC-SHA256 signature using your webhook secret

Verify the signature to ensure authenticity.