Skip to main content
POST
/
query
/
completed
{}
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 [email protected].

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
query
string
trace_id
string
savings
number
duration_ms
number

Response

200

Webhook accepted