{"slug":"tools-halowerk-com-v1-cohort-retention-dc2765","title":"Builds the cohort table from the events you pass","host":"tools.halowerk.com","method":"POST","resource":"https://tools.halowerk.com/v1/cohort/retention","category":"other","description":"Builds the cohort table from the events you pass: users grouped by the period of their first event, counted again in each following period. Returns the table per cohort, a retention curve across all cohorts, and, where events carry a value, cumulative value and value per user. The curve counts only ","price_listed":0.002,"price_asked":0.002,"state":"answering","state_label":"Answering","checks_7d":1,"answered_7d":1,"latency_ms_median":903,"reported_calls_30d":3,"reported_payers_30d":3,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"events":[{"time_unix_s":1785110400,"type":"order","user_id":"u1","value":19.9},{"time_unix_s":1785715200,"type":"order","user_id":"u1","value":24.5},{"time_unix_s":1785110400,"type":"order","user_id":"u2","value":12},{"time_unix_s":1785715200,"type":"order","user_id":"u3","value":30}],"period":"week","periods":3},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"properties":{"activation_type":{"description":"If set, only events of this type put a user into a cohort. Without it the first event of any type counts.","maxLength":120,"type":"string"},"events":{"description":"Each event needs user_id and a timestamp (time_unix_s in seconds since 1970, or time as ISO 8601). Optional: type and value. Any other field name is rejected rather than guessed. The service caps the whole request body at 256 KB, so long records reach that limit before maxItems.","maxItems":4000,"minItems":1,"type":"array"},"period":{"default":"week","enum":["day","week","month"],"type":"string"},"periods":{"default":12,"description":"How many periods the table runs, period 0 being the entry period.","maximum":52,"minimum":1,"type":"integer"},"retention_types":{"description":"If set, only events of these types count as being active. Without it every event counts.","items":{"type":"string"},"maxItems":50,"type":"array"},"timezone_offset_s":{"default":0,"description":"Offset from UTC in seconds used to place period boundaries.","maximum":50400,"minimum":-50400,"type":"integer"},"week_start":{"default":"monday","enum":["monday","sunday"],"type":"string"}},"required":["events"],"type":"object"},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-10-10","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":true,"latency_ms":903,"error":null}],"description_full":"Builds the cohort table from the events you pass: users grouped by the period of their first event, counted again in each following period. Returns the table per cohort, a retention curve across all cohorts, and, where events carry a value, cumulative value and value per user. The curve counts only cohorts old enough for a given period, so a young cohort is not scored as churn. Day, week and month are real calendar periods. Nothing is fetched, nothing is stored.","last_updated":"2026-10-08T05:56:00.774Z","schemes":["exact"]}