Developer documentation

REST examples

Server integrations use bearer keys and JSON. Keep server keys out of browsers, email links, and logs.

curl

Replace the sample benefit and recipient with values from your application. Keep the claim and idempotency key stable across recovery retries.

curl https://veltor.dev/v1/evaluations \
  -H "Authorization: Bearer $VELTOR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: attempt_customer_123" \
  --data '{
  "benefit": "signup_credits",
  "claim_id": "signup_customer_123",
  "subject": {
    "external_id": "customer_123",
    "email": "alex@example.com",
    "email_verified": true
  },
  "context": {"ip": "192.0.2.10"}
}'

Python

Handle transport and HTTP errors separately from a successful allow-or-deny result. Your code chooses what either evaluation does.

import os, requests
response = requests.post(
    "https://veltor.dev/v1/evaluations",
    headers={"Authorization": "Bearer " + os.environ["VELTOR_SECRET_KEY"],
             "Idempotency-Key": "attempt_customer_123"},
    json={
  "benefit": "signup_credits",
  "claim_id": "signup_customer_123",
  "subject": {
    "external_id": "customer_123",
    "email": "alex@example.com",
    "email_verified": true
  },
  "context": {"ip": "192.0.2.10"}
}, timeout=1.8
)
response.raise_for_status()
evaluation = response.json()

OpenAPI

Download the generated OpenAPI contract for supported fields, strict request bodies, response headers, and limits. Removed and unknown fields are rejected.