Integration guides

Idempotency

Send an Idempotency-Key so a retried submission never starts a second request.

Network calls fail in ways that leave you unsure whether a request went through. Send an Idempotency-Key header on POST /questions, and a retry is always safe.

  • Same key and same body: returns the original request instead of creating a new one.
  • Same key with a different body: returns 409 idempotency_conflict.
  • Keys are kept for 24 hours.

Choosing a key

Derive the key from something stable in your own system, such as your record ID plus the question, rather than generating a new random value on each attempt. A new key on every retry defeats the purpose.

Headers

Idempotency-KeystringOptional#
Recommended on POST /questions. Kept for 24 hours.

Next

Rate limits →

Submit with a keybash
curl -X POST https://api.synquery.com/v0/questions \
  -H "x-api-key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: memo-ortho-2026-q4-robotic-share" \
  -d '{"preset": "market_read", "question": "What share of total knee replacements at US hospitals now use robotic assistance?"}'
Same key, different body · 409json
{
  "error": {
    "code": "idempotency_conflict",
    "message": "Same Idempotency-Key with a different body"
  }
}