WEBHOOK
/
query
/
completed
{
  "query": "<string>",
  "trace_id": "<string>",
  "savings": 123,
  "duration_ms": 123
}

Isofold can send a webhook to your system after each query completes execution.

This is useful for:

  • Tracking per-query savings
  • Auditing rewritten queries
  • Updating internal cost dashboards

Trigger

The webhook fires after:

  • A query is received via /query
  • It is rewritten (if possible)
  • It has finished executing

Payload

{
  "query": "SELECT * FROM users",
  "trace_id": "abc123",
  "savings": 0.18,
  "duration_ms": 114
}

Fields

FieldTypeDescription
querystringThe original query submitted
trace_idstringThe unique identifier for this query run
savingsnumberEstimated USD savings from optimization
duration_msnumberTime taken to execute the query

Setup

To enable this webhook:

  1. Go to the Team Settings in the Isofold Dashboard
  2. Add your webhook endpoint URL
  3. Optionally include an HMAC signing secret

Webhook retries on failure with exponential backoff.


Security

  • Webhooks include an X-Isofold-Signature header
  • You can verify integrity with your shared secret using HMAC-SHA256
X-Isofold-Signature: t=1699987200,v1=abc123...

Want to listen for failed or skipped queries too? Contact support@isofold.com.

Body

application/json

Response

200

Webhook accepted