API reference
Tally is a small HTTP API that stores per-row scores and answers ranking questions.
Tally stores numeric scores keyed by (scope_key, rule_key, row_key) and exposes ranking, percentile, and top-N queries.
- Idempotent ingest by composite key — re-runs are safe.
- Server-side ranking via Postgres window functions.
- Four tie-resolution policies.
- Per-row TTLs with automatic cleanup.
scope — a logical bucket (campaign, table, project). Auto-created on first ingest.
rule — a named scoring dimension within a scope (e.g. intent_score). Auto-created on first ingest.
row_key — caller-supplied identifier (lead id, account domain, Clay row id).
/utils/echo — returns the JSON body verbatim. Handy for sanity-checking a Clay column or webhook payload.
/utils/stash — POST a JSON payload with a TTL, get back a UUID; GET it later by id. Useful for handing data between Clay steps or async webhooks.
/utils/run — execute a small JS snippet inside a QuickJS WASM sandbox over an input you provide. No network, env, or DB access.
/utils/current-time — current UTC time as ISO + Unix timestamps.
/utils/render — render a Jinja/Nunjucks HTML template against a JSON data context. Accepts inline template or a stash id.
All utility endpoints require a workspace API key.
Bulk ingest: up to 1,000 rows per request (413 above).
Leaderboard: max 1,000 rows per page (keyset pagination).
Rate limiting: not enforced in v1 — please be reasonable.
