{"service":"Agent Tools","endpoint":"/v1/funnel/analyze","method":"POST","content_type":"application/json","inputSchema":{"type":"object","required":["steps","events"],"properties":{"steps":{"type":"array","minItems":2,"maxItems":20,"items":{"type":"string"},"description":"Step names in the order they are meant to happen. Each name once."},"events":{"type":"array","minItems":1,"maxItems":4000,"description":"Each event needs user_id, step and a timestamp (time_unix_s in seconds since 1970, or time as ISO 8601). Optional: segment. Events whose step is not in steps are counted in events_outside_funnel and otherwise left alone. The service caps the whole request body at 256 KB, so long records reach that limit before maxItems."},"window_s":{"type":"integer","minimum":1,"maximum":31536000,"default":604800,"description":"How long a user has, from the first step on, to reach the later ones."},"strict_order":{"type":"boolean","default":true,"description":"true requires each step to happen at or after the previous one. false only requires that it happened inside the window."},"compare_segments":{"type":"boolean","default":true,"description":"Break the funnel down by segment and test the segments against the largest one."},"confidence_level":{"type":"number","minimum":0.5,"maximum":0.9999,"default":0.95},"max_segments":{"type":"integer","minimum":2,"maximum":20,"default":8,"description":"How many segments are reported, largest first."}}},"requestExample":{"steps":["view","cart","checkout","purchase"],"events":[{"user_id":"u1","step":"view","time_unix_s":1786000000,"segment":"eu"},{"user_id":"u1","step":"cart","time_unix_s":1786000120,"segment":"eu"},{"user_id":"u1","step":"checkout","time_unix_s":1786000420,"segment":"eu"},{"user_id":"u1","step":"purchase","time_unix_s":1786000900,"segment":"eu"},{"user_id":"u2","step":"view","time_unix_s":1786000010,"segment":"us"},{"user_id":"u2","step":"cart","time_unix_s":1786000200,"segment":"us"},{"user_id":"u3","step":"view","time_unix_s":1786000020,"segment":"us"}],"window_s":604800},"operations":[{"method":"POST","inputSchema":{"type":"object","required":["steps","events"],"properties":{"steps":{"type":"array","minItems":2,"maxItems":20,"items":{"type":"string"},"description":"Step names in the order they are meant to happen. Each name once."},"events":{"type":"array","minItems":1,"maxItems":4000,"description":"Each event needs user_id, step and a timestamp (time_unix_s in seconds since 1970, or time as ISO 8601). Optional: segment. Events whose step is not in steps are counted in events_outside_funnel and otherwise left alone. The service caps the whole request body at 256 KB, so long records reach that limit before maxItems."},"window_s":{"type":"integer","minimum":1,"maximum":31536000,"default":604800,"description":"How long a user has, from the first step on, to reach the later ones."},"strict_order":{"type":"boolean","default":true,"description":"true requires each step to happen at or after the previous one. false only requires that it happened inside the window."},"compare_segments":{"type":"boolean","default":true,"description":"Break the funnel down by segment and test the segments against the largest one."},"confidence_level":{"type":"number","minimum":0.5,"maximum":0.9999,"default":0.95},"max_segments":{"type":"integer","minimum":2,"maximum":20,"default":8,"description":"How many segments are reported, largest first."}}},"requestExample":{"steps":["view","cart","checkout","purchase"],"events":[{"user_id":"u1","step":"view","time_unix_s":1786000000,"segment":"eu"},{"user_id":"u1","step":"cart","time_unix_s":1786000120,"segment":"eu"},{"user_id":"u1","step":"checkout","time_unix_s":1786000420,"segment":"eu"},{"user_id":"u1","step":"purchase","time_unix_s":1786000900,"segment":"eu"},{"user_id":"u2","step":"view","time_unix_s":1786000010,"segment":"us"},{"user_id":"u2","step":"cart","time_unix_s":1786000200,"segment":"us"},{"user_id":"u3","step":"view","time_unix_s":1786000020,"segment":"us"}],"window_s":604800}}]}